/* Tailwind CSS CDN + Custom OACS Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* ========================================
   OACS CUSTOM THEME - COLOR PALETTE
   ======================================== */
:root {
  --oacs-primary: #8B2B3E;
  --oacs-primary-dark: #6B1F2E;
  --oacs-primary-light: #A63D52;
  --oacs-black: #1A1A1A;
  --oacs-dark-gray: #2D2D2D;
  --oacs-medium-gray: #737373;
  --oacs-light-gray: #D4D4D4;
  --oacs-background: #FAFAF9;
}

/* ========================================
   OACS UTILITY CLASSES
   ======================================== */
.font-inter { font-family: 'Inter', sans-serif; }

/* Text Colors */
.text-oacs-primary { color: var(--oacs-primary) !important; }
.text-oacs-primary-dark { color: var(--oacs-primary-dark) !important; }
.text-oacs-primary-light { color: var(--oacs-primary-light) !important; }
.text-oacs-black { color: var(--oacs-black) !important; }
.text-oacs-dark-gray { color: var(--oacs-dark-gray) !important; }
.text-oacs-medium-gray { color: var(--oacs-medium-gray) !important; }
.text-oacs-light-gray { color: var(--oacs-light-gray) !important; }

/* Background Colors */
.bg-oacs-primary { background-color: var(--oacs-primary) !important; }
.bg-oacs-primary-dark { background-color: var(--oacs-primary-dark) !important; }
.bg-oacs-primary-light { background-color: var(--oacs-primary-light) !important; }
.bg-oacs-black { background-color: var(--oacs-black) !important; }
.bg-oacs-dark-gray { background-color: var(--oacs-dark-gray) !important; }
.bg-oacs-medium-gray { background-color: var(--oacs-medium-gray) !important; }
.bg-oacs-light-gray { background-color: var(--oacs-light-gray) !important; }
.bg-oacs-background { background-color: var(--oacs-background) !important; }

/* Gradient Backgrounds */
.bg-oacs-gradient { 
  background: linear-gradient(135deg, var(--oacs-black) 50%, var(--oacs-primary) 0%); 
}
.bg-oacs-gradient-text { 
  background: linear-gradient(135deg, var(--oacs-primary) 0%, var(--oacs-primary-light) 100%); 
}

/* Border Colors */
.border-oacs-primary { border-color: var(--oacs-primary) !important; }
.border-oacs-light-gray { border-color: var(--oacs-light-gray) !important; }

/* Hover States */
.hover\:text-oacs-primary:hover { color: var(--oacs-primary) !important; }
.hover\:text-oacs-primary-dark:hover { color: var(--oacs-primary-dark) !important; }
.hover\:text-oacs-primary-light:hover { color: var(--oacs-primary-light) !important; }
.hover\:bg-oacs-primary:hover { background-color: var(--oacs-primary) !important; }
.hover\:bg-oacs-primary-dark:hover { background-color: var(--oacs-primary-dark) !important; }

/* ========================================
   RESPONSIVE TYPOGRAPHY
   ======================================== */

/* 📱 Mobile Portrait (320px - 480px) */
@media (min-width: 320px) and (max-width: 480px) {
  h1, .text-4xl, .text-5xl, .text-6xl { font-size: 1.875rem !important; line-height: 2.25rem !important; }
  h2, .text-3xl, .text-4xl { font-size: 1.5rem !important; line-height: 2rem !important; }
  h3, .text-2xl, .text-3xl { font-size: 1.25rem !important; line-height: 1.75rem !important; }
  p, .text-xl, .text-lg { font-size: 0.875rem !important; line-height: 1.5rem !important; }
}

/* 📱 Mobile Landscape (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
  h1, .text-4xl, .text-5xl, .text-6xl { font-size: 2.25rem !important; line-height: 2.5rem !important; }
  h2, .text-3xl, .text-4xl { font-size: 1.875rem !important; line-height: 2.25rem !important; }
  h3, .text-2xl, .text-3xl { font-size: 1.5rem !important; line-height: 2rem !important; }
  p, .text-xl, .text-lg { font-size: 1rem !important; line-height: 1.75rem !important; }
}

/* 📱 Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  h1, .text-5xl, .text-6xl { font-size: 3rem !important; line-height: 1.2 !important; }
  h2, .text-4xl { font-size: 2.25rem !important; line-height: 2.5rem !important; }
  h3, .text-2xl, .text-3xl { font-size: 1.875rem !important; line-height: 2.25rem !important; }
  p, .text-xl { font-size: 1.125rem !important; line-height: 1.75rem !important; }
}

/* 💻 Laptop/Desktop (1025px - 1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
  h1, .text-6xl { font-size: 3.25rem !important; line-height: 1.1 !important; }
  h2, .text-4xl, .text-5xl { font-size: 2.25rem !important; line-height: 1.25 !important; }
  h3, .text-2xl, .text-3xl { font-size: 1.35rem !important; line-height: 1.35 !important; }
  p, .text-xl { font-size: 1.125rem !important; }
  .text-lg { font-size: 1.125rem !important; }
}

/* 🖥️ Large Desktop (1281px+) */
@media (min-width: 1281px) {
  h1, .text-6xl { font-size: 3.5rem !important; line-height: 1.1 !important; }
  h2, .text-4xl, .text-5xl { font-size: 2.5rem !important; }
  h3, .text-2xl, .text-3xl { font-size: 1.5rem !important; }
  p, .text-xl { font-size: 1.25rem !important; }
  .text-lg { font-size: 1.125rem !important; }
}

/* ========================================
   TOP BAR & GLOBAL FIXES
   ======================================== */

/* Top Bar Contact Links Visibility */
div.bg-oacs-black.text-white.py-2.text-sm a {
  color: #fff !important;
}

/* Footer Contact Links Visibility */
footer.bg-oacs-black a {
  color: #fff !important;
}

/* Footer Email - Keep on single line */
footer.bg-oacs-black a[href^="mailto"] {
  white-space: nowrap;
  display: inline-block;
}

/* Footer Contact Section - Prevent text wrapping */
footer .space-y-3 p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

footer .space-y-3 a {
  white-space: nowrap;
}

/* Global Paragraph Overflow Prevention */
p {
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

/* ========================================
   HEADER STICKY FIX
   ======================================== */
header {
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
}

/* ========================================
   MOBILE RESPONSIVENESS IMPROVEMENTS
   ======================================== */

/* Mobile: Reduce padding and margins */
@media (max-width: 767px) {
  /* Hero section adjustments */
  section.min-h-screen {
    min-height: auto !important;
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  /* Reduce section padding on mobile */
  .py-20 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .py-16 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  /* Container padding */
  .px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Button sizing */
  .px-8 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  .py-4 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  /* Image sizing */
  .w-48 {
    width: 10rem !important;
    height: 10rem !important;
  }

  /* Grid adjustments */
  .gap-8 {
    gap: 1.5rem !important;
  }

  .gap-6 {
    gap: 1rem !important;
  }

  /* Stats carousel mobile fix */
  .stat-carousel .grid {
    min-height: 300px !important;
  }

  .stat-card {
    padding: 1.5rem !important;
  }

  /* Header mobile adjustments */
  header .py-4 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  header img {
    height: 2.5rem !important;
    width: 2.5rem !important;
  }

  /* Top bar mobile */
  .bg-oacs-black.text-white.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    font-size: 0.75rem !important;
  }

  /* Card hover effects disabled on mobile */
  .card-hover:hover {
    transform: none !important;
  }

  .group-hover\:scale-105:hover {
    transform: none !important;
  }

  /* Mobile menu improvements */
  #mobileMenu {
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }

  /* Ensure text doesn't overflow on mobile */
  h1, h2, h3, h4, h5, h6, p {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Mobile spacing for hero content */
  .space-y-8 {
    gap: 1.5rem !important;
  }

  /* Adjust max-width for better mobile readability */
  .max-w-3xl, .max-w-2xl {
    max-width: 100% !important;
  }

  /* Footer adjustments */
  footer .grid {
    gap: 2rem !important;
  }

  /* Scroll indicator on mobile */
  .animate-bounce-slow {
    display: none !important;
  }
}

/* Tablet specific adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
  .py-20 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }

  .stat-carousel .grid {
    min-height: 350px !important;
  }
}

/* ========================================
   STATS CAROUSEL ANIMATION
   ======================================== */
.stat-carousel {
  position: relative;
}

.stat-carousel .grid {
  position: relative;
  min-height: 400px;
}

.stat-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.6s ease-in-out;
  pointer-events: none;
}

.stat-card.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.stat-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.stat-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.stat-dot:hover {
  background-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

.stat-dot.active {
  background-color: #A63D52;
  width: 32px;
  border-radius: 6px;
}

/* ========================================
   ANIMATION CLASSES
   ======================================== */
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

.animate-fade-in-left {
  animation: fadeInLeft 0.6s ease-out forwards;
  opacity: 0;
  transform: translateX(-30px);
}

.animate-fade-in-right {
  animation: fadeInRight 0.6s ease-out forwards;
  opacity: 0;
  transform: translateX(30px);
}

.animate-scale-in {
  animation: scaleIn 0.6s ease-out forwards;
  opacity: 0;
  transform: scale(0.9);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========================================
   CARD & HOVER EFFECTS
   ======================================== */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--oacs-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--oacs-primary-dark);
}

/* ========================================
   RESPONSIVE IMAGES
   ======================================== */
img {
  max-width: 100%;
  height: auto;
}

.responsive-img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
