/* ============================================
   Hagy's Automotive — Custom Styles
   Terracotta + Sand Palette | Confident Corporate
   ============================================ */

/* ---- CSS Custom Properties ---- */
:root {
    --terracotta: #C2704E;
    --terracotta-dark: #A85A3A;
    --terracotta-light: #D4916E;
    --sand: #F5F0E8;
    --sand-light: #FAF7F2;
    --sand-dark: #E8DFD0;
    --charcoal: #2A2A2A;
    --charcoal-light: #4A4A4A;
    --white: #FFFFFF;
    --off-white: #FEFCF9;
    --border: #E8E0D4;
    --shadow-sm: 0 1px 3px rgba(42, 42, 42, 0.06);
    --shadow-md: 0 4px 16px rgba(42, 42, 42, 0.08);
    --shadow-lg: 0 8px 32px rgba(42, 42, 42, 0.10);
    --shadow-xl: 0 16px 48px rgba(42, 42, 42, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --nav-width: 260px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 0;
}

body {
    font-family: var(--font-sans);
    color: var(--charcoal);
    background: var(--off-white);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ---- Layout ---- */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ---- Side Navigation ---- */
.side-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--nav-width);
    height: 100vh;
    background: var(--charcoal);
    color: var(--sand);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px 24px;
    z-index: 1000;
    overflow-y: auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    color: var(--terracotta);
    flex-shrink: 0;
}

.nav-brand-name {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 32px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: rgba(245, 240, 232, 0.6);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(194, 112, 78, 0.15);
}

.nav-link.active {
    color: var(--terracotta-light);
}

.nav-link svg {
    flex-shrink: 0;
}

.nav-cta {
    padding-top: 24px;
    border-top: 1px solid rgba(245, 240, 232, 0.1);
}

.nav-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--terracotta);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.nav-phone:hover {
    background: var(--terracotta-dark);
    transform: translateY(-1px);
}

/* ---- Mobile Menu Toggle ---- */
.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1100;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--charcoal);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: var(--shadow-md);
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--sand);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- Overlay ---- */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* ---- Main Content ---- */
.main-content {
    margin-left: var(--nav-width);
    flex: 1;
    min-height: 100vh;
}

/* ---- Section Base ---- */
.section {
    padding: 100px 0;
}

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

/* ---- Section Header ---- */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 16px;
    padding: 6px 16px;
    background: rgba(194, 112, 78, 0.1);
    border-radius: 100px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    color: var(--charcoal);
    line-height: 1.15;
    margin-bottom: 20px;
}

.section-desc {
    font-size: 18px;
    color: var(--charcoal-light);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.accent-text {
    color: var(--terracotta);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: var(--terracotta);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(194, 112, 78, 0.3);
}

.btn-primary:hover {
    background: var(--terracotta-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(194, 112, 78, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--charcoal);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--terracotta);
    color: var(--terracotta);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 18px 28px;
}

/* ---- HERO ---- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 60px 0;
    background: linear-gradient(135deg, var(--sand-light) 0%, var(--sand) 50%, var(--sand-dark) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(194, 112, 78, 0.05);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: 10%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(194, 112, 78, 0.04);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: var(--white);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--charcoal-light);
    box-shadow: var(--shadow-sm);
    margin-bottom: 28px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--terracotta);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 800;
    line-height: 1.08;
    color: var(--charcoal);
    margin-bottom: 24px;
}

.hero-desc {
    font-size: 18px;
    color: var(--charcoal-light);
    line-height: 1.75;
    margin-bottom: 36px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.hero-trust {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--charcoal-light);
}

.hero-image {
    position: relative;
}

.hero-img-wrapper {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.hero-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-img-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: var(--terracotta);
    border-radius: var(--radius-lg);
    z-index: -1;
}

.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.stat-card {
    background: var(--white);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.stat-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 800;
    color: var(--terracotta);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 13px;
    color: var(--charcoal-light);
    font-weight: 500;
}

/* ---- SERVICES ---- */
.services {
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.service-card {
    padding: 36px 28px;
    background: var(--sand-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--terracotta-light);
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius-md);
    color: var(--terracotta);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--terracotta);
    color: var(--white);
}

.service-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 10px;
    line-height: 1.3;
}

.service-card p {
    font-size: 14px;
    color: var(--charcoal-light);
    line-height: 1.7;
}

/* ---- ABOUT ---- */
.about {
    background: var(--sand);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-images {
    position: relative;
}

.about-img-main {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-img-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-img-secondary {
    position: absolute;
    bottom: -32px;
    right: -32px;
    width: 180px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--sand);
}

.about-img-secondary img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-accent-box {
    position: absolute;
    top: -24px;
    left: -24px;
    background: var(--terracotta);
    color: var(--white);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

.about-content {
    max-width: 520px;
}

.about-body {
    font-size: 16px;
    color: var(--charcoal-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--charcoal);
    line-height: 1.5;
}

.value-check {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(194, 112, 78, 0.1);
    border-radius: 50%;
    color: var(--terracotta);
    margin-top: 1px;
}

/* ---- WHY US ---- */
.why-us {
    background: var(--charcoal);
    color: var(--sand);
}

.why-us .section-tag {
    background: rgba(194, 112, 78, 0.2);
}

.why-us .section-title {
    color: var(--white);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.why-card {
    padding: 40px 32px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.why-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(194, 112, 78, 0.4);
    transform: translateY(-4px);
}

.why-number {
    font-family: var(--font-serif);
    font-size: 48px;
    font-weight: 800;
    color: rgba(194, 112, 78, 0.3);
    line-height: 1;
    margin-bottom: 20px;
}

.why-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
    line-height: 1.3;
}

.why-card p {
    font-size: 14px;
    color: rgba(245, 240, 232, 0.6);
    line-height: 1.75;
}

/* ---- GALLERY ---- */
.gallery {
    background: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 16px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.gallery-item.large {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
}

.gallery-item.wide {
    grid-column: 1 / 4;
    grid-row: 2 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(42, 42, 42, 0.8));
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    transform: translateY(100%);
    transition: var(--transition);
}

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

/* ---- CONTACT ---- */
.contact {
    background: var(--sand);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-desc {
    font-size: 16px;
    color: var(--charcoal-light);
    line-height: 1.75;
    margin-bottom: 36px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius-sm);
    color: var(--terracotta);
    box-shadow: var(--shadow-sm);
}

.contact-detail strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 4px;
}

.contact-detail span,
.contact-detail a {
    font-size: 15px;
    color: var(--charcoal-light);
    transition: var(--transition);
}

.contact-detail a:hover {
    color: var(--terracotta);
}

.contact-map {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* ---- Contact Form ---- */
.contact-form-wrapper {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.contact-form-header {
    margin-bottom: 28px;
}

.contact-form-header h3 {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 800;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.contact-form-header p {
    font-size: 14px;
    color: var(--charcoal-light);
    line-height: 1.6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--charcoal);
    background: var(--sand-light);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--terracotta);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(194, 112, 78, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #B0A898;
}

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

.form-success {
    display: none;
    text-align: center;
    padding: 48px 24px;
}

.form-success.show {
    display: block;
}

.success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(194, 112, 78, 0.1);
    border-radius: 50%;
    color: var(--terracotta);
}

.form-success h3 {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 800;
    color: var(--charcoal);
    margin-bottom: 10px;
}

.form-success p {
    font-size: 15px;
    color: var(--charcoal-light);
    line-height: 1.6;
}

/* ---- Footer ---- */
.footer {
    background: var(--charcoal);
    color: var(--sand);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--white);
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
}

.footer-logo svg {
    color: var(--terracotta);
}

.footer-brand p {
    font-size: 14px;
    color: rgba(245, 240, 232, 0.6);
    line-height: 1.7;
    max-width: 280px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--white);
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 14px;
    color: rgba(245, 240, 232, 0.6);
    transition: var(--transition);
}

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

.footer-contact p {
    font-size: 14px;
    color: rgba(245, 240, 232, 0.6);
    line-height: 1.8;
}

.footer-contact a {
    color: rgba(245, 240, 232, 0.6);
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--terracotta-light);
}

.footer-bottom {
    border-top: 1px solid rgba(245, 240, 232, 0.08);
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(245, 240, 232, 0.4);
}

/* ---- Scroll Animations ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    :root {
        --nav-width: 220px;
    }
    
    .hero-grid {
        gap: 40px;
    }
    
    .about-grid,
    .contact-grid {
        gap: 48px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 900px) {
    .side-nav {
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .side-nav.open {
        transform: translateX(0);
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-overlay.show {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-trust {
        align-items: center;
    }
    
    .hero-image {
        max-width: 480px;
        margin: 0 auto;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-images {
        max-width: 480px;
        margin: 0 auto;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .gallery-item.large {
        grid-column: 1 / 3;
    }
    
    .gallery-item.wide {
        grid-column: 1 / 3;
    }
}

@media (max-width: 640px) {
    .section {
        padding: 72px 0;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about-values {
        grid-template-columns: 1fr;
    }
    
    .about-img-secondary {
        width: 140px;
        right: -16px;
        bottom: -20px;
    }
    
    .about-accent-box {
        top: -16px;
        left: -16px;
        padding: 14px 18px;
        font-size: 12px;
    }
    
    .why-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item.large,
    .gallery-item.wide {
        grid-column: 1;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-form-wrapper {
        padding: 24px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
