/* ===================================
   Electromecánica — Custom Styles
   Classic & Elegant Auto Repair
   Charcoal + Coral Palette
   =================================== */

/* ---------- CSS Variables ---------- */
:root {
    --charcoal: #374151;
    --charcoal-dark: #1f2937;
    --charcoal-deeper: #111827;
    --coral: #E07A5F;
    --coral-light: #e8956f;
    --coral-dark: #c4654a;
    --cream: #F5F0EB;
    --cream-light: #FAF7F4;
    --warm-gray: #9CA3AF;
    --warm-gray-light: #D1D5DB;
    --white: #FFFFFF;
    --black: #0F172A;
    
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    --nav-width: 260px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

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

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s var(--ease-out);
}

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

ul {
    list-style: none;
}

/* ---------- Container ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

.section-header--center {
    text-align: center;
}

.section-header__eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--coral);
    margin-bottom: 16px;
}

.section-header__line {
    display: inline-block;
    width: 32px;
    height: 1px;
    background-color: var(--coral);
    flex-shrink: 0;
}

.section-header__title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    line-height: 1.15;
    color: var(--charcoal-dark);
}

.section-header__title--light {
    color: var(--cream);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    border-radius: 4px;
    transition: all 0.35s var(--ease-out);
    cursor: pointer;
}

.btn--primary {
    background-color: var(--coral);
    color: var(--white);
    border: 1.5px solid var(--coral);
}

.btn--primary:hover {
    background-color: var(--coral-dark);
    border-color: var(--coral-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(224, 122, 95, 0.3);
}

.btn--outline {
    background-color: transparent;
    color: var(--white);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.btn--outline:hover {
    border-color: var(--white);
    background-color: rgba(255, 255, 255, 0.08);
}

.btn--light {
    background-color: var(--white);
    color: var(--charcoal-dark);
    border: 1.5px solid var(--white);
}

.btn--light:hover {
    background-color: transparent;
    color: var(--white);
    transform: translateY(-2px);
}

.btn--full {
    width: 100%;
    justify-content: center;
}

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

.side-nav__top {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.side-nav__logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--cream);
    line-height: 1.2;
}

.side-nav__nav {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 16px 0;
}

.side-nav__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-nav__link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--warm-gray);
    transition: all 0.3s var(--ease-out);
    position: relative;
}

.side-nav__link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 24px;
    background-color: var(--coral);
    border-radius: 2px;
    transition: height 0.3s var(--ease-out);
}

.side-nav__link:hover,
.side-nav__link.active {
    color: var(--cream);
}

.side-nav__link.active::before,
.side-nav__link:hover::before {
    height: 28px;
}

.link-number {
    font-family: var(--font-serif);
    font-size: 0.6875rem;
    font-weight: 400;
    color: var(--coral);
    opacity: 0.6;
    min-width: 20px;
    transition: opacity 0.3s;
}

.side-nav__link:hover .link-number,
.side-nav__link.active .link-number {
    opacity: 1;
}

.side-nav__bottom {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.side-nav__phone {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    color: var(--warm-gray);
    transition: color 0.3s;
}

.side-nav__phone:hover {
    color: var(--coral);
}

.side-nav__copyright {
    font-size: 0.6875rem;
    color: var(--warm-gray);
    opacity: 0.5;
}

/* Mobile toggle */
.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: var(--cream);
    border-radius: 6px;
    transition: background-color 0.3s;
}

.mobile-toggle:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

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

/* ========== CONTENT AREA ========== */
.content {
    margin-left: var(--nav-width);
    min-height: 100vh;
}

/* ========== SECTION BASE ========== */
.section {
    padding: 100px 0;
    min-height: auto;
}

/* ========== HERO ========== */
.section--hero {
    padding: 0;
    min-height: 100vh;
    position: relative;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    overflow: hidden;
}

.hero__bg-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.6;
    pointer-events: none;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        var(--charcoal-deeper) 0%,
        rgba(31, 41, 55, 0.92) 40%,
        rgba(31, 41, 55, 0.6) 70%,
        transparent 100%
    );
    pointer-events: none;
}

.hero__image {
    position: relative;
    height: 100%;
    min-height: 600px;
}

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

.hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 64px 80px 48px;
    max-width: 600px;
}

.hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--coral);
    margin-bottom: 28px;
}

.hero__eyebrow-line {
    display: inline-block;
    width: 40px;
    height: 1px;
    background-color: var(--coral);
    flex-shrink: 0;
}

.hero__title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 500;
    line-height: 1.1;
    color: var(--cream);
    margin-bottom: 24px;
}

.hero__title .accent {
    font-style: italic;
    color: var(--coral);
}

.hero__subtitle {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--warm-gray-light);
    margin-bottom: 40px;
    max-width: 440px;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* ========== SERVICES ========== */
.section--services {
    background-color: var(--cream-light);
}

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

.service-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 40px 32px;
    border: 1px solid rgba(55, 65, 81, 0.06);
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--coral);
    transform: scaleX(0);
    transition: transform 0.4s var(--ease-out);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(55, 65, 81, 0.1);
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-card__icon {
    width: 56px;
    height: 56px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(224, 122, 95, 0.08);
    border-radius: 12px;
}

.service-card__icon svg {
    width: 28px;
    height: 28px;
}

.service-card__title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--charcoal-dark);
    margin-bottom: 12px;
}

.service-card__description {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--warm-gray);
}

/* ========== ABOUT ========== */
.section--about {
    background-color: var(--charcoal-deeper);
    padding: 120px 0;
}

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

.about__images {
    position: relative;
}

.about__image-main {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

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

.about__image-secondary {
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 55%;
    border-radius: 8px;
    overflow: hidden;
    border: 4px solid var(--charcoal-deeper);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

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

.about__accent-box {
    position: absolute;
    top: -24px;
    right: -24px;
    background-color: var(--coral);
    padding: 24px 28px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 12px 32px rgba(224, 122, 95, 0.4);
}

.accent-box__number {
    display: block;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1;
    margin-bottom: 4px;
}

.accent-box__label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.about__content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about__text {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--warm-gray);
}

.about__values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 32px;
    padding: 24px 0;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--cream);
}

.value-item svg {
    flex-shrink: 0;
}

/* ========== GALLERY ========== */
.section--gallery {
    background-color: var(--cream);
    padding: 120px 0;
}

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

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item--large {
    grid-column: span 7;
    grid-row: span 2;
}

.gallery-item--wide {
    grid-column: span 5;
    grid-row: span 2;
}

.gallery-item:not(.gallery-item--large):not(.gallery-item--wide) {
    grid-column: span 6;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

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

.gallery-item__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.4s var(--ease-out);
}

.gallery-item:hover .gallery-item__caption {
    opacity: 1;
    transform: translateY(0);
}

/* ========== CONTACT ========== */
.section--contact {
    background-color: var(--cream-light);
}

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

.contact__text {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--warm-gray);
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-detail {
    display: flex;
    gap: 20px;
}

.contact-detail__icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(224, 122, 95, 0.08);
    border-radius: 10px;
}

.contact-detail__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--coral);
    margin-bottom: 4px;
}

.contact-detail__value {
    display: block;
    font-size: 0.9375rem;
    color: var(--charcoal-dark);
    line-height: 1.6;
}

.contact-detail__link {
    color: var(--charcoal-dark);
    transition: color 0.3s;
}

.contact-detail__link:hover {
    color: var(--coral);
}

/* Contact Form */
.contact__form-wrapper {
    background-color: var(--white);
    border-radius: 12px;
    padding: 48px;
    box-shadow: 0 8px 40px rgba(55, 65, 81, 0.06);
    border: 1px solid rgba(55, 65, 81, 0.06);
}

.contact-form__title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--charcoal-dark);
    margin-bottom: 32px;
}

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

.form-group__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--warm-gray);
    margin-bottom: 8px;
}

.form-group__input,
.form-group__textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: var(--charcoal-dark);
    background-color: var(--cream-light);
    border: 1.5px solid transparent;
    border-radius: 6px;
    transition: all 0.3s var(--ease-out);
    outline: none;
}

.form-group__input:focus,
.form-group__textarea:focus {
    border-color: var(--coral);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.1);
}

.form-group__input::placeholder,
.form-group__textarea::placeholder {
    color: var(--warm-gray-light);
}

.form-group__textarea {
    resize: vertical;
    min-height: 120px;
}

.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    gap: 16px;
}

.form-success p {
    font-size: 1rem;
    color: var(--charcoal);
    line-height: 1.6;
    max-width: 280px;
}

/* ========== FOOTER ========== */
.footer {
    background-color: var(--charcoal-deeper);
    padding: 80px 0 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 64px;
    padding-bottom: 64px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__brand {
    max-width: 320px;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.footer__tagline {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--warm-gray);
}

.footer__links h4,
.footer__contact h4 {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 500;
    color: var(--cream);
    margin-bottom: 20px;
}

.footer__links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer__links a {
    font-size: 0.9375rem;
    color: var(--warm-gray);
    transition: color 0.3s, padding-left 0.3s;
}

.footer__links a:hover {
    color: var(--coral);
    padding-left: 4px;
}

.footer__contact address {
    font-style: normal;
    font-size: 0.9375rem;
    color: var(--warm-gray);
    line-height: 1.8;
}

.footer__contact a {
    color: var(--warm-gray);
    transition: color 0.3s;
}

.footer__contact a:hover {
    color: var(--coral);
}

.footer__bottom {
    padding: 24px 0;
    text-align: center;
}

.footer__bottom p {
    font-size: 0.8125rem;
    color: var(--warm-gray);
    opacity: 0.6;
}

/* ========== SCROLL ANIMATIONS ========== */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    :root {
        --nav-width: 220px;
    }
    
    .hero__content {
        padding: 60px 40px 60px 32px;
    }
}

@media (max-width: 1024px) {
    .side-nav {
        transform: translateX(-100%);
        transition: transform 0.4s var(--ease-out);
    }
    
    .side-nav.open {
        transform: translateX(0);
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .side-nav__overlay.show {
        display: block;
    }
    
    .content {
        margin-left: 0;
    }
    
    .hero {
        grid-template-columns: 1fr;
    }
    
    .hero__image {
        min-height: 400px;
        order: -1;
    }
    
    .hero__overlay {
        background: linear-gradient(
            to top,
            rgba(17, 24, 39, 0.95) 0%,
            rgba(17, 24, 39, 0.7) 50%,
            rgba(17, 24, 39, 0.3) 100%
        );
    }
    
    .hero__content {
        padding: 60px 32px;
        max-width: 100%;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .about__image-secondary {
        right: 0;
    }
    
    .about__accent-box {
        right: -12px;
        top: -16px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .gallery-item--large {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .gallery-item--wide {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .gallery-item:not(.gallery-item--large):not(.gallery-item--wide) {
        grid-column: span 1;
    }
    
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .footer__brand {
        grid-column: span 2;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 72px 0;
    }
    
    .section--about {
        padding: 80px 0;
    }
    
    .section--gallery {
        padding: 80px 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 32px 28px;
    }
    
    .about__values {
        grid-template-columns: 1fr;
    }
    
    .about__image-secondary {
        position: relative;
        bottom: auto;
        right: auto;
        width: 100%;
        margin-top: 16px;
    }
    
    .about__accent-box {
        position: relative;
        top: auto;
        right: auto;
        display: inline-block;
        margin-bottom: 16px;
    }
    
    .about__images {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item--large,
    .gallery-item--wide,
    .gallery-item:not(.gallery-item--large):not(.gallery-item--wide) {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .contact__form-wrapper {
        padding: 32px 24px;
    }
    
    .hero__cta {
        flex-direction: column;
    }
    
    .hero__cta .btn {
        justify-content: center;
    }
    
    .footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer__brand {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    .hero__content {
        padding: 48px 20px;
    }
    
    .hero__title {
        font-size: 2rem;
    }
    
    .section-header__title {
        font-size: 1.75rem;
    }
    
    .side-nav {
        width: 100%;
    }
}
