/* 
   Prestige Auto Body - Modern Website Styles
   Created for a luxury auto body shop in San Rafael, CA
*/

/* ===== Base Styles ===== */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #c59d5f;
    --accent-color: #e74c3c;
    --text-light: #ffffff;
    --text-dark: #333333;
    --text-gray: #777777;
    --bg-light: #f8f8f8;
    --bg-dark: #1a1a1a;
    --transition: all 0.3s ease;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 5px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ===== Header & Navigation ===== */
.header {
    position: relative;
    height: 100vh;
    background-color: var(--bg-dark);
    overflow: hidden;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    z-index: 1000;
    transition: var(--transition);
    background-color: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
}

.navbar.scrolled {
    padding: 1rem 5%;
    background-color: rgba(26, 26, 26, 0.95);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    color: var(--text-light);
}

.logo img {
    max-height: 60px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-light);
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-light);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--text-light);
    text-align: center;
    padding: 0 1rem;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-content h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.hero-phone i {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== Services Section ===== */
.services {
    background-color: var(--bg-light);
    position: relative;
}

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

.service-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-gray);
}

/* ===== About Section ===== */
.about-section {
    background-color: var(--bg-dark);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.section-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.5;
}

.section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.section-container {
    position: relative;
    z-index: 2;
}

.about-section .section-title {
    color: var(--text-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: #ccc;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.image-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.before-after-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.before-image, .after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.before-image {
    background-image: url('https://images.unsplash.com/photo-1597172576974-f1fbf8e7e44b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    z-index: 1;
    width: 50%;
}

.after-image {
    background-image: url('https://images.unsplash.com/photo-1550355291-bbee04a92027?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    z-index: 0;
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: var(--secondary-color);
    z-index: 2;
    cursor: ew-resize;
}

.slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-handle::after {
    content: '↔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: bold;
}

/* ===== Gallery Section ===== */
.gallery {
    background-color: var(--bg-light);
    position: relative;
}

/* ===== Instagram Feed Section ===== */
.instagram-feed {
    background-color: var(--bg-light);
    position: relative;
}

.instagram-subtitle {
    text-align: center;
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-top: -2rem;
    margin-bottom: 2rem;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.instagram-post {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
    aspect-ratio: 1 / 1;
}

.instagram-post a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.instagram-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.instagram-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.instagram-post:hover img {
    transform: scale(1.05);
}

.instagram-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: var(--text-light);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.instagram-post:hover .instagram-overlay {
    opacity: 1;
}

.instagram-caption {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.instagram-date {
    font-size: 0.8rem;
    opacity: 0.8;
}

.instagram-placeholder {
    grid-column: 1 / -1;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.instagram-loading {
    text-align: center;
    color: var(--text-gray);
}

.instagram-loading i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.instagram-cta {
    text-align: center;
}

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

.gallery-item {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.gallery-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.gallery-item:nth-child(1) .gallery-image {
    background-image: url('https://images.unsplash.com/photo-1580273916550-e323be2ae537?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
}

.gallery-item:nth-child(2) .gallery-image {
    background-image: url('https://images.unsplash.com/photo-1552519507-da3b142c6e3d?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
}

.gallery-item:nth-child(3) .gallery-image {
    background-image: url('https://images.unsplash.com/photo-1503376780353-7e6692767b70?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
}

.gallery-item:nth-child(4) .gallery-image {
    background-image: url('https://images.unsplash.com/photo-1567808291548-fc3ee04dbcf0?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--text-light);
    transform: translateY(100px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===== Testimonials Section ===== */
.testimonials {
    background-color: var(--bg-dark);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.testimonials .section-title {
    color: var(--text-light);
}

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

.testimonial {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: #ddd;
}

.testimonial-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.testimonial-author h4 {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.stars {
    color: var(--secondary-color);
}

/* ===== Contact Section ===== */
.contact {
    background-color: var(--bg-light);
    position: relative;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 0.3rem;
}

.info-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.info-item p {
    color: var(--text-gray);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--text-light);
    border-radius: 50%;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.contact-form {
    background-color: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(197, 157, 95, 0.2);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 3rem 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo img {
    max-height: 80px;
    width: auto;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-info {
    color: #999;
    font-size: 0.9rem;
}

/* ===== Parallax & Animation Effects ===== */
.parallax-section {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.services.parallax-section {
    background-image: linear-gradient(rgba(248, 248, 248, 0.9), rgba(248, 248, 248, 0.9)), url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
}

.gallery.parallax-section {
    background-image: linear-gradient(rgba(248, 248, 248, 0.9), rgba(248, 248, 248, 0.9)), url('https://images.unsplash.com/photo-1535732820275-9ffd998cac22?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
}

.instagram-feed.parallax-section {
    background-image: linear-gradient(rgba(248, 248, 248, 0.9), rgba(248, 248, 248, 0.9)), url('https://images.unsplash.com/photo-1611162617213-7d7a39e9b1d7?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
}

.contact.parallax-section {
    background-image: linear-gradient(rgba(248, 248, 248, 0.9), rgba(248, 248, 248, 0.9)), url('https://images.unsplash.com/photo-1560253023-3ec5d502959f?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive Styles ===== */
@media screen and (max-width: 1024px) {
    html {
        font-size: 15px;
    }
    
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image {
        order: -1;
    }
}

@media screen and (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
        z-index: 1000;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .services-grid,
    .gallery-grid,
    .testimonial-slider {
        grid-template-columns: 1fr;
    }
    
    .instagram-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media screen and (min-width: 481px) and (max-width: 1024px) {
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
