/* ==========================================================================
   1. REGLAS BASE Y TIPOGRAFÍA
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Forzado de fuente institucional en todo el sitio */
html, body, p, a, h1, h2, h3, span, div {
    font-family: 'roboto', sans-serif !important;
}

body {

    background-color: #000000 !important; /* Gris Televen solicitado */

}



/* ==========================================================================
   2. COMPONENTES GLOBALES (HEADER DE BÚSQUEDA Y FECHAS)
   ========================================================================== */

/* Centrado del encabezado de resultados (Search & Category) */
.search-title-header {
    width: 100%;
    text-align: center;
    margin-bottom: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-title-header p {
    font-size: 2.2rem;
    color: black;
    margin: 0;
}

.search-title-header strong {
    color: #be0027; /* Rojo Televen */
    text-transform: uppercase;
    margin-left: 0.5rem;
}

/* Estilo de la fecha: Centrado y Negro Puro */
.search-date {
    display: block !important;
    text-align: center !important;
    color: #fff !important;
    font-weight: bold;
    font-size: 1.3rem;
    margin: 1rem 0 !important;
}

/* ==========================================================================
   3. GRID DE RESULTADOS (SEARCH & CATEGORIES)
   ========================================================================== */

/* Contenedor Principal del Grid */
.search-grid-layout, 
.search-page-container {
    max-width: 1440px;
    margin: 16rem auto 6rem;
    padding: 0 2rem;
}

/* Rejilla de 3 columnas */
.search-results-grid, 
.search-results-list {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Estilo de la Tarjeta (Card) */
.search-card {
    background: #000;
    border: 1px solid #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
    padding: 0 !important;
}

/* Media/Imagen de la tarjeta */
.search-card-media img {
    width: 100%;
    height: 200px !important;
    object-fit: cover;
    display: block;
}

/* Contenido de la tarjeta */
.search-card-content {
    padding: 2rem !important;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.search-card h2 {
    font-size: 1.8rem !important;
    line-height: 1.3;
    margin-bottom: 1rem;
    text-align: center;
    color: #000;
}

.search-excerpt {
    font-size: 1.5rem;
    line-height: 1.6;
    color: #444;
    text-align: justify;
}

/* ==========================================================================
   4. DISEÑO PÁGINA 404 (ESTILO "FUERA DEL AIRE")
   ========================================================================== */

.error-404-container {
    max-width: 1440px;
    margin: 18rem auto 8rem;
    padding: 0 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

.error-code {
    font-size: clamp(12rem, 20vw, 22rem);
    font-weight: 900;
    line-height: 1;
    color: #f0f0f0;
    position: relative;
    z-index: -1;
    margin-bottom: -5rem;
    letter-spacing: -10px;
    background: linear-gradient(to bottom, #e0e0e0, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-title {
    font-size: 4rem;
    color: #E41C36;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.error-message {
    font-size: 2rem;
    color: white;
    max-width: 600px;
    margin: 0 auto 4rem;
    line-height: 1.5;
}

.search-box-404 {
    background: #f9f9f9;
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid #eee;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 500px;
}

.btn-home {
    display: inline-block;
    background: #E41C36;
    color: #fff;
    padding: 1.8rem 4rem;
    border-radius: 50px;
    font-size: 1.6rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(190, 0, 39, 0.2);
}

.btn-home:hover {
    background: #E41C36;
    transform: translateY(-3px);
    color: #fff;
}

/* ==========================================================================
   5. OPTIMIZACIÓN RESPONSIVE
   ========================================================================== */

/* Tablets (1024px) */
@media (max-width: 1024px) {
    .search-results-grid, 
    .search-results-list {
        grid-template-columns: repeat(2, 1fr) !important;
        max-width: 95%;
    }
}

/* Móviles (768px) */
@media (max-width: 768px) {
    .search-page-container, 
    .error-404-container {
        margin-top: 14rem;
    }

    .search-results-grid, 
    .search-results-list {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .error-title { font-size: 2.8rem; }
    .error-code { margin-bottom: -3rem; }
    
    .search-card h2 { font-size: 2rem !important; }
}

/* Pantallas Pequeñas (480px) */
@media (max-width: 480px) {
    .search-card h2 { font-size: 1.8rem !important; }
    .error-code { font-size: 10rem; }
}