/* Importar fuentes */
@font-face {
    font-family: 'Avenir Next';
    src: url('https://beltatelier.co/wp-content/uploads/2025/07/avenir-next-regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Avenir Next';
    src: url('https://beltatelier.co/wp-content/uploads/2025/07/avenir-next-demi-bold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

/* Estilos generales y controles de filtro */
.filter-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    font-family: 'Avenir Next', sans-serif;
    padding: 20px 0;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

.filter-controls .sort-by {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-controls .sort-by label {
    font-weight: 400;
    color: #333;
    font-size: min(1vw, 16px);
}

.filter-controls select,
.filter-controls .search-form input {
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 5px;
    font-family: 'Avenir Next', sans-serif;
    font-size: min(1vw, 16px);
}

.filter-controls .search-form {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding-right: 5px;
}

.filter-controls .search-form input {
    border: none;
    outline: none;
    padding: 8px 0 8px 12px;
}

.filter-controls .search-form button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.filter-controls .search-form button i {
    color: #7E7E7E;
}

/* Estilos para el post destacado (banner) */
.latest-post-section {
    margin-bottom: 40px;
}

.featured-post-container {
    display: flex;
    flex-direction: column;
}

.featured-image-wrapper {
    position: relative;
    width: min(87.55vw, 1681px);
    height: min(22.76vw, 437px);
    overflow: hidden;
}

.featured-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-image-wrapper .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Filtro oscuro */
    z-index: 1;
}

.featured-image-wrapper .post-meta-top-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
}

.featured-image-wrapper .featured-content-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 2;
    width: calc(100% - 40px);
}

.featured-image-wrapper h3 {
    color: #FFFFFF; /* Título blanco sobre la imagen */
    font-family: 'Avenir Next', sans-serif;
    font-weight: 600;
    font-size: min(2vw, 40px);
    margin: 0;
    line-height: 1.2;
}

.featured-content-below-image {
    width: min(87.55vw, 1681px);
    font-family: 'Avenir Next', sans-serif;
    /* padding-left: 20px; Margen para alinear con la imagen */
    box-sizing: border-box; /* Incluir padding en el ancho */
}

.featured-content-below-image p {
    color: #7E7E7E;
    font-weight: 400;
    font-size: min(1.15vw, 22px);
    margin: 20px 0; /* Margen superior e inferior para la descripción */
}

.read-more-btn {
    display: inline-flex; /* Usar flex para centrar contenido */
    justify-content: center; /* Centrar horizontalmente */
    align-items: center; /* Centrar verticalmente */
    width: min(30.68vw, 589px);
    height: min(3.18vw, 61px);
    margin-bottom: 50px;
    border: 1px solid #7E7E7E;
    color: #7E7E7E;
    font-family: arial;
    font-weight: 400;
    text-decoration: none;
    background-color: transparent;
    transition: background-color 0.3s, color 0.3s;
}

.read-more-btn:hover {
    background-color: #7E7E7E;
    color: #fff;
}

/* Estilos para el bloque de categoría y fecha (combinado) */
.post-meta-combined {
    display: flex;
    align-items: center; /* Alinear verticalmente los elementos */
    border: 1px solid #FFFFFF;
    color: #FFFFFF;
    font-family: 'Avenir Next', sans-serif;
    font-weight: 400;
    font-size: min(1.15vw, 22px);
    white-space: nowrap; /* Evitar que se rompa el texto */
    /* Removido el padding vertical directo aquí, se manejará en los hijos */
}

.post-meta-combined .category-name {
    padding: 5px 10px 5px 10px; /* Padding a la izquierda del texto, con padding vertical */
}

.post-meta-combined .post-date {
    padding: 5px 10px 5px 10px; /* Padding a la derecha del texto, con padding vertical */
}

.post-meta-combined .meta-divider {
    width: 1px;
    height: auto; /* HACEMOS LA ALTURA AUTOMÁTICA */
    align-self: stretch; /* ESTIRAMOS EL DIVISOR PARA QUE OCUPE TODA LA ALTURA DEL FLEX CONTAINER */
    background-color: #FFFFFF;
    margin: 0; /* No se necesita margen aquí, el padding en los spans ya lo crea */
}


/* Estilos para el grid de 3 columnas */
.regular-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.regular-posts-grid .post-card {
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
    transition: transform 0.3s ease;
    font-family: 'Avenir Next', sans-serif;
    background-color: #fff;
}

.regular-posts-grid .post-card:hover {
    transform: translateY(-5px);
}

.regular-posts-grid .post-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.regular-posts-grid .post-image-container {
    position: relative;
    height: 350px;
    overflow: hidden;
}

.regular-posts-grid .post-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.regular-posts-grid .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Filtro oscuro */
    z-index: 1;
}

.regular-posts-grid .post-meta-centered-overlay {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%); /* Centrar horizontalmente */
    z-index: 2;
}

.regular-posts-grid .post-text-content {
    padding: 15px 0px;
    text-align: left; /* Alineación a la izquierda */
}

.regular-posts-grid h4 {
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: min(1.15vw, 22px);
    font-weight: 600;
    color: #000000;
    line-height: 1.2;
}

.regular-posts-grid p {
    margin-bottom: 20px; /* Se quitó el botón, dejar espacio */
    font-size: min(1.15vw, 22px);
    color: #7E7E7E;
    font-weight: 400;
    line-height: 1.5;
}

/* Estilos para el botón de "View All" */
.view-all-container {
    text-align: center;
    margin-top: 40px;
}

.view-all-btn {
    display: inline-block;
    padding: 10px 25px;
    border: 1px solid #7E7E7E;
    color: #7E7E7E;
    text-decoration: none;
    font-family: 'Avenir Next', sans-serif;
    font-weight: 400;
    transition: background-color 0.3s, color 0.3s;
}

.view-all-btn:hover {
    background-color: #7E7E7E;
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .featured-image-wrapper, .featured-content-below-image {
        width: 100%; /* Ajustar al 100% del contenedor */
    }
}

@media (max-width: 992px) {
    .regular-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .featured-image-wrapper h3 {
        font-size: min(3vw, 30px);
    }
}

@media (max-width: 768px) {
    .regular-posts-grid {
        grid-template-columns: 1fr;
    }
    .featured-image-wrapper {
        height: 250px; /* Reducir altura en móviles */
    }
    .featured-image-wrapper h3 {
        font-size: min(4vw, 28px);
    }
    .featured-content-below-image p {
        font-size: min(3vw, 18px);
    }
    .post-meta-combined {
        font-size: min(3vw, 18px);
    }
    .post-meta-combined .category-name,
    .post-meta-combined .post-date {
        padding: 3px 8px 3px 8px; /* Ajustar padding en móviles */
    }
    .post-meta-combined .post-date {
        padding: 3px 8px 3px 8px;
    }
    .read-more-btn {
        width: 100%; /* Botón de ancho completo en móviles */
        height: 50px; /* Altura fija para el botón */
        font-size: min(3.5vw, 18px);
    }
    .regular-posts-grid h4,
    .regular-posts-grid p {
        font-size: min(3vw, 18px);
    }
}

/* encabezado */

/* Importar fuentes */
@font-face {
    font-family: 'Avenir Next';
    src: url('https://beltatelier.co/wp-content/uploads/2025/07/avenir-next-regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Avenir Next';
    src: url('https://beltatelier.co/wp-content/uploads/2025/07/avenir-next-demi-bold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Avenir Next Ultralight';
    src: url('https://beltatelier.co/wp-content/uploads/2025/07/AvenirNextCyr-UltraLight.ttf') format('truetype');
    font-weight: 275;
    font-style: normal;
}

/* 1. SECCIÓN ENCABEZADO Y BOTÓN */
.top-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.top-categories-text {
    font-family: 'Avenir Next', sans-serif;
    color: #353535;
    font-weight: 400;
    font-size: min(2.60vw, 50px);
    letter-spacing: 0.15em;
    width: 514px;
    height: 68px;
    display: flex;
    align-items: center;
}

.top-categories-text .categories-light {
    margin-left: 20px;
    font-weight: 275;
    font-family: 'Avenir Next Ultralight', sans-serif;
}

/* === BOTÓN VIEW ALL - ESTADO NORMAL === */
.view-all-button {
    width: 204px;
    height: 85px;
    border: 1px solid #7E7E7E;
    color: #7E7E7E;
    background-color: #FFFFFF; /* Fondo blanco por defecto */
    font-family: 'Avenir Next', sans-serif;
    font-weight: 400;
    font-size: min(1.15vw, 22px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* === BOTÓN VIEW ALL - HOVER Y FOCUS === */
.view-all-button:hover,
.view-all-button:focus,
.view-all-button:active {
    background-color: #7E7E7E;
    color: #FFFFFF;
    border-color: #7E7E7E;
    outline: none;
}


/* 2. SECCIÓN TARJETAS DE CATEGORÍA */
.category-cards-section {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background-color: #F9F9F9;
    width: 548px;
    height: 176px;
    display: flex;
}

.category-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    width: 100%;
}

.category-card .card-image-wrapper {
    width: 186px;
    height: 174px;
    overflow: hidden;
}

.category-card .card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card .card-content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 35px;
}

.category-card .card-category-title {
    color: #353535;
    font-family: 'Avenir Next', sans-serif;
    font-weight: 400;
    font-size: min(1.30vw, 25px);
    line-height: 45px;
    letter-spacing: 7px;
    margin: 0;
}

.category-card .card-article-count {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    color: #000000;
    font-family: 'Avenir Next', sans-serif;
    font-weight: 600;
    font-size: min(1.15vw, 22px);
}

.icon-memo {
    display: block;
    width: 24px; /* Ajusta según el tamaño de tu ícono */
    height: 29px;
    background: url('https://beltatelier.co/wp-content/uploads/2025/10/memo-icon.jpeg') no-repeat center center / contain;
}


.icon-search {
    display: block;
    width: 24px; /* Ajusta según el tamaño de tu ícono */
    height: 29px;
    background: url('https://beltatelier.co/wp-content/uploads/2025/10/search-icon.jpeg') no-repeat center center / contain;
}

/* 3. SECCIÓN CONTROLES DE FILTRADO (Nuevos estilos) */
.filter-controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

/* 3. SECCIÓN CONTROLES DE FILTRADO (NUEVOS ESTILOS) */
/* 3. SECCIÓN CONTROLES DE FILTRADO (NUEVOS ESTILOS) */
.filter-controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.sort-by-control {
    width: 351px;
    height: 55px;
    background-color: #000000;
    color: #FFFFFF;
    position: relative;
    font-family: 'Avenir Next', sans-serif;
    font-size: min(1.15vw, 22px);
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.sort-by-control .sort-by-text {
    font-weight: 400;
    pointer-events: none;
    z-index: 2;
}

.sort-by-control select {
    background-color: transparent;
    border: none;
    color: transparent;
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 3;
}

/* Pseudo-elemento para el ícono de la flecha */
.sort-by-control::after {
    content: '▼';
    color: #FFFFFF;
    font-size: 16px;
    pointer-events: none;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}
/* Estilos del desplegable */
.sort-by-control option {
    background-color: #000000; /* Fondo de la lista desplegable */
    color: #FFFFFF; /* Color de la letra */
}

/* === SECCIÓN CONTROLES DE FILTRADO - SEARCH CONTROL CORREGIDO Y FORZADO === */

.search-control {
    width: 351px;
    height: 55px;
    display: flex;
    align-items: center;
    background-color: #F9F9F9 !important;
    border: none !important;
    padding: 0 !important;
    box-sizing: border-box;
    font-family: 'Avenir Next', sans-serif;
    position: relative;
}

.search-control #search-input {
    flex: 1;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    padding: 0 15px !important;
    color: #000000 !important;
    font-weight: 400 !important;
    font-size: min(1.15vw, 22px) !important;
    height: 100% !important;
    line-height: 1 !important;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.search-control #search-button {
    background-color: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 55px !important;
    height: 55px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    color: #000000 !important;
    transition: background-color 0.2s ease !important;
}

.search-control #search-button:hover {
    background-color: #F9F9F9 !important; /* Mismo fondo */
}

/* Estilos para el ícono de búsqueda */
.search-control #search-button .icon-search {
    width: 22px !important;
    height: 22px !important;
    background: url('https://beltatelier.co/wp-content/uploads/2025/10/search-icon.jpeg') no-repeat center center / contain !important;
    display: block !important;
}

/* Estilos para el título de la categoría en la card */
.card-category-title {
    display: flex;
    flex-direction: column;
    color: #353535;
    font-family: 'Avenir Next', sans-serif;
    font-weight: 400;
    font-size: min(1.30vw, 25px);
    line-height: 45px;
    letter-spacing: 7px;
    margin: 0;
}

.card-category-title span {
    display: block; /* Asegura que la segunda palabra se muestre en una nueva línea */
}

/* === RESPONSIVE - MÓVIL (MAX-WIDTH: 768PX) === */

@media (max-width: 768px) {
    /* --- ENCABEZADO "TOP CATEGORIES" Y BOTÓN "VIEW ALL" --- */
    .top-header-section {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .top-categories-text {
        font-size: min(7.1vw, 136.32px);
        width: auto;
        height: auto;
        justify-content: center;
        letter-spacing: 0.1em;
    }

    .top-categories-text .categories-light {
        margin-left: 10px;
        font-size: min(7.1vw, 136.32px);
    }

    .view-all-button {
        width: 100%;
        height: 60px;
        font-size: min(3.5vw, 20px);
        padding: 0;
        border: 1px solid #7E7E7E;
    }

    .view-all-button:hover,
    .view-all-button:focus,
    .view-all-button:active {
        background-color: #7E7E7E;
        color: #fff;
        border-color: #7E7E7E;
    }

    /* --- TARJETAS DE CATEGORÍA --- */
    .category-cards-section {
        flex-direction: column;
        gap: 20px;
    }

    .category-card {
        width: 100%;
        height: auto;
        padding: 15px;
        box-sizing: border-box;
    }

    .category-card .card-image-wrapper {
        width: 100px;
        height: 100px;
        margin-right: 15px;
    }

    .category-card .card-content-wrapper {
        padding-left: 15px;
        justify-content: center;
    }

    .category-card .card-category-title {
        font-size: min(3vw, 20px);
        line-height: 1.2;
        letter-spacing: 3px;
        margin: 0;
    }

    .category-card .card-article-count {
        font-size: min(3vw, 18px);
        gap: 8px;
    }

    .icon-memo {
        width: 20px;
        height: 24px;
    }

    /* --- CONTROLES DE FILTRADO --- */
    .filter-controls-section {
        flex-direction: column;
        gap: 20px;
    }

    .sort-by-control {
        width: 100%;
        height: 50px;
        font-size: min(3vw, 18px);
        padding: 0 15px;
    }

    .search-control {
        width: 100%;
        height: 50px;
    }

    .search-control #search-input {
        font-size: min(3.5vw, 20px) !important;
        padding: 0 10px;
    }

    .search-control #search-button {
        width: 50px;
        height: 50px;
    }

    .search-control #search-button .icon-search {
        width: 20px;
        height: 20px;
    }

    /* --- POST DESTACADO --- */
    .featured-image-wrapper {
        height: 250px;
    }

    .featured-image-wrapper h3 {
        font-size: min(4vw, 28px);
    }

    .featured-content-below-image p {
        font-size: min(3vw, 18px);
    }

    .read-more-btn {
        width: 100%;
        height: 50px;
        font-size: min(3.5vw, 18px);
    }

    /* --- GRID DE POSTS (AQUÍ ESTÁN TUS CAMBIOS) --- */
    .regular-posts-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas */
        gap: 20px; /* Espacio entre cards */
    }

    /* CAMBIO: Altura de la imagen del post en móvil */
    .regular-posts-grid .post-image-container {
        height: 200px !important; /* <--- ESTA ES LA SOLUCIÓN */
    }

    .regular-posts-grid .post-meta-centered-overlay {
        display: none; /* Oculta categoría/fecha */
    }

    .regular-posts-grid h4 {
        font-size: min(3.5vw, 18px); /* Ajustado para 2 columnas */
        margin-top: 10px; /* Reducir margen superior */
    }

    .regular-posts-grid p {
        font-size: min(3vw, 18px);
        display: none; /* Oculta el extracto (etiqueta P) */
    }
}