/* ========================================
   Gym City – Fully Responsive Styles
   ======================================== */

/* ---------- Base Reset ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

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

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00ff66;
}

/* ---------- Text Stroke Utility ---------- */
.text-stroke {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
    color: transparent;
}

/* ---------- Navbar ---------- */
.nav-scrolled {
    background-color: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* ---------- Hamburger Menu ---------- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 60;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
    background: #00ff66;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
    background: #00ff66;
}

/* ---------- Mobile Navigation Overlay ---------- */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 55;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-nav.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mobile-nav ul li {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-nav.open ul li {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav.open ul li:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.open ul li:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav.open ul li:nth-child(3) { transition-delay: 0.2s; }
.mobile-nav.open ul li:nth-child(4) { transition-delay: 0.25s; }
.mobile-nav.open ul li:nth-child(5) { transition-delay: 0.3s; }
.mobile-nav.open ul li:nth-child(6) { transition-delay: 0.35s; }

.mobile-nav ul li a {
    font-family: 'Teko', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-nav ul li a:hover,
.mobile-nav ul li a:active {
    color: #00ff66;
    transform: scale(1.05);
}

.mobile-nav .mobile-nav-cta {
    margin-top: 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease 0.4s, transform 0.3s ease 0.4s;
}

.mobile-nav.open .mobile-nav-cta {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Service Cards – Touch Device Fix ---------- */
@media (hover: none) and (pointer: coarse) {
    .service-card .absolute.z-20 p {
        height: auto !important;
        opacity: 1 !important;
    }
}

/* ---------- Dark Mode Fix ---------- */
html.dark {
    color-scheme: dark;
}

/* ---------- Responsive Breakpoints ---------- */

/* Extra small devices (phones, < 380px) */
@media (max-width: 379px) {
    .hamburger {
        display: flex;
    }

    .desktop-nav {
        display: none !important;
    }
}

/* Small devices (phones, < 768px) */
@media (max-width: 767px) {
    .hamburger {
        display: flex;
    }

    .desktop-nav {
        display: none !important;
    }

    /* Hero Section */
    #home h1 {
        font-size: 3rem !important;
        line-height: 0.95;
    }

    #home .text-lg {
        font-size: 0.95rem !important;
    }

    #home .flex-wrap a {
        padding: 12px 20px !important;
        font-size: 0.7rem !important;
        width: 100%;
        text-align: center;
    }

    /* Quick Intro Banner */
    .intro-banner {
        margin-left: 0.5rem !important;
        margin-right: 0.5rem !important;
        margin-top: -1.5rem !important;
        border-radius: 0.75rem;
    }

    .intro-banner h3 {
        font-size: 2rem !important;
    }

    .intro-banner p {
        font-size: 0.7rem !important;
    }

    /* Section Headings */
    .section-heading {
        font-size: 2.5rem !important;
    }

    /* Pricing Cards */
    .pricing-card {
        padding: 1.5rem !important;
    }

    .pricing-card .text-5xl {
        font-size: 2.5rem !important;
    }

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

    /* Lightbox */
    #lightbox img {
        max-width: 95vw !important;
        max-height: 80vh !important;
    }

    #close-lightbox {
        top: 12px !important;
        right: 12px !important;
        font-size: 1.75rem !important;
        background: rgba(0,0,0,0.5);
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* WhatsApp button – keep above fold */
    .whatsapp-float {
        bottom: 16px !important;
        right: 16px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 1.6rem !important;
    }

    /* Transformation gallery */
    #transformation-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    #transformation-gallery > div {
        height: 200px !important;
    }
}

/* Medium devices (tablets) */
@media (min-width: 768px) and (max-width: 1023px) {
    .hamburger {
        display: flex;
    }

    .desktop-nav {
        display: none !important;
    }

    #home h1 {
        font-size: 4.5rem !important;
    }

    .section-heading {
        font-size: 3.5rem !important;
    }

    #transformation-gallery {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Large screens (desktops 1024px+) */
@media (min-width: 1024px) {
    .hamburger {
        display: none !important;
    }

    .mobile-nav {
        display: none !important;
    }

    .desktop-nav {
        display: flex !important;
    }
}

/* ---------- Lightbox swipe hint ---------- */
#lightbox {
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

/* ---------- Smooth entry animations ---------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

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

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

/* ---------- No scrollbar utility ---------- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ---------- Safe area for notched phones ---------- */
@supports (padding: max(0px)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .mobile-nav {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ---------- Scroll offset for sections ---------- */
section[id] {
    scroll-margin-top: 60px; /* Mobile navbar height offset */
}

@media (min-width: 1024px) {
    section[id] {
        scroll-margin-top: 80px; /* Desktop navbar height offset */
    }
}
