/* ============================================
   PÁGINA DE ARCHIVO DE BLOG
   Hero: Banner con gato + overlay oscuro
   Grid: 3 columnas con gap 1rem
   Hover: Overlay con botón "LEER +"
   ============================================ */

/**
 * BODY DE ARCHIVO
 * - margin: 0 para eliminar espacios del header oculto
 * - padding: 0
 * - background: Negro AuraPRO
 */
.ap-archive-blog {
    margin: 0;
    padding: 0;
    background: var(--ap-color-bg, #050506);
}

/**
 * HERO DEL BLOG (Banner superior)
 * - position: relative para overlay
 * - height: 100vh para ocupar toda la pantalla
 * - overflow: hidden para recortar imagen
 */
.ap-blog-hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/**
 * IMAGEN DE FONDO (BANNER-TRASERO.jpg)
 * - position: absolute para cubrir todo
 * - background-size: cover para llenar sin deformar
 * - background-position: center left (gato a la izquierda)
 * - z-index: 1
 */
.ap-blog-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center left;
    background-repeat: no-repeat;
    z-index: 1;
}

/**
 * OVERLAY OSCURO (contenido)
 * - position: absolute para cubrir todo
 * - background: Negro con opacidad para legibilidad
 * - z-index: 2 para estar encima de la imagen
 * - display: flex centrado
 */
.ap-blog-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: end;
    padding: 2rem;
}

.ap-blog-hero-overlay .container {
    text-align: center;
    max-width: 700px;
    margin-right: 1rem;
}

/**
 * OREJAS DE GATO (ícono superior)
 * - max-width: 150px
 * - margin-bottom: Separación del título
 * - filter: drop-shadow para efecto premium
 */
.ap-blog-hero-icon {
    max-width: 190px;
    height: auto;
    filter: drop-shadow(0 6px 20px rgba(212, 175, 55, 0.4));
}

/**
 * TÍTULO PRINCIPAL (Lucky / AURAPRO)
 * - font-family: Calder Dark (títulos premium)
 * - font-size: Grande con clamp()
 * - background: Degradado dorado
 * - -webkit-background-clip: text para aplicar degradado
 */
.ap-blog-hero-title {
    font-family: var(--ap-font-body);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.ap-blog-brand {
    background: linear-gradient(135deg, 
        var(--ap-color-gold, #d4af37) 0%, 
        var(--ap-color-gold-soft, #f4e5a1) 50%, 
        var(--ap-color-gold, #d4af37) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/**
 * SUBTÍTULO
 * - font-size: Mediano
 * - color: Dorado
 * - font-weight: 600
 * - margin-bottom: 1.5rem
 */
.ap-blog-hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--ap-color-gold, #d4af37);
    font-weight: 600;
    font-family: var(--ap-font-body);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/**
 * DESCRIPCIÓN
 * - font-size: 1rem
 * - color: Texto claro
 * - line-height: 1.8 para legibilidad
 * - margin-bottom: 2.5rem
 */
.ap-blog-hero-description {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--ap-color-text, #f5f5f5);
    line-height: 1.8;
    font-family: var(--ap-font-body, 'Acumin Pro', 'Poppins', sans-serif);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: justify;
}

/**
 * FORMULARIO DE BÚSQUEDA
 * - display: flex para input + botón
 * - max-width: 500px centrado
 * - background: Blanco con transparencia
 * - border-radius: Pill (999px)
 */
.ap-blog-search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

/**
 * INPUT DE BÚSQUEDA
 * - flex: 1 para ocupar espacio disponible
 * - padding: Generoso para área táctil
 * - border: none
 * - font-size: 1rem
 * - color: Negro
 */
.ap-blog-search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: var(--ap-font-body, 'Poppins', sans-serif);
    color: #000000;
    background: transparent;
}

.ap-blog-search-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/**
 * BOTÓN DE BÚSQUEDA
 * - padding: Espaciado interno
 * - background: Dorado AuraPRO
 * - border: none
 * - cursor: pointer
 * - transition: hover suave
 */
.ap-blog-search-btn {
    padding: 1rem 1.8rem;
    background: var(--ap-color-gold, #d4af37);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ap-blog-search-btn i {
    font-size: 1.2rem;
    color: #000000;
}

.ap-blog-search-btn:hover {
    background: var(--ap-color-gold-soft, #f4e5a1);
}

.tarjeta-posts{
    padding: 0;
}

/* ============================================
   SECCIÓN DE ARCHIVO (Grid de posts)
   ============================================ */

/**
 * SECCIÓN DE ARCHIVO
 * - padding-block: Espaciado vertical
 * - background: Negro AuraPRO
 */
.ap-blog-archive {
    padding: 3rem 6rem;
    background: var(--ap-color-bg, #050506);
}

/**
 * GRID DE 3 COLUMNAS
 * - display: grid con 3 columnas iguales
 * - gap: 1rem (según solicitud)
 * - margin-bottom: Separación de paginación
 */
.ap-blog-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

/**
 * CARD DE POST
 * - position: relative para overlay
 * - aspect-ratio: 3/4 para proporción vertical elegante
 * - border-radius: Esquinas redondeadas
 * - overflow: hidden para recortar imagen
 * - background: Negro alternativo
 */
.ap-blog-archive-card {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: var(--ap-radius-lg, 18px);
    overflow: hidden;
    background: var(--ap-color-bg-alt, #111111);
    box-shadow: var(--ap-shadow-soft, 0 18px 45px rgba(0,0,0,0.55));
}

/**
 * LINK DEL CARD
 * - display: block para ocupar todo
 * - height: 100%
 * - text-decoration: none
 */
.ap-blog-archive-link {
    display: block;
    height: 100%;
    text-decoration: none;
    position: relative;
}

/**
 * IMAGEN DEL POST
 * - width: 100%
 * - height: 100%
 * - object-fit: cover para llenar sin deformar
 * - transition: transform para zoom en hover
 */
.ap-blog-archive-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ap-blog-archive-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/**
 * PLACEHOLDER SI NO HAY IMAGEN
 * - background: Gradiente oscuro
 * - display: flex centrado
 * - Ícono dorado
 */
.ap-blog-archive-placeholder {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ap-blog-archive-placeholder i {
    font-size: 3rem;
    color: rgba(212, 175, 55, 0.3);
}

/**
 * CONTENIDO DEL CARD (título + botón LEER)
 * - position: absolute en la parte inferior
 * - background: Gradiente negro para legibilidad
 * - padding: Espaciado interno
 * - z-index: 2
 */
.ap-blog-archive-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(0deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 60%, rgba(0,0,0,0) 100%);
    z-index: 2;
}

/**
 * TÍTULO DEL POST
 * - font-family: Raleway (headings)
 * - font-size: Responsivo
 * - color: Blanco
 * - margin-bottom: 0.8rem
 */
.ap-blog-archive-title {
    font-family: var(--ap-font-heading, 'Raleway', sans-serif);
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

/**
 * BOTÓN "LEER" (visible siempre)
 * - display: inline-flex para centrar ícono
 * - font-size: 0.9rem
 * - color: Dorado
 * - font-weight: 700
 */
.ap-blog-archive-read {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--ap-color-gold, #d4af37);
    font-weight: 700;
    font-family: var(--ap-font-body, 'Poppins', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/**
 * OVERLAY HOVER (aparece al pasar el mouse)
 * - position: absolute para cubrir todo
 * - background: Negro con opacidad
 * - display: flex centrado
 * - opacity: 0 por defecto (invisible)
 * - transition: opacity para fade in
 * - z-index: 3 (encima de todo)
 */
.ap-blog-archive-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

/**
 * BOTÓN "LEER +" (en hover)
 * - display: inline-flex
 * - padding: Generoso
 * - background: Dorado
 * - color: Negro
 * - border-radius: Pill
 */
.ap-blog-archive-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    background: var(--ap-color-gold, #d4af37);
    color: #000000;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: var(--ap-font-body, 'Poppins', sans-serif);
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    transition: transform 0.3s ease;
}

/**
 * HOVER: Mostrar overlay + zoom en imagen + elevar botón
 */
.ap-blog-archive-link:hover .ap-blog-archive-hover {
    opacity: 1;
}

.ap-blog-archive-link:hover .ap-blog-archive-image img {
    transform: scale(1.08);
}

.ap-blog-archive-link:hover .ap-blog-archive-btn {
    transform: translateY(-4px);
}

/* ============================================
   PAGINACIÓN
   ============================================ */

/**
 * CONTENEDOR DE PAGINACIÓN
 * - text-align: center
 * - margin-top: Separación del grid
 */
.ap-blog-pagination {
    text-align: center;
    margin-top: 3rem;
}

.ap-blog-pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.ap-blog-pagination a,
.ap-blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--ap-color-text, #f5f5f5);
    border-radius: var(--ap-radius-md, 10px);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--ap-font-body, 'Poppins', sans-serif);
    text-decoration: none;
    transition: all 0.3s ease;
}

.ap-blog-pagination a:hover {
    background: var(--ap-color-gold, #d4af37);
    color: #000000;
    transform: translateY(-2px);
}

.ap-blog-pagination .current {
    background: var(--ap-color-gold, #d4af37);
    color: #000000;
}

/* ============================================
   MENSAJE DE BLOG VACÍO
   ============================================ */

.ap-blog-empty {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--ap-color-muted, #b0b0b0);
}

.ap-blog-empty i {
    font-size: 4rem;
    color: var(--ap-color-gold, #d4af37);
    margin-bottom: 2rem;
}

.ap-blog-empty h2 {
    font-size: 2rem;
    color: var(--ap-color-text, #f5f5f5);
    font-family: var(--ap-font-heading, 'Raleway', sans-serif);
    margin-bottom: 1rem;
}

.ap-blog-empty p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.ap-btn-home {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2.5rem;
    background: var(--ap-color-gold, #d4af37);
    color: #000000;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--ap-font-body, 'Poppins', sans-serif);
    text-decoration: none;
    transition: all 0.3s ease;
}

.ap-btn-home:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

/* ============================================
   RESPONSIVE - TABLET (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    /**
     * Grid: 2 columnas en tablet
     */
    .ap-blog-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /**
     * Hero: Reducir tamaños
     */
    .ap-blog-hero-icon {
        max-width: 120px;
    }

    .ap-blog-hero-title {
        font-size: 4rem;
    }
}

/* ============================================
   RESPONSIVE - MÓVIL (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /**
     * Grid: 1 columna en móvil
     */
    .ap-blog-archive-grid {
        grid-template-columns: 1fr;
    }

    /**
     * Hero: Ajustes móvil
     */
    .ap-blog-hero {
        height: auto;
        min-height: 100vh;
    }

    .ap-blog-hero-icon {
        max-width: 100px;
        margin-bottom: 1.5rem;
    }

    .ap-blog-hero-title {
        font-size: 3rem;
    }

    .ap-blog-hero-subtitle {
        font-size: 1.2rem;
    }

    .ap-blog-hero-description {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    /**
     * Sección archivo: Reducir padding
     */
    .ap-blog-archive {
        padding-block: 3rem;
    }

    /**
     * Cards: Cambiar aspect-ratio en móvil
     */
    .ap-blog-archive-card {
        aspect-ratio: 16 / 9;
    }
}

/* ============================================
   RESPONSIVE - MÓVIL PEQUEÑO (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .ap-blog-hero-overlay {
        padding: 1.5rem;
    }

    .ap-blog-hero-icon {
        max-width: 80px;
    }

    .ap-blog-hero-title {
        font-size: 2.5rem;
    }

    .ap-blog-search-form {
        max-width: 100%;
    }

    .ap-blog-archive-content {
        padding: 1rem;
    }

    .ap-blog-archive-title {
        font-size: 1rem;
    }
}
