/* =========================================================
   Jaenwagen - Tema custom
   Paleta: Azul corporativo + Naranja/amarillo + Blanco
   (Inspirada en jaenwagen.com original)
   ========================================================= */

:root {
    --color-primary: #0057FF;
    --color-primary-dark: #0046CC;
    --color-primary-light: #2D73FF;
    --color-accent: #FF6900;
    --color-accent-dark: #D85700;

    --color-bg: #FFFFFF;
    --color-bg-soft: #F4F4F4;
    --color-bg-dark: #2B2B2B;

    --color-text: #212121;
    --color-text-soft: #464646;
    --color-text-muted: #6B7280;
    --color-text-on-dark: #FFFFFF;

    --color-border: #E5E5E5;
    --color-border-dark: #1E3A5F;

    --font-heading: 'Montserrat', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    --container: 1240px;
    --radius: 8px;
    --radius-sm: 4px;
    --transition: all 0.25s ease;
    --shadow-sm: 0 1px 3px rgba(11, 37, 64, 0.08);
    --shadow: 0 4px 16px rgba(11, 37, 64, 0.1);
    --shadow-lg: 0 12px 32px rgba(11, 37, 64, 0.15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Sin caret en texto normal — solo en inputs/textarea/contenteditable */
* { caret-color: transparent; }
input, textarea, select, [contenteditable="true"] { caret-color: auto; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem;
    color: var(--color-text);
}
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.625rem); }

p { margin: 0 0 1rem; color: var(--color-text-soft); }

a { color: var(--color-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-accent); }

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============ Botones ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6900 0%, #D85700 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(255, 105, 0, 0.28);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #D85700 0%, #B84900 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 105, 0, 0.42);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.btn-secondary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

.btn-outline-light {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
.btn-outline-light:hover {
    background: #fff;
    color: var(--color-primary);
}

.btn-large { padding: 1.05rem 2.25rem; font-size: 1rem; }

/* ============ HEADER ============ */

/* Barra superior: contacto directo siempre visible */
.topbar {
    background: var(--color-primary);
    color: #fff;
    font-size: 0.875rem;
    padding: 0.55rem 0;
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.topbar a { color: #fff; }
.topbar a:hover { color: var(--color-accent); }
.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.topbar-item svg { width: 14px; height: 14px; }

/* Header principal */
.site-header {
    background: #fff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow); }

.site-header > .container {
    max-width: 100%;
    padding-left: 2rem;
    padding-right: 2rem;
}

.header-inner {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem 0;
    gap: 1.75rem;
    flex-wrap: nowrap;
}

.site-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.site-logo img {
    max-height: 62px;
    width: auto;
}

.main-nav {
    flex: 0 1 auto;
    display: flex;
    justify-content: flex-start;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}
.main-nav a {
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
    white-space: nowrap;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}
.main-nav a:hover, .main-nav .current-menu-item > a {
    color: var(--color-primary);
}
.main-nav a:hover::after, .main-nav .current-menu-item > a::after {
    transform: scaleX(1);
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1.05rem;
}
.header-phone:hover { color: var(--color-accent); }
.header-phone-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

/* ============ Hero ============ */
.hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    color: #fff;
    padding: 5rem 0;
    background-color: #0B2540;
    background-image:
        linear-gradient(135deg, rgba(11, 37, 64, 0.88) 0%, rgba(0, 86, 167, 0.75) 100%),
        var(--hero-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-content { max-width: 820px; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-accent);
    color: #fff;
    padding: 0.45rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
}
.hero h1 { color: #fff; margin-bottom: 1.5rem; }
.hero h1 span { color: var(--color-accent); }
.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2.5rem;
    max-width: 680px;
}
.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}
.hero-phone-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
}
.hero-phone-block small {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 0.15rem;
}
.hero-phone-block strong {
    font-size: 1.4rem;
    color: var(--color-accent);
    font-family: var(--font-heading);
}
.hero-trust {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    flex-wrap: wrap;
}
.hero-trust-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    font-weight: 500;
}
.hero-trust-item svg { width: 20px; height: 20px; color: var(--color-accent); }

/* ============ Secciones ============ */
.section { padding: 5rem 0; }
.section-soft { background: var(--color-bg-soft); }
.section-primary { background: var(--color-primary); color: #fff; }
.section-dark { background: var(--color-bg-dark); color: #fff; }
.section-primary h1, .section-primary h2, .section-primary h3,
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-primary p, .section-dark p { color: rgba(255,255,255,0.85); }

.section-header { text-align: center; max-width: 760px; margin: 0 auto 3.5rem; }
.section-header h2 span { color: var(--color-accent); }
.section-eyebrow {
    display: inline-block;
    color: var(--color-accent);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

/* ============ Grids ============ */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ============ Service cards ============ */
.service-card {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    transition: var(--transition);
    text-decoration: none;
    color: var(--color-text);
    display: block;
    box-shadow: var(--shadow-sm);
}
.service-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    color: var(--color-text);
}
.service-card-icon {
    width: 60px; height: 60px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
}
.service-card h3 { margin-bottom: 0.75rem; font-size: 1.25rem; }
.service-card p { margin: 0 0 1rem; font-size: 0.95rem; }
.service-card-link {
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition);
}
.service-card:hover .service-card-link { gap: 0.6rem; }

/* ============ Features ============ */
.feature {
    text-align: center;
    padding: 1rem;
}
.feature-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(247, 148, 29, 0.25);
}
.feature h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.feature p { font-size: 0.95rem; margin: 0; }

/* ============ CTA Banner ============ */
.cta-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 4.5rem 0;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(247,148,29,0.25) 0%, transparent 60%);
    pointer-events: none;
}
.cta-banner h2 { color: #fff; margin-bottom: 1rem; }
.cta-banner p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    max-width: 680px;
    margin: 0 auto 2rem;
}

/* ============ Premio / Award ============ */
.award-card {
    background: #fff;
    border-left: 5px solid var(--color-accent);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.award-card h3 { color: var(--color-primary); }
.award-card p { color: var(--color-text); }

/* ============ Gallery (fotos del taller) ============ */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.gallery-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--color-bg-soft);
    position: relative;
    cursor: zoom-in;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item::after {
    content: '\01F50D';
    position: absolute;
    bottom: 0.75rem; right: 0.75rem;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    color: var(--color-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.gallery-item:hover::after { opacity: 1; }

/* ============ Lightbox ============ */
.jw-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
    padding: 2rem;
}
.jw-lightbox.is-open {
    opacity: 1;
}
.jw-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    transform: scale(0.9);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: default;
}
.jw-lightbox.is-open .jw-lightbox-img {
    transform: scale(1);
}
.jw-lightbox-close,
.jw-lightbox-prev,
.jw-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 0;
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    font-size: 1.6rem;
    line-height: 1;
    backdrop-filter: blur(6px);
}
.jw-lightbox-close:hover,
.jw-lightbox-prev:hover,
.jw-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08);
}
.jw-lightbox-close { top: 1.5rem; right: 1.5rem; }
.jw-lightbox-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.jw-lightbox-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }
.jw-lightbox-prev:hover, .jw-lightbox-next:hover { transform: translateY(-50%) scale(1.08); }
.jw-lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    background: rgba(0,0,0,0.4);
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    backdrop-filter: blur(6px);
}
@media (max-width: 600px) {
    .jw-lightbox { padding: 0.75rem; }
    .jw-lightbox-close { top: 0.75rem; right: 0.75rem; width: 40px; height: 40px; }
    .jw-lightbox-prev { left: 0.5rem; }
    .jw-lightbox-next { right: 0.5rem; }
}

/* ============ Contacto ============ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}
.contact-info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.contact-info-icon {
    width: 48px; height: 48px; flex-shrink: 0;
    border-radius: var(--radius);
    background: var(--color-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
}
.contact-info-item strong {
    display: block;
    color: var(--color-text);
    margin-bottom: 0.2rem;
    font-family: var(--font-heading);
}
.contact-info-item p { margin: 0; }

.contact-form {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow);
}
.contact-form label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}
.contact-form input, .contact-form textarea, .contact-form select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 86, 167, 0.15);
}

/* ============ Footer ============ */
.site-footer {
    background: var(--color-bg-dark);
    color: #E5E7EB;
    padding: 4rem 0 1.5rem;
}
.site-footer p { color: #D1D5DB; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}
.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 1.25rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 0.75rem;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 40px; height: 3px;
    background: var(--color-accent);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 0.6rem; color: #D1D5DB; font-size: 0.95rem; }
.footer-col a { color: #E5E7EB; font-size: 0.95rem; transition: var(--transition); }
.footer-col a:hover { color: var(--color-accent); }
.footer-logo {
    max-height: 70px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}
.footer-social {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.25rem;
}
.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition);
}
.footer-social a:hover {
    background: var(--color-accent);
    color: #fff;
    transform: translateY(-2px);
}
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: #9CA3AF;
}

/* ============ Page fade transition (coherente con logo) ============ */
.jw-page-fade {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 99998;
    pointer-events: none;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.55s cubic-bezier(0.76, 0, 0.24, 1);
}
.jw-page-fade.is-out { opacity: 1; }
.jw-page-fade.no-anim,
.jw-page-fade.no-anim .jw-page-fade-logo { transition: none; }

.jw-page-fade-logo {
    width: clamp(100px, 18vw, 150px);
    height: auto;
    opacity: 0;
    transform: scale(0.85);
    transition:
        opacity 0.35s cubic-bezier(0.76, 0, 0.24, 1),
        transform 0.55s cubic-bezier(0.76, 0, 0.24, 1);
}
.jw-page-fade.is-out .jw-page-fade-logo {
    opacity: 1;
    transform: scale(1);
}

/* ============ Mercedes-style intro reveal ============ */
.jw-intro {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.7s cubic-bezier(0.76, 0, 0.24, 1);
    pointer-events: none;
    overflow: hidden;
}
.jw-intro.is-fading { opacity: 0; }

/* Haz horizontal de luz sutil que cruza el logo */
.jw-intro::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 40vh;
    transform: translateY(-50%) scaleY(0.02);
    transform-origin: center;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(255,255,255,0) 35%,
        rgba(255,255,255,0.65) 49%,
        rgba(255,255,255,0.65) 51%,
        rgba(255,255,255,0) 65%,
        transparent 100%);
    opacity: 0;
    filter: blur(14px);
    mix-blend-mode: screen;
    animation: jw-intro-beam 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
    z-index: 2;
    pointer-events: none;
}

/* Halo radial amplio centrado en el logo */
.jw-intro::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90vmin;
    height: 90vmin;
    transform: translate(-50%, -50%) scale(0.3);
    background: radial-gradient(circle at center,
        rgba(255,255,255,0.5) 0%,
        rgba(255,255,255,0.2) 18%,
        rgba(255,255,255,0.05) 40%,
        transparent 65%);
    opacity: 0;
    animation: jw-intro-halo 1.9s cubic-bezier(0.22, 1, 0.36, 1) 1s forwards;
    pointer-events: none;
    z-index: 1;
}

.jw-intro-stage {
    position: relative;
    width: clamp(200px, 40vw, 360px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    z-index: 3;
}

.jw-intro-logo {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transform: scale(0.92);
    filter: brightness(0) invert(1);
    animation: jw-intro-logo-reveal 2.2s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
    position: relative;
    z-index: 4;
}

@keyframes jw-intro-logo-reveal {
    0% {
        opacity: 0;
        transform: scale(0.92);
        filter: brightness(0) invert(1) opacity(0.15);
    }
    40% {
        opacity: 0.6;
        transform: scale(0.97);
        filter: brightness(0) invert(1) opacity(0.55);
    }
    65% {
        opacity: 1;
        transform: scale(1.03);
        filter: brightness(0) invert(1) drop-shadow(0 0 22px rgba(255,255,255,0.85));
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(0) invert(1);
    }
}

@keyframes jw-intro-beam {
    0% { opacity: 0; transform: translateY(-50%) scaleY(0.02); }
    25% { opacity: 0.7; transform: translateY(-50%) scaleY(0.15); }
    65% { opacity: 0.5; transform: translateY(-50%) scaleY(0.55); }
    100% { opacity: 0; transform: translateY(-50%) scaleY(0.85); }
}

@keyframes jw-intro-halo {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
    55% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); }
}

/* ============ Logo transition overlay ============ */
.jw-logo-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    z-index: 99999;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}
.jw-logo-overlay-img {
    width: clamp(160px, 30vw, 260px);
    height: auto;
    transform: scale(0.6);
    opacity: 0;
    transition:
        transform 1.3s cubic-bezier(0.22, 1, 0.36, 1),
        top 1.3s cubic-bezier(0.22, 1, 0.36, 1),
        left 1.3s cubic-bezier(0.22, 1, 0.36, 1),
        width 1.3s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.45s ease;
    will-change: transform, top, left, width;
}

/* Phase 1 — click logo: fondo blanco cubre la página, logo en su tamaño final */
.jw-logo-overlay.is-eating {
    background: rgba(255, 255, 255, 1);
}
.jw-logo-overlay.is-eating .jw-logo-overlay-img {
    opacity: 1;
    transform: scale(1);
}

/* Phase 2 — en el home: overlay con logo centrado exactamente al mismo tamaño */
.jw-logo-overlay.is-covering {
    background: rgba(255, 255, 255, 1);
}
.jw-logo-overlay.is-covering .jw-logo-overlay-img {
    opacity: 1;
    transform: scale(1);
}

/* Phase 3 — reveal: overlay fades out, logo is JS-positioned to header spot */
.jw-logo-overlay.is-revealing {
    background: rgba(255, 255, 255, 0);
}

/* ============ Floating CTA ============ */
.floating-cta {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.floating-btn {
    width: 58px; height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    transition: var(--transition);
    text-decoration: none;
}
.floating-btn:hover {
    transform: scale(1.1);
    color: #fff;
}
.floating-btn-whatsapp { background: #25D366; }
.floating-btn-phone { background: var(--color-accent); }

/* ============ Page hero ============ */
.page-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    padding: 4rem 0 3rem;
    text-align: center;
}
.page-hero h1 { color: #fff; margin-bottom: 0.5rem; }
.breadcrumbs {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 1rem;
}
.breadcrumbs a { color: var(--color-accent); }

.page-content { padding: 4rem 0; max-width: 920px; margin: 0 auto; }
.page-content p { font-size: 1.05rem; color: var(--color-text-soft); }
.page-content h2 { margin-top: 2.5rem; color: var(--color-primary); }
.page-content h3 { margin-top: 2rem; color: var(--color-text); }
.page-content ul { color: var(--color-text-soft); padding-left: 1.25rem; }
.page-content li { margin-bottom: 0.5rem; }
.page-content strong { color: var(--color-text); }
.page-content img { border-radius: var(--radius); margin: 1.5rem 0; box-shadow: var(--shadow); }

/* ============ Blog ============ */
.post-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.post-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.post-card-thumb {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--color-bg-soft);
}
.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-card-body { padding: 1.5rem; }
.post-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.post-card h3 a { color: var(--color-text); }
.post-card h3 a:hover { color: var(--color-primary); }
.post-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
    .main-nav ul { gap: 1.25rem; }
    .main-nav a { font-size: 0.9rem; }
    .site-logo img { max-height: 54px; }
}

@media (max-width: 960px) {
    .topbar { font-size: 0.8rem; }
    .topbar-right { display: none; }
    .topbar-inner { justify-content: center; }

    .main-nav {
        position: fixed;
        top: 0; right: -100%;
        width: 88%; max-width: 360px;
        height: 100vh;
        background: #fff;
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        box-shadow: -10px 0 30px rgba(0,0,0,0.15);
        z-index: 1001;
        display: block;
    }
    .main-nav.open { right: 0; }
    .main-nav ul { flex-direction: column; gap: 0; align-items: flex-start; }
    .main-nav li {
        width: 100%;
        border-bottom: 1px solid var(--color-border);
    }
    .main-nav a { display: block; padding: 1rem 0; }

    .menu-toggle { display: inline-flex; }
    .header-phone span { display: none; }
    .header-cta .btn { display: none; }

    .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .hero { min-height: 70vh; padding: 4rem 0; }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; align-items: flex-start; }
    .hero-cta .btn { width: 100%; text-align: center; }
    .section { padding: 3.5rem 0; }
    .page-content { padding: 3rem 0; }
    .topbar-left { justify-content: center; gap: 1rem; }
}
