@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:wght@300;400;500;600&display=swap');

/* ════════════════════════════
   ANIMATIONS
════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes lineGrow {
    from { width: 0; }
    to   { width: 40px; }
}

/* ════════════════════════════
   BASE
════════════════════════════ */
body {
    margin: 0;
    font-family: 'Barlow', Arial, sans-serif;
    background: #f7f7f7;
}

/* ════════════════════════════
   SHARED UTILITIES
════════════════════════════ */

/* Tagline with leading line */
.pointer-text {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: 'Barlow', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #888;
    margin: 0 0 0.4em;
}

.pointer-text .line {
    width: 40px;
    height: 1.5px;
    background-color: #bbb;
    flex-shrink: 0;
    animation: lineGrow 0.6s ease 0.2s both;
}

/* Main page H1 */
.page-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 5rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: #111;
    margin: 0;
    line-height: 1;
}

/* ════════════════════════════
   NAV
════════════════════════════ */
nav.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f0f0f0;
    margin: 4em 20% 0 20%;
    border-radius: 2.5em;
    height: 5.9em;
    position: relative;
    padding: 0 3em;
    filter: drop-shadow(0 0.3em 0.5em rgba(0, 0, 0, 0.2));
    z-index: 1000;
}

nav.nav img {
    height: 10em;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.nav-left,
.nav-right {
    display: flex;
    gap: 4em;
    z-index: 2;
}

.nav-pill {
    text-decoration: none;
    padding: 10px 15px;
    color: #333;
    border-radius: 5px;
    font-size: 1.2em;
    font-family: 'Barlow', sans-serif;
    font-weight: 500;
}

.nav-pill:hover,
.nav-pill.active {
    background-color: #000000;
    color: white;
}

/* Side controls */
.nav-side {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
    z-index: 3;
}

.nav-side-left  { left: -4.5em; }
.nav-side-right { right: -4.5em; }

/* Language switcher */
.lang-switch {
    display: flex;
    gap: 0.3em;
    font-size: 0.8em;
    font-weight: bold;
    color: #555;
    font-family: 'Barlow', sans-serif;
}

.lang-switch span {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background 0.2s, color 0.2s;
}

.lang-switch span.active-lang {
    background: #000;
    color: #fff;
}

.lang-switch span:hover:not(.active-lang) {
    background: #ddd;
}

/* Theme toggle */
.theme-toggle {
    background: #e0e0e0;
    border: none;
    border-radius: 50%;
    width: 2.4em;
    height: 2.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.theme-toggle:hover {
    background: #ccc;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4em;
    z-index: 10;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile dropdown */
.mobile-menu {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: #f0f0f0;
    margin: 0.5rem 1rem 0;
    border-radius: 1.5rem;
    padding: 1.5rem 1rem;
    filter: drop-shadow(0 0.3em 0.5em rgba(0, 0, 0, 0.15));
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.mobile-menu.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.mobile-menu .nav-pill {
    font-size: 1.1rem;
    width: 100%;
    text-align: center;
}

.mobile-menu-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    width: 100%;
    justify-content: center;
}

/* ════════════════════════════
   SHARED PAGE LAYOUT (sidebar + content)
════════════════════════════ */
.page-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    align-items: flex-start;
}

.page-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 2rem;
    padding: 2rem 1.2rem 2rem 0;
    border-right: 1px solid #e0e0e0;
    animation: fadeUp 0.6s ease both;
}

.sidebar-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.06em;
    color: #111;
    margin: 0 0 1rem;
    line-height: 1;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sidebar-link {
    display: block;
    font-family: 'Barlow', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #888;
    text-decoration: none;
    padding: 0.45rem 0.7rem;
    border-left: 2px solid transparent;
    border-radius: 0 4px 4px 0;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.sidebar-link:hover {
    color: #111;
    background: rgba(0,0,0,0.04);
}

.sidebar-link.active {
    color: #ff6a00;
    border-left-color: #ff6a00;
    background: rgba(255, 106, 0, 0.05);
}

.page-content {
    flex: 1;
    padding: 2.5rem 0 4rem 3rem;
    min-width: 0;
}

/* ════════════════════════════
   FOOTER
════════════════════════════ */
.site-footer {
    margin-top: 5rem;
    background: #111;
    color: #aaa;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    display: flex;
    justify-content: center;
    gap: 10rem;
}

.footer-heading {
    font-family: 'Barlow', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 1rem;
}

.footer-social {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    border: 1px solid #333;
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    font-family: 'Barlow', sans-serif;
    font-weight: 600;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.social-link:hover {
    border-color: #ff6a00;
    color: #ff6a00;
    background: rgba(255,106,0,0.08);
}

.footer-text {
    font-size: 0.88rem;
    line-height: 1.7;
    margin: 0 0 0.3rem;
    color: #888;
    font-family: 'Barlow', sans-serif;
}

.footer-text a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-text a:hover { color: #ff6a00; }

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-nav a {
    font-size: 0.88rem;
    font-family: 'Barlow', sans-serif;
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-nav a:hover { color: #ff6a00; }

.footer-bottom {
    border-top: 1px solid #222;
    text-align: center;
    padding: 1.2rem 2rem;
    font-size: 0.78rem;
    font-family: 'Barlow', sans-serif;
    color: #555;
}

/* ════════════════════════════
   DARK MODE
════════════════════════════ */
[data-theme="dark"] body { background: #1a1a1a; }

[data-theme="dark"] nav.nav {
    background-color: #2a2a2a;
    filter: drop-shadow(0 0.3em 0.5em rgba(0, 0, 0, 0.5));
}

[data-theme="dark"] .nav-pill { color: #ccc; }

[data-theme="dark"] .nav-pill:hover,
[data-theme="dark"] .nav-pill.active {
    background-color: #ffffff;
    color: #000;
}

[data-theme="dark"] .lang-switch { color: #aaa; }
[data-theme="dark"] .lang-switch span.active-lang { background: #fff; color: #000; }
[data-theme="dark"] .lang-switch span:hover:not(.active-lang) { background: #444; }

[data-theme="dark"] .theme-toggle { background: #444; color: #fff; }
[data-theme="dark"] .theme-toggle:hover { background: #555; }

[data-theme="dark"] .mobile-menu { background: #2a2a2a; }
[data-theme="dark"] .hamburger span { background: #ccc; }
[data-theme="dark"] .mobile-menu-controls { border-top-color: rgba(255,255,255,0.1); }

/* Shared utilities dark */
[data-theme="dark"] .pointer-text { color: #555; }
[data-theme="dark"] .pointer-text .line { background-color: #ff6a00; }
[data-theme="dark"] .page-title { color: #f0ece4; }

/* Sidebar dark */
[data-theme="dark"] .page-sidebar { border-right-color: #2a2a2a; }
[data-theme="dark"] .sidebar-heading { color: #f0ece4; }
[data-theme="dark"] .sidebar-link { color: #555; }
[data-theme="dark"] .sidebar-link:hover { color: #ccc; background: rgba(255,255,255,0.04); }
[data-theme="dark"] .sidebar-link.active { color: #ff6a00; border-left-color: #ff6a00; background: rgba(255,106,0,0.06); }

/* Footer dark */
[data-theme="dark"] .site-footer { background: #0d0d0d; }
[data-theme="dark"] .footer-bottom { border-top-color: #1a1a1a; }

/* i18n elements start hidden */
[data-i18n] { visibility: hidden; }

/* ════════════════════════════
   NAV RESPONSIVE BREAKPOINTS
════════════════════════════ */

/* Large monitors that aren't huge */
@media (max-width: 1400px) {
    nav.nav { margin-left: 10%; margin-right: 10%; }
}

/* Medium desktops / laptops */
@media (max-width: 1150px) {
    nav.nav {
        margin-left: 5%;
        margin-right: 5%;
        padding: 0 2em;
    }
    .nav-left, .nav-right { gap: 2em; }
    .nav-side-left { left: -3.5em; }
    .nav-side-right { right: -3.5em; }
}

/* Small desktops / large tablets — side controls can't float outside at this width,
   bring them inside the nav flow */
@media (max-width: 960px) and (min-width: 769px) {
    nav.nav {
        margin-left: 1.5%;
        margin-right: 1.5%;
        padding: 0 1.2em;
    }
    .nav-side {
        position: static;
        flex-direction: row;
        gap: 0.4rem;
        align-items: center;
    }
    .nav-left, .nav-right { gap: 0.8em; }
    .nav-pill { font-size: 1em; padding: 6px 10px; }
}

/* ════════════════════════════
   MOBILE
════════════════════════════ */
@media (max-width: 768px) {
    nav.nav {
        margin: 1.5rem 1rem;
        padding: 0 1.2rem;
        height: 4rem;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        border-radius: 1.5rem;
    }

    .nav-left,
    .nav-right,
    .nav-side {
        display: none;
    }

    nav.nav img {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        height: 5rem;
        z-index: 1;
    }

    .hamburger { display: flex; }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1.2rem 1.5rem;
    }
}

/* Sidebar collapses to horizontal tabs on mobile */
@media (max-width: 900px) {
    .page-layout {
        flex-direction: column;
        padding: 0 1rem;
    }

    .page-sidebar {
        width: 100%;
        position: static;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding: 1.5rem 0 0.8rem;
    }

    [data-theme="dark"] .page-sidebar { border-bottom-color: #2a2a2a; }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.3rem;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-link {
        white-space: nowrap;
        border-left: none;
        border-bottom: 2px solid transparent;
        border-radius: 4px 4px 0 0;
        padding: 0.35rem 0.9rem;
    }

    .sidebar-link.active {
        border-left-color: transparent;
        border-bottom-color: #ff6a00;
    }

    .page-content { padding: 1.5rem 0 3rem; }
}

/* ════════════════════════════
   NAV DROPDOWN (Products)
════════════════════════════ */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
}

.nav-dropdown .dropdown-trigger::after {
    content: '▾';
    font-size: 0.65em;
    opacity: 0.55;
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.nav-dropdown:hover .dropdown-trigger::after,
.nav-dropdown.open .dropdown-trigger::after {
    transform: rotate(-180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
    min-width: 260px;
    padding: 0.5rem 0;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Invisible bridge below the trigger so hover isn't lost crossing the gap */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.55rem 1.2rem;
    text-decoration: none;
    font-family: 'Barlow', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: #444;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.dropdown-item:hover { background: #f5f5f5; color: #ff6a00; }
.dropdown-item.active { color: #ff6a00; background: rgba(255,106,0,0.05); font-weight: 600; }

/* Dark mode */
[data-theme="dark"] .dropdown-menu {
    background: #2a2a2a;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}
[data-theme="dark"] .dropdown-item { color: #ccc; }
[data-theme="dark"] .dropdown-item:hover { background: #333; color: #ff6a00; }
[data-theme="dark"] .dropdown-item.active { color: #ff6a00; background: rgba(255,106,0,0.08); }

/* Mobile product links in mobile menu */
.mobile-products-group {
    width: 100%;
}

.mobile-products-label {
    font-family: 'Barlow', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #aaa;
    margin: 0.5rem 0 0.3rem;
    padding: 0 1rem;
    text-align: center;
}

.mobile-products-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    width: 100%;
}

.nav-pill-sm {
    text-decoration: none;
    padding: 7px 10px;
    color: #555;
    border-radius: 5px;
    font-size: 0.82rem;
    font-family: 'Barlow', sans-serif;
    font-weight: 500;
    text-align: center;
    transition: background 0.2s, color 0.2s;
}

.nav-pill-sm:hover,
.nav-pill-sm.active {
    background-color: #ff6a00;
    color: #fff;
}

[data-theme="dark"] .mobile-products-label { color: #555; }
[data-theme="dark"] .nav-pill-sm { color: #888; }
[data-theme="dark"] .nav-pill-sm:hover,
[data-theme="dark"] .nav-pill-sm.active { background: #ff6a00; color: #fff; }
