/* Shared Navigation - matches React Menu component exactly */
/* Uses .ccnav prefix to avoid conflicts with both React and blog styles */
/* Roboto is bundled via @fontsource in the React app — no Google Fonts import needed */

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

body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

.ccnav {
    position: sticky;
    top: 0;
    z-index: 11000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    width: 100%;
    font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
}

.ccnav-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 32px;
    height: 64px;
    min-height: 64px;
}

.ccnav-logo-link {
    flex-shrink: 0;
    line-height: 0;
}

.ccnav-logo {
    height: 30px;
    width: auto;
    cursor: pointer;
}

/* Menu container: links + login */
.ccnav-menu {
    display: flex;
    align-items: center;
    width: 100%;
}

.ccnav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0 0 0 16px;
    flex-grow: 1;
}

.ccnav-links li {
    margin: 0;
    padding: 0;
}

.ccnav-links a {
    color: #000;
    text-decoration: none !important;
    font-size: 1rem;
    font-weight: 600 !important;
    position: relative;
    padding-bottom: 4px;
    white-space: nowrap;
    cursor: pointer;
    line-height: 1.75;
    letter-spacing: 0.00938em;
    border-radius: 0 !important;
    text-transform: none !important;
}

.ccnav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background-color: transparent;
}

.ccnav-links a:hover::after,
.ccnav-links a.ccnav-active::after,
.ccnav-links .current-menu-item > a::after {
    background-color: #5C33D7;
}

.ccnav-links a.ccnav-active,
.ccnav-links .current-menu-item > a {
    font-weight: 600 !important;
}

.ccnav-links a:hover {
    text-decoration: none;
}

/* Login button */
.ccnav-login {
    display: inline-block;
    padding: 5px 15px;
    border: 1px solid #000;
    border-radius: 4px !important;
    color: #000;
    text-decoration: none !important;
    font-size: 0.875rem;
    font-weight: 500 !important;
    text-transform: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.75;
    transition: background-color 250ms;
    cursor: pointer;
}

.ccnav-login:hover {
    background-color: rgba(0, 0, 0, 0.04);
    text-decoration: none;
}

/* Language switcher */
.ccnav-lang {
    position: relative;
    flex-shrink: 0;
}

.ccnav-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    transition: background 0.15s;
}

.ccnav-lang-btn:hover {
    background: rgba(0,0,0,0.05);
}

.ccnav-lang-chevron {
    color: #888;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.ccnav-lang.open .ccnav-lang-chevron {
    transform: rotate(180deg);
}

.ccnav-lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    overflow: hidden;
    min-width: 140px;
    z-index: 12000;
}

.ccnav-lang.open .ccnav-lang-dropdown {
    display: block;
}

.ccnav-lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    text-decoration: none !important;
    transition: background 0.15s;
}

.ccnav-lang-option:hover {
    background: #f5f5f5;
    color: #000;
    text-decoration: none !important;
}

/* Hamburger toggle */
.ccnav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
    color: #000;
}

.ccnav-toggle svg {
    width: 28px;
    height: 28px;
}

.ccnav-icon-close {
    display: none;
}

.ccnav-inner.menu-open .ccnav-icon-menu {
    display: none;
}

.ccnav-inner.menu-open .ccnav-icon-close {
    display: block;
}

/* Mobile */
@media (max-width: 1199px) {
    .ccnav-inner {
        justify-content: space-between;
    }
    .ccnav-menu {
        display: none;
    }
    .ccnav-toggle {
        display: block;
    }
    .ccnav-inner.menu-open .ccnav-menu {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        padding: 32px 24px 16px;
        z-index: 10900;
        width: 100%;
    }
    .ccnav-inner.menu-open .ccnav-links {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 0;
        gap: 16px;
    }
    .ccnav-inner.menu-open .ccnav-login {
        margin-top: 16px;
        align-self: flex-start;
    }
}

/* ===== Shared Footer (.ccfooter) ===== */
/* Loaded on all pages (SPA + blog) via nav-styles.css */

.ccfooter {
    position: relative;
    z-index: 10;
    width: 100%;
    background: #16121C;
    color: #ffffff;
    font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
    padding: 60px 48px 0;
}

.ccfooter-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
}

@media (max-width: 900px) {
    .ccfooter-inner {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 600px) {
    .ccfooter-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

.ccfooter h4 {
    font-family: 'Kanit', 'Helvetica', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: #ffffff;
}

.ccfooter p {
    color: #9CA3AF;
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

.ccfooter a {
    color: #9CA3AF;
    text-decoration: none;
    transition: color 0.2s;
}

.ccfooter a:hover {
    color: #ffffff;
    text-decoration: none;
}

.ccfooter-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ccfooter-links li {
    margin-bottom: 8px;
}

.ccfooter-links a {
    font-size: 0.9rem;
}

.ccfooter-social {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.ccfooter-social-link {
    color: #9CA3AF;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.ccfooter-social-link:hover {
    color: #ffffff;
}

.ccfooter-address p {
    margin-bottom: 4px;
}

/* Logo + copyright bar — full bleed, centered column */
.ccfooter-bottom {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 40px;
    padding: 48px 24px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.ccfooter-bottom a {
    display: inline-flex;
}

.ccfooter-logo {
    height: 52px;
    width: auto;
    opacity: 0.85;
}

.ccfooter-copyright {
    font-size: 0.8rem;
    color: #9CA3AF;
    margin: 0;
}
