/* ============================================================
   Brahma Standard Comparator — Premium CSS v1.1.0
   Gallinas Brahma Boyacá
   Paleta: dorado/tierra sobre fondo oscuro · glassmorphism
   MOBILE-FIRST | Accesible | Performance-optimizado
   ============================================================ */

/* ── Reset de box-sizing ── */
.bsc-wrap *,
.bsc-wrap *::before,
.bsc-wrap *::after {
    box-sizing: border-box;
}

/* ── Variables ── */
:root {
    --bsc-gold:        #c8a96e;
    --bsc-gold-light:  #e2c99a;
    --bsc-gold-dark:   #8b5e3c;
    --bsc-dark-bg:     #0f0f1a;
    --bsc-dark-card:   #1a1a2e;
    --bsc-dark-card2:  #16213e;
    --bsc-us-blue:     #1a3a6e;
    --bsc-us-accent:   #4a90d9;
    --bsc-eu-green:    #1a3a1a;
    --bsc-eu-accent:   #4db86e;
    --bsc-cumple:      #2d7a47;
    --bsc-cumple-bg:   rgba(45,122,71,.15);
    --bsc-nocumple:    #8b2a2a;
    --bsc-nocumple-bg: rgba(139,42,42,.15);
    --bsc-dif-bg:      rgba(200,169,110,.08);
    --bsc-text:        #e8dcc8;
    --bsc-text-muted:  #9d8c75;
    --bsc-border:      rgba(200,169,110,.18);
    --bsc-radius:      14px;
    --bsc-radius-sm:   8px;
    --bsc-shadow:      0 8px 32px rgba(0,0,0,.45);
    --bsc-trans:       all 0.28s cubic-bezier(0.4,0,0.2,1);
    /* Touch target mínimo WCAG 2.1 AA */
    --bsc-touch-min:   48px;
}

/* ── Wrap principal ── */
.bsc-wrap {
    font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1228 50%, #0f1a0f 100%);
    border: 1px solid var(--bsc-border);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    box-shadow: var(--bsc-shadow), 0 0 80px rgba(200,169,110,.08);
    max-width: 1100px;
    margin: 1.5rem auto;
    color: var(--bsc-text);
    /* Evita overflow horizontal en móvil */
    width: 100%;
    
    /* ── PROTECCIÓN ANTI-COPIA ── */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* ══════════════════════════════════════════
   SEO UTILITIES — Contenido indexable por Google
   ══════════════════════════════════════════ */

/* Texto solo para lectores de pantalla y crawlers (visualmente oculto pero en el DOM) */
.bsc-sr-only,
.bsc-seo-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Header SEO con H1 y descripción — visible para crawlers, oculto visualmente */
.bsc-seo-header {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* Footer keywords */
.bsc-footer-keywords {
    margin-top: 0.3rem;
    opacity: 0.6;
}

/* Reset headings dentro del plugin (WordPress suele inyectar estilos del tema) */
.bsc-wrap h1,
.bsc-wrap h2,
.bsc-wrap h3,
.bsc-wrap h4,
.bsc-wrap h5 {
    margin: 0;
    padding: 0;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
    line-height: inherit;
    border: none;
    background: none;
    box-shadow: none;
}

/* h4 usado en col-label y diferencias-title */
.bsc-col-label,
.bsc-diferencias-title {
    font-weight: 700;
}

/* h5 usado en section-title */
.bsc-section-title {
    font-size: 0.72rem;
}


/* ── Header ── */
.bsc-header {
    background: linear-gradient(135deg, #1a1228 0%, #0f1520 100%);
    border-bottom: 1px solid var(--bsc-border);
    padding: 2rem 1.25rem 1.75rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.bsc-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(200,169,110,.15) 0%, transparent 70%);
    pointer-events: none;
}
.bsc-header-icon {
    font-size: 3rem;
    margin-bottom: 0.6rem;
    display: block;
    filter: drop-shadow(0 0 20px rgba(200,169,110,.4));
    /* will-change ahorra repaints en animación */
    will-change: transform;
    animation: bsc-float 4s ease-in-out infinite;
}
@keyframes bsc-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}
/* Respeta preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .bsc-header-icon {
        animation: none;
        will-change: auto;
    }
    .bsc-panel {
        animation: none !important;
    }
    .bsc-btn-parte,
    .bsc-col,
    .bsc-diferencia-item {
        transition: none !important;
    }
}
.bsc-title {
    font-size: clamp(1.3rem, 4vw, 1.9rem);
    font-weight: 800;
    color: var(--bsc-gold);
    margin: 0 0 0.5rem;
    text-shadow: 0 2px 20px rgba(200,169,110,.35);
    letter-spacing: -0.5px;
    line-height: 1.2;
}
.bsc-subtitle {
    color: var(--bsc-text-muted);
    font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    line-height: 1.6;
}
.bsc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}
.bsc-badge--us {
    background: rgba(74,144,217,.2);
    color: #7ab8f5;
    border: 1px solid rgba(74,144,217,.4);
}
.bsc-badge--eu {
    background: rgba(77,184,110,.2);
    color: #7de09a;
    border: 1px solid rgba(77,184,110,.4);
}

/* ══════════════════════════════════════════
   SELECTOR DE PARTES — SCROLL HORIZONTAL
   Funciona como un carril deslizable en móvil
   ══════════════════════════════════════════ */
.bsc-selector {
    display: flex;
    /* NO wrap — scroll horizontal en móvil */
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: rgba(0,0,0,.25);
    border-bottom: 1px solid var(--bsc-border);
    /* Scroll horizontal con inercia táctil */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    /* Ocultar scrollbar visualmente pero mantener funcionalidad */
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Importante: padding en los extremos para ver el último item */
    padding-right: 1.25rem;
}
.bsc-selector::-webkit-scrollbar {
    display: none;
}

/* Indicador visual de scroll */
.bsc-selector-wrap {
    position: relative;
}
.bsc-selector-wrap::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to left, rgba(10,10,20,.9), transparent);
    pointer-events: none;
    border-radius: 0;
}

.bsc-btn-parte {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.6rem 0.9rem;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--bsc-radius-sm);
    color: var(--bsc-text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--bsc-trans);
    /* Tamaño mínimo touch WCAG: 48px de alto */
    min-height: var(--bsc-touch-min);
    min-width: 72px;
    /* Evita que se comprima en el flex */
    flex-shrink: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* Snap point */
    scroll-snap-align: start;
    /* Tap highlight transparente en iOS/Android */
    -webkit-tap-highlight-color: transparent;
}
.bsc-btn-parte::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--parte-color, var(--bsc-gold)), transparent);
    opacity: 0;
    transition: opacity 0.28s;
}

/* Estado hover — solo dispositivos con pointer fino (mouse) */
@media (hover: hover) and (pointer: fine) {
    .bsc-btn-parte:hover {
        border-color: var(--parte-color, var(--bsc-gold));
        color: var(--bsc-text);
        transform: translateY(-2px);
        box-shadow: 0 4px 20px rgba(0,0,0,.3);
    }
    .bsc-btn-parte:hover::before {
        opacity: 0.15;
    }
}

/* Estado active — táctil y mouse */
.bsc-btn-parte:active {
    transform: scale(0.96);
    opacity: 0.85;
}

/* Estado seleccionado */
.bsc-btn-parte--active {
    border-color: var(--parte-color, var(--bsc-gold));
    color: var(--bsc-gold-light);
    font-weight: 700;
    box-shadow: 0 0 0 1px var(--parte-color, var(--bsc-gold)) inset,
                0 4px 16px rgba(0,0,0,.3);
}
.bsc-btn-parte--active::before {
    opacity: 0.18;
}

.bsc-btn-icono {
    font-size: 1.4rem;
    position: relative;
    z-index: 1;
    line-height: 1;
}
.bsc-btn-label {
    position: relative;
    z-index: 1;
    line-height: 1.2;
    font-size: 0.7rem;
}

/* ── Content ── */
.bsc-content {
    padding: 1.25rem;
}

/* ── Panel — Progressive Enhancement para SEO ──
   SIN JS: todos los paneles visibles (Google los indexa todos)
   CON JS:  .bsc-js en el wrap activa el modo tabs
   ──────────────────────────────────────────── */

/* Estado base: todo visible para SEO / crawlers sin JS */
.bsc-panel {
    display: block;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(200,169,110,.1);
    padding-bottom: 2rem;
}
.bsc-panel:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Con JS activo: comportamiento de tabs */
.bsc-js .bsc-panel {
    display: none;
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
    animation: bsc-fadein 0.32s cubic-bezier(0.4,0,0.2,1) both;
}
.bsc-js .bsc-panel--active {
    display: block;
}
@keyframes bsc-fadein {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* El selector de tabs solo tiene sentido con JS */
.bsc-selector-wrap {
    display: none;
}
.bsc-js .bsc-selector-wrap {
    display: block;
}

/* Sin JS: ocultamos el indicador de swipe */
.bsc-js-hint {
    display: none;
}
.bsc-js .bsc-js-hint {
    display: block;
}

/* ── Región descripción ── */
.bsc-region-desc {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--bsc-border);
    border-radius: var(--bsc-radius);
}
.bsc-region-icono {
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--bsc-gold);
    flex-shrink: 0;
}
.bsc-region-title {
    font-size: clamp(1.1rem, 3.5vw, 1.35rem);
    font-weight: 700;
    color: var(--bsc-gold);
    margin: 0 0 0.25rem;
    line-height: 1.2;
}
.bsc-region-subtitle {
    color: var(--bsc-text-muted);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}

/* ── Grid comparativo ── */
.bsc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
/* Tablet y desktop: dos columnas lado a lado */
@media (min-width: 640px) {
    .bsc-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }
}

/* ── Imagen de Apoyo del Estándar ── */
.bsc-standard-image {
    margin: 0;
    padding: 0;
    width: 100%;
    /* Ocultar el borde inferior del contenedor visualmente */
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.bsc-standard-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    pointer-events: none; /* Previene clicks y arrastrar extra */
    -webkit-user-drag: none;
}

/* ── Columnas ── */
.bsc-col {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--bsc-radius);
    overflow: hidden;
    /* backdrop-filter desactivado en móvil por rendimiento */
}
@media (min-width: 640px) {
    .bsc-col {
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }
    /* Hover solo con mouse */
    @media (hover: hover) and (pointer: fine) {
        .bsc-col:hover {
            border-color: rgba(255,255,255,.15);
            box-shadow: 0 6px 24px rgba(0,0,0,.3);
            transform: translateY(-2px);
            transition: var(--bsc-trans);
        }
    }
}
.bsc-col--us { border-top: 3px solid var(--bsc-us-accent); }
.bsc-col--eu { border-top: 3px solid var(--bsc-eu-accent); }

/* ── Col header ── */
.bsc-col-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.bsc-col-header--us {
    background: linear-gradient(135deg, rgba(26,58,110,.5), rgba(26,58,110,.2));
}
.bsc-col-header--eu {
    background: linear-gradient(135deg, rgba(26,58,26,.5), rgba(26,58,26,.2));
}
.bsc-flag {
    font-size: 1.8rem;
    flex-shrink: 0;
    line-height: 1;
}
.bsc-col-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--bsc-text);
    line-height: 1.2;
}
.bsc-col-org {
    font-size: 0.7rem;
    color: var(--bsc-text-muted);
    margin-top: 0.15rem;
    line-height: 1.3;
}

/* ── Col body ── */
.bsc-col-body {
    padding: 1rem 1.1rem;
}
.bsc-descripcion {
    color: var(--bsc-text-muted);
    font-size: 0.83rem;
    line-height: 1.65;
    margin: 0 0 1rem;
    border-left: 2px solid var(--bsc-border);
    padding-left: 0.75rem;
}

/* ── Sections ── */
.bsc-section {
    margin-bottom: 0.9rem;
}
.bsc-section-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.45rem;
}
.bsc-section-title--cumple  { color: #5cba80; }
.bsc-section-title--no-cumple { color: #d4706a; }

.bsc-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.bsc-dot--cumple    { background: #5cba80; }
.bsc-dot--no-cumple { background: #d4706a; }

/* ── Listas ── */
.bsc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.bsc-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--bsc-text);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    /* Sin transition en lista — demasiados elementos */
}
.bsc-list--cumple .bsc-list-item {
    background: var(--bsc-cumple-bg);
    border-left: 2px solid var(--bsc-cumple);
}
.bsc-list--no-cumple .bsc-list-item {
    background: var(--bsc-nocumple-bg);
    border-left: 2px solid var(--bsc-nocumple);
}
/* Hover en lista solo con mouse */
@media (hover: hover) and (pointer: fine) {
    .bsc-list-item:hover {
        filter: brightness(1.1);
    }
}
.bsc-check {
    flex-shrink: 0;
    font-size: 0.88rem;
    margin-top: 0.1rem;
}

/* ── Puntuación ── */
.bsc-puntuacion {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.77rem;
    font-style: italic;
    line-height: 1.55;
    padding: 0.6rem 0.8rem;
    border-radius: var(--bsc-radius-sm);
    margin-top: 0.9rem;
    color: var(--bsc-text-muted);
}
.bsc-puntuacion--us {
    background: rgba(74,144,217,.1);
    border: 1px solid rgba(74,144,217,.25);
}
.bsc-puntuacion--eu {
    background: rgba(77,184,110,.1);
    border: 1px solid rgba(77,184,110,.25);
}
.bsc-puntuacion-icon {
    flex-shrink: 0;
    font-size: 0.88rem;
    margin-top: 0.1rem;
}

/* ── Diferencias clave ── */
.bsc-diferencias {
    background: var(--bsc-dif-bg);
    border: 1px solid rgba(200,169,110,.3);
    border-radius: var(--bsc-radius);
    padding: 1.1rem 1.1rem 1.1rem 1.25rem;
    position: relative;
    overflow: hidden;
}
.bsc-diferencias::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 0% 50%, rgba(200,169,110,.07) 0%, transparent 60%);
    pointer-events: none;
}
.bsc-diferencias-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}
.bsc-diferencias-icon { font-size: 1.1rem; }
.bsc-diferencias-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--bsc-gold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
}
.bsc-diferencias-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}
.bsc-diferencia-item {
    font-size: 0.83rem;
    color: var(--bsc-text);
    line-height: 1.6;
    padding: 0.55rem 0.75rem 0.55rem 1rem;
    border-left: 2px solid var(--bsc-gold);
    background: rgba(255,255,255,.03);
    border-radius: 0 6px 6px 0;
}
/* Hover solo con mouse */
@media (hover: hover) and (pointer: fine) {
    .bsc-diferencia-item {
        transition: background 0.2s, transform 0.2s;
    }
    .bsc-diferencia-item:hover {
        background: rgba(200,169,110,.09);
        transform: translateX(3px);
    }
}

/* ── Llamado a la Acción (WhatsApp CTA) ── */
.bsc-cta-container {
    display: flex;
    justify-content: center;
    padding: 2rem 1.25rem;
    position: relative;
}
.bsc-cta-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: radial-gradient(ellipse at center, rgba(200,169,110,0.3) 0%, transparent 100%);
}
.bsc-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
    color: #fff !important;
    padding: 0.85rem 1.8rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none !important;
    box-shadow: 0 8px 25px rgba(18, 140, 126, 0.35), 0 0 0 1px rgba(255,255,255,0.1) inset;
    transition: var(--bsc-trans);
    /* Para evitar selects indeseados en iOS */
    -webkit-user-select: none;
    user-select: none;
}
/* Hover para pantallas con mouse */
@media (hover: hover) and (pointer: fine) {
    .bsc-btn-whatsapp:hover,
    .bsc-btn-whatsapp:focus {
        transform: translateY(-3px);
        box-shadow: 0 12px 30px rgba(18, 140, 126, 0.45), 0 0 0 1px rgba(255,255,255,0.2) inset;
        background: linear-gradient(135deg, #149a8b 0%, #086b5f 100%);
    }
}
.bsc-btn-whatsapp:active {
    transform: scale(0.96);
    box-shadow: 0 4px 15px rgba(18, 140, 126, 0.3), 0 0 0 1px rgba(255,255,255,0.05) inset;
}
.bsc-wa-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* ── Footer ── */
.bsc-footer {
    border-top: 1px solid var(--bsc-border);
    padding: 0.85rem 1.25rem;
    text-align: center;
    font-size: 0.72rem;
    color: var(--bsc-text-muted);
    background: rgba(0,0,0,.2);
    line-height: 1.5;
}
.bsc-footer p { margin: 0; }
.bsc-footer em {
    color: var(--bsc-gold);
    font-style: normal;
    font-weight: 600;
}

/* ══════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   Mobile-first: base = móvil
   640px = tablet / 900px = desktop
   ══════════════════════════════════════════ */

/* Tablet y superior */
@media (min-width: 640px) {
    .bsc-header { padding: 2.2rem 2rem 1.8rem; }
    .bsc-selector {
        flex-wrap: wrap;
        overflow-x: visible;
        justify-content: center;
        padding: 1.25rem 1.5rem;
    }
    .bsc-selector-wrap::after { display: none; }
    .bsc-btn-parte {
        min-width: 80px;
        font-size: 0.78rem;
    }
    .bsc-btn-label { font-size: 0.75rem; }
    .bsc-content { padding: 1.75rem; }
    .bsc-region-desc { gap: 1rem; padding: 1.2rem 1.5rem; }
    .bsc-col-body { padding: 1.2rem 1.3rem; }
    .bsc-diferencias { padding: 1.4rem; }
}

/* Desktop */
@media (min-width: 900px) {
    .bsc-wrap { margin: 2rem auto; }
    .bsc-header { padding: 2.5rem 2rem 2rem; }
    .bsc-content { padding: 2rem; }
    .bsc-btn-parte { min-width: 88px; }
    .bsc-diferencias { padding: 1.5rem; }
}

/* Pantallas muy pequeñas (< 360px) */
@media (max-width: 359px) {
    .bsc-btn-parte { min-width: 62px; padding: 0.5rem 0.6rem; }
    .bsc-btn-icono { font-size: 1.2rem; }
    .bsc-btn-label { font-size: 0.65rem; }
    .bsc-col-org   { display: none; }
}
