/* Common Styles - Shared across all pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-secondary);
    background: var(--gradient-body);
    min-height: 100vh;
}

/* Index page specific - no top padding needed due to hero taking full viewport */
body.index-page {
    padding-top: 0;
}

/* Common page styles for pages with fixed header */
body.fixed-header {
    background: var(--bg-primary);
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.wide-container {
    max-width: 1600px;
    margin: auto;
    padding: 1rem;
}

nav {
    position: sticky;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--gradient-nav);
    z-index: 1000;
    padding: 6px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.hidden {
    display: none;
}

.parts-links {
    list-style: none;
    margin-top: 0.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 1vw;
}

.manuals-pages-nav {
    height: 100vh;
}

.nav-links li.manuals-pages-links {
    margin-left: 3vw;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

/* Manuals dropdown (shared) */
.manual-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    /* Slight padding so the menu visually connects and hover area is forgiving */
    padding: 0.12rem 0.25rem;
    margin: -0.12rem -0.25rem;
}

.manual-menu {
    position: absolute;
    top: 100%;
    margin-top: -2px;
    left: 0;
    background: var(--gradient-nav);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    padding: 0.55rem 0.7rem;
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    min-width: fit-content;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(6px);
}

.manual-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    padding: 0.5rem 0.78rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.manual-menu a:hover,
.manual-menu a:focus-visible {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.15);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.manual-dropdown.open .manual-menu,
.manual-dropdown:focus-within .manual-menu,
.manual-dropdown:hover .manual-menu {
    display: flex;
}

@media (max-width: 640px) {
    .manual-menu {
        background: var(--gradient-nav);
        border: 1px solid rgba(255, 255, 255, 0.18);
        box-shadow: none;
        padding: 0.4rem 0.5rem;
        left: 10vw;
    }
}

@media (max-width: 1120px) {
    .nav-links li {
        margin-left: 0.5rem;
        font-size: small !important;
    }
}

.nav-links a:hover {
    cursor: pointer;
    opacity: 0.8;
}

#theme-select {
    margin-right: 2%;
}

.lang-selector,
.theme-selector {
    display: flex;
    align-items: center;
}

.lang-selector select,
.theme-selector select {
    background: var(--gradient-button);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    padding: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-selector select option,
.theme-selector select option {
    background: var(--primary-color);
    color: #fff;
}

.lang-selector select:hover,
.theme-selector select:hover {
    background: var(--gradient-button-hover);
    border-color: rgba(255, 255, 255, 0.5);
}

.lang-selector select option:hover,
.theme-selector select option:hover,
.lang-selector select option:checked,
.theme-selector select option:checked {
    background: var(--primary-dark);
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: -1;
    transition: opacity 1.5s ease-in-out;
}

.hero::before {
    background-image: url('../background.jpg');
    opacity: 0.3;
}

.hero::after {
    background-image: url('../background.jpg');
    opacity: 0;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ---------- Search Hero ---------- */
.search-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.search-hero h1,
.wide-container h1 {
    font-size: 2rem;
    color: var(--text-primary);
}

.parts-links li a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.parts-links li a::after {
    content: " 🔗";
}

.parts-links li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.btn {
    display: inline-block;
    background: var(--gradient-button);
    color: #fff;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px var(--shadow-primary);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow-primary);
    background: var(--gradient-button-hover);
}

.features {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-primary);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-light);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
}

.feature-card h3 {
    margin-top: 1rem;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
}

.cta-section {
    padding: 5rem 0;
    background: var(--gradient-cta);
    color: #fff;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

footer {
    z-index: 11;
    background: var(--footer-bg);
    color: #fff;
    text-align: center;
    width: 100%;
    position: fixed;
    bottom: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 950px) {

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .features h2 {
        font-size: 2rem;
    }

    .nav-links {
        flex-direction: column-reverse;
        align-items: flex-start;
    }

    .nav-links li {
        margin-left: 0;
        margin-bottom: 0.5rem;
    }

    .banner-container {
        width: 55% !important;
    }

    .manual-menu {
        left: 5vw;
    }

}

/* ======================================================
   Mobile Navbar - Hamburger Menu
   ====================================================== */

/* Hamburger button (hidden by default) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ------------------ Mobile Only ------------------ */
@media (max-width: 950px) {

    #theme-select {
        width: 55px;
    }

    /* Show hamburger */
    .nav-toggle {
        display: flex;
    }

    /* Keep existing column layout BUT hide by default */
    .nav-links {
        display: none;
        /* override existing flex */
        border-radius: 8px;
    }

    /* When open */
    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: left;
        padding: 0;
    }

    .nav-links a {
        display: block;
        width: 100%;
        font-size: 1rem;
    }

    .lang-selector {
        margin-left: 0;
        padding: 0.5rem 1.5rem;
    }
}

/* ======================================================
   Hamburger → X Animation
   ====================================================== */

.nav-toggle span {
    transition: transform .5s ease, opacity 0.2s ease;
}

/* When menu is open */
.nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* ----------------------------------------------------- */