/* ===========================
   main.css — consolidated styles (updated)
   =========================== */

/* ---------- Variables & utilities ---------- */
:root {
    --transition-fast: 0.3s ease;
    --transition-med: 0.8s ease-out; /* aligned with latest animate-on-scroll */
}

* { font-family: 'Poppins', sans-serif; }

.absolute { z-index: 1000; }
.pointer-events-none { pointer-events: none; }
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}
/* ---------- Custom Animation Utilities (for Why Us / Programs sections) ---------- */

/* Base animation utilities */
.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}
.animate-slide-left {
  animation: slideLeft 0.8s ease-out forwards;
}
.animate-zoom-in {
  animation: zoomIn 0.6s ease-out forwards;
}

/* Restore visible state for scroll-triggered elements */
.animate-on-scroll,
.animate-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.animate-on-scroll.in-view,
.animate-fade-in.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* (optional) Accessibility respect */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in,
  .animate-slide-left,
  .animate-zoom-in,
  .animate-on-scroll {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
/* Tailwind-like helpers sometimes used inline */
.group:hover .group-hover\:visible { visibility: visible; }
.group:hover .group-hover\:opacity-100 { opacity: 1; }

/* ---------- Keyframes ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideLeft {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes floatSoft {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-10px) rotate(5deg); }
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.2; }
    50%      { opacity: 0.4; }
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Scroll-in reveal ---------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--transition-med);
}
.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}
.animate-slide-up { animation: slideUp 0.7s ease-out forwards; }

/* ---------- Floating flourishes & helpers ---------- */
.floating              { animation: floatSoft 3s ease-in-out infinite; }
.floating-ornament     { animation: floatSoft 6s ease-in-out infinite; }
.floating-btn          { animation: float 3s ease-in-out infinite; }
.animate-float         { animation: float 6s ease-in-out infinite; }
.animate-pulse-slow    { animation: pulse-slow 4s ease-in-out infinite; }
.animate-bounce-slow   { animation: bounce-slow 3s ease-in-out infinite; }

/* Backdrop blur helper */
.backdrop-blur-lg {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* ---------- Particles ---------- */
.particle {
    position: absolute;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}
.particle-1 { width: 8px;  height: 8px;  top: 20%; left: 5%;  animation-delay: 0s; }
.particle-2 { width: 12px; height: 12px; top: 60%; right: 10%; animation-delay: 1s; }
.particle-3 { width: 6px;  height: 6px;  bottom: 30%; left: 15%; animation-delay: 2s; }
.particle-4 { width: 10px; height: 10px; top: 40%; right: 20%; animation-delay: 3s; }
.particle-5 { width: 8px;  height: 8px;  bottom: 20%; right: 5%;  animation-delay: 4s; }

/* ---------- Typography (news article pages) ---------- */
.news-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 2rem 0 1rem;
    border-left: 4px solid  oklch(83.7% 0.128 66.29);
    padding-left: 1rem;
}
.news-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin: 1.5rem 0 1rem;
}
.news-content p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #4b5563;
}
.news-content ul,
.news-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}
.news-content li { margin-bottom: 0.5rem; line-height: 1.6; }
.news-content blockquote {
    border-left: 4px solid oklch(83.7% 0.128 66.29);
    background-color: #f8fafc;
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #475569;
}

/* ---------- Cards & hovers ---------- */
.gallery-card,
.winner-card,
.teacher-card-hover,
.contact-info-hover,
.social-icon,
.submit-btn,
.filter-btn {
    transition: all var(--transition-fast);
}

.news-card-hover {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.news-card-hover:hover { transform: translateY(-8px); }

.event-card-hover {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.teacher-card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.contact-info-hover:hover { transform: translateX(5px); }
.social-icon:hover        { transform: translateY(-3px) scale(1.1); }
.submit-btn:hover         { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(59,130,246,0.3); }

/* Enhanced shadows */
.hover\:shadow-3xl:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ---------- Buttons / filters / pagination ---------- */
.filter-active,
.filter-btn.active {
    background: linear-gradient(135deg, oklch(83.7% 0.128 66.29), oklch(76.9% 0.188 70.08)) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(59,130,246,0.4);
}
.pagination-active,
.category-active {
    background: linear-gradient(135deg, oklch(83.7% 0.128 66.29), oklch(76.9% 0.188 70.08));
    color: #fff;
}

/* ---------- Gallery ---------- */
.gallery-container { gap: 0; }

.gallery-item {
    border: 1px solid #f3f4f6;
    transition: transform var(--transition-fast);
}
.gallery-item:hover {
    z-index: 10;
    transform: scale(1.02);
}

/* Lightbox */
#gallery-lightbox { display: none; }
#gallery-lightbox.flex { display: flex; }

#lightboxModal { transition: opacity var(--transition-fast); }
#lightboxModal.show {
    display: flex;
    animation: fadeIn var(--transition-fast);
}

/* ---------- Aspect helpers ---------- */
.aspect-\[4\/3\]        { aspect-ratio: 4/3; }
.image-container-9-16   { aspect-ratio: 9/13; }

/* ---------- Canvas layers ---------- */
#classesCanvas,
#faqCanvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0; /* below content, above backgrounds */
}

/* ---------- Slider / hero ---------- */
.slide {
    opacity: 0;
    z-index: 0;
    transition: opacity 1s ease-in-out;
}
.slide.active {
    opacity: 1;
    z-index: 1;
}

/* ---------- Modal system ---------- */
/* Modal base */

.modal {
    /* DO NOT set display:none here */
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    display: flex;              /* ready to layout when not hidden */
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

/* Respect Tailwind's hidden utility */
.modal.hidden { display: none !important; }

/* Visible state toggled by JS */
.modal.show {
    opacity: 1;
    pointer-events: auto;
}

/* Modal content animation */
.modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.pointer-events-none { pointer-events: none; }


/* Keep your helper */
.pointer-events-none { pointer-events: none; }
/* ---------- FAQ ---------- */
.faq-answer { display: none; transition: all var(--transition-fast); }
.faq-question.active + .faq-answer { display: block; animation: slideDown var(--transition-fast); }
.faq-icon { transition: transform var(--transition-fast); }
.faq-icon.active { transform: rotate(180deg); }

/* ---------- Accessibility: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

     /* Additional CSS needed for the section */
 .about-section {
     position: relative;
     padding: 5rem 0;
     overflow: hidden;
 }

.about-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, oklch(90.1% 0.076 70.697), oklch(76.9% 0.188 70.08), oklch(75% 0.183 55.934));
}

.pattern-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.1;
}

.pattern-circle {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: pulse-slow 4s ease-in-out infinite;
}

.pattern-1 {
    width: 8rem;
    height: 8rem;
    top: 10%;
    left: 10%;
}

.pattern-2 {
    width: 10rem;
    height: 10rem;
    bottom: 20%;
    right: 20%;
    animation-delay: 1s;
}

.pattern-3 {
    width: 6rem;
    height: 6rem;
    top: 50%;
    left: 25%;
    animation-delay: 2s;
}

.pattern-4 {
    width: 7rem;
    height: 7rem;
    bottom: 30%;
    right: 30%;
    animation-delay: 1.5s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 10;
}

.header-content {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
}

.highlight-text {
    color: #fbbf24;
}

.title-underline {
    width: 6rem;
    height: 0.25rem;
    background: #fbbf24;
    margin: 0 auto 1.5rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: #dbeafe;
    max-width: 42rem;
    margin: 0 auto;
}

.main-content {
    max-width: 80rem;
    margin: 0 auto;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .content-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.mission-vision-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.content-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.icon-container {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mission-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.vision-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.icon {
    width: 2rem;
    height: 2rem;
    color: white;
}

.card-title h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.title-underline-small {
    width: 3rem;
    height: 0.125rem;
    background: #fbbf24;
}

.vision-underline {
    background: #10b981;
}

.card-text {
    color: #dbeafe;
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.card-link {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fbbf24;
}

.vision-link {
    color: #10b981;
}

.link-arrow {
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.content-card:hover .link-arrow {
    transform: translateX(0.25rem);
}

.sidebar-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.card-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-align: center;
    margin-bottom: 2rem;
}

.stats-grid {
  display: flex;
  justify-content: space-around; /* evenly spaced */
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  text-align: center;
}

.stat-item {
  flex: 1 1 150px; /* responsive width */
  min-width: 120px;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.stat-item:nth-child(1) .stat-number { color: oklch(55.5% 0.163 48.998); }
.stat-item:nth-child(2) .stat-number { color: oklch(55.5% 0.163 48.998); }
.stat-item:nth-child(3) .stat-number { color: oklch(55.5% 0.163 48.998); }
.stat-item:nth-child(4) .stat-number { color: oklch(55.5% 0.163 48.998); }

.stat-label {
    color: #dbeafe;
    font-size: 0.875rem;
}

.values-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.value-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.value-item:nth-child(1) .value-icon { background: oklch(83.7% 0.128 66.29); }
.value-item:nth-child(2) .value-icon { background: #10b981; }
.value-item:nth-child(3) .value-icon { background: #a855f7; }
.value-item:nth-child(4) .value-icon { background: #ef4444; }

.icon-small {
    width: 1.25rem;
    height: 1.25rem;
    color: white;
}

.value-text {
    color: #dbeafe;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }

    .section-subtitle {
        font-size: 1.125rem;
    }

    .content-card {
        padding: 1.5rem;
    }

    .stats-grid {
        display: inline-flex;
    }
}

/* Mobile Top Bar Styles */
@media (max-width: 768px) {
    .top-bar {
        padding: 0.75rem 0;
    }

    .contact-link {
        padding: 0.25rem 0;
    }

    .social-icon {
        padding: 0.25rem;
    }

    .language-btn {
        padding: 0.5rem;
    }

    /* Social links above language on mobile */
    .top-bar .flex-col .order-1 {
        order: 1;
    }

    .top-bar .flex-col .order-2 {
        order: 2;
    }

    /* Center social icons on mobile */
    .top-bar .justify-center {
        justify-content: center;
    }

    /* Adjust language dropdown for mobile */
    .language-dropdown {
        width: 160px;
        right: -10px;
    }

    /* Stack contact info vertically on very small screens */
    @media (max-width: 480px) {
        .top-bar .container {
            padding: 0 0.75rem;
        }

        .contact-link span {
            font-size: 0.875rem;
        }
    }
}

/* Mobile Header Styles */
@media (max-width: 1024px) {
    .header {
        padding: 0.5rem 0;
    }

    .logo {
        width: 2.5rem !important;
        height: 2.5rem !important;
        font-size: 1rem !important;
        margin-right: 0.75rem !important;
    }

    .school-name {
        font-size: 1.125rem !important;
    }

    .mobile-menu-btn {
        padding: 0.5rem !important;
    }

    .mobile-nav {
        width: 280px;
    }

    .mobile-nav-link {
        padding: 0.75rem 1rem !important;
        font-size: 1rem;
    }

    /* Hide desktop navigation completely on mobile */
    .desktop-nav {
        display: none !important;
    }

    /* Show mobile menu button only on mobile */
    .mobile-menu-btn {
        display: flex !important;
    }
}

/* Desktop Styles */
@media (min-width: 1025px) {
    /* Hide mobile menu button on real desktop */
    .mobile-menu-btn {
        display: none !important;
    }

    /* Hide mobile navigation overlay and menu on desktop */
    .mobile-nav-overlay,
    .mobile-nav {
        display: none !important;
    }

    /* Show desktop navigation */
    .desktop-nav {
        display: flex !important;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .school-name {
        font-size: 1rem !important;
    }

    .logo {
        width: 2.25rem !important;
        height: 2.25rem !important;
        font-size: 0.875rem !important;
    }

    .mobile-nav {
        width: 100%;
    }

    .mobile-nav-link {
        padding: 1rem !important;
        font-size: 1.125rem;
    }

    /* Top bar adjustments for very small screens */
    .top-bar .text-sm {
        font-size: 0.75rem;
    }
}

/* Tablet Adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .school-name {
        font-size: 1.25rem !important;
    }

    .desktop-nav {
        gap: 1.5rem !important;
    }

    .nav-link {
        font-size: 0.95rem;
    }

    /* Top bar tablet adjustments */
    .top-bar .container {
        padding: 0 2rem;
    }
}

/* Mobile Navigation Active State */
.mobile-nav.active {
    transform: translateX(0) !important;
}

.mobile-nav-overlay.active {
    display: block !important;
}

/* Smooth transitions */
.mobile-nav,
.mobile-nav-overlay {
    transition: all 0.3s ease;
}

/* Touch-friendly button sizes */
.mobile-menu-btn,
.close-btn,
.language-btn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-link,
.social-icon {
    min-height: 32px;
    display: flex;
    align-items: center;
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Ensure proper z-index stacking */
.top-bar {
    z-index: 999;
}

.header {
    z-index: 40;
}

.mobile-nav-overlay {
    z-index: 30;
}

.mobile-nav {
    z-index: 40;
}

/* Mobile Top Bar Styles */
@media (max-width: 768px) {
    .top-bar {
        padding: 0.75rem 0;
    }

    .contact-link {
        padding: 0.25rem 0;
    }

    .social-icon {
        padding: 0.25rem;
    }

    .language-btn {
        padding: 0.5rem;
    }

    /* Center align everything on mobile */
    .top-bar .flex-col {
        align-items: center;
        text-align: center;
    }

    /* Social links on top, language on bottom */
    .top-bar .space-y-2 > *:first-child {
        order: 1;
    }

    .top-bar .space-y-2 > *:last-child {
        order: 2;
    }

    /* Adjust language dropdown for mobile */
    .language-dropdown {
        width: 160px;
        right: -10px;
    }
}

/* Desktop Styles */
@media (min-width: 769px) {
    .top-bar .flex-row {
        align-items: center;
    }

    /* Reset mobile ordering */
    .top-bar .space-y-2 > * {
        order: 0;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .top-bar .container {
        padding: 0 0.75rem;
    }

    .contact-link span {
        font-size: 0.875rem;
    }

    .top-bar .text-sm {
        font-size: 0.75rem;
    }
}

/* Touch-friendly sizes */
.contact-link,
.social-icon {
    min-height: 32px;
    display: flex;
    align-items: center;
}

.language-btn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form Input Styling */
.form-input,
.form-textarea {
    background: white;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus,
.form-textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.form-input:hover,
.form-textarea:hover {
    transform: translateY(-1px);
}

.form-textarea {
    min-height: 120px;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .form-input,
    .form-textarea {
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Add to your existing CSS */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}