@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
}

body {
    background-color: #fff;
    color: #000;
}

a {
    text-decoration: none;
    color: inherit;
}

.main {
    overflow: hidden;
}

.navbar-container {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgb(255, 255, 255);
}

.navbar {
    display: flex;
    height: 56px;
    align-items: center;
    position: relative;
}

.logo {
    flex: 1;
    align-items: center;
    display: flex;
    font-weight: 500;
    color: rgb(23, 26, 32);
}

.middle-menu {
    position:absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.right-menu {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.nav-item {
    font-size: 14px;
    cursor: pointer;
    padding: 4px 16px;
}

.nav-item:hover {
    background-color: #d8d9da;
    border-bottom-left-radius: 9999px;
    border-bottom-right-radius: 9999px;
    border-top-left-radius: 9999px;
    border-top-right-radius: 9999px;
}

.nav-icon-item {
    position: relative;      /* needed for tooltip positioning */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 18px;         /* controls icon size */
}

/* The tooltip text — hidden by default */
.icon-tooltip {
    position: absolute;
    top: 40px;               /* sits below the icon */
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;     /* prevents text wrapping */
    opacity: 0;              /* invisible by default */
    pointer-events: none;    /* can't accidentally hover the tooltip itself */
    transition: opacity 0.2s ease;
}

/* Show tooltip on hover */
.nav-icon-item:hover .icon-tooltip {
    opacity: 1;
}

/* Optional — subtle hover background like Tesla */
.nav-icon-item:hover {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
}
/* Hero Section Styles*/

.hero-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

/*these styles are for the slides in the hero section, you can customize them as needed, hide by default*/
.slide {
    display: none;
    position: relative;
    height: calc(100vh - 56px);
    background-size: cover;
    background-position: center;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.hero-section .slide:first-child {
    display: flex; /* Show the first slide by default */
}

.slide:target {
    display: flex; /* Show the first slide by default */
}

/*Individual slide backgrounds*/
#slide-1 {
    background-image: url(./assets/FSD.jpg);
    background-size: cover;
    background-position: center;
}

#slide-2 {
    background-image: url(./assets/sergey-sokolov-mw8A4dOX9z8-unsplash.jpg);
    background-size: cover;
    background-position: center;
}

#slide-3 {
    background-image: url(./assets/Model\ Y\ \(slide\ sec\).jpg);
    background-size: cover;
    background-position: center;
}

.slide h1 {
    margin-bottom: 10px;
    font-size: 48px;
    font-weight: 500;
    color: #ffffff;
}

.slide p {
    font-size: 20px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.995);
}

/*buttons area*/
.actions-area {
    display: flex;
    justify-content: center;    
    margin-bottom: 100px;
}

button {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    width: 164px;
    height: 40px;
    padding: 4px 4px 4px 4px;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    margin-right: 15px;
    cursor: pointer;
}

.dark-btn {
    background-color: #3B82F6;
    color: #ffffff;
}

.light-btn {
    background-color: rgba(255, 255, 255, 0.948);
    color: #171a1e;
}

.dark-btn:hover {
    background-color: #2563eb;
}

.light-btn:hover {
    background-color: #dbdbdb;
}

/*arrows for the hero section*/
.arrow-left, .arrow-right {
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    color: #111;
    background-color: rgba(255, 255, 255, 0.85);
    justify-content: center;
    text-decoration: none;
} 

.arrow-left {
    left: 20px;
}

.arrow-right {
    right: 20px;
}

.arrow-left:hover, .arrow-right:hover {
    background-color: #fff;
}

.dot-navigation {
    position: absolute;
    bottom: 20px;
    display: flex;
    left: 50%;
    transform: translateX(-50%);
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
}

.dot:hover {
    background-color: #fff;
}

.content-section {
    position: relative;
    background: #ffffff;
    padding: 40px 0 30px;
    overflow: hidden; 
    position: relative;
}

/* The track holds all cards in a horizontal row*/
.models-track {
    display: flex;
    gap: 16px;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0 40px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;
}

.models-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.model-card {
    scroll-snap-align: start;
    flex-shrink: 0;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 580px;
    width: calc(50% - 28px);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 30px 30px;
    color: #fff;
}

.model-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 55%);
    border-radius: 12px;
}

.card-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 2; 
}

/* Keeps text above the overlay */
.model-card h2,
.model-card p,
.model-card .model-tag,
.model-card .actions-area {
    position: relative;
    z-index: 1;
}

.model-actions-area {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    position: relative;
    z-index: 2;        /* ← lifts buttons above the ::before overlay */
}
/* Small label at top like "Sport Sedan" */
.model-tag {
    font-size: 17px;
    font-weight: 500;
    position: relative;
    color: #fff;
    z-index: 2;
}

.model-card h2 {
    font-size: 48px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #fff;
}

.model-card p {
    font-size: 20px;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
}

/* Individual card backgrounds */
#model-1 { background-image: url('./assets/Model\ 3\ \(model\ section\).jpg'); }
#model-2 { background-image: url('./assets/Model\ X.jpg'); }
#model-3 { background-image: url('./assets/Model\ S.jpg'); }
#model-4 { background-image: url('./assets/Model\ Y\ \(model\ sec\).jpg'); }

/* Dots */
.dots-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    padding: 0 40px;
}

.dots-container .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    display: block;
    transition: background 0.2s;
}

.dots-container .dot:hover {
    background: #000;
}

.section-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    color: #111;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    text-decoration: none;
    z-index: 10;
}

.section-arrow-left  { left: 8px; }
.section-arrow-right { right: 8px; }

.section-arrow:hover { background: #fff; }

footer {
    background: #ffffff;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 40px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 24px;
}

.footer-item a {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.558);
}

.footer-item a:hover {
    color: #000000;
}

/* Responsive adjustments for mobile */

/* Media query — only applies when screen is 768px wide or less */
@media (max-width: 768px) {
    /* Hide middle nav on mobile — not enough space */
    .middle-menu {
        display: none;
    }

    /* Right menu also simplified */
    .right-menu {
        gap: 8px;
    }

    .nav-item {
        padding: 4px 8px;
    }

    /* Hero text scales down */
    .slide h1 {
        font-size: 28px;
        padding: 0 20px;
    }

    .slide p {
        font-size: 16px;
        padding: 0 20px;
    }

    /* Buttons stack vertically on mobile */
    .actions-area {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    /* Model cards go full width on mobile — one at a time */
    .model-card {
        width: calc(100% - 80px);   /* one card visible instead of two */
        height: 460px;
    }

    .model-card h2 {
        font-size: 32px;
    }

    /* Model card buttons stack on mobile */
    .model-actions-area {
        flex-direction: column;
        gap: 8px;
    }

    .model-card .dark-btn,
    .model-card .light-btn {
        width: 100%;
    }

    /* Footer links wrap nicely */
    .footer-nav {
        gap: 8px 16px;
    }
}