/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Premium Color Palette */
    --gold: #D4AF37;           
    --gold-hover: #F8D96D;     
    --gold-dark: #8A6E18;      
    --black: #050505;          
    --charcoal: #111111;       
    --white: #ffffff;
    --gray-text: #b0b0b0;      
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
    
    /* Effects */
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --border-subtle: 1px solid rgba(255, 255, 255, 0.08);
    --border-gold: 1px solid rgba(212, 175, 55, 0.3);
    --glass-bg: rgba(20, 20, 20, 0.95);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--black);
    color: var(--gray-text);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    color: var(--white);
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

/* =========================================
   2. PRELOADER
   ========================================= */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--black);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader-content { text-align: center; }
.preloader-logo { width: 150px; margin: 0 auto 20px; filter: brightness(0) invert(1); }
.preloader-text { font-family: var(--font-heading); font-style: italic; color: var(--gold); }
.loading-bar { width: 200px; height: 2px; background: #222; margin: 15px auto; overflow: hidden; }
.loading-progress { width: 0%; height: 100%; background: var(--gold); animation: load 2s forwards; }
@keyframes load { 100% { width: 100%; } }

/* =========================================
   3. LUXURY BUTTONS
   ========================================= */
.cta-btn, .plan-btn, .explore-btn {
    position: relative;
    display: inline-block;
    padding: 16px 40px;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--black);
    background: linear-gradient(135deg, var(--gold), #cba12f);
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
    z-index: 1;
    text-align: center;
}

/* Shine Effect */
.cta-btn::before, .plan-btn::before, .explore-btn::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: 0.5s;
    z-index: -1;
}

.cta-btn:hover::before, .plan-btn:hover::before, .explore-btn:hover::before { left: 100%; }
.cta-btn:hover, .plan-btn:hover, .explore-btn:hover {
    color: var(--black);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.cta-btn.whatsapp { background: #25D366; color: white; }

.explore-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 12px 30px;
    width: 100%;
    margin-top: auto;
}
.explore-btn:hover { background: var(--gold); color: var(--black); }

/* Overlay View Button (Small) */
.overlay-btn { width: auto; padding: 10px 25px; background: var(--white); color: var(--black); border: none; }

/* =========================================
   4. NAVIGATION
   ========================================= */
.navbar {
    position: fixed; top: 0; width: 100%;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: var(--border-subtle);
    padding: 15px 0;
    z-index: 1000;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1300px; margin: 0 auto; padding: 0 20px; }
.nav-logo-img { height: 50px; filter: brightness(0) invert(1); }
.nav-menu { display: flex; gap: 35px; align-items: center; }
.nav-link { color: var(--white); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; position: relative; }
.nav-link::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 1px; background: var(--gold); transition: var(--transition); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.cta-btn-nav {
    padding: 10px 25px; border: 1px solid var(--gold); color: var(--gold);
    text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; font-weight: 500; transition: var(--transition);
}
.cta-btn-nav:hover { background: var(--gold); color: var(--black); }

.nav-toggle { display: none; cursor: pointer; z-index: 1001; }
.nav-toggle span { display: block; width: 25px; height: 2px; background: var(--gold); margin: 5px 0; transition: 0.3s; }

/* =========================================
   5. HERO & SECTIONS
   ========================================= */
.hero { height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; }
.hero-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; background: #000; }
.hero-video::after { content: ''; position: absolute; inset: 0; background: url('https://images.pexels.com/photos/841130/pexels-photo-841130.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1') center/cover; opacity: 0.4; }

.video-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle, transparent 20%, #050505 90%); z-index: 1; }
.hero-content { position: relative; z-index: 2; padding-top: 60px; }
.hero-title { font-size: 4.5rem; line-height: 1.1; margin-bottom: 20px; font-weight: 700; }
.hero-title .highlight { color: var(--gold); font-family: var(--font-heading); font-style: italic; font-weight: 400; display: block; }
.hero-subtitle { font-size: 1.1rem; max-width: 700px; margin: 0 auto 40px; color: #ddd; }

.hero-stats { display: flex; justify-content: center; gap: 60px; margin-top: 60px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 30px; }
.stat-number { font-size: 2.5rem; color: var(--white); font-family: var(--font-heading); }
.stat-label { font-size: 0.8rem; text-transform: uppercase; color: var(--gold); letter-spacing: 1px; }

section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 70px; }
.section-tag { color: var(--gold); text-transform: uppercase; letter-spacing: 4px; font-size: 0.8rem; display: block; margin-bottom: 15px; }
.section-header h2 { font-size: 3rem; margin-bottom: 20px; }
.section-header p { max-width: 600px; margin: 0 auto; color: #888; }

/* =========================================
   6. ABOUT
   ========================================= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-story h3 { font-size: 2rem; border-left: 3px solid var(--gold); padding-left: 20px; color: var(--white); }
.story-text { margin: 20px 0; color: #aaa; }
.feature-item { display: flex; align-items: flex-start; margin-bottom: 30px; padding: 20px; background: rgba(255,255,255,0.02); border: var(--border-subtle); transition: var(--transition); }
.feature-item:hover { border-color: var(--gold); transform: translateX(10px); }
.feature-item i { font-size: 1.5rem; color: var(--gold); margin-right: 20px; margin-top: 5px; }
.feature-item h4 { color: var(--white); font-weight: 600; font-size: 1.1rem; }

.whatsapp-btn { display: inline-flex; align-items: center; gap: 10px; color: #25D366; font-weight: 500; margin-top: 20px; border-bottom: 1px solid transparent; }
.whatsapp-btn:hover { border-bottom-color: #25D366; }

.image-stack { position: relative; height: 500px; }
.image-card img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(30%); transition: var(--transition); }
.image-card.main { width: 85%; height: 85%; border: 1px solid var(--gold); padding: 10px; }
.image-card.floating { position: absolute; bottom: 0; right: 0; width: 55%; height: 55%; border: 10px solid var(--black); box-shadow: -20px -20px 50px rgba(0,0,0,0.5); }
.image-card:hover img { filter: grayscale(0%); }

/* =========================================
   7. CARDS (Unified Row Layout)
   ========================================= */
/* Grid System: 3 Columns Desktop */
.branches-grid, .services-grid, .membership-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
    align-items: stretch;
}

/* Card Base */
.branch-card, .service-card, .membership-card {
    background: var(--charcoal);
    border: var(--border-subtle);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}
.branch-card:hover, .service-card:hover, .membership-card:hover {
    transform: translateY(-8px);
    border-color: var(--gold);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* Branch Specifics */
.branch-image { height: 280px; position: relative; overflow: hidden; }
.branch-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; }
.branch-card:hover .branch-image img { transform: scale(1.1); }
.branch-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; opacity: 0; transition: var(--transition); }
.branch-card:hover .branch-overlay { opacity: 1; }
.branch-info { padding: 25px; border-top: 2px solid var(--gold); margin-top: auto; display: flex; flex-direction: column; gap: 5px; }
.branch-location, .branch-timing { display: flex; gap: 10px; font-size: 0.9rem; color: #999; }
.branch-location i, .branch-timing i { color: var(--gold); }

/* Service Specifics */
.service-card { padding: 40px 30px; text-align: center; }
.service-icon { font-size: 3rem; color: var(--gold); margin-bottom: 25px; }
.service-card h3 { font-size: 1.4rem; margin-bottom: 15px; }
.service-card ul { text-align: left; margin-top: auto; border-top: 1px solid #222; padding-top: 20px; }
.service-card li { margin-bottom: 10px; color: #999; font-size: 0.9rem; }
.service-card li i { color: var(--gold); margin-right: 10px; }

/* Membership Specifics */
.membership-toggle { display: flex; justify-content: center; align-items: center; gap: 20px; margin-bottom: 50px; }
.discount { background: var(--gold); color: var(--black); padding: 2px 6px; font-size: 0.7rem; font-weight: 700; }
/* Custom Toggle Switch CSS */
.toggle-switch { position: relative; width: 50px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-switch label { position: absolute; inset: 0; background: #333; border-radius: 30px; cursor: pointer; transition: .4s; }
.toggle-switch label:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background: var(--gold); transition: .4s; border-radius: 50%; }
.toggle-switch input:checked + label:before { transform: translateX(24px); }

.membership-card { padding: 40px; text-align: center; }
.membership-card.popular { border: 1px solid var(--gold); background: #161616; transform: scale(1.05); z-index: 5; }
.popular-badge { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); background: var(--gold); color: var(--black); padding: 5px 20px; font-weight: 700; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 1px; }
.price { margin: 25px 0; color: var(--white); }
.price .currency { font-size: 1.5rem; vertical-align: top; color: var(--gold); }
.price .amount { font-size: 3.5rem; font-family: var(--font-heading); line-height: 1; }
.plan-features { margin-bottom: 30px; text-align: left; }
.plan-features li { margin-bottom: 15px; color: #ccc; }
.plan-features li i { color: var(--gold); margin-right: 10px; }

/* =========================================
   8. INSTAGRAM & GALLERY
   ========================================= */
.instagram-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Exactly 3 per row */
    gap: 20px;
}
.insta-post { position: relative; aspect-ratio: 1/1; overflow: hidden; border: 1px solid #222; }
.insta-post img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.insta-post:hover img { transform: scale(1.1); filter: grayscale(100%); }
.insta-overlay { position: absolute; inset: 0; background: rgba(212, 175, 55, 0.85); display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; transition: var(--transition); color: var(--black); }
.insta-post:hover .insta-overlay { opacity: 1; }
.instagram-cta { text-align: center; margin-top: 40px; }

/* Gallery Grid */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-item { position: relative; height: 300px; overflow: hidden; cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; transition: var(--transition); border: 1px solid var(--gold); margin: 15px; }
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* =========================================
   9. CONTACT SECTION
   ========================================= */
#contact { background-color: #080808; background-image: radial-gradient(circle at top right, #1a1a1a 0%, #000 60%); }

.contact-content {
    background: var(--charcoal);
    border: var(--border-gold);
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Info left, Form right */
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.contact-info {
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    padding: 60px 40px;
    border-right: 1px solid #222;
    display: flex; flex-direction: column; justify-content: center; gap: 40px;
}

.contact-card { background: transparent; padding: 0; border: none; }
.contact-icon { font-size: 1.8rem; color: var(--gold); margin-bottom: 15px; }
.contact-card h4 { font-size: 1.2rem; margin-bottom: 10px; color: var(--white); }
.branch-list .branch-item { margin-bottom: 15px; font-size: 0.9rem; color: #999; border-left: 2px solid #333; padding-left: 15px; }
.branch-item strong { color: var(--gold); display: block; margin-bottom: 5px; }

#contact-form { padding: 60px 50px; background: var(--charcoal); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.form-group { margin-bottom: 20px; }

input, select, textarea {
    width: 100%; background: #0a0a0a; border: 1px solid #333; padding: 18px 20px;
    color: var(--white); font-size: 0.95rem; font-family: var(--font-body); transition: var(--transition);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); background: #000; }
select { appearance: none; cursor: pointer; }

/* =========================================
   10. FOOTER
   ========================================= */
.footer { background: #020202; border-top: 1px solid #111; padding-top: 80px; font-size: 0.9rem; }
.footer-content { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 60px; }
.footer-logo-img { filter: brightness(0) invert(1); width: 140px; margin-bottom: 20px; }
.social-links a { display: inline-flex; width: 40px; height: 40px; border: 1px solid #333; justify-content: center; align-items: center; margin-right: 10px; transition: var(--transition); color: #888; }
.social-links a:hover { border-color: var(--gold); color: var(--gold); }
.footer-bottom { border-top: 1px solid #111; padding: 30px 0; text-align: center; color: #444; }


/* =========================================
   12. PREMIUM MODAL OVERHAUL (FIXED)
   ========================================= */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10000;
    display: flex; /* Always flex to center content */
    justify-content: center; align-items: center;
    
    /* Hiding Logic */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

.modal.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Darker, Blurry Backdrop */
.modal-backdrop {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    z-index: 1;
}

/* The Card Itself */
.modal-content {
    position: relative; z-index: 2;
    background: #111;
    width: 90%; max-width: 550px;
    padding: 50px 40px;
    border: 1px solid rgba(212, 175, 55, 0.5); /* Stronger Gold Border */
    box-shadow: 0 0 50px rgba(0,0,0,0.9);
    
    /* Slide Animation */
    transform: translateY(50px);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal.active .modal-content {
    transform: translateY(0);
}

/* Close Button */
.modal-close {
    position: absolute; top: 15px; right: 20px;
    background: transparent; border: none;
    font-size: 2.5rem; color: #666;
    cursor: pointer; transition: 0.3s;
    line-height: 1; z-index: 10;
}
.modal-close:hover { color: var(--gold); }

/* Typography & Inputs */
.modal-header h3 { color: var(--gold); font-size: 2rem; text-align: center; margin-bottom: 10px; }
.modal-header p { text-align: center; color: #999; margin-bottom: 30px; font-size: 0.9rem; }

.input-group { position: relative; margin-bottom: 25px; }
.premium-input {
    width: 100%; background: transparent; border: none; border-bottom: 1px solid #444;
    padding: 10px 0; color: #fff; font-size: 1rem; font-family: var(--font-body);
}
.premium-input:focus { outline: none; border-bottom-color: var(--gold); }

.premium-input:focus ~ label,
.premium-input:not(:placeholder-shown) ~ label {
    top: -20px; font-size: 0.8rem; color: var(--gold);
}

.input-group label {
    position: absolute; top: 10px; left: 0; color: #666; pointer-events: none; transition: 0.3s;
}

.select-wrapper { border-bottom: 1px solid #444; margin-bottom: 20px; }
.premium-select {
    width: 100%; background: transparent; border: none; padding: 10px 0; color: #fff; cursor: pointer;
}
.premium-select option { background: #000; color: #fff; }

@media (max-width: 600px) {
    .modal-content { padding: 30px 20px; width: 95%; }
}

/* =========================================
   11. RESPONSIVE DESIGN (Crucial for Mobile/Tablet)
   ========================================= */
@media (max-width: 1024px) {
    /* Tablet: Switch to 2 columns where fitting */
    .hero-title { font-size: 3.5rem; }
    .branches-grid, .services-grid, .membership-grid, .instagram-grid, .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Mobile: Stack Everything */
    
    /* Navigation */
    .nav-toggle { display: block; }
    .nav-menu {
        display: none; /* Hidden by default */
        position: absolute;
        top: 70px; right: 20px;
        background: #111;
        border: 1px solid #333;
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        width: 250px;
    }
    .nav-menu.active { display: flex; }
    
    /* Grids to 1 Column */
    .branches-grid, .services-grid, .membership-grid, .instagram-grid, .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .about-grid, .contact-content { grid-template-columns: 1fr; }
    
    .hero-title { font-size: 2.5rem; }
    .hero-stats { flex-direction: column; gap: 30px; }
    
    .form-row { grid-template-columns: 1fr; }
    .contact-info, #contact-form { padding: 40px 20px; }
    .contact-info { border-right: none; border-bottom: 1px solid #222; }
    
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-logo-img { margin: 0 auto 20px; }
    .social-links { justify-content: center; }
}