/* Base Styles and Variables */
:root {
    --dark-bg: #121212;
    --darker-bg: #0a0a0a;
    --card-bg: rgba(30, 30, 30, 0.7);
    --primary-color: #c9a959; /* Gold accent */
    --secondary-color: #8B0000; /* Deep red */
    --text-color: #f5f5f5;
    --text-secondary: #aaaaaa;
    --transition: all 0.3s ease;
    --border-radius: 4px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb:hover {
    background: #d8b96a;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--darker-bg);
}

.btn-primary:hover {
    background-color: #d8b96a;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Loading Screen */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--darker-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader-content {
    text-align: center;
}

.loader-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.car-path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drive 2s linear forwards;
}

@keyframes drive {
    to {
        stroke-dashoffset: 0;
    }
}

.loader h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    letter-spacing: 3px;
    color: var(--primary-color);
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

header.scrolled {
    background-color: rgba(10, 10, 10, 0.95);
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.logo {
    padding-left: 40px;
}

.logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--primary-color);
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding-right: 40px;
}

/* Hero Section */
.hero {
    height: 100vh;
    background-image: url('images/e39fcbbc-1725-4b16-ab4e-92c2b0c775d6.jpeg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin-left: 100px;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
    letter-spacing: 3px;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 40px;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
    letter-spacing: 2px;
}

.engine-sound {
    margin-top: 30px;
}

.sound-btn {
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: none;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.sound-btn:hover {
    background-color: #a60000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.3);
}

.sound-btn:active {
    transform: translateY(0);
}

.sound-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.sound-btn.playing {
    background-color: var(--primary-color);
    color: var(--darker-bg);
}

.sound-btn.playing i {
    transform: rotate(180deg);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.sound-btn.playing {
    animation: pulse 2s infinite;
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-line {
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 0 auto;
}

/* History Section */
.history {
    background-color: var(--darker-bg);
}

.history-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.history-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.history-image img {
    transition: transform 0.5s ease;
}

.history-image:hover img {
    transform: scale(1.05);
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.history-text {
    padding: 20px;
}

.intro-text {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 300;
    font-family: 'Playfair Display', serif;
}

.history-text p {
    margin-bottom: 20px;
}

.quote {
    padding: 30px;
    margin: 30px 0;
    border-left: 3px solid var(--primary-color);
    background-color: rgba(201, 169, 89, 0.1);
}

.quote blockquote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.1rem;
}

/* Specs Section */
.specs {
    background-color: var(--dark-bg);
    background-image: url('images/specs-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.specs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.85);
}

.specs-content {
    position: relative;
}

.specs-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.specs-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.spec-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.spec-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
}

.card-header {
    background-color: var(--primary-color);
    padding: 15px 20px;
}

.card-header h3 {
    color: var(--darker-bg);
    font-size: 1rem;
    text-align: center;
    letter-spacing: 1px;
}

.card-content {
    padding: 25px;
}

.card-content ul li {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.card-content ul li span {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 3px;
}

/* 3D Model Section */
.model3d {
    background-color: var(--darker-bg);
    position: relative;
    overflow: hidden;
}

.model-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.model-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: linear-gradient(145deg, var(--darker-bg) 0%, var(--card-bg) 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 5;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--primary-color);
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#model-viewer {
    width: 100%;
    height: 100%;
}

.model-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background-color: var(--primary-color);
    color: var(--darker-bg);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.control-btn:hover {
    transform: translateY(-2px);
    background-color: #d8b96a;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn i {
    font-size: 1.2rem;
}

/* Gallery Section */
.gallery {
    background-color: var(--darker-bg);
    position: relative;
}

.gallery-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 0 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
    aspect-ratio: 16/9;
    box-shadow: var(--box-shadow);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Removed transition since we're not transforming anymore */
}

.gallery-item:hover img {
    /* Removed transform scale effect */
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.8));
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

.gallery-item.loading {
    background: linear-gradient(90deg, var(--card-bg) 0%, var(--darker-bg) 50%, var(--card-bg) 100%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.lightbox.active {
    display: flex;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.close-lightbox:hover {
    color: var(--primary-color);
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    opacity: 1;
    transform: scale(1);
}

.lightbox-controls {
    position: absolute;
    bottom: 50px;
    display: flex;
    gap: 30px;
}

.prev-btn, .next-btn {
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: var(--transition);
}

.prev-btn:hover, .next-btn:hover {
    background-color: var(--primary-color);
    color: var(--darker-bg);
}

/* Features Section */
.features {
    background-color: var(--dark-bg);
}

.features-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-item {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: var(--box-shadow);
}

.feature-item:hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-icon i {
    font-size: 1.8rem;
    color: var(--darker-bg);
}

.feature-item h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Footer */
footer {
    background-color: var(--darker-bg);
    padding: 70px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.footer-logo p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-links h3, .footer-social h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-links h3::after, .footer-social h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.social-icons a i {
    font-size: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.footer-bottom i {
    color: var(--secondary-color);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero-content {
        margin-left: 50px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .specs-cards, .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background-color: var(--darker-bg);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition);
        z-index: 101;
    }
    
    nav ul.active {
        right: 0;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    nav ul li {
        margin: 15px 0;
        text-align: center;
    }
    
    .hero-content {
        margin-left: 30px;
        max-width: 90%;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .history-content, .specs-cards, .features-grid, .footer-content {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .gallery-item {
        aspect-ratio: 4/3;
    }
    
    section {
        padding: 70px 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-content {
        margin-left: 20px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .specs-intro, .gallery-intro, .features-intro {
        margin-bottom: 30px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .footer-content {
        gap: 30px;
    }
}

