/* CATALYTICS & MUFFLERS — premium feel: photo-driven, mixed light/dark sections, red accents */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #1a1a1a;
}

/* ===== HERO — premium cinematic dark (MagnaFlow/Flowmaster reference) ===== */

.hero-section {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    /* Cinematic studio lighting: soft spotlight upper-left fading to deep black at edges.
       Gives the hero "depth" even when the photo is missing — not flat, not red. */
    background:
        radial-gradient(ellipse at 30% 40%, #2a2a2a 0%, #161616 60%, #0a0a0a 100%);
}

.hero-image {
    background-image: url('../images/hero.jpg');
    background-size: cover;
    background-position: center;
    /* Photo shows as-is when present — no red tint, no blend mode */
}

/* Soft left-side darkening for headline legibility + subtle vignette at edges */
.hero-overlay {
    background:
        linear-gradient(
            100deg,
            rgba(0, 0, 0, 0.78) 0%,
            rgba(0, 0, 0, 0.50) 35%,
            rgba(0, 0, 0, 0.20) 65%,
            rgba(0, 0, 0, 0.05) 100%
        ),
        radial-gradient(
            ellipse at center,
            transparent 50%,
            rgba(0, 0, 0, 0.45) 100%
        );
}

/* ===== ANIMATED RED UNDERLINE ON SECTION HEADINGS ===== */

.section-heading {
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.section-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 80px;
    height: 4px;
    background-color: #c8102e;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Trigger on scroll-into-view (hover too, as a fallback) */
.section-heading:hover::after,
section:hover .section-heading::after {
    transform: scaleX(1);
}

/* Always show on smaller screens */
@media (max-width: 1024px) {
    .section-heading::after {
        transform: scaleX(1);
    }
}

/* ===== INQUIRY FORM LOCATION TABS ===== */

.inquiry-tab {
    background: #ffffff;
    color: #1a1a1a;
    border: 2px solid #e8e4dc;
    transition: all 0.2s ease;
    cursor: pointer;
}
.inquiry-tab:hover {
    border-color: #c8102e;
    color: #c8102e;
}
.inquiry-tab-active,
.inquiry-tab-active:hover {
    background: #c8102e;
    color: #ffffff;
    border-color: #c8102e;
}

/* ===== GALLERY CAROUSEL ===== */

.gallery-track {
    /* Hide scrollbar visually, keep functionality */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.gallery-track::-webkit-scrollbar {
    display: none;
}

/* ===== SERVICE CARDS ===== */
/* Mobile: horizontal layout (photo left, text right) — compact, less scrolling */
/* sm+: vertical layout (photo on top, text below) — full visual impact */

.service-card {
    background: #ffffff;
    border: 1px solid #e8e4dc;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: row;
}

@media (min-width: 640px) {
    .service-card {
        flex-direction: column;
    }
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: rgba(200, 16, 46, 0.4);
    box-shadow: 0 20px 40px rgba(26, 26, 26, 0.12);
}

/* Photo container — square thumb on mobile, full 4:3 on sm+ */
.service-card > div:first-child {
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.4s ease;
    flex-shrink: 0;
    width: 38%;
    aspect-ratio: 1 / 1;
}

@media (min-width: 640px) {
    .service-card > div:first-child {
        width: 100%;
        aspect-ratio: 4 / 3;
    }
}

/* Text content area — flexible width on mobile so text fills remaining space */
.service-card > div:nth-child(2) {
    flex: 1;
    min-width: 0;
    padding: 1.25rem;
}

@media (min-width: 640px) {
    .service-card > div:nth-child(2) {
        padding: 1.75rem;
    }
}

.service-card:hover > div:first-child {
    transform: scale(1.03);
}

.service-card:nth-child(1) > div:first-child {
    background-image: url('../images/service-mufflers.jpg');
}
.service-card:nth-child(2) > div:first-child {
    background-image: url('../images/service-catalytic.jpg');
}
.service-card:nth-child(3) > div:first-child {
    background-image: url('../images/service-welding.jpg');
}

/* ===== ABOUT — square photo ===== */

#about .aspect-square {
    background-image: url('../images/about.jpg');
    background-size: cover;
    background-position: center;
    box-shadow: 0 20px 50px rgba(26, 26, 26, 0.15);
}

/* ===== BRAND BADGES (dark section) ===== */

.brand-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    cursor: default;
}

.brand-badge:hover {
    background: rgba(200, 16, 46, 0.1);
    border-color: #c8102e;
    transform: translateY(-3px);
}

.brand-badge span {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 1px;
    color: #ffffff;
    text-transform: uppercase;
}

/* ===== REVIEW CARDS ===== */

.review-card {
    background: #ffffff;
    border-radius: 4px;
    padding: 2rem;
    border-top: 4px solid #c8102e;
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(26, 26, 26, 0.1);
}

/* ===== CONTACT ROWS ===== */

.contact-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

a.contact-row {
    text-decoration: none;
    color: inherit;
}

.contact-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: #f5f3ee;
    color: #c8102e;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

a.contact-row.group:hover .contact-icon {
    background: #c8102e;
    color: #ffffff;
}

/* ===== MOBILE MENU ===== */

#mobile-menu {
    transition: max-height 0.3s ease;
}

/* ===== LANGUAGE FADE ===== */

[data-lang-en], [data-lang-es] {
    transition: opacity 0.15s ease;
}

/* ===== SELECTION ===== */

::selection {
    background-color: #c8102e;
    color: white;
}

/* ===== PRINT ===== */

@media print {
    nav, #mobile-menu, .hero-section { display: none !important; }
    body { background: white !important; color: black !important; }
}
