/*!
Theme Name: Grid Theme
Theme URI: http://underscores.me/
Author: Armando Nevárez
Author URI: https://www.akronoticias.com
Description: Un tema diseñado para mostrar contenido en una cuadrícula de estilo moderno, ideal para blogs y portafolios visuales.
Version: 1.1.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: grid-theme
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 Reset & Base
2.0 Grid System Layout
3.0 Custom Post Grid Styles (Tu nuevo diseño de tarjeta)
	3.1 Card Structure
	3.2 Image & Overlays
	3.3 Content Area
	3.4 Source/Category
	3.5 Title
	3.6 Footer Meta
4.0 Accessibility & Utilities
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1.0 Reset & Base
--------------------------------------------------------------*/
html {
	line-height: 1.15;
	-webkit-text-size-adjust: 100%;
}
body {
	margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: #f4f6f8; /* Un fondo gris claro para que las tarjetas resalten */
    color: #333;
}
main {
	display: block;
}
a {
	background-color: transparent;
    text-decoration: none;
}
img {
	border-style: none;
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}
*, *::before, *::after {
	box-sizing: border-box;
}

/*--------------------------------------------------------------
2.0 Grid System Layout
--------------------------------------------------------------*/
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Rejilla responsive */
    gap: 20px; /* Espacio entre las tarjetas */
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Para la portada, podrías usar un selector más específico si es necesario */
.home .site-main, .archive .site-main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 24px;
}


/*--------------------------------------------------------------
3.0 Custom Post Grid Styles (Tu nuevo diseño de tarjeta)
--------------------------------------------------------------*/

/* 3.1 Card Structure */
/* Seleccionamos el <article> de cada post. La clase .post es estándar en WordPress. */
.post {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden; /* Asegura que la imagen respete los bordes redondeados */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.post:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 3.2 Image & Overlays */
.post .post-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Aspect ratio 16:9 */
    overflow: hidden;
    background-color: #eee;
}
.post .post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* La imagen cubre el área sin deformarse */
}
/* Estilo opcional para un icono de "play" sobre la imagen (si el post es un video) */
.post .play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* No interfiere con el clic en la imagen */
}
.post .play-overlay::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 18px solid #ffffff;
    margin-left: 5px;
}


/* 3.3 Content Area */
/* Este es el contenedor del texto debajo de la imagen */
.post .post-text-wrap {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Permite que el área de texto se expanda */
}

/* 3.4 Source/Category */
/* Estilo para la categoría o la fuente del post */
.post .post-category {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}
.post .post-category-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 8px;
}
.post .post-category a {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.post .post-category a:hover {
    color: #0073aa;
}

/* 3.5 Title */
.post .entry-title {
    font-size: 18px;
    line-height: 1.4;
    margin: 0 0 12px 0; /* Espacio debajo del título */
    flex-grow: 1; /* Empuja el footer hacia abajo */
}
.post .entry-title a {
    color: #111;
    font-weight: 700;
}
.post .entry-title a:hover {
    color: #0073aa;
}


/* 3.6 Footer Meta */
/* Contenedor para los likes, comentarios y texto de patrocinado */
.post .entry-meta-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #6c757d;
    border-top: 1px solid #f1f1f1;
    padding-top: 12px;
    margin-top: auto; /* Se asegura que esté al final */
}
.post .post-stats {
    display: flex;
    gap: 12px; /* Espacio entre los iconos */
}
.post .post-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}
/* Para los iconos, necesitarías una fuente de iconos como FontAwesome o usar SVGs */
.post .post-stats .icon-like::before {
    content: '👍'; /* Placeholder */
}
.post .post-stats .icon-comment::before {
    content: '💬'; /* Placeholder */
}

.post .sponsored-label {
    font-size: 11px;
    font-weight: 500;
    color: #888;
}

/*--------------------------------------------------------------
4.0 Accessibility & Utilities
--------------------------------------------------------------*/
/* Texto para lectores de pantalla */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}