/* ══════════════════════════════════════════════
   PAUDEL ENTERPRISES — Complete Navbar CSS
   ══════════════════════════════════════════════ */

/* ── Variables ────────────────────────────────── */
:root {
    --color-dark:       #1F2937;
    --color-accent:     #F97316;
    --color-border:     #E5E7EB;
    --header-height-lg: 110px;
    --header-height-sm: 70px;
    --transition:       all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm:        0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md:        0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg:        0 10px 15px -3px rgba(0,0,0,0.1);
}

/* ── Base ─────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; overflow-x: hidden; }
h1   { font-family: 'Oswald', sans-serif; text-transform: uppercase; line-height: 1.1; }
a    { text-decoration: none; color: inherit; transition: var(--transition); }
ul   { list-style: none; }
img  { max-width: 100%; display: block; }

/* ── Header wrapper ───────────────────────────── */
header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: var(--header-height-lg);
    background: #ffffff;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

/* Shrunk state on scroll */
header.scrolled {
    height: var(--header-height-sm);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--color-border);
}

/* ── Logo ─────────────────────────────────────── */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.site-logo {
    width: auto;
    height: clamp(30px, 4vw, 80px);
    object-fit: contain;
    display: block;
    transition: var(--transition);
}

header.scrolled .site-logo {
    height: 44px;
}

.site-logo-fallback {
    font-family: 'Oswald', sans-serif;
    font-size: 1.15rem;
    line-height: 1;
    color: var(--color-dark);
    text-transform: uppercase;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: var(--color-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%);
    transition: var(--transition);
}
.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-text {
    display: flex;
    flex-direction: column;
}
.logo-text h1 {
    font-size: 2.2rem;
    color: var(--color-dark);
    letter-spacing: -1px;
    margin: 0;
    transition: var(--transition);
}
.logo-text span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #64748b;
    font-weight: 700;
    transition: opacity 0.3s ease;
}

/* Shrink logo on scroll */
header.scrolled .logo-icon       { width: 40px; height: 40px; }
header.scrolled .logo-text h1    { font-size: 1.5rem; }
header.scrolled .logo-text span  { opacity: 0; display: none; }

/* ── Nav links ────────────────────────────────── */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-dark);
    position: relative;
    white-space: nowrap;
}

/* Animated underline on hover */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--color-accent);
    transition: var(--transition);
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ── Nav item (wrapper) ───────────────────────── */
.nav-item {
    position: relative;
    padding-bottom: 8px;                /* ← extends hover zone to cover submenu gap */
    margin-bottom: -8px;               /* ← cancel out so layout stays the same */
}

/* ── Submenu — DESKTOP ────────────────────────── */
/*
   FIX: Added display:none as the default hidden state.
   Previously only opacity/visibility were used, which caused
   layout issues because the submenu still participated in
   the flex flow. display:none removes it entirely.
*/
.submenu {
    position: absolute;
    top: 100%;                          /* ← flush to nav-item bottom, no gap */
    left: 0;
    min-width: 220px;
    background: #ffffff;
    display: none;
    flex-direction: column;
    gap: 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-accent);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 999;
    padding-top: 8px;                   /* ← visual spacing moved INSIDE submenu */
}

/* Show submenu on desktop hover */
.nav-item:hover > .submenu {
    display: flex;                      /* ← show as flex column */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    width: 100%;
}

.submenu .nav-link {
    display: block;
    padding: 12px 20px;
    font-size: 0.85rem;
    text-transform: capitalize;
    border-bottom: 1px solid var(--color-border);
    letter-spacing: 0.3px;
}

.submenu li:last-child .nav-link {
    border-bottom: none;
}

/* Remove underline animation inside submenu */
.submenu .nav-link::after {
    display: none;
}

.submenu .nav-link:hover {
    background: #f3f4f6;
    padding-left: 26px;
    color: var(--color-accent);
}

/* ── Mobile toggle button ─────────────────────── */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-dark);
    background: none;
    border: none;
    padding: 4px 8px;
}

/* ── User login button ────────────────────────── */
.nav-user-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: var(--transition);
    margin-left: 16px;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.35);
}

.nav-user-btn:hover {
    background: #c2410c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.45);
    color: #ffffff;
}

/* Shrink slightly when header scrolls */
header.scrolled .nav-user-btn {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
}

/* On mobile — keep it visible beside the hamburger */
@media (max-width: 768px) {
    .nav-user-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
        margin-left: 10px;
    }
}

/* ── Responsive — Mobile ──────────────────────── */
@media (max-width: 768px) {

    .site-logo {
        height: 42px;
    }

    /* Show hamburger */
    .mobile-toggle { display: block; }

    /* ── Mobile nav menu ──────────────────────── */
    .nav-menu {
        display: none;
        position: absolute;
        top: var(--header-height-sm);
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;           /* ← stretch full width */
        gap: 0;
        background: #ffffff;
        padding: 8px 0 16px;
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - var(--header-height-sm));
        overflow-y: auto;
    }

    .nav-menu.active { display: flex; }

    /* Top-level items */
    .nav-menu > .nav-item {
        width: 100%;
    }

    .nav-menu > .nav-item > .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 24px;
        font-size: 0.9rem;
        border-bottom: 1px solid var(--color-border);
    }

    /* Remove desktop underline animation on mobile */
    .nav-menu > .nav-item > .nav-link::after {
        display: none;
    }

    /* ── Chevron arrow for items with submenus ── */
    .nav-item.has-submenu > .nav-link::before {
        content: '›';
        font-size: 1.2rem;
        font-weight: 300;
        line-height: 1;
        color: #9CA3AF;
        transition: transform 0.25s ease, color 0.2s ease;
        margin-left: auto;
        padding-left: 12px;
    }

    .nav-item.has-submenu.open > .nav-link::before {
        transform: rotate(90deg);
        color: var(--color-accent);
    }

    /* Underline animation: disable on items with submenus on mobile */
    .nav-item.has-submenu > .nav-link::after {
        display: none;
    }

    /* ── Mobile submenu — accordion ──────────── */
    /*
       FIX: position:static removes the absolute float, making
       the submenu part of the normal document flow as an
       accordion panel below its parent nav item.
    */
    .submenu {
        position: static;               /* ← KEY FIX: in-flow accordion */
        display: none;
        flex-direction: column;
        width: 100%;
        min-width: unset;
        background: #f9fafb;
        box-shadow: none;
        border: none;
        border-top: 2px solid var(--color-accent);
        border-bottom: 1px solid var(--color-border);
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
        margin-top: 0;
        padding: 4px 0;
    }

    /* Show submenu when parent has .open class (toggled via JS) */
    .nav-item.open > .submenu {
        display: flex;
    }

    /* Submenu links on mobile */
    .submenu .nav-link {
        display: block;
        padding: 11px 24px 11px 36px;  /* ← indent to show hierarchy */
        font-size: 0.85rem;
        color: #4B5563;
        border-bottom: 1px solid #F3F4F6;
        text-transform: capitalize;
        letter-spacing: 0.2px;
    }

    .submenu li:last-child .nav-link {
        border-bottom: none;
    }

    .submenu .nav-link:hover {
        background: #f3f4f6;
        padding-left: 40px;
        color: var(--color-accent);
    }

    /* Active state highlight */
    .submenu .nav-link.active {
        color: var(--color-accent);
        font-weight: 600;
    }
}

/* ══════════════════════════════════════════════
   HERO + SLIDESHOW
   ══════════════════════════════════════════════ */
.hero {
    position: relative;
    height: 90vh;
    width: 100%;
    overflow: hidden;
    margin-top: var(--header-height-lg);
}

.slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.slide.active { opacity: 1; z-index: 2; }

.slide-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1);
    transition: transform 6s ease;
    filter: brightness(0.7);
}
.slide.active .slide-bg { transform: scale(1.1); }

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease 0.3s;
}
.slide.active .hero-content { opacity: 1; transform: translateY(0); }

.hero h1 {
    color: white;
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}
.hero p {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    color: #e5e7eb;
    margin-bottom: 30px;
}

/* Slider dots */
.slider-dots {
    position: absolute;
    bottom: 30px; left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 12px;
}

.dot {
    width: 12px; height: 12px;
    border-radius: 0;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s;
    transform: rotate(45deg);
}
.dot.active {
    background: var(--color-accent);
    transform: rotate(45deg) scale(1.2);
}

/* ══════════════════════════════════════════════
   BRANDS SCROLL
   ══════════════════════════════════════════════ */
.brands-section {
    padding: 50px 0;
    background: #111827;
    overflow: hidden;
    position: relative;
}

.brands-wrapper {
    display: flex;
    width: max-content;
    animation: scrollBrands 25s linear infinite;
}

.brands-section:hover .brands-wrapper {
    animation-play-state: paused;
}

.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 180px;
    margin: 0 40px;
    color: #9CA3AF;
    transition: var(--transition);
}
.brand-item:hover { color: white; }
.brand-item i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--color-accent);
}
.brand-item span {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

@keyframes scrollBrands {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════
   HERO RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .hero {
        margin-top: var(--header-height-sm);
        height: 70vh;
    }
    .hero h1 { font-size: 2.4rem; }
    .hero p  { font-size: 1rem; }
}