/* ==============================
   NAVBAR - SIEMPRE DARK MODE
   ============================== */

@import url('https://fonts.googleapis.com/css2?family=Alata&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Alata&family=Comfortaa:wght@300..700&display=swap');

:root {
  --platinum: #e6e8e6;
  --platinum-dark: #ced0ce;
  --white: #ffffff;
  --black: #000000;
  --gray-light: #f5f5f7;
  --gray-mid: #8e8e93;
  --gold: #d4af37;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.08);
  --section-spacing: 80px;
  --font-family: "alata-regular", sans-serif;
  --overlay-gradient-start: rgba(0, 0, 0, 0.85);
  --overlay-gradient-mid: rgba(0, 0, 0, 0.7);
  --overlay-gradient-end: rgba(0, 0, 0, 0.5);
}

/* Navbar Base */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 4px 0;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    box-sizing: border-box;
    height: 12vh;
}

/* SIEMPRE DARK MODE por defecto */
.navbar.dark-mode {
    background: #000000;
}

/* Cuando hay scroll - fondo blanco */
.navbar.dark-mode.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    padding: 4px 0;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Container */
.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    justify-content: space-between;
    -webkit-justify-content: space-between;
    box-sizing: border-box;
}

/* Logo */
.navbar-logo {
    height: 100px;
    width: auto;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -webkit-user-select: none;
    user-select: none;
}

.navbar-logo:hover {
    transform: scale(1.05);
    -webkit-transform: scale(1.05);
}

/* Menu */
.navbar-menu {
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    gap: 40px;
}

.navbar-nav {
    display: flex;
    display: -webkit-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

/* Nav Items - Texto blanco por defecto */
.nav-link {
    color: white;
    text-decoration: none;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 200;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
    -webkit-transition: color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Cuando hay scroll - texto negro */
.navbar.dark-mode.scrolled .nav-link {
    color: #333;
}

.nav-link:hover {
    color: #D4AF37 !important;
}

.nav-link.active {
    color: #D4AF37 !important;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #D4AF37;
}

/* WhatsApp Button */
.whatsapp-button-nav {
    background: #25D366;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    display: -webkit-inline-flex;
    align-items: center;
    -webkit-align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.whatsapp-button-nav:hover {
    background: #128C7E;
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
}

/* Mobile Toggle */
.navbar-toggler {
    display: none;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    flex-direction: column;
    -webkit-flex-direction: column;
    justify-content: space-between;
    -webkit-justify-content: space-between;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.navbar-toggler span {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    transition: 0.3s;
    -webkit-transition: 0.3s;
}

/* Cuando hay scroll - hamburguesa negra */
.navbar.dark-mode.scrolled .navbar-toggler span {
    background: #333;
}

/* Overlay */
.navbar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.navbar-cta-mobile {
    display: none;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 992px) {
    .navbar-container {
        padding: 0 20px;
    }
    
    .navbar-menu {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: #222;
        flex-direction: column;
        -webkit-flex-direction: column;
        align-items: flex-start;
        -webkit-align-items: flex-start;
        padding: 100px 30px 30px;
        transition: right 0.3s ease;
        -webkit-transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .navbar-menu.active {
        right: 0;
    }
    
    .navbar-nav {
        flex-direction: column;
        -webkit-flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-link {
        padding: 15px 0;
        width: 100%;
        border-bottom: 1px solid #444;
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
    }
    
    .navbar-cta {
        display: none;
    }
    
    .navbar-cta-mobile {
        display: block;
        width: 100%;
        margin-top: 20px;
    }
    
    .whatsapp-button-mobile {
        display: block;
        background: #25D366;
        color: white;
        padding: 14px;
        border-radius: 25px;
        text-align: center;
        text-decoration: none;
        font-weight: 500;
        -webkit-tap-highlight-color: transparent;
        font-size: 16px;
    }
    
    .navbar-toggler {
        display: flex;
        display: -webkit-flex;
    }
    
    .navbar-overlay.active {
        display: block;
    }
}

/* iOS Safari specific */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 992px) {
        .navbar-menu {
            height: 100vh;
            height: -webkit-fill-available;
            padding-top: calc(100px + env(safe-area-inset-top));
            padding-bottom: calc(30px + env(safe-area-inset-bottom));
        }
    }
}

/* Tablet landscape */
@media (max-width: 1199px) and (min-width: 993px) {
    .navbar-container {
        padding: 0 30px;
    }
    
    .navbar-menu {
        gap: 30px;
    }
    
    .navbar-nav {
        gap: 20px;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
}

/* Mobile landscape */
@media (max-width: 767px) and (orientation: landscape) {
    .navbar-menu {
        padding: 80px 30px 20px;
    }
    
    .nav-link {
        padding: 10px 0;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .navbar-container {
        padding: 0 15px;
    }
    
    .navbar-logo {
        height: 65px;
    }
    
    .navbar-menu {
        width: 280px;
    }
    
    .nav-link {
        padding: 12px 0;
    }
}

/* Very small mobile */
@media (max-width: 320px) {
    .navbar-menu {
        width: 250px;
        padding: 90px 20px 20px;
    }
    
    .navbar-logo {
        height: 55px;
    }
}

/* Padding para body */
body {
    padding-top: 80px;
}

@media (max-width: 767px) {
    body {
        padding-top: 70px;
    }
}

/* Prevent zoom on focus in iOS */
@media screen and (max-width: 992px) {
    .navbar-toggler,
    .whatsapp-button-mobile,
    .nav-link {
        font-size: 16px;
    }
}