/* ============================================
   Ekotek v2 — Layout Styles (Step 2: Navbar)
   --------------------------------------------
   Google Sans Flex  |  #1f1f1f text  |  Material Symbols
   ============================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --font-base: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --color-text: #1f1f1f;
    --color-primary: #F1562C;
    --color-primary-hover: #d94a22;
    --color-white: #ffffff;
    --topbar-bg: #1a1a1a;
    --topbar-height: 44px;
    --navbar-height: 80px;
    --transition-fast: 0.15s ease;
    --shadow-dropdown: 0 8px 24px rgba(0, 0, 0, 0.08);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-base);
    color: var(--color-text);
    line-height: 1.6;
    background: var(--color-white);
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    font-family: var(--font-base);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
}

/* ---- Material Symbols ---- */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.topbar-icon {
    font-size: 16px;
    margin-right: 4px;
}

.dropdown-chevron {
    font-size: 18px;
    margin-left: 2px;
    transition: transform var(--transition-fast);
}

/* ---- Topbar ---- */
.topbar {
    background: var(--topbar-bg);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8125rem;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
}

.topbar-social {
    display: flex;
    align-items: center;
    gap: 2px;
}

.topbar-social a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.topbar-social a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.topbar-social a img {
    width: 14px;
    height: 14px;
    display: block;
    filter: brightness(0) invert(1);
    opacity: 0.75;
    transition: opacity var(--transition-fast);
}

.topbar-social a:hover img {
    opacity: 1;
}

.topbar-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-info a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color var(--transition-fast);
}

.topbar-info a:hover {
    color: var(--color-white);
}

/* Topbar language switcher */
.topbar-lang {
    position: relative;
}

.topbar-lang-current {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-base);
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    transition: background var(--transition-fast);
}

.topbar-lang-current:hover {
    background: rgba(255, 255, 255, 0.18);
}

.topbar-lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 130px;
    background: var(--color-white);
    border-radius: 6px;
    box-shadow: var(--shadow-dropdown);
    list-style: none;
    padding: 4px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1002;
}

.topbar-lang-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.topbar-lang-dropdown li a {
    display: block;
    padding: 6px 12px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: background var(--transition-fast);
}

.topbar-lang-dropdown li a:hover {
    background: rgba(241, 86, 44, 0.04);
    color: var(--color-primary);
}

/* ---- Navbar ---- */
.site-navbar {
    background: var(--color-white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--navbar-height);
}

.navbar-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.navbar-brand img {
    height: 60px;
    width: auto;
    display: block;
}

/* Toggle (mobile) */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.navbar-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Menu wrapper */
.navbar-menu {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
    gap: 24px;
}

/* Nav list */
.navbar-nav {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 32px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 8px 0;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-item:hover > .nav-link .dropdown-chevron {
    transform: rotate(180deg);
}

/* Dropdown base */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: var(--color-white);
    border-radius: 8px;
    box-shadow: var(--shadow-dropdown);
    list-style: none;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1001;
}

/* Arrow pointer */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 24px;
    width: 12px;
    height: 12px;
    background: var(--color-white);
    transform: rotate(45deg);
    border-radius: 2px;
    box-shadow: -2px -2px 4px rgba(0,0,0,0.04);
}

.nav-item:hover > .dropdown-menu,
.dropdown-item-wrap:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item-wrap {
    position: relative;
}

.dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast), background var(--transition-fast);
    white-space: nowrap;
}

.dropdown-link:hover {
    color: var(--color-primary);
    background: rgba(241, 86, 44, 0.04);
}

/* Multi-level: child dropdown opens to the right */
.dropdown-menu .dropdown-menu {
    top: -8px;
    left: calc(100% + 8px);
}

.dropdown-menu .dropdown-menu::before {
    top: 16px;
    left: -6px;
    transform: rotate(-45deg);
    box-shadow: -2px 2px 4px rgba(0,0,0,0.04);
}

/* Rightmost items: open to the left */
.nav-item:last-child > .dropdown-menu,
.dropdown-item-wrap:last-child > .dropdown-menu {
    left: auto;
    right: 0;
}

.dropdown-item-wrap:last-child > .dropdown-menu .dropdown-menu {
    left: auto;
    right: calc(100% + 8px);
}

/* ---- Navbar Extras ---- */
.navbar-extras {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Navbar search */
.navbar-search {
    display: flex;
    align-items: center;
    position: relative;
    width: 44px;
    height: 40px;
    transition: width 0.3s ease;
    overflow: hidden;
}

.navbar-search.is-focused,
.navbar-search:focus-within {
    width: 220px;
}

.navbar-search-input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    background: #f8f8f8;
    font-family: var(--font-base);
    font-size: 0.875rem;
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    opacity: 0;
}

.navbar-search.is-focused .navbar-search-input,
.navbar-search:focus-within .navbar-search-input {
    opacity: 1;
}

.navbar-search-input::placeholder {
    color: #999;
}

.navbar-search-input:focus {
    border-color: var(--color-primary);
    background: var(--color-white);
}

.navbar-search-btn {
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: background var(--transition-fast);
}

.navbar-search-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.navbar-search-btn img {
    width: 18px;
    height: 18px;
    display: block;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.navbar-search-btn:hover img {
    opacity: 1;
}

/* Live search dropdown */
.navbar-search-dropdown {
    position: absolute;
    top: calc(70% + 8px);
    max-width: 90vw;
    max-height: 420px;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(6, 20, 58, 0.18);
    border: 1px solid rgba(6, 20, 58, 0.08);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.navbar-search-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.navbar-search-results {
    padding: 8px 0;
}
.navbar-search-section {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8a95a8;
}
.navbar-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #06143a;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    outline: none;
}
.navbar-search-item:hover,
.navbar-search-item.is-active {
    background: #f3f6fb;
}
.navbar-search-item-info {
    min-width: 0;
}
.navbar-search-item-title {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.navbar-search-item-meta {
    display: block;
    font-size: 12px;
    color: #8a95a8;
    font-weight: 500;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.navbar-search-no-results {
    padding: 20px 14px;
    text-align: center;
    color: #8a95a8;
    font-size: 14px;
}

/* ---- Main & Footer ---- */
.site-main {
    min-height: 50vh;
}

/* ---- Footer ---- */
.site-footer {
    background: #1a1a1a;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
}

.footer-logo img {
    height: 60px;
    width: auto;
    display: block;
}

.footer-about {
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 280px;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    transition: background var(--transition-fast), transform var(--transition-fast);
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
}

.footer-social a img {
    width: 15px;
    height: 15px;
    display: block;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-title {
    color: var(--color-white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: inline-block;
}

.footer-col ul li a:hover {
    color: var(--color-primary);
}

.footer-contact ul li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.6;
}

.footer-icon {
    font-size: 18px;
    color: var(--color-primary);
    margin-top: 1px;
    flex-shrink: 0;
}

.footer-bottom {
    padding: 20px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-size: 0.8125rem;
}

.footer-bottom-links a:hover {
    color: var(--color-primary);
}

/* ============================================
   Responsive (Mobile)
   ============================================ */
@media (max-width: 991px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        position: fixed;
        top: calc(var(--topbar-height) + var(--navbar-height));
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-white);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 24px;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .navbar-menu.is-open {
        transform: translateX(0);
    }

    .navbar-toggle {
        z-index: 1000;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .nav-item {
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .nav-link {
        padding: 14px 0;
        font-size: 1rem;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 8px 16px;
        min-width: auto;
        display: none;
    }

    .dropdown-menu::before {
        display: none;
    }

    .nav-item.is-open > .dropdown-menu,
    .dropdown-item-wrap.is-open > .dropdown-menu {
        display: block;
    }

    .dropdown-menu .dropdown-menu {
        left: auto;
        top: auto;
        padding-left: 16px;
    }

    .dropdown-link {
        padding: 10px 0;
        font-size: 0.9375rem;
    }

    .navbar-extras {
        margin-top: 24px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .navbar-cta {
        width: 100%;
        text-align: center;
    }

    .lang-switcher {
        width: 100%;
    }

    .lang-current {
        width: 100%;
        justify-content: center;
    }

    .lang-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
        margin-top: 8px;
    }

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

    .navbar-search {
        width: 100%;
        height: 44px;
    }

    .navbar-search.is-focused,
    .navbar-search:focus-within {
        width: 100%;
    }

    .navbar-search-input {
        opacity: 1;
        border-radius: 8px;
        background: #f5f5f5;
    }

    .navbar-search-btn {
        right: 4px;
    }

    .topbar-info {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

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

    .footer-about {
        max-width: none;
    }
}

/* ============================================
   Responsive (Mobile)
   ============================================ */
@media (max-width: 991px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        position: fixed;
        top: calc(var(--topbar-height) + var(--navbar-height));
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-white);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 24px;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .navbar-menu.is-open {
        transform: translateX(0);
    }

    .navbar-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .nav-item {
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .nav-link {
        padding: 14px 0;
        font-size: 1rem;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 8px 16px;
        min-width: auto;
        display: none;
    }

    .dropdown-menu::before {
        display: none;
    }

    .nav-item.is-open > .dropdown-menu,
    .dropdown-item-wrap.is-open > .dropdown-menu {
        display: block;
    }

    .dropdown-menu .dropdown-menu {
        left: auto;
        top: auto;
        padding-left: 16px;
    }

    .dropdown-link {
        padding: 10px 0;
        font-size: 0.9375rem;
    }

    .navbar-extras {
        margin-top: 24px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .navbar-cta {
        width: 100%;
        text-align: center;
    }

    .navbar-search {
        width: 100%;
        height: 44px;
    }

    .navbar-search.is-focused,
    .navbar-search:focus-within {
        width: 100%;
    }

    .navbar-search-input {
        opacity: 1;
        border-radius: 8px;
        background: #f5f5f5;
    }

    .navbar-search-btn {
        right: 4px;
    }

}


/* ---- Breadcrumb ---- */
.breadcrumb {
    padding: 16px 0;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: #595959;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    color: #bbb;
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: #595959;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: #f26522;
}

.breadcrumb-item.is-active {
    color: #162033;
    font-weight: 500;
}