/*
Theme Name: Coco Theme
Author: Pablo J. Chumillo
Author URI: https://primeraposicion.net/
Description: Tema personalizado para tienda de pollos orgánicos
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coco-theme
*/

/* Importar estilos base y de WooCommerce */
@import url('css/base.css');
@import url('css/woocommerce.css');

/* Estilos para Widget de Publicidad */
.advertisement-widget-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.advertisement-widget-container:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.advertisement-title {
    color: var(--color-primary, #2c5aa0);
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-primary, #2c5aa0);
}

.advertisement-widget {
    text-align: center;
}

.advertisement-widget .ad-image {
    width: 100%;
    height: auto;
    max-width: 300px;
    border-radius: 6px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.advertisement-widget .ad-image:hover {
    transform: scale(1.02);
}

.advertisement-widget .ad-text {
    color: #333;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 15px;
}

.advertisement-widget .ad-cta-button {
    display: inline-block;
    background: var(--color-primary, #2c5aa0);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.advertisement-widget .ad-cta-button:hover {
    background: var(--color-secondary, #1e3d6f);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
    color: #ffffff;
    text-decoration: none;
}

/* Layout para contenido con sidebar */
.content-sidebar-wrap {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.site-main {
    flex: 1;
    min-width: 0; /* Permite que el contenido se contraiga */
}

.advertisement-sidebar {
    flex: 0 0 300px; /* Ancho fijo de 300px */
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 120px; /* Ajustar según la altura del header */
}

/* Responsive para widgets de publicidad */
@media (max-width: 768px) {
    .content-sidebar-wrap {
        flex-direction: column;
        padding: 15px;
        gap: 0; /* Sin gap ya que no hay sidebar */
    }
    
    .advertisement-sidebar {
        display: none; /* Ocultar completamente el sidebar en móviles */
    }
    
    .site-main {
        width: 100%; /* El contenido ocupa todo el ancho disponible */
        max-width: 100%;
    }
}

/* Header */
.site-header {
    box-shadow: 0px 2px 12px 5px rgb(0 0 0 / 10%);
    padding: 1rem 0;
    position: fixed;
    z-index: 9999999;
    background: var(--color-background);
    width: 100vw;
    height: 80px;
}

.site-branding {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0px 20px;
    height: 100%;
}

.custom-logo {
    height: clamp(20px, 50px, 80px)!important;
}

.site-title {
    font-size: 1.5em;
    margin: 0;
}

.site-content {
    padding-top: 100px;
}

/* Contenedor para agrupar iconos de búsqueda y carrito */
.site-header-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Icono de búsqueda de productos */
.site-header-search {
    display: flex;
    align-items: center;
}

.product-search-container {
    position: relative;
}

.product-search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--color-primary);
    padding: 8px;
}

.product-search-toggle svg {
    width: 20px;
    height: 20px;
    fill: var(--color-primary);
    transition: fill 0.3s ease;
}

.product-search-toggle:hover svg {
    fill: var(--color-secondary);
}

.product-search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
}

.product-search-modal.show {
    display: flex;
}

.search-modal-content {
    background: transparent;
    padding: 0;
    border-radius: 0;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.product-search-form {
    display: flex;
    width: 100%;
}

.product-search-form .search-field {
    flex: 1;
    padding: 20px 25px;
    border: none;
    border-radius: 8px;
    font-size: 24px;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: #333;
    text-align: center;
}

.product-search-form .search-field::placeholder {
    color: #999;
    text-align: center;
}

.product-search-form .search-submit {
    display: none;
}

.search-results-container {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: none;
}

.search-results-container.show {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.search-result-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 600;
    font-size: 16px;
    margin: 0 0 4px 0;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-price {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 500;
    margin: 0;
}

.search-result-excerpt {
    font-size: 12px;
    color: #666;
    margin: 2px 0 0 0;
    line-height: 1.3;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.search-loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

/* Navegación principal */

input#dgwt-wcas-search-input-1 {
    width: 250px;
    border-radius: 50px;
    border: 1px solid var(--color-primary);
}

.main-navigation {
    position: fixed;
    top: 0;
    left: -250px; /* Inicialmente oculto fuera de la pantalla */
    width: 250px;
    height: 100%;
    background-color: var(--color-background);
    transition: left 0.3s ease;
    z-index: 1000; /* Asegura que esté encima de otros elementos */
    overflow-y: auto; /* Permite scroll si el menú es largo */
}

.main-navigation.show {
    left: 0; /* Muestra el menú deslizándolo a la pantalla */
    box-shadow: 9px 0px 6px 0px #00000038;
}

.main-navigation #primary-menu {
    list-style: none;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    line-height: 1px;
}

.main-navigation li {
    margin-bottom: 1rem;
}

.main-navigation a {
    color: var(--color-text);
    text-decoration: none;
}

.main-navigation li ul {
    list-style: none;
}

.main-navigation a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #333;
}

.main-navigation .menu-item-has-children > a::after {
    content: ""; /* \25BC Flecha hacia abajo */
    float: right;
    margin-left: 5px;
}

.main-navigation .sub-menu {
    margin-left: 20px; /* Espacio para submenús */
    border-left: 2px solid #ccc;
}

.main-navigation .sub-menu li a {
    padding-left: 15px; /* Espaciado adicional para submenús */
}

li.menu-item > a {
    margin: 10px;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100; /* Encima del menú */
}

.menu-toggle:focus {
    outline: none;
}

.menu-toggle .icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    margin: 5px 0;
    transition: 0.4s;
}

.current-menu-item {
    background: var(--color-primary);
}

.current-menu-item > a {
    color: var(--color-background)!important;
}

/* Para ocultar la barra de scroll cuando el menú está abierto */
body.menu-open {
    overflow: hidden;
}

.overlay {
    width: 100vw;
    height: 100vh;
    position: fixed;
    background: #0000008a;
    z-index: 99;
}

.overlay.show-ol {
    display: block!important;
}

/* Estilos adicionales para secciones del menú */
.main-navigation .search-bar {
    margin-bottom: 1rem;
}

.main-navigation .menu-section {
    margin-bottom: 2rem;
}

.menu-principal-container {
    padding-top: 100px;
}

.menu-item > a {
    color: var(--color-primary);
    font-weight: bolder;
}

.widget.user-account { /* Widget de menu, al final */
    text-align: center;
    position: absolute;
    width: inherit;
    bottom: 38px;
    background: var(--color-accent);
    padding: 5px;
}

/* CART */

/* Estilos para el carrito con SVG personalizado */
.site-header-cart {
    display: flex;
    align-items: center;
}

.cart-contents {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-text);
    position: relative;
}

.cart-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--color-primary);
    transition: fill 0.3s ease;
}

.cart-contents:hover .cart-icon svg {
    fill: var(--color-secondary);
}

.cart-contents .count {
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Panel de carrito deslizante */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    z-index: 99999999;
    transition: right 0.3s ease;
}

.cart-drawer.open {
    right: 0;
}

.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: -1;
}

.cart-drawer.open .cart-drawer-overlay {
    opacity: 1;
    visibility: visible;
}

.cart-drawer-content {
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.cart-drawer-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--color-text);
}

.cart-drawer-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 5px;
}

.cart-drawer-close:hover {
    color: #333;
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    position: relative;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: var(--color-text);
    line-height: 1.3;
}

.cart-item-price {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.qty-btn:hover {
    background: var(--color-secondary);
}

.qty-number {
    font-size: 14px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-remove {
    background: #dc3545;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    margin-left: 4px;
}

.cart-item-remove:hover {
    background: #c82333;
}

/* Loader para botones del carrito */
.cart-button-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
    background-color: rgba(0, 0, 0, 0.1) !important;
}

.cart-button-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: cart-button-spin 1s linear infinite;
    z-index: 10;
}

.cart-button-loading * {
    opacity: 0 !important;
}

.cart-button-loading:hover {
    background-color: rgba(0, 0, 0, 0.2) !important;
}

@keyframes cart-button-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cart-drawer-footer {
    border-top: 1px solid #eee;
    padding: 20px;
}

.cart-drawer-total {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    color: var(--color-text);
}

.cart-drawer-actions {
    display: flex;
    gap: 10px;
}

.cart-drawer-actions .btn {
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-secondary);
}

/* Loader para el carrito */
.cart-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cart-loader p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.cart-error {
    text-align: center;
    padding: 40px 20px;
    color: #e74c3c;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-drawer {
        width: 100vw;
        right: -100vw;
    }
}

/* SEARCH */

input#wp-block-search__input-1 {
    border-radius: 5px;
    border: 1px solid var(--color-primary);
}

button.wp-block-search__button.wp-element-button {
    border-radius: 5px;
    padding: 5px;
    background: var(--color-primary);
    color: var(--color-accent);
}

label.wp-block-search__label {
    display: none;
}

.wp-block-tag-cloud {
    display: flex;
    overflow-x: scroll;
    flex-wrap: nowrap;
    padding: 10px;
}

.tag-cloud-link {
    background: lightgray;
    border: none;
    color: gray;
    border-radius: 50px;
}

.wp-block-tag-cloud a {
    white-space: nowrap;
}

h1.entry-title {
    text-align: center;
    color: var(--color-primary);
}

/* CONTENT */
article.page {
    padding: 0px 15px;
}

/* #sidebar role complementary */

#sidebar {
    display: none;
}


/* Footer */
.site-footer {
    background-color: #940a0d;
    padding: 20px 0;
    color: var(--color-accent);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
}

.footer-contact, .footer-newsletter, .footer-social {
    flex: 1;
    min-width: 250px;
    padding: 20px;
}

.footer-contact h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.footer-contact p {
    margin: 5px 0;
}

.footer-newsletter {
    text-align: center;
}

.footer-newsletter * div.wpforms-container {
    margin: 0px!important;
}

.footer-newsletter * form * input {
    border-radius: 50px!important;
    max-width: 100%!important;
}

.footer-newsletter * form * label, .footer-newsletter * form * button  {
    display: none!important;
}

.footer-social {
    text-align: right;
}

/* ==========================================================================
   ESTILOS PARA SHORTCODES DE CATEGORÍAS
   ========================================================================== */

/* Contenedor general para shortcodes de categorías */
.category-shortcode,
.wp-category-list,
#genre {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary, #007cba);
}

/* Título o etiqueta de categorías */
.category-shortcode b,
#genre b {
    color: var(--color-primary, #007cba);
    font-weight: 600;
    margin-right: 8px;
}

/* Lista de categorías */
.category-shortcode ul,
.wp-category-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-shortcode li,
.wp-category-list li {
    margin: 0;
    padding: 0;
}

/* Enlaces de categorías */
.category-shortcode a,
.wp-category-list a,
#genre a {
    display: inline-block;
    padding: 6px 12px;
    background: var(--color-primary, #007cba);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--color-primary, #007cba);
}

.category-shortcode a:hover,
.wp-category-list a:hover,
#genre a:hover {
    background: #f5f5f5;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Estilo alternativo para categorías en línea (separadas por comas) */
.category-inline {
    margin: 10px 0;
}

.category-inline a {
    background: none;
    color: var(--color-primary, #007cba);
    padding: 2px 4px;
    border: none;
    border-radius: 0;
    text-decoration: underline;
    font-weight: normal;
}

.category-inline a:hover {
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    transform: none;
    box-shadow: none;
    border-radius: 3px;
}

/* Separadores entre categorías */
.category-inline a:not(:last-child):after {
    content: ", ";
    color: #666;
    text-decoration: none;
}

.single-post * .site-content {
    margin: 0px 20px;
}

/* Contador de posts (si está habilitado) */
.category-shortcode .count,
.wp-category-list .count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8em;
    margin-left: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
    .category-shortcode,
    .wp-category-list,
    #genre {
        padding: 10px;
        margin: 15px 0;
    }
    
    .category-shortcode ul,
    .wp-category-list ul {
        gap: 6px;
    }
    
    .category-shortcode a,
    .wp-category-list a,
    #genre a {
        padding: 4px 8px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .category-shortcode ul,
    .wp-category-list ul {
        flex-direction: column;
        gap: 4px;
    }
    
}

.entry-content .woocommerce {
    max-width: none!important;
    margin: auto;
}

/* Imágenes de categorías con bordes redondeados */
.category-shortcode img,
.wp-category-list img,
#genre img,
.category-inline img,
.cat-item img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

.category-shortcode img:hover,
.wp-category-list img:hover,
#genre img:hover,
.category-inline img:hover,
.cat-item img:hover {
    border-radius: 12px;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Imágenes dentro de enlaces de categorías */
.category-shortcode a img,
.wp-category-list a img,
#genre a img,
.category-inline a img {
    vertical-align: middle;
    margin-right: 6px;
    border-radius: 6px;
    width: 20px;
    height: 20px;
    object-fit: cover;
}

footer * a.social-link {
    padding: 9px 13px;
    font-size: 20px;
    border-radius: 50px;
}

.social-links a {
    color: #ffffff;
    margin-left: 10px;
    font-size: 1.5em;
    text-decoration: none;
}

.social-links a:hover {
    color: #8cb46f; /* Cambiar el color al pasar el ratón */
}

.social-link > img {
   height: 20px;
}

footer > .copy {
    background: #444;
    color: #ffffff;
    padding: 10px;
    width: 100%;
    text-align: center;
}


/* Página principal */
.home .entry-content {
    text-align: center;
}

.site-main {
    padding-top: 100px;
    max-width: 1200px;
    margin: auto;
}

/* Página de blog */
.blog .site-main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.blog .entry-title {
    font-size: 1.2em;
}

.auth-btn {
    width: 100%;
    left: 0;
    text-align: center;
    position: absolute;
    bottom: 0;
    padding: 5px;
}

.btn-logout {
    color: saddlebrown!important;
    background: salmon;
}

.btn-register {
    color: var(--color-primary)!important;
    background: var(--color-accent);
}

/* HACKS */

#wpadminbar {
    position: fixed;
}

/* Responsive */
@media (max-width: 768px) {
    .main-navigation ul {
        flex-direction: column;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

/* SINGLE:BLOG */

/* Header */
.entry-header h1, .entry-header h2 {
    font-family: var(--font-heading);
    color: var(--color-primary);
}

/* Meta información */
.entry-meta {
    color: var(--color-secondary);
    font-size: 0.9em;
    margin-bottom: 15px;
}

.single * .entry-content {
    padding: 10px;
}

/* Artículos Relacionados */
.related-posts {
    margin-top: 40px;
}

.related-posts h3 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-size: 1.5em;
    margin-bottom: 20px;
}

.related-posts-wrapper {
    display: flex;
    flex-wrap: wrap; /* Permite que los elementos se ajusten automáticamente en líneas cuando sea necesario */
    gap: 20px; /* Espaciado entre los artículos */
    justify-content: space-between;
}

.related-post-item {
    flex: 1 1 calc(33.333% - 20px); /* Cada artículo ocupa el 33% del ancho, restando el gap */
    max-width: calc(33.333% - 20px); /* Asegura que no se excedan del ancho disponible */
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
}

.related-post-item:hover {
    transform: translateY(-5px); /* Efecto hover */
}

.related-post-thumbnail img {
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

.related-post-item h4 {
    font-family: var(--font-heading);
    font-size: 1.1em;
    color: var(--color-text);
    margin-top: 10px;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 15px;
    background-color: var(--color-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
}

.read-more:hover {
    background-color: var(--color-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .related-post-item {
        flex: 1 1 calc(50% - 20px); /* Ajuste para pantallas más pequeñas */
        max-width: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .related-post-item {
        flex: 1 1 100%; /* En pantallas pequeñas, los artículos ocupan el 100% del ancho */
        max-width: 100%;
    }
}

/* Contenedor de las imágenes destacadas */
.post-thumbnail {
    width: 100%; /* Asegura que la imagen ocupe todo el ancho del contenedor */
    height: 0;
    padding-bottom: 56.25%; /* Relación de aspecto 16:9 (ajusta según lo que necesites) */
    position: relative;
    overflow: hidden;
    border-radius: 10px; /* Esquinas redondeadas */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Sombra sutil */
}

/* Imagen dentro del contenedor */
.post-thumbnail img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajusta la imagen para cubrir todo el contenedor sin distorsión */
    object-position: center; /* Centra la imagen dentro del contenedor */
    transform: translate(-50%, -50%);
}

/* Estilos para ser responsivo */
@media (max-width: 768px) {
    .post-thumbnail {
        padding-bottom: 75%; /* Cambia la relación de aspecto en pantallas más pequeñas a 4:3 */
    }
}

@media (max-width: 480px) {
    .post-thumbnail {
        padding-bottom: 100%; /* Relación de aspecto cuadrada en pantallas pequeñas */
    }
}

