/* === FONT OPTIMIZATION: SELF-HOSTED FONTS === */

/* Open Sans Regular */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/open-sans-v27-latin-regular.woff2') format('woff2');
}

/* Open Sans Semi-Bold */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/open-sans-v27-latin-600.woff2') format('woff2');
}

/* Montserrat Regular */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/montserrat-v24-latin-regular.woff2') format('woff2');
}

/* Montserrat Bold */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/montserrat-v24-latin-700.woff2') format('woff2');
}

/* Montserrat Black */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/montserrat-v24-latin-900.woff2') format('woff2');
}

/* === CRITICAL CSS OPTIMIZATION === */
/* Remove Google Fonts import - handled via preload in HTML for better LCP */

/* Performance-first CSS Variables */
:root {
  --color-primary: #00695C;
  --color-accent: #E27D60;
  --color-charcoal: #333333;
  --color-slate: #555555;
  --color-bg: #F8F6F2;
  --color-white: #FFFFFF;
}

/* Testimonial Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Critical Performance Optimizations */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Performance-optimized font loading */
body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--color-charcoal);
  background: var(--color-bg);
  line-height: 1.6;
  font-display: swap;
  margin: 0;
  padding: 0;
}

/* Critical font optimizations for LCP */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-charcoal);
  font-weight: 700;
  margin-bottom: 0.75em;
  font-display: swap;
}
h1, h2 {
  color: var(--color-primary);
}
h3, h4 {
  color: var(--color-slate);
  font-weight: 500;
}

/* Image optimization for LCP */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Critical layout optimizations */
.hero-bg-img {
  will-change: auto;
  contain: layout style paint;
}

/* Performance-optimized animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: var(--color-accent);
  text-decoration: underline;
}

button, .btn, input[type="submit"], .primary-btn {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
button:hover, .btn:hover, input[type="submit"]:hover, .primary-btn:hover {
  background: #004D40;
  color: var(--color-white);
}

.secondary-btn, .ghost-btn {
  background: var(--color-white);
  color: var(--color-primary);
  border: 1px solid var(--color-accent);
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  font-weight: 500;
  border-radius: 6px;
  padding: 12px 24px;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.secondary-btn:hover, .ghost-btn:hover {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.card, .course-card {
  background: var(--color-white);
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 2rem;
  margin-bottom: 2rem;
}

.section-bg {
  background: var(--color-bg);
}

.text-primary {
  color: var(--color-primary) !important;
}
.text-accent {
  color: var(--color-accent) !important;
}
.text-slate {
  color: var(--color-slate) !important;
}
.bg-primary {
  background: var(--color-primary) !important;
}
.bg-accent {
  background: var(--color-accent) !important;
}
.bg-offwhite {
  background: var(--color-bg) !important;
}

input, textarea, select {
  font-family: 'Open Sans', Arial, sans-serif;
  color: var(--color-charcoal);
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  padding: 10px 14px;
  background: var(--color-white);
  transition: border 0.2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* Custom styles for Hope Institute Online */

/* Form styles */
.form-input {
    @apply block w-full rounded-md border-gray-300 shadow-sm focus:border-green-500 focus:ring-green-500;
}

/* Button styles */
.btn {
    @apply inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500;
}

.btn-secondary {
    @apply inline-flex items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500;
}

/* Card styles */
.card {
    @apply bg-white overflow-hidden shadow rounded-lg;
}

.card-header {
    @apply px-4 py-5 sm:px-6;
}

.card-body {
    @apply px-4 py-5 sm:p-6;
}

.card-footer {
    @apply px-4 py-4 sm:px-6 bg-gray-50;
}

/* Navigation styles */
.nav-link {
    @apply inline-flex items-center px-1 pt-1 text-gray-500 hover:text-gray-900;
}

.nav-link-active {
    @apply inline-flex items-center px-1 pt-1 text-gray-900 border-b-2 border-green-500;
}

/* Hero section styles */
.hero {
    @apply relative bg-gradient-to-r from-green-700 via-green-600 to-green-500;
}

.hero-overlay {
    @apply absolute inset-0 bg-gradient-to-b from-black/20 to-black/10 mix-blend-multiply;
}

.hero-content {
    @apply relative max-w-7xl mx-auto py-24 px-4 sm:py-32 sm:px-6 lg:px-8;
}

/* Hero Section Styles */
.hero-section {
  position: relative;
  min-height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center center;
  padding: 60px 20px;
}
.hero-section::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.3);
  z-index: 1;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* Feature section styles */
.feature-icon {
    @apply absolute flex items-center justify-center h-12 w-12 rounded-md bg-green-500 text-white;
}

.feature-content {
    @apply ml-16;
}

/* Course card styles */
.course-card {
    @apply bg-white overflow-hidden shadow rounded-lg transition-all duration-300 hover:shadow-lg;
    height: 380px;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Course cards (Featured Section) */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.course-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.course-card:hover img {
    transform: scale(1.05);
}

.course-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 1rem 1.5rem 0.5rem;
    line-height: 1.3;
    flex-shrink: 0;
}

.course-card p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 1.5rem;
    flex-grow: 1;
}

/* Card content area */
.course-card .card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding-bottom: 1.5rem;
}

/* Button container for proper spacing */
.course-card .button-container {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 1.5rem 0;
    flex-shrink: 0;
}

.course-card .btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    cursor: pointer;
    flex: 1;
}

/* Secondary button style */
.course-card .btn-secondary {
    background: linear-gradient(135deg, #e5e7eb 0%, #f3f4f6 100%);
    color: #374151;
    border: 1px solid #d1d5db;
}

.course-card .btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.course-card .btn-secondary:hover {
    background: linear-gradient(135deg, #d1d5db 0%, #e5e7eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Featured Courses Section */
.featured-courses {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.featured-courses h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive course cards */
@media (max-width: 768px) {
    .course-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem 0;
    }
    
    .course-card {
        margin: 0 1rem;
    }
    
    .featured-courses {
        padding: 3rem 1rem;
    }
    
    .featured-courses h2 {
        font-size: 2rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .course-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    @apply bg-gray-100;
}

::-webkit-scrollbar-thumb {
    @apply bg-green-600 rounded-full;
}

::-webkit-scrollbar-thumb:hover {
    @apply bg-green-700;
}

/* Loading spinner */
.spinner {
    @apply animate-spin h-5 w-5 text-white;
}

/* Message styles */
.message {
    @apply mt-4 p-4 rounded-md;
}

.message-success {
    @apply bg-green-50 text-green-800;
}

.message-error {
    @apply bg-red-50 text-red-800;
}

/* Mobile menu styles */
.mobile-menu {
    @apply md:hidden;
}

.mobile-menu-button {
    @apply inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-green-500;
}

/* Footer styles */
.footer {
    @apply bg-gray-800 text-white;
}

.footer-link {
    @apply text-gray-300 hover:text-white;
}

/* Utility classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-lg {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        @apply text-black;
    }
    
    a {
        text-decoration: none;
        @apply text-black;
    }
}

/* Why Choose Us card hover effect */
.why-card:hover {
    background-color: #20b2aa !important;
    color: #fff !important;
    border-color: #20b2aa !important;
    transition: background 0.3s, color 0.3s, border 0.3s;
}
.why-card:hover h3,
.why-card:hover p,
.why-card:hover .text-black,
.why-card:hover .text-gray-900,
.why-card:hover .text-gray-600 {
    color: #fff !important;
}
.why-card:hover .text-teal-500,
.why-card:hover .text-teal-600 {
    color: #fff !important;
}

/* --- Why Choose Us Section Grid & Card Styles --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 40px 0;
  justify-content: center;
}
/* Center the last row if it has only two cards (for 5 cards total) */
.services-grid .last-row-card {
  justify-self: center;
}
@media (min-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  /* For 5 cards: center the last two on the second row */
  .services-grid .last-row-card {
    grid-column: span 1;
  }
  .services-grid .last-row-card:first-of-type {
    grid-column: 2/3;
  }
  .services-grid .last-row-card:last-of-type {
    grid-column: 3/4;
  }
}
.service-card {
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 25px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.2s, transform 0.2s;
  min-height: 220px;
}
.service-card:hover {
  box-shadow: 0 8px 24px rgba(0,105,92,0.15);
  transform: translateY(-4px) scale(1.02);
  border-color: #20b2aa;
  background-color: #f4fffe;
}
.card-icon {
  width: 38px;
  height: 38px;
  color: #00695C;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-card:hover .card-icon {
  color: #20b2aa;
}
.card-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #333;
  margin-bottom: 10px;
}
.card-description {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}
@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 0;
  }
  .service-card {
    padding: 16px;
    min-height: 180px;
  }
  .card-title {
    font-size: 1rem;
  }
  .card-description {
    font-size: 0.92rem;
  }
}
/* --- End Why Choose Us Section Styles --- */
.stat-plus {
  margin-right: 0.18em;
  /*padding-bottom: 100px;
  font-size: 0.85em;
  /* vertical-align: middle; */
  opacity: 1;
  font-weight: 700;
}


#formMessage {
    padding: 10px;
    border-radius: 5px;
    text-align: center; /* This centers the text content */
}

#formMessage.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#formMessage.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


.hero-section {
    min-height: 100vh; /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    position: relative;
    overflow: hidden; /* For background shapes if they go outside bounds */
    /* Using a teal gradient similar to yours, but slightly refined for smoothness 
    background: linear-gradient(140deg, #65cebe 60%, #6ae2dc 80%, #5fcbc7 100%);*/
    color: #ffffff;
     /* For 'inset-0' to work as expected, you typically need positioning */
  /* position: absolute; */ /* Or fixed, sticky, etc. */

 background-image: linear-gradient(
    to bottom right,
    rgba(13, 148, 136, 0.7),  /* teal-700 at 70% opacity */
    rgba(5, 150, 105, 0.6),   /* emerald-600 at 60% opacity */
    rgba(34, 197, 94, 0.5)    /* green-500 at 50% opacity */
  );
  mix-blend-mode: multiply;
  z-index: 1;

}

.hero-content {
    max-width: 800px; /* Adjust as needed */
    z-index: 2; /* Above background shapes */
    position: relative;
    padding-top: 80px;
}

.hero-headline {
    font-size: 0.5rem; /* Even smaller for better balance */
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.15;
    letter-spacing: -0.5px;
    color: #ffffff;
    /* Animation will be applied by JS */
    opacity: 0;
    transform: translateY(20px);
}

.hero-subheading {
    font-size: 0.4rem; /* Even smaller subtitle */
    margin-bottom: 30px;
    font-weight: 300;
    opacity: 0;
    transform: translateY(20px);
}

.hero-cta-buttons {
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    margin: 0 10px;
    border-radius: 50px; /* Pill shape */
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cta-button.primary {
    background-color: #ffffff;
    color: #2B7A78; /* Dark teal from gradient */
}

.cta-button.primary:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.cta-button.secondary {
    background-color: #006448;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.cta-button.secondary:hover {
    background-color: #ffffff;
    color: #2B7A78; /* Dark teal */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(43, 122, 120, 0.2); /* Subtle colored shadow */
}

.hero-subjects {
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
}

.hero-subjects span {
    font-weight: 500;
    margin-right: 10px;
}

.hero-subjects ul {
    display: inline;
    list-style: none;
    padding: 0;
    margin: 0;
}

.hero-subjects ul li {
    display: inline;
    margin: 0 5px;
    padding: 3px 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    font-size: 0.85rem;
}

/* Background Shapes (Optional & Basic) */
.hero-background-shapes .shape {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(14, 36, 233, 0.05); /* Very subtle */
    z-index: 1;
}
.hero-background-shapes .shape1 {
    width: 200px; height: 200px; top: 10%; left: 5%; animation: float 10s ease-in-out infinite;
}
.hero-background-shapes .shape2 {
    width: 150px; height: 150px; bottom: 15%; right: 10%; animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    50% { transform: translateY(-20px) translateX(10px) rotate(180deg); }
    100% { transform: translateY(0px) translateX(0px) rotate(360deg); }
}

/* Animation states for JS */
.animate-on-load.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-on-load.delay-1.is-visible { transition-delay: 0.2s; }
.animate-on-load.delay-2.is-visible { transition-delay: 0.4s; }
.animate-on-load.delay-3.is-visible { transition-delay: 0.6s; }


/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 0.7rem; /* Much smaller mobile headline */
    }
    .hero-subheading {
        font-size: 0.35rem; /* Much smaller mobile subtitle */
    }
    .cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
        display: block; /* Stack buttons on mobile */
        margin: 10px auto; /* Center them */
        width: fit-content;
    }
    .hero-subjects ul li {
        display: block; /* Stack subjects */
        margin: 5px auto;
        width: fit-content;
    }
}

/* ===== ULTRA-MODERN HERO SECTION STYLES ===== */

/* Modern Hero Section Container */
.modern-hero-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #059669 0%, #0d9488 25%, #0891b2 50%, #0ea5e9 75%, #3b82f6 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    overflow: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Elements for Dynamic Background */
.floating-element {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px);
    animation: float-around 20s linear infinite;
}

.floating-element-1 {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 5%;
    animation-duration: 25s;
    animation-delay: 0s;
}

.floating-element-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-duration: 30s;
    animation-delay: -5s;
}

.floating-element-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 15%;
    animation-duration: 35s;
    animation-delay: -10s;
}

.floating-element-4 {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 30%;
    animation-duration: 28s;
    animation-delay: -8s;
}

.floating-element-5 {
    width: 90px;
    height: 90px;
    bottom: 40%;
    left: 70%;
    animation-duration: 32s;
    animation-delay: -12s;
}

@keyframes float-around {
    0% {
        transform: translateX(0px) translateY(0px) scale(1) rotate(0deg);
        opacity: 0.7;
    }
    25% {
        transform: translateX(30px) translateY(-40px) scale(1.1) rotate(90deg);
        opacity: 0.9;
    }
    50% {
        transform: translateX(-20px) translateY(-80px) scale(0.9) rotate(180deg);
        opacity: 0.6;
    }
    75% {
        transform: translateX(-50px) translateY(-40px) scale(1.05) rotate(270deg);
        opacity: 0.8;
    }
    100% {
        transform: translateX(0px) translateY(0px) scale(1) rotate(360deg);
        opacity: 0.7;
    }
}

/* Hero Content Wrapper with Advanced Animations */
.hero-content-wrapper {
    animation: heroContentFadeIn 1.5s ease-out forwards;
    opacity: 0;
    transform: translateY(40px);
}

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

/* Modern Badge Styling */
.modern-badge {
    animation: badgeSlideIn 1s ease-out 0.3s forwards;
    opacity: 0;
    transform: translateY(-20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

/* Ultra-Modern Hero Title */
.modern-hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 50%, #e0f2fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: titleGlow 2s ease-in-out infinite alternate;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

@keyframes titleGlow {
    from {
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
    }
    to {
        filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.8));
    }
}

/* Modern Hero Subtitle */
.modern-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 300;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: subtitleSlideIn 1s ease-out 0.8s forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

/* Enhanced Modern CTA Buttons */
.modern-cta-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: ctaSlideIn 1s ease-out 1.2s forwards;
    opacity: 0;
    transform: translateY(30px);
    font-size: 1rem;
    padding: 0.875rem 2rem;
}

.modern-cta-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    color: white;
    box-shadow: 0 25px 50px rgba(5, 150, 105, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.modern-cta-secondary {
    position: relative;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: ctaSlideIn 1s ease-out 1.4s forwards;
    opacity: 0;
    transform: translateY(30px);
    font-size: 1rem;
    padding: 0.875rem 2rem;
}

.modern-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

/* Modern Subject Tags */
.subjects-showcase {
    animation: subjectsSlideIn 1s ease-out 1.6s forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

.modern-subject-tag {
    animation: tagPopIn 0.6s ease-out forwards;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
}

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

.modern-subject-tag:hover {
    transform: translateY(-5px) scale(1.05);
}

/* Scroll Indicator */
.scroll-indicator {
    text-align: center;
    animation: scrollIndicatorFade 2s ease-out 2s forwards;
    opacity: 0;
}

@keyframes scrollIndicatorFade {
    to {
        opacity: 1;
    }
}

.scroll-text {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.scroll-arrow-container {
    display: inline-block;
}

/* Additional Professional Enhancements for Hero Section */

/* Premium glass-morphism effect for badges and elements */
.modern-badge,
.modern-subject-tag > div {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
}

/* Enhanced gradient overlay for depth */
.modern-hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 226, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Sophisticated typography enhancements */
.modern-hero-title {
    font-family: 'Montserrat', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-variation-settings: 'wght' 900;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Professional button states with micro-interactions */
.modern-cta-primary,
.modern-cta-secondary {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    will-change: transform, box-shadow;
}

.modern-cta-primary:active {
    transform: scale(0.98);
}

.modern-cta-secondary:active {
    transform: scale(0.98);
}

/* Elegant loading state */
.modern-cta-primary.loading,
.modern-cta-secondary.loading {
    opacity: 0.8;
    cursor: not-allowed;
    position: relative;
}

.modern-cta-primary.loading::after,
.modern-cta-secondary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: buttonSpinner 1s linear infinite;
}

@keyframes buttonSpinner {
    to {
        transform: rotate(360deg);
    }
}

/* Premium focus indicators */
.modern-cta-primary:focus-visible,
.modern-cta-secondary:focus-visible,
.modern-subject-tag:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.5);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.1);
}

/* Sophisticated hover effects for subject tags */
.modern-subject-tag > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    border-radius: inherit;
}

.modern-subject-tag:hover > div::before {
    transform: translateX(100%);
}

/* Professional loading animation for page entry */
@keyframes heroEntrance {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(50px);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.hero-content-wrapper {
    animation: heroEntrance 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Enhanced scroll indicator with pulsing effect */
.scroll-indicator {
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-indicator:hover {
    transform: translateY(-3px);
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: pulseRing 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulseRing {
    0% {
        transform: translateX(-50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) scale(1.8);
        opacity: 0;
    }
}

/* High-end responsive breakpoints */
@media (min-width: 1920px) {
    .modern-hero-title {
        font-size: clamp(4rem, 6vw, 7rem);
    }
    
    .modern-hero-subtitle {
        font-size: clamp(1.3rem, 2vw, 1.8rem);
    }
}

@media (max-width: 640px) {
    .floating-element {
        opacity: 0.5; /* Reduce opacity on small screens */
        animation-duration: 15s; /* Slower animation for better performance */
    }
}

/* Performance optimizations */
.modern-hero-section * {
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Dark mode support for future enhancement */
@media (prefers-color-scheme: dark) {
    .modern-hero-section {
        background: linear-gradient(135deg, #064e3b 0%, #065f46 25%, #0f766e 50%, #0891b2 75%, #1e40af 100%);
    }
}

/* Print styles */
@media print {
    .modern-hero-section {
        background: #059669 !important;
        color: white !important;
        min-height: 50vh !important;
    }
    
    .floating-element,
    .scroll-indicator {
        display: none !important;
    }
}

/* ===== ULTRA-MODERN HEADER STYLES ===== */

/* Modern Header Base */
#modern-header {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid rgba(5, 150, 105, 0.1);
    box-shadow: 
        0 4px 32px rgba(0, 0, 0, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#modern-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom-color: rgba(5, 150, 105, 0.2);
    box-shadow: 
        0 8px 40px rgba(0, 0, 0, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

/* Enhanced Logo Section */
.logo-section {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-section:hover {
    transform: translateY(-1px);
}

/* Premium Navigation Links */
.nav-link-modern {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1f2937 !important;
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.nav-link-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(14, 116, 144, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.nav-link-modern:hover::before {
    opacity: 1;
}

.nav-link-modern:hover {
    color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.15);
}

.nav-link-modern.nav-link-active {
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
}

.nav-text {
    position: relative;
    z-index: 1;
    color: #1f2937 !important;
    font-weight: 600;
}

/* Navigation Indicator */
.nav-indicator {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #059669, #0891b2);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.nav-link-modern:hover .nav-indicator,
.nav-link-modern.nav-link-active .nav-indicator {
    width: 80%;
}

/* Premium Dropdown Menu */
.dropdown-menu-modern {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    width: 24rem;
    background: #ffffff !important;
    border-radius: 1rem;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 8px 25px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    border: 1px solid rgba(5, 150, 105, 0.1);
}

.dropdown-trigger:hover + .dropdown-menu-modern,
.dropdown-menu-modern:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.dropdown-content {
    padding: 0.75rem;
}

/* Dropdown Items */
.dropdown-item-modern {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dropdown-item-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.dropdown-item-modern:hover::before {
    left: 100%;
}

.dropdown-item-modern:hover {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(14, 116, 144, 0.05) 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.1);
}

.dropdown-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.dropdown-subtitle {
    font-size: 0.8rem;
    color: #ffffff;
    font-weight: 400;
}

/* Language Selector */
.language-selector-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 0.75rem;
    color: #059669 !important;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.language-selector-modern:hover {
    background: rgba(5, 150, 105, 0.15);
    border-color: rgba(5, 150, 105, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.2);
}

.flag-icon {
    font-size: 1.1rem;
}

.language-dropdown-modern {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #ffffff !important;
    border-radius: 0.75rem;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 8px 25px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    border: 1px solid rgba(5, 150, 105, 0.1);
}

.language-selector-modern:hover + .language-dropdown-modern,
.language-dropdown-modern:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.language-option-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    margin: 0.25rem;
}

.language-option-modern:hover {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

/* Enhanced CTA Button */
.cta-button-modern {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #059669 0%, #0891b2 100%);
    color: white;
    font-weight: 600;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 
        0 4px 20px rgba(5, 150, 105, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.cta-button-modern:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 30px rgba(5, 150, 105, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.cta-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
}

.cta-background {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0891b2 0%, #3b82f6 100%);
    transition: left 0.5s ease;
}

.cta-button-modern:hover .cta-background {
    left: 0;
}

/* Logout Button */
.logout-btn-modern {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #dc2626;
    font-weight: 500;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logout-btn-modern:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

/* Mobile Menu Button */
.mobile-menu-btn-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
    color: #059669;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-menu-btn-modern:hover {
    background: rgba(5, 150, 105, 0.15);
    transform: scale(1.05);
}

.hamburger-lines {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.line {
    width: 1.25rem;
    height: 0.125rem;
    background: currentColor;
    border-radius: 0.125rem;
    transition: all 0.3s ease;
}

.mobile-menu-btn-modern.active .line1 {
    transform: rotate(45deg) translate(0.35rem, 0.35rem);
}

.mobile-menu-btn-modern.active .line2 {
    opacity: 0;
}

.mobile-menu-btn-modern.active .line3 {
    transform: rotate(-45deg) translate(0.35rem, -0.35rem);
}

/* Enhanced Mobile Menu */
.mobile-menu-modern {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-modern.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 24rem;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-modern.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(5, 150, 105, 0.1);
}

.mobile-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.mobile-close-btn:hover {
    background: rgba(220, 38, 38, 0.15);
    transform: scale(1.05);
}

/* Mobile Navigation */
.mobile-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    color: #374151;
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.mobile-nav-item:hover,
.mobile-nav-item.mobile-nav-active {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(14, 116, 144, 0.05) 100%);
    color: #059669;
    transform: translateX(4px);
}

/* Mobile Dropdown */
.mobile-dropdown {
    margin-bottom: 0.5rem;
}

.mobile-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem;
    background: none;
    border: none;
    border-radius: 0.75rem;
    color: #374151;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-dropdown-trigger:hover {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-left: 1rem;
}

.mobile-dropdown.active .mobile-dropdown-content {
    max-height: 20rem;
}

.mobile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    margin-bottom: 0.25rem;
}

.mobile-dropdown-item:hover {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.dropdown-icon-small {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(5, 150, 105, 0.1);
}

.mobile-language-selector {
    margin-bottom: 1rem;
}

.mobile-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.mobile-lang-btn:hover,
.mobile-lang-btn.active {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
    border-color: rgba(5, 150, 105, 0.2);
}

.mobile-cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #059669 0%, #0891b2 100%);
    color: white;
    font-weight: 600;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.mobile-cta-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
}

.mobile-cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-cta-secondary:hover {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
    border-color: rgba(5, 150, 105, 0.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dropdown-menu-modern {
        width: 20rem;
    }
}

@media (max-width: 768px) {
    #modern-header {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .mobile-menu-content {
        width: 90%;
    }
}

/* Smooth Scrolling and Performance */
#modern-header {
    will-change: transform, background-color, box-shadow;
}

.nav-link-modern,
.dropdown-item-modern,
.mobile-nav-item {
    will-change: transform, background-color;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    #modern-header,
    .nav-link-modern,
    .dropdown-menu-modern,
    .mobile-menu-modern,
    .mobile-menu-content {
        transition: none;
    }
}

/* Focus Indicators */
.nav-link-modern:focus-visible,
.cta-button-modern:focus-visible,
.language-selector-modern:focus-visible,
.mobile-menu-btn-modern:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    #modern-header {
        background: rgba(255, 255, 255, 1);
        border-bottom: 2px solid #000;
    }
    
    .nav-link-modern {
        color: #000;
    }
    
    .nav-link-modern:hover {
        background: #f0f0f0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    #modern-header {
        background: rgba(17, 24, 39, 0.95);
        border-bottom-color: rgba(5, 150, 105, 0.3);
    }
    
    .nav-link-modern {
        color: #f9fafb;
    }
    
    .dropdown-menu-modern,
    .language-dropdown-modern,
    .mobile-menu-content {
        background: rgba(17, 24, 39, 0.98);
    }
    
    .dropdown-item-modern,
    .language-option-modern,
    .mobile-nav-item {
        color: #f9fafb;
    }
    
    .dropdown-title {
        color: #f9fafb;
    }
    
    .dropdown-subtitle {
        color: #9ca3af;
    }
}

/* ===== END ULTRA-MODERN HEADER STYLES ===== */

/* ===== HEADER VISIBILITY FIXES ===== */
/* Ensure all navigation elements are visible against white background */
#modern-header * {
    color: inherit;
}

#modern-header .nav-link-modern,
#modern-header .nav-link-modern .nav-text,
#modern-header .dropdown-trigger,
#modern-header .dropdown-trigger .nav-text {
    color: #1f2937 !important;
}

#modern-header .language-selector-modern {
    color: #059669 !important;
    background: rgba(5, 150, 105, 0.15) !important;
    border: 1px solid rgba(5, 150, 105, 0.3) !important;
}

#modern-header .cta-button-modern {
    color: white !important;
    background: linear-gradient(135deg, #059669 0%, #0891b2 100%) !important;
}

/* Dropdown arrow visibility */
#modern-header .dropdown-trigger svg,
#modern-header .language-selector-modern svg {
    color: inherit !important;
}

/* Logo text visibility */
#modern-header h1 {
    background: linear-gradient(135deg, #059669 0%, #0891b2 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

#modern-header p {
    color: #6b7280 !important;
}

/* Mobile menu button visibility */
.mobile-menu-btn-modern {
    color: #059669 !important;
    background: rgba(5, 150, 105, 0.1) !important;
    border: 1px solid rgba(5, 150, 105, 0.2) !important;
}

/* Hover states with enhanced visibility */
#modern-header .nav-link-modern:hover {
    color: #059669 !important;
    background: rgba(5, 150, 105, 0.1) !important;
}

#modern-header .language-selector-modern:hover {
    background: rgba(5, 150, 105, 0.2) !important;
    color: #047857 !important;
}

/* ===== END HEADER VISIBILITY FIXES ===== */

/* ===== ENHANCED PROGRAMS SECTION STYLES ===== */

/* Enhanced Program Cards */
.programs-section {
    position: relative;
    overflow: hidden;
}

/* Floating Animation for Background Elements */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.7;
    }
    33% { 
        transform: translateY(-20px) rotate(1deg); 
        opacity: 1;
    }
    66% { 
        transform: translateY(-10px) rotate(-1deg); 
        opacity: 0.8;
    }
}

@keyframes floatReverse {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.6;
    }
    33% { 
        transform: translateY(10px) rotate(-1deg); 
        opacity: 0.9;
    }
    66% { 
        transform: translateY(20px) rotate(1deg); 
        opacity: 0.7;
    }
}

/* Enhanced Hover Effects for Program Cards */
.group:hover {
    transform: translateY(-8px) scale(1.02);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Add glow effect on hover */
.group::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(34, 197, 94, 0.3), transparent);
    border-radius: 1.75rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.group:hover::before {
    opacity: 1;
}

/* Enhanced shadow effects */
.group {
    position: relative;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: filter 0.3s ease;
}

.group:hover {
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
}

/* Text glow effect on hover */
.group:hover .program-title {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    transition: text-shadow 0.3s ease;
}

/* Button enhancement on hover */
.group:hover .program-btn-primary {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
    transition: all 0.3s ease;
}

/* Card content lift effect */
.group:hover .program-card-content {
    transform: translateZ(10px);
    transition: transform 0.3s ease;
}

/* Image zoom with enhanced overlay */
.group:hover img {
    transform: scale(1.15);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Badge glow on hover */
.group:hover .program-badge,
.group:hover .level-badge {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* ===== END ENHANCED COURSE CARD HOVER EFFECTS ===== */

/* ===========================================
   TBT OPTIMIZATION STYLES
   Reducing layout shifts and painting work
   =========================================== */

/* Optimize for main thread performance */
* {
    /* Reduce paint area and promote to compositor layer when needed */
    will-change: auto;
}

/* Critical elements that should be promoted to compositor layers */
.loading-spinner,
.hero-section,
.courses-grid,
.course-card:hover {
    will-change: transform, opacity;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* Prevent layout thrashing with proper contain */
.course-card {
    contain: layout style paint;
}

.hero-section {
    contain: layout paint;
}

/* Optimize animations to use transform and opacity only */
@keyframes optimized-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px) translateZ(0);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

@keyframes optimized-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px) translateZ(0);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

/* Replace existing animations with GPU-accelerated versions */
.animate-fade-in {
    animation: optimized-fade-in 0.6s ease-out;
}

.animate-slide-up {
    animation: optimized-slide-up 0.8s ease-out;
}

/* Optimize hover effects for better performance */
.course-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    backface-visibility: hidden;
}

.course-card:hover {
    transform: translateY(-4px) translateZ(0);
}

/* Optimize image loading and rendering */
img {
    image-rendering: auto;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

/* Lazy loading optimization */
img[loading="lazy"] {
    content-visibility: auto;
    contain: layout style paint;
}

/* Optimize form elements */
input, textarea, select {
    contain: layout style;
}

/* Optimize button interactions */
button, .btn {
    contain: layout style;
    transform: translateZ(0);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

button:active {
    transform: translateZ(0) scale(0.98);
}

/* Optimize scroll performance */
.scroll-container {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    contain: layout style paint;
}

/* Critical loading states */
.content-loading {
    pointer-events: none;
}

.content-loaded .loading-spinner {
    opacity: 0;
    visibility: hidden;
    transform: translateZ(0) scale(0.8);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

/* Performance-optimized responsive design */
@media (max-width: 768px) {
    /* Reduce complexity on mobile for better performance */
    .complex-animation {
        animation: none;
    }
    
    /* Simplify shadows on mobile */
    .course-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .course-card:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Optimize for reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .loading-spinner {
        animation: none;
    }
}

/* Performance monitoring styles */
.perf-marker {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Optimize critical path rendering */
.above-fold {
    content-visibility: auto;
    contain-intrinsic-size: 100vh;
}

.below-fold {
    content-visibility: auto;
    contain-intrinsic-size: 50vh;
}

/* ===== PROGRAM CARDS STYLING ===== */

/* Program Card Overlays */
.program-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.85) 0%, rgba(139, 92, 246, 0.85) 100%);
    opacity: 0.3;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* Specific Card Overlays */
.arabic-card-overlay {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.85) 0%, rgba(22, 163, 74, 0.85) 100%);
}

.quran-card-overlay {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.85) 0%, rgba(79, 70, 229, 0.85) 100%);
}

.calligraphy-card-overlay {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.85) 0%, rgba(147, 51, 234, 0.85) 100%);
}

.islamic-card-overlay {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.85) 0%, rgba(220, 38, 38, 0.85) 100%);
}

.english-card-overlay {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.85) 0%, rgba(37, 99, 235, 0.85) 100%);
}

/* Program Card Content */
.program-card-content {
    position: relative;
    z-index: 2;
    padding: 1.5rem;
    height: 100%;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: rgb(0, 0, 0);
}

/* Program Badge */
.program-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

/* Program Title */
.program-title {
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Program Description */
.program-description {
    font-size: 1.2rem;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.9);
    margin-bottom: 2rem;
    flex-grow: 1;
}

/* Level Badges */
.level-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.level-badge-green {
    background: rgba(34, 197, 94, 0.2);
    color: rgb(34, 197, 94);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.level-badge-blue {
    background: rgba(59, 130, 246, 0.2);
    color: rgb(59, 130, 246);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.level-badge-purple {
    background: rgba(168, 85, 247, 0.2);
    color: rgb(168, 85, 247);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.level-badge-red {
    background: rgba(239, 68, 68, 0.2);
    color: rgb(239, 68, 68);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Program Buttons */
.program-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: white;
    color: #1f2937;
    font-weight: 600;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.program-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.program-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 600;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.program-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* ===== RESPONSIVE PROGRAM CARDS ===== */

/* Mobile optimizations */
@media (max-width: 768px) {
    .program-card-content {
        padding: 1.5rem;
        min-height: 350px;
    }
    
    .program-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .program-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .program-btn-primary,
    .program-btn-secondary {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .program-badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .program-card-content {
        padding: 1.75rem;
    }
    
    .program-title {
        font-size: 1.75rem;
    }
}

/* Large screen optimizations */
@media (min-width: 1025px) {
    .program-card-content {
        padding: 2.25rem;
        min-height: 360px;
    }
    
    .program-title {
        font-size: 2rem;
    }
    
    .program-description {
        font-size: 1.1rem;
    }
}

/* Animation improvements */
@media (prefers-reduced-motion: no-preference) {
    .program-card-overlay {
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .group:hover .program-card-overlay {
        animation: pulse-gentle 2s infinite;
    }
}

@keyframes pulse-gentle {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.65;
    }
}

/* Accessibility improvements */
.program-btn-primary:focus,
.program-btn-secondary:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .program-card-overlay {
        opacity: 0.95;
    }
    
    .program-title,
    .program-description {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }
    
    .program-btn-primary {
        border: 2px solid #000;
    }
    
    .program-btn-secondary {
        border: 2px solid white;
    }
}