/* ============================================================================
   FALLBACK FONT CON MÉTRICAS AJUSTADAS (CLS Optimization)
   Previene layout shift cuando Google Fonts carga
   ============================================================================ */
@font-face {
    font-family: 'Inter Fallback';
    src: local('Arial'), local('Helvetica Neue'), local('Helvetica'), local('sans-serif');
    size-adjust: 106.5%;
    ascent-override: 90%;
    descent-override: 22%;
    line-gap-override: 0%;
}

/* Variables de Marca y Estilo Moderno */
:root {
    --primary-color: #6B2D7B; /* Púrpura Dushi */
    --primary-light: #8e3da3;
    --primary-dark: #4a1e54;
    --secondary-color: #f8f9fa;
    --accent-color: #ffc107; /* Un toque de dorado/amarillo para resaltar */
    --text-color: #212529;
    --text-muted: #6c757d;
    --white: #ffffff;
    --font-main: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #ffffff;
    overflow-x: hidden;
    /* Compensar altura del header fixed (aproximadamente 80px) */
    padding-top: 80px;
}

/* Reglas globales para imágenes - Prevenir distorsión en móvil */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Para imágenes dentro de contenedores específicos que necesitan object-fit */
.hero img,
.service-card img,
.product-card img {
    object-fit: cover;
}

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

/* ---------------------------------------------------------
   Parallax (ligero y accesible)
   - Desktop only (evita jank en móvil)
   - Respeta prefers-reduced-motion
   Uso:
     <section class="parallax-bg" style="--parallax-image: url('/assets/images/konica-minolta-accuriopress.avif')">
       <div class="container">...</div>
     </section>
--------------------------------------------------------- */
.parallax-bg {
    position: relative;
    background-color: var(--primary-dark);
    background-image: var(--parallax-image, none);
    background-size: cover;
    /* Default: ligeramente hacia abajo para mostrar más “la parte media-inferior” */
    background-position: var(--parallax-position, center 75%);
    background-repeat: no-repeat;
    overflow: hidden;
}

.parallax-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    /* Overlay para legibilidad y consistencia de marca */
    background: linear-gradient(135deg, rgba(74, 30, 84, 0.86) 0%, rgba(26, 37, 47, 0.65) 100%);
    z-index: 0;
}

.parallax-bg > .container {
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
    .parallax-bg {
        background-attachment: fixed;
    }
}

@media (max-width: 1023px), (prefers-reduced-motion: reduce) {
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* Navegación Elevada */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -1px;
    white-space: nowrap; /* Evita que "DUSHI COMPANY" se parta en 2 líneas */
    line-height: 1;
}

.logo img {
    height: 45px;
    margin-right: 10px;
    width: auto;
    display: block; /* Evita baseline gap y alineaciones raras */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-links li {
    white-space: nowrap; /* Evita cortes en items de menú */
}

/* Dropdown Styles */
.nav-item-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none; /* Cambiado de opacity a display:none para asegurar que no se vea */
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    min-width: 260px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border-radius: 15px;
    padding: 15px 0;
    z-index: 1000;
    border: 1px solid #eee;
    list-style: none !important; /* Quitar puntos */
    margin: 0 !important;
}

.nav-item-dropdown:hover .dropdown-menu {
    display: block; /* Mostrar al pasar el mouse */
}

.dropdown-menu li {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    list-style: none !important; /* Quitar puntos */
    text-align: left;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: var(--secondary-color);
    color: var(--primary-color) !important;
    padding-left: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.lang-switch {
    border: 1px solid #ddd;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    gap: 8px;
}

.lang-switch a {
    color: var(--text-muted);
}

.lang-switch a.active {
    color: var(--primary-color);
    font-weight: bold;
}

/* Menú Hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: 0.4s ease-in-out;
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 20px 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
}

/* Hero Section con Video de Cloudflare */
.hero {
    position: relative;
    padding: 200px 0 150px;
    color: var(--white);
    text-align: center;
    overflow: hidden;
    background-color: var(--primary-dark); /* Fallback */
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero--no-overlay {
    /* Home: si el video tarda en cargar, no queremos un flash negro */
    background-color: var(--primary-color);
}

.hero--no-overlay .hero-video-container {
    background-color: var(--primary-color);
    /* Poster/thumbnail que se muestra mientras el video carga */
    background-image: url('/assets/images/video-thumbnail.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Home: velo de marca (mitad de intensidad vs overlay “fuerte” original) */
.hero--no-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2; /* encima del video, debajo del texto */
    pointer-events: none;
    /* Antes (overlay fuerte): ~0.85 a ~0.70. Ahora: ~0.42 a ~0.35 */
    background: linear-gradient(135deg, rgba(74, 30, 84, 0.42) 0%, rgba(107, 45, 123, 0.35) 100%);
}

/* Home: el player del iframe puede meter barras negras laterales según aspect ratio.
   Solución práctica: “zoom/crop” leve para llenar el ancho y ocultar letterboxing. */
.hero--no-overlay .hero-video-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%) scale(1.18);
    transform-origin: center;
}

.hero-video-container iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    /* Transición suave cuando el video aparece sobre el thumbnail */
    opacity: 0;
    animation: fadeInVideo 0.8s ease-out 0.5s forwards;
}

@keyframes fadeInVideo {
    to { opacity: 1; }
}

/* Overlay morado institucional que se desvanece suavemente */
.video-loading-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    z-index: 2;
    animation: fadeOutOverlay 1.5s ease-out 0.8s forwards;
}

@keyframes fadeOutOverlay {
    0% { opacity: 1; }
    100% { opacity: 0; pointer-events: none; }
}

/* Botón de play (visible solo en móvil/tablet; en desktop el video se inyecta solo al entrar al viewport) */
.hero-play-btn {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 4;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: var(--transition);
}

.hero-play-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateX(-50%) translateY(-2px);
}

.hero-play-btn:active {
    transform: translateX(-50%) translateY(0);
}

/* Mostrar botón en todos los anchos; el video se carga solo bajo demanda */

/* Capa para legibilidad y marca */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 30, 84, 0.85) 0%, rgba(107, 45, 123, 0.7) 100%);
    z-index: 2;
}

.hero .container {
    position: relative;
    z-index: 3;
}

/* Home: sin velo/overlay encima del video. Mantener legibilidad con text-shadow. */
.hero--no-overlay h1,
.hero--no-overlay p {
    text-shadow: 0 3px 18px rgba(0,0,0,0.55);
}

/* Divisor inclinado (Shape Divider) */
.hero-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
    z-index: 4;
}

.hero-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 70px;
}

.hero-divider .shape-fill {
    fill: var(--secondary-color);
}


.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.1;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================================
   RESPONSIVE HERO BACKGROUNDS (LCP Optimization)
   ============================================================================ */
.hero-home,
section.hero.hero-home,
section.hero.hero--no-overlay {
    background-image: url('/assets/images/products/catalogos-produccion.webp') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    min-height: 500px !important;
    max-height: 500px !important;
}

/* Asegurar que NO haya video ni placeholder en hero-home */
.hero-home .hero-video-container,
section.hero-home .hero-video-container {
    display: none !important;
}

/* Hero de servicios usa la MISMA imagen que home */
.services-hero,
section.services-hero,
.services-hero.parallax-bg,
section.services-hero.parallax-bg {
    background-image: url('/assets/images/products/catalogos-produccion.webp') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Botones Premium */
.btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--white);
    color: var(--primary-color) !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.btn-secondary {
    background-color: rgba(255,255,255,0.1);
    color: var(--white) !important;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Tarjetas de Servicios */
.services {
    padding: 100px 0;
    background: var(--secondary-color);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-bottom: 5px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    border-bottom: 5px solid var(--primary-color);
}

.service-card .icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: inline-block;
}

.service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.service-card a {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* FAQ / AIO Section */
.faq {
    padding: 100px 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
}

.faq-item h4 {
    padding: 20px;
    background: #fdfdfd;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary-dark);
}

.faq-item p {
    padding: 0 20px 20px;
    color: var(--text-muted);
}

/* Widget de Reseñas Estilo dushi.me */
.reviews-widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    color: #333;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    max-width: 400px;
    margin: 0 auto;
}

.reviews-header {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.google-logo-mini {
    width: 30px;
    height: 30px;
    display: block;
    object-fit: contain;
    flex: 0 0 auto;
}

.rating-info h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #444;
}

.stars-row {
    color: #fbbc05;
    font-size: 1.2rem;
    margin: 2px 0;
}

.reviews-count {
    font-size: 0.85rem;
    color: #666;
}

.review-item-mini {
    font-size: 0.9rem;
    line-height: 1.4;
    font-style: italic;
    color: #555;
    position: relative;
    padding-left: 20px;
}

.review-item-mini::before {
    content: '"';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.5rem;
    color: #ccc;
    line-height: 1;
}

.btn-google-maps {
    display: inline-block;
    background: #4285f4;
    color: #fff !important;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: var(--transition);
}

.btn-google-maps:hover {
    background: #357ae8;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .reviews-widget {
        max-width: 100%;
    }
}

/* Footer Dark */
footer {
    background: #1a1a1a;
    color: #ccc; /* Mejorado contraste de #999 a #ccc */
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h5 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #ccc; /* Mejorado contraste de #999 a #ccc */
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--white);
}

.footer-subtitle {
    margin-top: 18px;
    margin-bottom: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.2px;
}

/* Footer: sitemap (Opción A) — 3 columnas, listas compactas */
.footer-sitemap {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.10);
}

.footer-sitemap-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    margin-top: 12px;
}

.footer-sitemap-title {
    color: rgba(255,255,255,0.90);
    font-size: 0.95rem;
    font-weight: 900;
    margin: 0 0 12px;
    letter-spacing: 0.2px;
}

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

.footer-sitemap-links li {
    margin-bottom: 10px;
    line-height: 1.2;
}

.footer-sitemap-links a {
    color: #bdbdbd;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    transition: var(--transition);
}

.footer-sitemap-links a:hover {
    color: var(--white);
}

@media (max-width: 900px) {
    .footer-sitemap-grid {
        grid-template-columns: 1fr;
    }
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
}

/* ---------------------------------------------------------
   Páginas internas (Blog / Contacto / Artículos)
--------------------------------------------------------- */

.page-hero {
    padding: 170px 0 70px;
    background: linear-gradient(135deg, rgba(74, 30, 84, 0.92) 0%, rgba(107, 45, 123, 0.82) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.page-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
}

.page-hero p {
    max-width: 850px;
    font-size: 1.15rem;
    opacity: 0.95;
}

.breadcrumbs {
    margin-top: 20px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.breadcrumbs a {
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.25);
}

.breadcrumbs a:hover {
    border-bottom-color: rgba(255,255,255,0.6);
}

.content {
    padding: 90px 0;
    background: #fff;
}

.content h2 {
    color: var(--primary-dark);
    font-size: 2rem;
    margin-bottom: 18px;
}

.content h3 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 12px;
}

.content p {
    color: var(--text-muted);
    line-height: 1.85;
}

.content ul {
    margin: 15px 0 0 0;
    padding-left: 20px;
    color: var(--text-muted);
}

.content li {
    margin-bottom: 8px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.blog-card {
    background: var(--white);
    border-radius: 18px;
    border: 1px solid #eee;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    padding: 28px;
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-6px);
    border-color: rgba(107, 45, 123, 0.35);
}

.blog-card .meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.blog-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.35rem;
    color: var(--primary-dark);
}

.blog-card p {
    margin-bottom: 18px;
}

.blog-card a {
    color: var(--primary-color);
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.note {
    background: var(--secondary-color);
    border: 1px solid #eee;
    padding: 18px 18px;
    border-radius: 14px;
    margin: 18px 0;
    color: var(--text-muted);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    align-items: start;
}

.video-embed {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #eee;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    background: #000;
    aspect-ratio: 16 / 9;
}

.video-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.form-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

.form-control label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-control input,
.form-control select,
.form-control textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
    background: #fff;
}

.form-control textarea {
    min-height: 140px;
    resize: vertical;
}

.form-control input:focus,
.form-control select:focus,
.form-control textarea:focus {
    border-color: rgba(107, 45, 123, 0.6);
    box-shadow: 0 0 0 4px rgba(107, 45, 123, 0.12);
}

.form-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.status {
    margin-top: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .page-hero {
        padding: 150px 0 55px;
    }
    .page-hero h1 {
        font-size: 2.2rem;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------
   Wikei (Knowledge Base)
--------------------------------------------------------- */

.kb-top {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
    align-items: start;
    margin-bottom: 28px;
}

.kb-search {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.kb-label {
    display: block;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.kb-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #ddd;
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.kb-input:focus {
    border-color: rgba(107, 45, 123, 0.6);
    box-shadow: 0 0 0 4px rgba(107, 45, 123, 0.12);
}

.kb-hint {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.kb-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    align-items: start;
}

.kb-sidebar {
    position: sticky;
    top: 110px; /* header fixed */
}

.kb-sidebar-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    margin-bottom: 16px;
}

.kb-sidebar-title {
    font-weight: 900;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.kb-toc {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kb-toc li {
    margin-bottom: 10px;
}

.kb-toc a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}

.kb-toc a:hover {
    text-decoration: underline;
}

.kb-section {
    margin-bottom: 40px;
}

.kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 16px;
}

.kb-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.kb-card:hover {
    transform: translateY(-4px);
    border-color: rgba(107, 45, 123, 0.35);
}

.kb-card h3 {
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.kb-card a {
    color: var(--primary-color);
    font-weight: 900;
    text-decoration: none;
}

.kb-block {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    margin-top: 16px;
}

.kb-block h3 {
    margin-top: 0;
}

.kb-glossary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 16px;
}

.kb-glossary-item {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.kb-hidden {
    display: none !important;
}

@media (max-width: 980px) {
    .kb-top {
        grid-template-columns: 1fr;
    }
    .kb-layout {
        grid-template-columns: 1fr;
    }
    .kb-sidebar {
        position: relative;
        top: auto;
    }
}

/* ============================================================================
   SOCIAL LINKS (Footer)
   ============================================================================ */

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    align-items: center;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.social-links svg {
    color: white;
    width: 20px;
    height: 20px;
}

/* ============================================================================
   OPTIMIZACIÓN MÓVIL: Ocultar video del hero + Ajustes responsivos
   ============================================================================ */

@media (max-width: 768px) {
    /* Ocultar iframe de video en móvil para mejorar LCP */
    .hero-video-container,
    .hero-video-container iframe {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    /* Mostrar imagen de fondo estática SOLO en hero de HOME */
    .hero-home,
    section.hero.hero-home,
    section.hero.hero--no-overlay {
        background-image: url('/assets/images/products/catalogos-produccion.webp') !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        min-height: 500px !important;
        max-height: 500px !important;
    }
    
    /* Asegurar que el overlay del video tampoco aparezca */
    .video-loading-overlay {
        display: none !important;
    }
    
    /* ========================================================================
       FIX CRÍTICO: Hero de servicios - altura FIJA y NO heredar estilos de home
       ======================================================================== */
    
    /* Forzar altura idéntica a home (500px) SOLO en servicios */
    section.services-hero.parallax-bg,
    .services-hero.parallax-bg,
    section.services-hero,
    section.parallax-bg {
        min-height: 500px !important;
        max-height: 500px !important;
        height: 500px !important;
        padding: 100px 20px 60px !important;
        background-size: cover !important;
        background-position: center center !important;
        background-attachment: scroll !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        /* NO heredar background del home */
        background-image: var(--parallax-image) !important;
    }
    
    /* Container del hero centrado */
    .services-hero .container,
    section.services-hero .container {
        max-width: 100% !important;
        padding: 0 20px !important;
        text-align: center !important;
    }
    
    /* Textos del hero de servicios ajustados */
    .services-hero h1,
    section.services-hero h1,
    .parallax-bg h1 {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
        text-shadow: 2px 2px 8px rgba(0,0,0,0.7) !important;
    }
    
    .services-hero p,
    section.services-hero p,
    .parallax-bg p {
        font-size: 0.95rem !important;
        line-height: 1.4 !important;
        text-shadow: 1px 1px 4px rgba(0,0,0,0.7) !important;
    }
    
    /* Hero CTAs más pequeños en móvil */
    .hero-cta-row {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .hero-cta-row .btn {
        width: 100% !important;
        max-width: 300px !important;
        font-size: 0.95rem !important;
        padding: 12px 24px !important;
    }
    
    /* ========================================================================
       FIX CRÍTICO: Video de producción - aspect ratio correcto en móvil
       ======================================================================== */
    
    /* ========================================================================
       Video de producción en móvil: Estilo tarjeta (como volantes)
       ======================================================================== */
    
    /* En móvil, el video se convierte en tarjeta de 1 columna */
    .video-production-container,
    [style*="grid-column: span 2"] {
        grid-column: span 1 !important;
        background: white !important;
        border-radius: 20px !important;
        padding: 0 !important;
        box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important;
        overflow: hidden !important;
        display: block !important;
    }
    
    /* Contenedor del iframe mantiene aspect ratio */
    .video-production-container > div,
    [style*="grid-column: span 2"] > div[style*="padding-bottom: 56.25%"],
    div[style*="padding-bottom: 56.25%"] {
        position: relative !important;
        width: 100% !important;
        padding-bottom: 56.25% !important;
        height: 0 !important;
        overflow: hidden !important;
        background: #000 !important;
        border-radius: 20px 20px 0 0 !important;
    }
    
    /* Iframe del video */
    .video-production-container iframe,
    [style*="grid-column: span 2"] iframe,
    div[style*="padding-bottom: 56.25%"] iframe,
    iframe[src*="cloudflarestream"] {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        border: none !important;
    }
    
    /* Asegurar que cualquier iframe de video tenga max-width */
    iframe[src*="youtube"],
    iframe[src*="vimeo"],
    iframe[src*="cloudflare"] {
        max-width: 100% !important;
    }
}


