/*
Theme Name: Hostinger DB Cards Child
Theme URI: https://aldenoticias.com/
Description: Tema hijo de Hostinger Affiliate que aplica a la página de entradas el diseño de tarjetas de DB Newsletter RD.
Author: AlDesnudoNoticias
Template: hostinger-affiliate-theme
Version: 1.0.1
Text Domain: hostinger-db-cards-child
*/

:root {
    --hdb-cards-text: #333333;
    --hdb-cards-muted: #6b7280;
    --hdb-cards-border: #e5e7eb;
    --hdb-cards-background: #ffffff;
    --hdb-cards-placeholder: #f3f4f6;
    --hdb-cards-max-width: 1180px;
    --hdb-cards-padding: 16px;
    --hdb-cards-radius: 14px;
}

/* Contenedor de la portada, archivos, categorías y buscador. */
.db-cards-page {
    width: 100%;
    min-width: 0;
    padding: 18px 0 34px;
    color: var(--hdb-cards-text);
}

.db-cards-container {
    width: 100%;
    max-width: var(--hdb-cards-max-width);
    min-width: 0;
    margin: 0 auto;
    padding: 0 var(--hdb-cards-padding);
}

.db-cards-header {
    margin: 0 0 18px;
}

.db-cards-title {
    margin: 12px 0 10px;
    color: var(--hdb-cards-text);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.db-cards-description {
    margin-top: 6px;
    color: var(--hdb-cards-muted);
    font-size: 15px;
}

.db-cards-description > :first-child {
    margin-top: 0;
}

.db-cards-description > :last-child {
    margin-bottom: 0;
}

/* Grid idéntico al de DB Newsletter RD: 1, 2 y 3 columnas. */
.db-cards-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.db-cards-grid > * {
    min-width: 0;
    max-width: 100%;
}

/* Seguridad: si un plugin inyecta un anuncio dentro del grid, debe ocupar una fila completa. */
.db-cards-grid > .banner,
.db-cards-grid > .google-auto-placed,
.db-cards-grid > ins.adsbygoogle,
.db-cards-grid > .adsbygoogle,
.db-cards-grid > .code-block,
.db-cards-grid > [class*="ad-"] {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 720px) {
    .db-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .db-cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Tarjeta: imagen 16:9, título y sin extracto. */
.db-card {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--hdb-cards-background);
    border: 1px solid var(--hdb-cards-border);
    border-radius: var(--hdb-cards-radius);
}

.db-card:hover {
    border-color: #d1d5db;
}

.db-card > a,
.db-card > a:hover,
.db-card > a:focus {
    display: block;
    color: inherit;
    text-decoration: none;
}

.db-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--hdb-cards-placeholder);
}

.db-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: cover;
    object-position: center;
    border: 0;
}

.db-card-body {
    padding: 12px 12px 14px;
}

.db-card-title {
    margin: 0;
    color: var(--hdb-cards-text);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.db-card > a:hover .db-card-title,
.db-card > a:focus .db-card-title {
    text-decoration: none;
}

/* Paginación del mismo estilo. */
.db-cards-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
    font-size: 16px;
}

.db-cards-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 9px 12px;
    color: var(--hdb-cards-text);
    text-decoration: none;
    border: 1px solid var(--hdb-cards-border);
    border-radius: 12px;
    background: #ffffff;
}

.db-cards-pagination .page-numbers:hover,
.db-cards-pagination .page-numbers:focus {
    text-decoration: none;
    background: #f9fafb;
}

.db-cards-pagination .page-numbers.current {
    color: #ffffff;
    background: #111827;
    border-color: #111827;
}

.db-cards-empty {
    margin: 0;
    padding: 20px 0;
    font-size: 17px;
}

@media (max-width: 719px) {
    .db-cards-page {
        padding-top: 12px;
    }

    .db-cards-title {
        font-size: 25px;
    }
}
