/* ─────────────────────────────────────────────────────────
   Cittopia · Unified site navigation styling
   With dropdown submenus
   ───────────────────────────────────────────────────────── */

.cn-header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #e8edf0;
    position: sticky;
    top: 0;
    z-index: 100;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.cn-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

/* Logo */
.cn-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #1b3a2f;
    text-decoration: none;
    font-weight: 700;
    flex-shrink: 0;
}
.cn-logo img {
    height: 36px;
    width: auto;
    display: block;
}

/* Nav links (desktop) */
.cn-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex: 1;
    justify-content: center;
}
.cn-link {
    color: #1b3a2f;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    line-height: 1.2;
}
.cn-link:hover {
    color: #2ca58d;
    background: rgba(44, 165, 141, 0.06);
}
.cn-link.active {
    color: #2ca58d;
    font-weight: 700;
}
.cn-caret {
    font-size: 0.7rem;
    color: #888;
    transition: transform 0.15s;
}

/* Dropdown wrapper */
.cn-dropdown {
    position: relative;
}
.cn-dropdown.open .cn-caret,
.cn-dropdown:hover .cn-caret {
    transform: rotate(180deg);
}
.cn-dropdown.active > .cn-drop-toggle {
    color: #2ca58d;
    font-weight: 700;
}

/* Dropdown menu panel */
.cn-drop-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    min-width: 280px;
    background: #fff;
    border: 1px solid #e8edf0;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(27, 58, 47, 0.12);
    padding: 0.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s, transform 0.18s;
    z-index: 200;
}
.cn-dropdown:hover .cn-drop-menu,
.cn-dropdown.open .cn-drop-menu {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Bridge invisible area between toggle and dropdown to prevent hover gap */
.cn-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0.5rem;
}

.cn-drop-item {
    display: block;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    color: #1b1d1f;
    transition: background 0.1s;
}
.cn-drop-item:hover {
    background: rgba(44, 165, 141, 0.08);
}
.cn-drop-item.active {
    background: #f4faf8;
}
.cn-drop-label {
    display: block;
    font-weight: 700;
    font-size: 0.92rem;
    color: #1b3a2f;
}
.cn-drop-item.active .cn-drop-label {
    color: #2ca58d;
}
.cn-drop-desc {
    display: block;
    font-size: 0.78rem;
    color: #5a6068;
    margin-top: 0.15rem;
    line-height: 1.35;
}

/* Right side: lang switcher + CTA */
.cn-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}
.cn-cta {
    background: #2ca58d;
    color: #fff;
    padding: 0.55rem 1.1rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
    white-space: nowrap;
    line-height: 1.2;
}
.cn-cta:hover {
    background: #1b3a2f;
    color: #fff;
    transform: translateY(-1px);
}

/* Mobile burger */
.cn-burger {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 4px;
}
.cn-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #1b3a2f;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.cn-burger.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.cn-burger.open span:nth-child(2) {
    opacity: 0;
}
.cn-burger.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile nav */
.cn-mobile-nav {
    display: none;
    flex-direction: column;
    padding: 0.75rem 1.5rem 1.25rem;
    background: #fff;
    border-top: 1px solid #e8edf0;
    gap: 0.2rem;
    max-height: 75vh;
    overflow-y: auto;
}
.cn-mob-group {
    padding: 0.85rem 0.5rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94a0aa;
}
.cn-mobile-nav .cn-mob-child {
    padding-left: 1.5rem;
    color: #1b3a2f;
}
.cn-mobile-nav .cn-mob-top {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid #f3f5f7;
    color: #1b3a2f;
}
.cn-cta-mobile {
    background: #2ca58d !important;
    color: #fff !important;
    text-align: center;
    margin-top: 0.8rem;
    padding: 0.9rem !important;
    border-radius: 100px !important;
    font-weight: 700;
    justify-content: center;
}

/* Responsive breakpoints */
@media (max-width: 1100px) {
    .cn-drop-desc { display: none; }
    .cn-drop-menu { min-width: 220px; }
}
@media (max-width: 1000px) {
    .cn-nav { display: none; }
    .cn-cta { display: none; }
    .cn-burger { display: flex; }
    .cn-mobile-nav:not([hidden]) { display: flex; }
    .cn-inner { padding: 0.75rem 1rem; gap: 0.75rem; }
    .cn-logo-text { display: none; }
}

/* Override conflicting page-specific nav styles */
body:has([data-cittopia-nav]) .header-center,
body:has([data-cittopia-nav]) .ins-header,
body:has([data-cittopia-nav]) > .global-header > .header-center,
body:has([data-cittopia-nav]) > .global-header > .header-right {
    display: none !important;
}
