/**
 * Theme Name:     GeneratePress Child
 * Author:         Tom Usborne
 * Template:       generatepress
 * Text Domain:    generatepress-child
 * Description:    Child theme personalizado de GeneratePress optimizado para La Crítica.
 */

/* ------------------------------------------
   Tipografía y estilos globales
------------------------------------------ */
body, button, input, select, textarea {
    font-family: 'Montserrat', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #0073aa;
}

/* ------------------------------------------
   Breadcrumbs
------------------------------------------ */
.flocco-breadcrumbs {
    font-size: 0.9em;
    margin-bottom: 10px;
    color: #666;
}

.flocco-breadcrumbs a {
    color: #0073aa;
}

.flocco-breadcrumbs a:hover {
    text-decoration: underline;
}

/* ------------------------------------------
   Fecha en portada
------------------------------------------ */
.flocco-fecha-portada {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: #666;
    margin: 5px 0 15px 0;
    width: 100%;
    display: block;
    clear: both;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .flocco-fecha-portada {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
}

/* ------------------------------------------
   Fecha de actualización en artículos
------------------------------------------ */
.fecha-actualizacion {
    font-size: 0.85em;
    color: #777;
    margin: -10px 0 15px 0;
}

/* ------------------------------------------
   Botón volver al blog
------------------------------------------ */
.flocco-back-button {
    margin-top: 30px;
    text-align: center;
}

.flocco-back-button a {
    background: #eee;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: background 0.3s ease;
}

.flocco-back-button a:hover {
    background: #ddd;
}

/* ------------------------------------------
   Botones de compartir en redes
------------------------------------------ */
.flocco-share-buttons {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.flocco-share-buttons h4 {
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: 600;
}

.flocco-share-buttons ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.flocco-share-buttons li a {
    display: inline-block;
    background: #f0f0f0;
    padding: 8px 12px;
    border-radius: 4px;
    color: #333;
    font-weight: 500;
    transition: background 0.3s ease;
}

.flocco-share-buttons li a:hover {
    background: #ddd;
}

/* ------------------------------------------
   Alertas
------------------------------------------ */
#flocco-alert-banner {
    background-color: #c00;
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1rem;
    border-bottom: 3px solid #900;
}

.flocco-alert-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ------------------------------------------
   Cabecera editorial
------------------------------------------ */
.flocco-cabecera-editorial {
    text-align: center;
    margin-bottom: 10px;
    padding-top: 10px;
}

/* ------------------------------------------
   Clima
------------------------------------------ */
.flocco-clima, .flocco-clima-cabecera {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
}

.flocco-clima a {
    display: none;
}

.flocco-clima-ciudad {
    text-transform: capitalize;
}

.flocco-clima-temp {
    font-weight: bold;
}

.flocco-clima-desc {
    font-style: italic;
    opacity: 0.8;
}

.flocco-clima-loading {
    opacity: 0.6;
}

@media (max-width: 768px) {
    .flocco-clima, .flocco-clima-cabecera {
        display: none;
    }
}

/* ------------------------------------------
   Related Posts Wrapper - Encapsulado
------------------------------------------ */
.flocco-related-posts-wrapper {
    all: unset;
    display: block;
    clear: both;
    margin: 40px 0;
    padding-top: 20px;
}

.flocco-related-posts-wrapper .flocco-related-posts {
    all: initial;
    font-family: 'Montserrat', sans-serif;
    font-size: 1em;
    line-height: 1.4;
    color: #222;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

/* Título del bloque */
.flocco-related-posts-wrapper .flocco-related-posts h3 {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.3;
    color: #222;
    text-align: left;
}

/* Lista de posts relacionados */
.flocco-related-posts-wrapper .flocco-related-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Cada item relacionado */
.flocco-related-posts-wrapper .flocco-related-posts li {
    flex: 1 1 calc(50% - 10px); /* 2 columnas desktop */
    background: #f9f9f9;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.flocco-related-posts-wrapper .flocco-related-posts li:hover {
    transform: scale(1.02);
}

/* Link interno del item */
.flocco-related-posts-wrapper .flocco-related-posts li a {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 10px;
}

/* Imagen destacada del post */
.flocco-related-posts-wrapper .flocco-related-posts img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid #eee;
    object-fit: cover;
}

/* Título del post dentro de la lista */
.flocco-related-posts-wrapper .flocco-related-posts span {
    display: block;
    margin-top: 10px;
    font-weight: 500;
    font-size: 1em;
    color: #222;
}

/* Evita heredar estilos de blockquote, q, cite */
.flocco-related-posts-wrapper .flocco-related-posts blockquote,
.flocco-related-posts-wrapper .flocco-related-posts q,
.flocco-related-posts-wrapper .flocco-related-posts cite {
    all: unset;
}

/* Responsive - móviles */
@media (max-width: 768px) {
    .flocco-related-posts-wrapper .flocco-related-posts li {
        flex: 1 1 100%; /* 1 columna móvil */
    }
}

/* ------------------------------------------
   Bloques de noticias relacionadas - estilo card
------------------------------------------ */
.flocco-related-posts-wrapper {
    margin: 60px 0 30px 0; /* margen superior amplio */
    clear: both;
}

.flocco-related-posts {
    background: #f9f9f9; /* fondo general del bloque */
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.flocco-related-posts h3 {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 18px;
    color: #222;
}

.flocco-related-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.flocco-related-item {
    background: #ffffff;
    padding: 14px 20px;
    margin-bottom: 12px;
    border-radius: 6px;
    border-left: 4px solid #74c6ca; /* acento visual */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.flocco-related-item a {
    text-decoration: none;
    color: #222;
    font-weight: 500;
    display: block;
}

.flocco-related-item:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
    .flocco-related-posts {
        padding: 15px;
    }

    .flocco-related-item {
        padding: 12px 14px;
        font-size: 0.95em;
    }
}
