/* styles.css */
:root {
    --primary: #003366;
    --primary-dark: #002244;
    --accent: #FF0000;
    --light: #f8f9fa;
    --dark: #212529;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    color: var(--dark);
    background-color: #fff;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

.accent-red {
    color: #FF0000;
    font-weight: 700;
}

.logo-gray {
    color: #AAAAAA;
    font-weight: 600;
}

/* Header Styles */
header {
    background-color: #000000;
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px 0;
}

.logo {
    width: 400px;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: var(--transition);
    max-width: 100%;
}

.logo:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.header-text {
    text-align: center;
    flex-grow: 1;
}

header h1 {
    font-family: 'Montserrat', sans-serif;
    font-style: italic;
    font-weight: 400;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
    color: white;
    white-space: nowrap;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    color: #f0f0f0;
}

/* Navigation Styles */
nav {
    display: flex;
    justify-content: center;
    background: #000000;
    padding: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-top: 1px solid #333;
}

.nav-links {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    width: 100%;
    padding: 0 1rem;
    align-items: center;
}

nav a, .dropdown > a {
    color: white;
    text-decoration: none;
    margin: 0 0.75rem;
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
    font-size: 1rem;
    transition: var(--transition);
    height: 50px;
    display: flex;
    align-items: center;
}

nav a:hover, .dropdown > a:hover {
    color: var(--accent);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent);
    bottom: 0;
    left: 0;
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: #000000;
    min-width: 200px;
    z-index: 1;
    left: 0;
    top: 100%;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: 1px solid #333;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-content a {
    color: white;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    text-align: left;
    margin: 0;
    font-size: 0.9rem;
    transition: var(--transition);
    height: auto;
}

.dropdown-content a:hover {
    background: #333;
    padding-left: 1.25rem;
    color: var(--accent);
}

/* Header Contact Info */
.header-contact {
    margin-left: auto;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.header-contact a, .header-contact div {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    height: auto;
    transition: var(--transition);
    white-space: nowrap;
    margin: 2px 0;
}

.header-contact a:hover {
    color: var(--accent);
}

.header-contact a[href^="tel:"] {
    font-size: 24px;
    color: red;
    font-weight: bold;
}

.caret {
    margin-left: 5px;
    font-size: 0.8em;
}

/* Gallery Styles */
.gallery-container {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
}

.gallery-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    animation: galleryFade 8s infinite;
    opacity: 0;
}

.slide-1 {
    background-image: url('before-collision-repair-westwood-nj.jpg');
    animation-delay: 0s;
}

.slide-2 {
    background-image: url('after-collision-repair-westwood-nj.jpg');
    animation-delay: 4s;
}

@keyframes galleryFade {
    0% { opacity: 0; transform: scale(1.05); }
    10% { opacity: 1; transform: scale(1); }
    40% { opacity: 1; transform: scale(1); }
    50% { opacity: 0; transform: scale(1.05); }
    100% { opacity: 0; transform: scale(1.05); }
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    color: white;
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.gallery-overlay h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.gallery-overlay p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* CTA Button */
.cta-button {
    background: var(--accent);
    color: white;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    margin-top: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(255,102,0,0.3);
}

.cta-button:hover {
    background: #CC0000;
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

/* Section Title */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--primary);
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #FF0000;
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

/* Services Section */
.services {
    padding: 5rem 2rem;
    background: var(--light);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: 'Learn More →';
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    background: var(--accent);
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-weight: 600;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.service-card:hover::after {
    bottom: 0;
}

.service-card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.service-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    position: relative;
    z-index: 2;
}

.service-card p {
    color: #555;
    font-size: 1rem;
    position: relative;
    z-index: 2;
}

/* Map Section */
.map-container {
    width: 100%;
    padding: 5rem 2rem;
    background: white;
}

.map-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

.map-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 500px;
}

.map-wrapper iframe {
    height: 100%;
    width: 100%;
    border: none;
}

/* Contact Section */
.contact-section {
    padding: 5rem 2rem;
    background: var(--light);
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.contact-info {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-info a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255,102,0,0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
}

footer p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

footer p:first-child {
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Mobile Menu Toggle Styles */
.mobile-menu-container {
    display: none;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 1rem;
    z-index: 1001;
    position: relative;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: white;
    transition: var(--transition);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .logo {
        width: 350px;
    }
}

@media (max-width: 992px) {
    .logo {
        width: 300px;
    }
    
    .gallery-overlay h2 {
        font-size: 2rem;
    }
    
    .gallery-overlay p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .logo {
        width: 300px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .gallery-container {
        height: 60vh;
        min-height: 400px;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    nav a {
        margin: 0 0.5rem;
        font-size: 0.9rem;
        padding: 0.5rem 0;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    .map-wrapper {
        height: 400px;
    }
    
    .header-contact {
        margin-left: 0;
        width: 100%;
        text-align: center;
        align-items: center;
    }
    
    /* Mobile menu styles */
    nav {
        position: relative;
        padding: 0.5rem 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .mobile-menu-container {
        display: block;
        order: 2;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #000;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    nav a, .dropdown > a {
        margin: 1rem 0;
        font-size: 1.2rem;
        height: auto;
    }
    
    .dropdown-content {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        border: none;
        text-align: center;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .mobile-menu-toggle.active .hamburger {
        background: transparent;
    }
    
    .mobile-menu-toggle.active .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }
    
    .mobile-menu-toggle.active .hamburger::after {
        transform: rotate(-45deg);
        top: 0;
    }
}

@media (max-width: 576px) {
    .logo {
        width: 280px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .gallery-container {
        height: 50vh;
        min-height: 300px;
    }
    
    .gallery-overlay {
        padding: 2rem 1rem;
    }
    
    .gallery-overlay h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .contact-container {
        padding: 1.5rem;
    }
    
    .map-wrapper {
        height: 300px;
    }
    
    header h1 {
        font-size: 1.8rem !important;
        white-space: normal;
    }
}

@media (max-width: 400px) {
    .logo {
        width: 250px;
    }
    
    .header-contact a[href^="tel:"] {
        font-size: 1.1rem !important;
    }
}

/* Additional Sections */
.intro-section {
    padding: 4rem 2rem;
    background: white;
    text-align: center;
}

.intro-section h2 {
    font-size: 2rem;
    color: #003366;
    margin-bottom: 1.5rem;
}

.intro-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}

.warranty-section {
    padding: 5rem 2rem;
    background: #f8f9fa;
    text-align: center;
}

.warranty-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.family-section {
    padding: 3.75rem 1.875rem;
    background: white;
    text-align: center;
}

.feature-card {
    background: #f8f9fa;
    padding: 1.5625rem;
    border-radius: 10px;
}

.testimonial-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    text-align: left;
    position: relative;
}

.tesla-cta-box {
    background-color: #FF0000;
    padding: 1.5rem;
    text-align: center;
    margin: 2rem auto;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tesla-cta-link {
    color: white !important;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.tesla-cta-link:hover {
    opacity: 0.9;
}