/* ══════════════════════════════════════════════════════════════════════════
   HEADER & NAVIGATION
   Three breakpoints: desktop (>1024), tablet (769-1024), mobile (<=768)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Skip Link ──────────────────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 10000;
    padding: 8px 16px;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
    clip: auto;
    clip-path: none;
    height: auto;
    width: auto;
    margin: 0;
    overflow: visible;
}
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    word-wrap: normal;
}

/* ── Top Utility Bar ────────────────────────────────────────────────────── */
.topbar {
    display: none;
    background: var(--color-primary);
    color: #fff;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
}
.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 10px;
}
.topbar__contact {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.topbar__item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.topbar__link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}
.topbar__link:hover {
    opacity: 0.85;
}
.topbar__item--address {
    display: flex;
    align-items: center;
    gap: 6px;
}
.topbar__social {
    display: flex;
    align-items: center;
    gap: 10px;
}
.topbar__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s, transform 0.2s;
}
.topbar__social-link--whatsapp { background: var(--color-whatsapp); }
.topbar__social-link--whatsapp:hover { background: #1ebe57; transform: scale(1.05); }
.topbar__social-link--instagram { background: linear-gradient(45deg, #F53142, #882BF8); }
.topbar__social-link--instagram:hover { opacity: 0.9; transform: scale(1.05); }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
}
.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 16px;
}

/* Logo */
.navbar__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.navbar__logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

/* Desktop Menu */
.navbar__menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.navbar__item {
    position: relative;
}
.navbar__link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-dark);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
}
.navbar__link:hover,
.navbar__item--active > .navbar__link {
    color: var(--color-primary);
    background: rgba(0, 148, 255, 0.06);
}

/* Active indicator: bottom bar */
.navbar__item--active > .navbar__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
}

/* Chevron rotation */
.navbar__link--dropdown .icon--chevron {
    transition: transform 0.2s;
}

/* ── Desktop Dropdown ────────────────────────────────────────────────────── */
.navbar__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 280px;
    background: #fff;
    list-style: none;
    padding: 8px 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    z-index: 1000;
}
/* Show on hover (desktop) and focus-within (keyboard) */
.navbar__item--dropdown:hover > .navbar__dropdown,
.navbar__item--dropdown:focus-within > .navbar__dropdown {
    display: block;
}
/* Rotate chevron when dropdown open */
.navbar__item--dropdown:hover > .navbar__link--dropdown .icon--chevron,
.navbar__item--dropdown:focus-within > .navbar__link--dropdown .icon--chevron {
    transform: rotate(180deg);
}
.navbar__dropdown-link {
    display: block;
    padding: 10px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--color-dark);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}
.navbar__dropdown-link:hover,
.navbar__dropdown-link[aria-current="page"] {
    color: var(--color-primary);
    background: rgba(0, 148, 255, 0.04);
}
/* Separator between items */
.navbar__dropdown li + li .navbar__dropdown-link {
    border-top: 1px solid #f0f2f5;
}

/* ── CTA Button ──────────────────────────────────────────────────────────── */
.navbar__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--color-primary);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 8px;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}
.navbar__cta:hover {
    background: #007ad9;
    transform: translateY(-1px);
}

/* ── Hamburger Toggle ────────────────────────────────────────────────────── */
.navbar__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    color: var(--color-dark);
    z-index: 1001;
    border-radius: 6px;
    transition: background 0.2s;
}
.navbar__toggle:hover {
    background: #f0f2f5;
}
.navbar__toggle-icon--close {
    display: none;
}
.navbar__toggle[aria-expanded="true"] .navbar__toggle-icon--open { display: none; }
.navbar__toggle[aria-expanded="true"] .navbar__toggle-icon--close { display: block; }

/* ── Mobile / Tablet Menu Drawer ─────────────────────────────────────────── */
.mobile-menu {
    display: none;
    background: #fff;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.mobile-menu.is-open {
    display: block;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 20px 20px;
    border-top: 1px solid #eee;
}
.mobile-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mobile-menu__item {
    border-bottom: 1px solid #f0f2f5;
}
.mobile-menu__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    padding: 14px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-dark);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}
.mobile-menu__link:hover,
.mobile-menu__item--active > .mobile-menu__link {
    color: var(--color-primary);
}
.mobile-menu__link--dropdown .icon--chevron {
    transition: transform 0.25s;
}
.mobile-menu__link--dropdown[aria-expanded="true"] .icon--chevron {
    transform: rotate(180deg);
}

/* Mobile Accordion Dropdown */
.mobile-menu__dropdown {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0 0 8px 16px;
}
.mobile-menu__dropdown.is-open {
    display: block;
}
.mobile-menu__dropdown-link {
    display: block;
    padding: 11px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.mobile-menu__dropdown-link:hover {
    color: var(--color-primary);
}

/* Mobile Contact Buttons */
.mobile-menu__contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.mobile-menu__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 14px 20px;
    background: var(--color-primary);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border-radius: 8px;
    transition: background 0.2s;
}
.mobile-menu__cta:hover {
    background: #007ad9;
}
.mobile-menu__wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 14px 20px;
    background: #25D366;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border-radius: 8px;
    transition: background 0.2s;
}
.mobile-menu__wa:hover {
    background: #1fb855;
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Desktop: >1024px — full nav + topbar ────────────────────────────── */
@media (min-width: 1025px) {
    .topbar { display: block; }
    .navbar__menu { gap: 4px; }
    .navbar__link { font-size: 15px; padding: 10px 12px; }
    .navbar__toggle { display: none; }
}

/* ── Tablet: 769px – 1024px — compact nav, no topbar ────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
    .navbar__inner { padding: 10px 16px; gap: 8px; }
    .navbar__logo img { height: 40px; }
    .navbar__menu { gap: 0; }
    .navbar__link {
        font-size: 13px;
        padding: 8px 8px;
    }
    /* CTA: icon only on tablet to save space */
    .navbar__cta {
        padding: 10px;
        border-radius: 8px;
    }
    .navbar__cta-label { display: none; }
    .navbar__toggle { display: none; }
    .navbar__dropdown { min-width: 260px; }
}

/* ── Mobile: <=768px — hamburger ─────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar__inner { padding: 10px 12px; }
    .navbar__logo img { height: 40px; }

    /* Hide desktop nav, show hamburger */
    .navbar__menu { display: none; }
    .navbar__cta { display: none; }
    .navbar__toggle {
        display: flex;
    }
}

/* ── Small mobile: <=480px ───────────────────────────────────────────── */
@media (max-width: 480px) {
    .navbar__logo img { height: 36px; }
    .mobile-menu__link { font-size: 15px; }
    .mobile-menu__dropdown-link { font-size: 14px; }
}

/* Touch-open dropdown support (CSS class toggled by JS for touch devices) */
.navbar__item--dropdown.is-touch-open > .navbar__dropdown {
    display: block;
}
.navbar__item--dropdown.is-touch-open > .navbar__link--dropdown .icon--chevron {
    transform: rotate(180deg);
}
