/* ===== BASE ===== */
html {
    scroll-behavior: smooth;
}
body {
    background-color: #0F1115;
    color: #e2e2e8;
    overflow-x: hidden;
}
.glass-card {
    background: rgba(26, 29, 36, 0.75);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}
.glass-card:hover {
    border-color: rgba(54, 215, 255, 0.5);
    box-shadow: 0 0 20px rgba(54, 215, 255, 0.1);
}
.cyan-glow {
    box-shadow: 0 0 25px rgba(54, 215, 255, 0.8);
}
.cyan-glow:hover {
    box-shadow: 0 0 40px rgba(54, 215, 255, 1.0);
}
.hero-overlay {
    background: linear-gradient(to bottom, rgba(15, 17, 21, 0.4) 0%, rgba(15, 17, 21, 0.95) 100%);
}
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
/* Offset anchored sections below the fixed header (~72px) */
div#facility,
#trainers,
#contact {
    scroll-margin-top: 72px;
}

/* ===== ANIMATIONS ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-float {
    animation: float 2s ease-in-out infinite;
}
.animate-slide-up {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}
.scroll-animate {
    opacity: 0;
}

/* ===== MOBILE OPTIMISATION ===== */
@media (max-width: 767px) {
    /* Loader — smaller on phones */
    .loader-logo { width: 68px; height: 68px; }
    .loader-brand { font-size: 1.8rem; }
    .loader-tagline { font-size: 0.65rem; letter-spacing: 0.18em; }
    .loader-bar-track { width: 160px; }

    /* Prevent body horizontal scroll */
    body { overflow-x: hidden; }

    /* Section headings scale down */
    h2 { font-size: clamp(1.5rem, 6vw, 2.2rem) !important; }

    /* Facility cards — reduce icon size */
    .glass-card img[alt$="Icon"] { height: 2.5rem; }

    /* Trainer cards — force full column on mobile */
    .glass-card.overflow-hidden.flex {
        flex-direction: column !important;
    }
    .glass-card.overflow-hidden.flex > div:first-child {
        width: 100% !important;
        height: 260px !important;
    }
    .glass-card.overflow-hidden.flex > div:last-child {
        width: 100% !important;
    }

    /* Gallery cards — shorter on mobile */
    .relative.overflow-hidden.rounded-xl.h-80 {
        height: 200px;
    }

    /* Contact buttons — stack vertically & full width */
    #contact .flex.flex-col.md\\:flex-row {
        flex-direction: column;
        align-items: stretch;
    }
    #contact a.glass-card {
        justify-content: center;
    }

    /* Footer links wrap nicely */
    footer .flex.flex-wrap { gap: 1rem; }

    /* Make all touch targets at least 44px tall */
    nav a, button, a.glass-card { min-height: 44px; }

    /* Section spacing slightly tighter on mobile */
    .py-stack-lg { padding-top: 2.5rem; padding-bottom: 2.5rem; }
}

/* Tablets (768px – 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .loader-logo { width: 80px; height: 80px; }
    .loader-brand { font-size: 2.2rem; }
}


/* ===== PAGE LOADER ===== */
@keyframes loaderFadeOut {
    0%   { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.04); }
}
@keyframes loaderLogoIn {
    0%   { opacity: 0; transform: scale(0.6) rotate(-15deg); }
    60%  { opacity: 1; transform: scale(1.08) rotate(3deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes loaderBrandIn {
    0%   { opacity: 0; letter-spacing: 0.5em; }
    100% { opacity: 1; letter-spacing: 0.08em; }
}
@keyframes loaderTaglineIn {
    0%   { opacity: 0; transform: translateY(10px); }
    100% { opacity: 0.6; transform: translateY(0); }
}
@keyframes loaderBarFill {
    0%   { width: 0%; }
    40%  { width: 55%; }
    80%  { width: 85%; }
    100% { width: 100%; }
}

.loader-wrapper {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0F1115;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.loader-wrapper.loader-hide {
    animation: loaderFadeOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.loader-logo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(54, 215, 255, 0.5);
    box-shadow: 0 0 40px rgba(54, 215, 255, 0.5), 0 0 80px rgba(54, 215, 255, 0.2);
    animation: loaderLogoIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}
.loader-brand {
    font-family: 'Sora', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    animation: loaderBrandIn 0.6s ease 0.5s both;
    display: flex;
    gap: 12px;
}
.loader-brand-text {
    color: #e2e2e8;
}
.loader-brand-accent {
    color: #36d7ff;
    text-shadow: 0 0 20px rgba(54, 215, 255, 0.8);
}
.loader-tagline {
    font-family: 'Sora', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: #bbc9ce;
    animation: loaderTaglineIn 0.5s ease 0.9s both;
}
.loader-bar-track {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}
.loader-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #36d7ff, #b3ebff);
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(54, 215, 255, 0.8);
    animation: loaderBarFill 1.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}
