/* =============================================
   TALLER SOSA — Professional Industrial Edition
   Palette: Bone White & Navy Blue
   ============================================= */

:root {
    /* Paleta Blanco Hueso */
    --bg-bone: #F5F4F0; 
    --bg-white: #FFFFFF; 
    --text-dark: #2C3539; 
    --text-light: #64748B; 
    --bg-navy: #111827; 
    --accent-orange: #F97316;
    --accent-hover: #e06612;
    
    /* Tipografía */
    --font-heading: 'Teko', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* UI Details */
    --radius: 8px;
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-bone);
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.6;
}

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

/* === HEADER === */
.header {
    background-color: var(--bg-navy);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    cursor: pointer;
}

.header-logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.logo-taller { 
    font-family: var(--font-heading); 
    font-size: 2.2rem; 
    font-weight: 700; 
    color: #fff; 
}
.logo-sosa { 
    font-family: var(--font-heading); 
    font-size: 2.2rem; 
    font-weight: 700; 
    color: var(--accent-orange); 
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: var(--transition);
}

.nav a:hover { color: var(--accent-orange); }

/* === BUTTONS === */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-outline {
    border: 2px solid var(--accent-orange);
    color: var(--accent-orange);
}
.btn-outline:hover { background-color: var(--accent-orange); color: #fff; }

.btn-primary {
    background-color: var(--accent-orange);
    color: #fff;
}
.btn-primary:hover { 
    background-color: var(--accent-hover); 
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* === HERO === */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--bg-navy);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/front-taller.jpg');
    background-size: cover;
    background-position: center center;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(17,24,39,0.95) 0%, rgba(17,24,39,0.80) 45%, rgba(17,24,39,0.2) 100%);
    z-index: 1;
}

.hero-content { 
    position: relative; 
    z-index: 2; 
    width: 100%; 
}

.hero-text-box { 
    max-width: 1100px;
    margin-left: -5rem; 
    color: #fff; 
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-title-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: nowrap; 
}

.hero-logo-img {
    height: 220px; 
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 15px rgba(0,0,0,0.5));
}

.hero-title, .hero-text-box h1 {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 6vw, 5.5rem); 
    line-height: 0.9;
    margin-bottom: 0;
    color: var(--accent-orange);
    white-space: nowrap; 
}

.urgency-tag {
    color: var(--accent-orange);
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: block;
    font-size: 1.2rem; 
}

.text-white { color: #fff; }

.hero-text-box p {
    font-size: 1.5rem; 
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #E2E8F0;
    max-width: 800px; 
}

/* === SERVICES === */
.services {
    padding: 6rem 0;
    background-color: var(--bg-bone);
}

.section-header { text-align: center; margin-bottom: 4rem; }

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--bg-navy);
}

.divider {
    height: 4px;
    width: 60px;
    background-color: var(--accent-orange);
    margin: 0.5rem auto;
}

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

.service-card {
    background-color: var(--bg-white);
    padding: 3rem 2rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
    border-top: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-top-color: var(--accent-orange);
}

.service-number {
    position: absolute;
    top: 10px;
    right: 20px;
    font-family: var(--font-heading);
    font-size: 3rem;
    color: rgba(0,0,0,0.03);
    font-weight: 700;
    line-height: 1;
}

.service-icon { 
    font-size: 3.5rem; 
    margin-bottom: 1.5rem; 
    color: var(--accent-orange);
}

.service-icon svg, .service-svg-icon {
    width: 80px;
    height: 80px;
    transition: var(--transition);
}

.service-svg-icon {
    filter: brightness(0) saturate(100%) invert(58%) sepia(95%) saturate(2500%) hue-rotate(10deg) brightness(103%) contrast(105%);
}

.service-card:hover .service-icon svg, 
.service-card:hover .service-svg-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--bg-navy);
}

.service-card p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
}

/* === GALLERY (Tarjetas Técnicas) === */
.gallery-section {
    padding: 6rem 0;
    background-color: var(--bg-white);
}

.category-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.category-card {
    background-color: var(--bg-bone);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.category-info {
    padding: 1rem;
    background-color: var(--bg-navy);
    text-align: center;
    border-bottom: 3px solid var(--accent-orange);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.category-info h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--bg-white);
    letter-spacing: 1px;
    line-height: 1.1;
    margin: 0;
}

.category-slider-wrapper {
    width: 100%;
    height: 280px; 
    position: relative;
    overflow: hidden;
    background-color: var(--bg-bone);
    flex-grow: 1; 
}

.category-slider-track {
    width: 100%;
    height: 100%;
    position: relative; 
}

.category-img-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0; 
    transition: opacity 1s ease-in-out; 
}

.category-img-card.active {
    opacity: 1; 
}

/* === BRANDS MARQUEE === */
.brands-section {
    background-color: var(--bg-bone);
    padding: 4rem 0;
    text-align: center;
    overflow: hidden;
    border-top: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.brands-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    color: var(--bg-navy);
}

.marquee-wrapper { width: 100%; overflow: hidden; white-space: nowrap; }

.marquee-content {
    display: inline-flex;
    align-items: center;
    gap: 4rem;
    padding-right: 4rem;
    animation: marquee 35s linear infinite;
}

.brand-logo {
    height: 60px;
    width: auto;
    filter: grayscale(100%) opacity(0.5) contrast(150%);
    transition: var(--transition);
    cursor: pointer;
}

.brand-logo:hover { filter: grayscale(0%) opacity(1); transform: scale(1.1); }

@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* === CONTACT === */
.contact-section { padding: 6rem 0; background-color: var(--bg-navy); color: #fff; }

.contact-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 4rem; 
}

.contact-info-box { 
    padding: 3rem; 
    background-color: rgba(255,255,255,0.05); 
    border-radius: var(--radius); 
    border-left: 4px solid var(--accent-orange); 
}

.contact-info-box h2 { 
    font-family: var(--font-heading); 
    font-size: 2.5rem; 
    margin-bottom: 2rem; 
    color: var(--accent-orange); 
}

.info-item { margin-bottom: 1.5rem; }
.info-item strong { display: block; font-size: 0.9rem; color: #8892B0; margin-bottom: 0.3rem; text-transform: uppercase; }

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus, .contact-form textarea:focus { 
    outline: 2px solid var(--accent-orange); 
    background: rgba(255,255,255,0.15); 
}

.contact-map { 
    border-radius: var(--radius); 
    overflow: hidden; 
    height: 100%; 
    min-height: 400px;
    box-shadow: var(--shadow-md);
}

#mapa-taller { width: 100%; height: 100%; }

/* === FOOTER & SOCIALS === */
footer { 
    background-color: #080C15; 
    padding: 2.5rem 0; 
    text-align: center; 
    color: #8892B0; 
    font-size: 0.9rem; 
    border-top: 1px solid rgba(255,255,255,0.1); 
}

.social-info-group { margin-top: 1.5rem; }

.footer-socials {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 14px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
}

.social-icon { display: flex; align-items: center; justify-content: center; }

.custom-social-svg {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 39, 67, 0.3);
}

.social-link.tiktok:hover {
    background: #010101;
    border-color: #fe2c55;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 44, 85, 0.3);
}

.social-link:hover .custom-social-svg { transform: scale(1.1); }

/* === WIDGETS FLOTANTES === */
#backToTop {
    position: fixed;
    bottom: 140px; 
    right: 35px; 
    width: 60px; 
    height: 60px; 
    background-color: var(--accent-orange, #ff6b00);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#backToTop.visible { opacity: 1; visibility: visible; }
#backToTop:hover { background-color: var(--accent-hover, #e65c00); transform: translateY(-3px); }
#backToTop img { width: 45px; height: 45px; filter: brightness(0) invert(1); }

.floating-wa {
    position: fixed;
    bottom: 50px; 
    right: 30px; 
    width: 70px; 
    height: 70px; 
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: none;
    cursor: pointer;
    transition: 0.3s ease;
}
.floating-wa img { width: 45px; height: 45px; }
.floating-wa:hover { background-color: #128C7E; transform: scale(1.1); }

.wa-popup {
    display: none; 
    flex-direction: column;
    position: fixed;
    bottom: 50px; 
    right: 120px; 
    width: 300px;
    background: var(--bg-white, #ffffff);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
}

.wa-popup-header {
    background: var(--bg-navy, #0a192f);
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.wa-popup-header h3 { font-family: var(--font-heading, sans-serif); font-size: 1.5rem; margin: 0; letter-spacing: 1px; }
.wa-close-btn { background: none; border: none; color: #fff; font-size: 1.8rem; cursor: pointer; line-height: 1; }
.wa-popup-form { display: flex; flex-direction: column; gap: 10px; padding: 15px; }
.wa-popup-form input { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-family: var(--font-body, sans-serif); box-sizing: border-box; }
.wa-popup-form button { margin-top: 5px; width: 100%; padding: 10px; background-color: var(--accent-orange, #ff6b00); color: #ffffff; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; }

/* === REVEAL SYSTEM === */
.reveal { opacity: 0; transition: all 0.8s ease-out; }
.fade-up { transform: translateY(40px); }
.fade-left { transform: translateX(-40px); }
.fade-right { transform: translateX(40px); }
.reveal.active { opacity: 1; transform: translate(0); }


/* ==========================================================================
   MEDIA QUERIES (SISTEMA RESPONSIVO INTEGRADO Y FORZADO)
   ========================================================================== */

/* Bloquear scroll horizontal globalmente */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
}

/* 1. Monitores grandes / Ultrawide */
@media (min-width: 1201px) {
    .container { max-width: 1200px; }
}

/* 2. Laptops y Tablets Horizontales (Max 1024px) */
@media (max-width: 1024px) {
    .hero-text-box { margin-left: 0; max-width: 100%; padding: 0 1rem; }
    .hero-text-box h1, .hero-title { font-size: 4rem; }
    
    /* FORZAR ocultar el botón del encabezado sin importar la estructura HTML */
    .header .btn, .header-container .btn, .nav .btn, .btn-outline { 
        display: none !important; 
    }
    
    .services-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .category-gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .contact-grid { gap: 2rem; }
}

/* 3. Tablets Verticales y Smartphones Grandes (Max 900px) */
@media (max-width: 900px) {
    .nav { display: none !important; }
    .hero-overlay { background: linear-gradient(180deg, rgba(17,24,39,0.95) 0%, rgba(17,24,39,0.85) 60%, rgba(17,24,39,0.4) 100%); }
    .hero-content { display: flex; justify-content: center; align-items: center; text-align: center; height: 100%; margin-top: 5rem; }
    
    /* FORZAR APILAMIENTO: Esto baja el texto debajo del logo en el hero */
    .hero-title-wrapper { 
        flex-direction: column !important; 
        gap: 1rem !important; 
        justify-content: center !important;
        align-items: center !important;
        width: 100%;
    }
}

/* 4. Smartphones / Dispositivos Móviles (Max 768px) */
@media (max-width: 768px) {
    .container { padding: 0 1.5rem; }
    .header-logo-img { height: 40px; }
    .logo-taller, .logo-sosa { font-size: 1.5rem; }
    
    /* FORZAR ACHICAR TEXTO: Evita que "TU AUTO" se corte hacia la derecha */
    .hero-text-box h1, .hero-title { 
        font-size: 2.8rem !important; 
        white-space: normal !important; /* Permite que el texto baje de línea */
        line-height: 1.1 !important;
        text-align: center !important;
    }
    .hero-logo-img { height: 160px !important; }
    .hero-text-box p { font-size: 1.1rem; text-align: center; }
    
    .services { padding: 4rem 0; }
    .section-header h2 { font-size: 2.2rem; }
    
    /* Grillas a 1 columna */
    .services-grid, .category-gallery-grid, .contact-grid {
        grid-template-columns: 1fr !important;
    }
    
    .brands-section { padding: 3rem 0; }
    .contact-section { padding: 4rem 0; }
    
    /* Widgets flotantes */
    .floating-wa { right: 20px; bottom: 30px; width: 60px; height: 60px; }
    .floating-wa img { width: 40px; height: 40px; }
    #backToTop { right: 25px; bottom: 110px; width: 50px; height: 50px; }
    .wa-popup { right: 15px; left: 15px; bottom: 100px; width: auto; }
}

/* 5. Smartphones Pequeños (Max 480px) */
@media (max-width: 480px) {
    .hero-text-box h1, .hero-title { font-size: 2.4rem !important; }
    .hero-logo-img { height: 130px !important; }
    .btn { padding: 0.8rem 1rem; font-size: 0.85rem; }
}