/*
Theme Name: Autofix
Theme URI: https://example.com/autofix
Author: Autofix
Description: Tema WordPress 100% responsive y compatible con Elementor Free, diseñado específicamente para talleres de mecánica automotriz con paleta profesional en Azul Marino, Rojo y Blanco.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: autofix
Tags: automotive, mechanic, elementor, responsive, blue, red, white, one-column, custom-logo, custom-menu
*/

:root {
    --tm-navy: #0B1B35;
    --tm-blue: #123468;
    --tm-blue-light: #1E4D8C;
    --tm-red: #D9232D;
    --tm-red-hover: #B51821;
    --tm-white: #FFFFFF;
    --tm-offwhite: #F8FAFC;
    --tm-gray-100: #F1F5F9;
    --tm-gray-200: #E2E8F0;
    --tm-gray-600: #475569;
    --tm-gray-800: #1E293B;
    --tm-radius: 8px;
    --tm-radius-lg: 14px;
    --tm-shadow: 0 10px 30px rgba(11, 27, 53, 0.08);
    --tm-shadow-lg: 0 20px 45px rgba(11, 27, 53, 0.16);
    --tm-container: 1200px;
    --tm-font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --tm-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--tm-font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--tm-gray-800);
    background-color: var(--tm-white);
    overflow-x: hidden;
}

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

a {
    color: var(--tm-blue);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--tm-font-heading);
    color: var(--tm-navy);
    line-height: 1.2;
    margin-top: 0;
    font-weight: 800;
}

.tm-container {
    width: 100%;
    max-width: var(--tm-container);
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(16px, 4vw, 32px);
    padding-right: clamp(16px, 4vw, 32px);
}

/* =========================================================
   COMPATIBILIDAD ELEMENTOR FREE
   ========================================================= */
.elementor-page .site-main {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.tm-elementor-fullwidth .tm-container-default {
    max-width: 100%;
    padding: 0;
}

/* =========================================================
   BOTONES
   ========================================================= */
.tm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    min-height: 46px;
    font-family: var(--tm-font-heading);
    font-size: 0.9375rem;
    font-weight: 700;
    border-radius: var(--tm-radius);
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: all 0.25s ease;
}

.tm-btn-red {
    background-color: var(--tm-red);
    color: var(--tm-white);
}
.tm-btn-red:hover, .tm-btn-red:focus {
    background-color: var(--tm-red-hover);
    color: var(--tm-white);
    transform: translateY(-2px);
}

.tm-btn-navy {
    background-color: var(--tm-navy);
    color: var(--tm-white);
}
.tm-btn-navy:hover, .tm-btn-navy:focus {
    background-color: var(--tm-blue);
    color: var(--tm-white);
    transform: translateY(-2px);
}

.tm-btn-white {
    background-color: var(--tm-white);
    color: var(--tm-navy);
}
.tm-btn-white:hover, .tm-btn-white:focus {
    background-color: var(--tm-red);
    color: var(--tm-white);
    transform: translateY(-2px);
}

.tm-btn-outline-white {
    background-color: transparent;
    border-color: var(--tm-white);
    color: var(--tm-white);
}
.tm-btn-outline-white:hover {
    background-color: var(--tm-white);
    color: var(--tm-navy);
}

/* =========================================================
   HEADER & NAVEGACIÓN RESPONSIVE
   ========================================================= */
.tm-topbar {
    background-color: var(--tm-navy);
    color: var(--tm-white);
    font-size: 0.85rem;
    padding: 8px 0;
}

.tm-topbar-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.tm-topbar-info {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

.tm-topbar-info span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tm-site-header {
    background-color: var(--tm-white);
    border-bottom: 1px solid var(--tm-gray-200);
    position: sticky;
    top: 0;
    z-index: 999;
    transition: box-shadow 0.25s ease;
}

.tm-site-header.is-scrolled {
    box-shadow: 0 6px 24px rgba(11, 27, 53, 0.12);
}

.tm-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 20px;
}

.tm-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.tm-logo-wrap img {
    max-height: 50px;
    width: auto;
}

.tm-site-title {
    font-family: var(--tm-font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--tm-navy);
    margin: 0;
    letter-spacing: -0.02em;
}

.tm-site-title span {
    color: var(--tm-red);
}

.tm-nav-desktop {
    display: flex;
    align-items: center;
    gap: 28px;
}

.tm-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
    align-items: center;
}

.tm-nav-menu a {
    font-family: var(--tm-font-heading);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--tm-navy);
    padding: 8px 0;
    position: relative;
}

.tm-nav-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--tm-red);
    transition: width 0.25s ease;
}

.tm-nav-menu a:hover::after,
.tm-nav-menu .current-menu-item > a::after {
    width: 100%;
}

.tm-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tm-menu-toggle {
    display: none;
    background: var(--tm-navy);
    color: var(--tm-white);
    border: none;
    border-radius: var(--tm-radius);
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.4rem;
}

/* Mobile Drawer */
.tm-mobile-drawer {
    display: none;
    background-color: var(--tm-white);
    border-top: 1px solid var(--tm-gray-200);
    padding: 20px clamp(16px, 4vw, 32px) 28px;
}

.tm-mobile-drawer.is-open {
    display: block;
}

.tm-mobile-drawer .tm-nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.tm-mobile-drawer .tm-nav-menu a {
    display: block;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--tm-gray-100);
}

/* =========================================================
   SECCIONES LANDING TALLER MECÁNICO (AZUL, ROJO, BLANCO)
   ========================================================= */
.tm-section {
    padding: clamp(56px, 7vw, 96px) 0;
}

.tm-section-navy {
    background-color: var(--tm-navy);
    color: var(--tm-white);
}

.tm-section-navy h2,
.tm-section-navy h3,
.tm-section-navy h4 {
    color: var(--tm-white);
}

.tm-section-light {
    background-color: var(--tm-offwhite);
}

.tm-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--tm-font-heading);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tm-red);
    margin-bottom: 12px;
}

.tm-badge::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--tm-red);
    display: inline-block;
}

.tm-section-title {
    font-size: clamp(1.75rem, 3.2vw, 2.75rem);
    margin-bottom: 16px;
}

.tm-section-subtitle {
    font-size: 1.05rem;
    color: var(--tm-gray-600);
    max-width: 680px;
    margin-bottom: 40px;
}

.tm-section-navy .tm-section-subtitle {
    color: #CBD5E1;
}

/* HERO */
.tm-hero {
    position: relative;
    background: linear-gradient(125deg, rgba(11, 27, 53, 0.94) 0%, rgba(18, 52, 104, 0.88) 60%, rgba(217, 35, 45, 0.72) 100%);
    color: var(--tm-white);
    padding: clamp(64px, 9vw, 120px) 0 clamp(56px, 7vw, 88px);
}

.tm-hero h1 {
    color: var(--tm-white);
    font-size: clamp(2.1rem, 4.8vw, 3.85rem);
    line-height: 1.1;
    margin-bottom: 20px;
    max-width: 780px;
    text-transform: uppercase;
}

.tm-hero p {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: #E2E8F0;
    max-width: 620px;
    margin-bottom: 30px;
}

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

.tm-hero-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tm-hero-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--tm-radius);
    padding: 24px;
}

.tm-hero-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--tm-radius);
    background-color: var(--tm-red);
    color: var(--tm-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-bottom: 14px;
}

.tm-hero-card h3 {
    color: var(--tm-white);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.tm-hero-card p {
    font-size: 0.92rem;
    margin: 0;
    color: #CBD5E1;
}

/* GRID HELPERS */
.tm-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(24px, 4vw, 48px);
    align-items: center;
}

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

.tm-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ABOUT */
.tm-about-media {
    position: relative;
    border-radius: var(--tm-radius-lg);
    overflow: hidden;
    background-color: var(--tm-navy);
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tm-white);
    padding: 32px;
}

.tm-about-badge-box {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: var(--tm-red);
    color: var(--tm-white);
    padding: 18px 22px;
    border-radius: var(--tm-radius);
    box-shadow: var(--tm-shadow-lg);
    max-width: 220px;
}

.tm-about-badge-box strong {
    display: block;
    font-size: 1.75rem;
    font-family: var(--tm-font-heading);
    line-height: 1.1;
}

/* SERVICE CARDS */
.tm-service-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--tm-radius-lg);
    padding: 28px;
    position: relative;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.tm-service-card:hover {
    transform: translateY(-4px);
    border-color: var(--tm-red);
}

.tm-service-icon {
    width: 48px;
    height: 48px;
    background-color: var(--tm-red);
    color: var(--tm-white);
    border-radius: var(--tm-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 18px;
}

/* NUMBERED STEPS */
.tm-step-card {
    background-color: var(--tm-white);
    border: 1px solid var(--tm-gray-200);
    border-radius: var(--tm-radius);
    padding: 24px;
    box-shadow: var(--tm-shadow);
    position: relative;
}

.tm-step-num {
    font-family: var(--tm-font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--tm-red);
    margin-bottom: 10px;
}

/* COMPARISON CARDS */
.tm-compare-white {
    background-color: var(--tm-white);
    border: 1px solid var(--tm-gray-200);
    border-radius: var(--tm-radius-lg);
    padding: 32px;
    box-shadow: var(--tm-shadow);
}

.tm-compare-navy {
    background-color: var(--tm-navy);
    color: var(--tm-white);
    border-radius: var(--tm-radius-lg);
    padding: 32px;
    box-shadow: var(--tm-shadow-lg);
}

.tm-compare-navy h3 {
    color: var(--tm-white);
}

.tm-check-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

.tm-check-list li {
    padding: 8px 0 8px 28px;
    position: relative;
}

.tm-check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 8px;
    color: var(--tm-red);
    font-weight: 800;
}

/* STATS */
.tm-stat-box {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--tm-radius);
    padding: 24px;
    text-align: center;
}

.tm-stat-num {
    font-family: var(--tm-font-heading);
    font-size: clamp(2rem, 3.5vw, 2.85rem);
    font-weight: 800;
    color: var(--tm-white);
    line-height: 1.1;
}

.tm-stat-num span {
    color: var(--tm-red);
}

/* BRANDS */
.tm-brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
}

.tm-brand-pill {
    background: var(--tm-white);
    border: 1px solid var(--tm-gray-200);
    border-radius: var(--tm-radius);
    padding: 18px 14px;
    text-align: center;
    font-family: var(--tm-font-heading);
    font-weight: 700;
    color: var(--tm-navy);
    box-shadow: 0 4px 12px rgba(11, 27, 53, 0.04);
}

/* TESTIMONIALS */
.tm-review-card {
    background: var(--tm-white);
    color: var(--tm-gray-800);
    border-radius: var(--tm-radius);
    padding: 24px;
}

.tm-review-stars {
    color: #F59E0B;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* APPOINTMENT FORM */
.tm-form-box {
    background: var(--tm-white);
    border: 1px solid var(--tm-gray-200);
    border-radius: var(--tm-radius-lg);
    padding: clamp(24px, 4vw, 36px);
    box-shadow: var(--tm-shadow);
}

.tm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.tm-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tm-form-group.is-full {
    grid-column: 1 / -1;
}

.tm-form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tm-navy);
}

.tm-form-group input,
.tm-form-group select,
.tm-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--tm-gray-200);
    border-radius: var(--tm-radius);
    font-family: var(--tm-font-body);
    font-size: 0.95rem;
    background-color: var(--tm-offwhite);
}

.tm-form-group input:focus,
.tm-form-group select:focus,
.tm-form-group textarea:focus {
    outline: none;
    border-color: var(--tm-blue);
    background-color: var(--tm-white);
}

/* FAQ ACCORDION */
.tm-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.tm-faq-item {
    background: var(--tm-white);
    border: 1px solid var(--tm-gray-200);
    border-radius: var(--tm-radius);
    overflow: hidden;
}

.tm-faq-trigger {
    width: 100%;
    background: transparent;
    border: none;
    padding: 18px 20px;
    text-align: left;
    font-family: var(--tm-font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--tm-navy);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.tm-faq-content {
    display: none;
    padding: 0 20px 18px;
    color: var(--tm-gray-600);
    font-size: 0.95rem;
}

.tm-faq-item.is-active .tm-faq-content {
    display: block;
}

.tm-faq-item.is-active .tm-faq-icon {
    color: var(--tm-red);
    transform: rotate(45deg);
}

/* FOOTER */
.tm-site-footer {
    background-color: var(--tm-white);
    border-top: 4px solid var(--tm-red);
    color: var(--tm-gray-600);
    padding: 56px 0 28px;
}

.tm-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 36px;
}

.tm-footer-title {
    font-size: 1.05rem;
    color: var(--tm-navy);
    margin-bottom: 16px;
}

.tm-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tm-footer-links li {
    margin-bottom: 8px;
}

.tm-footer-bottom {
    border-top: 1px solid var(--tm-gray-200);
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.875rem;
}

/* BLOG / DEFAULT CONTENT */
.tm-page-wrap {
    padding: clamp(40px, 5vw, 72px) 0;
}

.tm-post-card {
    background: var(--tm-white);
    border: 1px solid var(--tm-gray-200);
    border-radius: var(--tm-radius);
    overflow: hidden;
    box-shadow: var(--tm-shadow);
    padding: 24px;
}

/* =========================================================
   MEDIA QUERIES (AJUSTABLE PARA CUALQUIER PANTALLA)
   ========================================================= */
@media (max-width: 992px) {
    .tm-nav-desktop {
        display: none;
    }
    .tm-menu-toggle {
        display: inline-flex;
    }
    .tm-hero-cards,
    .tm-grid-3,
    .tm-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .tm-grid-2,
    .tm-footer-grid,
    .tm-faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .tm-topbar {
        display: none;
    }
    .tm-header-actions .tm-btn {
        display: none;
    }
    .tm-hero-cards,
    .tm-grid-3,
    .tm-grid-4,
    .tm-form-grid {
        grid-template-columns: 1fr;
    }
    .tm-hero-actions .tm-btn {
        width: 100%;
    }
}

/* =========================================================
   MÓDULOS ELEMENTOR: AUTOFIX SLIDER & SERVICIOS
   ========================================================= */
.autofix-slider-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    background-color: var(--tm-navy);
}

.autofix-slide {
    display: none;
    align-items: center;
    min-height: 540px;
    padding: clamp(56px, 8vw, 96px) 0;
    background: linear-gradient(125deg, rgba(11, 27, 53, 0.95) 0%, rgba(18, 52, 104, 0.88) 60%, rgba(217, 35, 45, 0.72) 100%);
    color: var(--tm-white);
}

.autofix-slide.is-active {
    display: flex;
    animation: autofixFadeIn 0.45s ease;
}

@keyframes autofixFadeIn {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

.autofix-slide-inner h2 {
    color: var(--tm-white);
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    max-width: 780px;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.autofix-slide-inner p {
    color: #E2E8F0;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    max-width: 620px;
    margin-bottom: 28px;
}

.autofix-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(11, 27, 53, 0.7);
    color: var(--tm-white);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.autofix-slider-arrow:hover {
    background-color: var(--tm-red);
    border-color: var(--tm-red);
}

.autofix-prev { left: 16px; }
.autofix-next { right: 16px; }

.autofix-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.autofix-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 0;
}

.autofix-dot.is-active {
    background: var(--tm-red);
    transform: scale(1.2);
}

.autofix-el-card-navy {
    background-color: var(--tm-navy);
    color: var(--tm-white);
}

.autofix-el-card-navy h3 a {
    color: var(--tm-white);
}

.autofix-el-card-navy p {
    color: #CBD5E1;
}

.autofix-el-card-white h3 a {
    color: var(--tm-navy);
}

.autofix-el-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    font-size: 0.875rem;
    font-weight: 700;
}

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

@media (max-width: 992px) {
    .autofix-el-services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .autofix-el-services-grid {
        grid-template-columns: 1fr;
    }
}
