/**
 * responsive.css — Breakpoints responsive del tema MotorReview
 * Sistema mobile-first: 768px (tablet), 1024px (desktop)
 *
 * @package MotorReview
 */

/* ============================================================
   BASE MOBILE (< 480px) — Extra pequeño
   ============================================================ */
@media (max-width: 480px) {
    .contenedor {
        padding-left: 16px;
        padding-right: 16px;
    }

    .btn {
        padding: 11px 18px;
        font-size: 0.9rem;
    }

    .btn-grande {
        padding: 13px 20px;
        font-size: 0.95rem;
    }

    /* Hero portada más compacto */
    .hero {
        min-height: 420px !important;
    }

    /* Cards sin extracto en móvil muy pequeño */
    .card__extracto {
        -webkit-line-clamp: 2;
    }

    /* Filtros pills */
    .archivo-filtros__pills {
        gap: 6px;
    }

    .pill {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
}

/* ============================================================
   TABLET (768px — 1024px)
   ============================================================ */
@media (min-width: 768px) and (max-width: 1024px) {

    /* Grid de 2 columnas en tablet para 3col */
    .layout-3col {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Grid de 2 columnas para 4col */
    .layout-4col {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Sidebar debajo en tablet */
    .layout-contenido-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        align-items: start;
    }

    .sidebar .widget {
        margin-bottom: 0;
    }

    /* Footer: 2 columnas en tablet */
    .footer__widgets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

/* ============================================================
   DESKTOP (> 1024px) — Estilos adicionales
   ============================================================ */
@media (min-width: 1024px) {

    /* Hover en cards solo en dispositivos con puntero fino */
    @media (hover: hover) and (pointer: fine) {
        .card:hover {
            transform: translateY(-4px);
            box-shadow: 0 10px 32px rgba(0, 0, 0, 0.13);
        }
    }

    /* Barra de taxonomías visible */
    .barra-taxonomias {
        display: block;
    }

    /* Sidebar fijo */
    .sidebar {
        position: sticky;
        top: 90px;
    }

    /* Layout 4 columnas completo */
    .footer__widgets-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================================
   DESKTOP GRANDE (> 1280px)
   ============================================================ */
@media (min-width: 1280px) {
    :root {
        --gap-grid: 28px;
    }

    .cabecera__inner {
        gap: 40px;
    }
}

/* ============================================================
   REDUCCIÓN DE MOVIMIENTO — Accesibilidad
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .punt-barra {
        width: var(--ancho-final, 0%) !important;
        transition: none !important;
    }
}

/* ============================================================
   ALTO CONTRASTE — Accesibilidad
   ============================================================ */
@media (forced-colors: active) {
    .badge,
    .btn,
    .pill {
        border: 2px solid ButtonText;
    }

    .card {
        border: 1px solid ButtonText;
    }
}

/* ============================================================
   IMPRESIÓN
   ============================================================ */
@media print {

    /* Ocultar elementos no imprimibles */
    .cabecera,
    .barra-taxonomias,
    .sidebar,
    .footer,
    .newsletter-form,
    .ad-slot,
    .paginacion,
    .cabecera__menu-btn,
    .cabecera__buscar-btn,
    .review-metabar,
    .galeria-vehiculo .galeria-thumb,
    .youtube-lazy {
        display: none !important;
    }

    /* Ajuste de layout */
    .layout-contenido-sidebar {
        grid-template-columns: 1fr !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    h1, h2, h3 {
        color: #000;
        page-break-after: avoid;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    /* Mostrar URL de enlaces */
    a[href]::after {
        content: ' (' attr(href) ')';
        font-size: 0.75em;
        color: #555;
    }

    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: '';
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    .ficha-tecnica-box {
        page-break-inside: avoid;
    }

    .pros-cons-box {
        grid-template-columns: 1fr 1fr !important;
        page-break-inside: avoid;
    }
}
