/* --- Global Reset --- */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* --- Custom Animations --- */
@keyframes blob {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

.animate-blob {
    animation: blob 7s infinite alternate;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

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

.animate-bounce-slow {
    animation: bounce-slow 4s ease-in-out infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animate-on-view {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

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

.animate-on-view.animated.scale-up {
    opacity: 1;
    transform: scale(1);
}

[data-animation="scale-up"] {
    transform: scale(0.9);
}

/* --- Pulse Animation for Admission --- */
@keyframes pulse-gold {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 178, 35, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(244, 178, 35, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 178, 35, 0); }
}

.animate-pulse-gold {
    animation: pulse-gold 2s infinite;
}

/* --- Spacer for Fixed Header --- */
main {
    transition: padding-top 0.3s ease;
}

/* --- Hover Effects --- */
.group:hover .group-hover\:scale-100 {
    transform: scale(1);
}

/* --- Notices Ticker / Marquee Animation --- */
@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-ticker {
    animation: ticker 35s linear infinite;
    display: inline-flex;
    gap: 3rem;
    white-space: nowrap;
    will-change: transform;
}

.animate-ticker:hover {
    animation-play-state: paused;
}

/* --- Star fill utility --- */
.fill-brand-gold {
    fill: #f4b223;
}

/* --- Gallery Grid Bento Layout --- */
.gallery-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 1rem;
}

@media (max-width: 768px) {
    .gallery-bento {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Hover lift effect for cards --- */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(11, 31, 99, 0.15);
}

/* --- Smooth scale-x expand for decorative lines --- */
.scale-x-0 {
    transform: scaleX(0);
    transform-origin: left;
}

.group:hover .group-hover\:scale-x-100 {
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

/* --- Branding Colors --- */
:root {
    --brand-blue: #0B2C6B;
    --brand-gold: #F2B233;
    --brand-white: #FFFFFF;
    --brand-gray: #F5F7FA;
}

/* --- Logo Watermark --- */
.logo-watermark {
    position: relative;
}

.logo-watermark::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background-image: url('../dbs-images/logo/don-bosco-school-logo-500.webp');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

/* Hide watermark on small mobile devices to prevent layout issues */
@media (max-width: 768px) {
    .logo-watermark::before {
        display: none !important;
    }
}

/* --- Premium Hero Slider --- */
.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 8s linear;
    background-size: cover;
    background-position: center center;
}

@media (max-width: 768px) {
    .hero-slide {
        background-position: center center;
    }
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .hero-slide.active {
        transform: scale(1.02); /* Minimal zoom on mobile to preserve framing */
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(11, 44, 107, 0.7), rgba(11, 44, 107, 0.4));
    z-index: 1;
}

.banner-overlay-image {
    opacity: 0.18;
    transition: opacity 0.5s ease;
}

/* --- Image Hover Effects --- */
.hover-zoom {
    overflow: hidden;
}

.hover-zoom img {
    transition: transform 0.5s ease;
}

.hover-zoom:hover img {
    transform: scale(1.1);
}

/* --- Responsive Layouts --- */
.img-landscape { aspect-ratio: 16/9; width: 100%; object-fit: cover; }
.img-portrait { aspect-ratio: 4/5; width: 100%; object-fit: cover; }
.img-square { aspect-ratio: 1/1; width: 100%; object-fit: cover; }

/* --- Premium Modal System --- */
#admission-modal.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

#admission-modal.active .modal-content {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
}

body.modal-open {
    overflow: hidden !important;
}

@media (min-width: 768px) {
    body.modal-open {
        padding-right: 15px; /* Scrollbar compensation */
    }
}
/* --- Premium Glassmorphism --- */
.glass-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}

.glass-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

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

/* --- Mobile Specific Typography --- */
@media (max-width: 640px) {
    .text-balance {
        text-wrap: balance;
    }
    .hero-title-mobile {
        font-size: 2.75rem;
        line-height: 1.1;
        letter-spacing: -0.02em;
    }
}

/* --- Premium Buttons --- */
.btn-premium {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-premium::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
}

.btn-premium:active::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
}

/* --- Admission Popup Mobile Optimizations --- */
.popup-mobile-fix {
    width: min(400px, 92vw);
    border-radius: 2.5rem;
}

@media (max-width: 1023px) {
    .mobile-dropdown-toggle[aria-expanded="true"] + div {
        display: block !important;
    }
}

/* --- Fallback for dynamic Tailwind classes that might be missing from compiled CSS --- */
@media (min-width: 1024px) {
    .lg\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .modal-content {
        max-height: 85vh;
        width: 92% !important;
        margin: auto;
    }
}

/* --- Animated Gradient Text --- */
.animate-gradient-text {
    background: linear-gradient(to right, #f4b223, #fff, #f4b223);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradient-shine 3s linear infinite;
}

@keyframes gradient-shine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* --- Stats Grid Fix --- */
.stats-mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .stats-mobile-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- Smooth Drawer --- */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-image: none !important; /* Remove any potential background image */
}

#mobile-menu::before, #mobile-menu::after {
    display: none !important; /* Disable any watermark pseudo-elements */
}

/* --- Floating Action Buttons --- */
.fab-shadow {
    box-shadow: 0 12px 24px -6px rgba(11, 31, 99, 0.3);
}
