.cards-section-elementor {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 0;
    font-family: 'Cairo', sans-serif;
}

.cards-grid-elementor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.8rem;
    justify-content: center;
}

.card-item-elementor {
    background: white;
    border-radius: 28px;
    padding: 0.8rem 1.2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.8rem;
    border: 3px solid #AAAAAA;
    cursor: pointer;
    min-height: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: 'Cairo', sans-serif;
}

.card-item-elementor:hover {
    background-color: #FA299C;
    border-color: #FA299C;
    color: #FFFFFF;
}

.card-item-elementor:hover span {
    color: #FFFFFF;
}

.card-item-elementor.active {
    background-color: #FA299C;
    border-color: #FA299C;
}

.card-item-elementor.active span {
    color: white;
}

.card-item-elementor img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.card-item-elementor span {
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    color: #5D5D5D;
    line-height: 1.3;
    white-space: nowrap;
    font-family: 'Cairo', sans-serif;
}

/* Estilos para los artículos */
.articulos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    align-items: stretch;
    font-family: 'Cairo', sans-serif;
}

.articulo-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    font-family: 'Cairo', sans-serif;
}

.articulo-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.articulo-imagen {
    width: 100%;
    height: 250px !important;
    object-fit: cover;
    display: block;
}

.articulo-contenido {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    font-family: 'Cairo', sans-serif;
}

.articulo-categoria {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1AD6C8;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    height: 30px;
    padding: 0 1.2rem;
    border-radius: 10px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    align-self: flex-start;
    font-family: 'Cairo', sans-serif;
}

.articulo-subtitulo {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: #FA299C;
    margin: 0.25rem 0 0.5rem;
    line-height: 1.3;
    flex-shrink: 0;
    font-family: 'Cairo', sans-serif;
}

.articulo-contenido-texto {
    font-size: 18px;
    color: #5D5D5D;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
    font-family: 'Cairo', sans-serif;
}

.btn-rosa {
    display: block;
    background-color: #FA299C;
    color: white;
    padding: 0.6rem 1.8rem;
    border-radius: 10px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 18px;
    transition: background-color 0.3s ease;
    border: none;
    width: 100%;
    cursor: pointer;
    text-align: center;
    flex-shrink: 0;
    margin-top: auto;
    font-family: 'Cairo', sans-serif;
}

.btn-rosa:hover {
    background-color: #e02088;
    color: white;
}

/* Botón agregar artículo (solo para usuarios logueados) */
.btn-agregar-articulo {
    display: inline-block;
    background-color: #1AD6C8;
    color: white;
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 1.5rem;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
}

.btn-agregar-articulo:hover {
    background-color: #1AD6C8;
    color: white;
}

.articulos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    font-family: 'Cairo', sans-serif;
}

.icono-titulo {
    height: 1em;
    width: 35px;
    vertical-align: middle;
    margin-right: 1px;
    display: inline-block;
}

/* ============================================
   OVERLAY CON BOTONES - HOVER SOBRE ARTÍCULO
   ============================================ */

/* Overlay oscuro - aparece en hover */
.articulo-item .articulo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.articulo-item:hover .articulo-overlay {
    opacity: 1;
}

/* Botones dentro del overlay */
.btn-editar-overlay,
.btn-eliminar-overlay {
    padding: 0.7rem 1.8rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2;
    font-family: 'Cairo', sans-serif;
}

.btn-editar-overlay {
    background: #1AD6C8;
    color: white;
}

.btn-editar-overlay:hover {
    background: #15b8ab;
}

.btn-eliminar-overlay {
    background: #FA299C;
    color: white;
}

.btn-eliminar-overlay:hover {
    background: #e02088;
}

/* Efecto de escala en la imagen al hacer hover */
.articulo-item .articulo-imagen {
    transition: transform 0.3s ease;
}

.articulo-item:hover .articulo-imagen {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 600px) {
    .btn-editar-overlay,
    .btn-eliminar-overlay {
        padding: 0.5rem 1.2rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 400px) {
    .btn-editar-overlay,
    .btn-eliminar-overlay {
        padding: 0.4rem 1rem;
        font-size: 0.7rem;
        min-width: 70px;
    }
}

@media (max-width: 600px) {
    .cards-grid-elementor {
        gap: 1rem;
        grid-template-columns: repeat(2, 1fr);
    }
    .card-item-elementor {
        padding: 0.6rem 0.8rem;
        min-height: 70px;
        border-radius: 20px;
    }
    .card-item-elementor img {
        width: 40px;
        height: 40px;
    }
    .card-item-elementor span {
        font-size: 0.75rem;
        white-space: normal;
    }
    .seccion-titulo {
        font-size: 1.8rem;
    }
    .articulos-grid {
        grid-template-columns: 1fr;
    }
    .articulos-header {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 400px) {
    .cards-grid-elementor {
        grid-template-columns: 1fr 1fr;
        gap: 0.7rem;
    }
    .card-item-elementor {
        padding: 0.5rem 0.6rem;
        min-height: 60px;
        border-radius: 16px;
    }
    .card-item-elementor img {
        width: 32px;
        height: 32px;
    }
    .card-item-elementor span {
        font-size: 0.65rem;
    }
}
/* ============================================
   ESTILOS DEL MODAL - FORMULARIO
   ============================================ */

/* Campos del formulario */
.campo-formulario {
    margin-bottom: 1rem;
}

.campo-formulario label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-family: 'Cairo', sans-serif;
    font-size: 18px;
    color:#5D5D5D;
}

.campo-formulario input,
.campo-formulario textarea 
{
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
}
.campo-formulario select{
    width: 100%;
    padding: 0rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
}


.campo-formulario textarea {
    min-height: 80px;
    resize: vertical;
}

.campo-formulario input:focus,
.campo-formulario textarea:focus,
.campo-formulario select:focus {
    outline: none;
    border-color: #FA299C;
    box-shadow: 0 0 0 2px rgba(250, 41, 156, 0.1);
}

/* ============================================
   PREVIEW DE IMAGEN
   ============================================ */

.imagen-articulo-wrapper {
    margin-bottom: 1.5rem;
}

.imagen-articulo-wrapper label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: 'Cairo', sans-serif;
    font-size: 18px;
    color: #5D5D5D;
}

#imagenPreviewContainer {
    border: 5px dashed #FA299C;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    cursor: pointer;
    position: relative;
}

#imagenPreviewContainer:hover {
    border-color: #FA299C;
    background: #fce4ec;
}

#imagenPreviewContainer.has-image {
    border-color: #FA299C;
    background: #fff0f3;
    border-style: solid;
}

#imagenPreviewContainer.has-image:hover {
    border-color: #d81b60;
    background: #fce4ec;
}

#imagenPreview {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    object-fit: contain;
    display: none;
}

#imagenPlaceholder {
    color: #5D5D5D;
    font-size: 18px;
    font-family: 'Cairo', sans-serif;
}

#nombreArchivo {
    color: #888;
    font-size: 0.75rem;
    font-family: 'Cairo', sans-serif;
    margin-top: 0.3rem;
    display: none;
}

#nombreArchivo.visible {
    display: block;
}

#btnEliminarImagen {
    position: absolute;
    top: 8px;
    right: 10px;
    background: #FA299C;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    display: none;
    z-index: 5;
    line-height: 1;
    transition: background 0.2s ease;
    padding: 0;
}

#btnEliminarImagen:hover {
    background: #d81b60;
}

#btnEliminarImagen.visible {
    display: block;
}

/* ============================================
   BOTONES DEL MODAL
   ============================================ */

.botones-modal {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.botones-modal button {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#btnCerrarModal {
    border: 1px solid #1AD6C8;
    color: #FFFFFF;
    background: #1AD6C8;
}

#btnCerrarModal:hover {
    background: #15b8ab;
    border-color: #15b8ab;
}

#btnPublicar {
    border: none;
    background: #FA299C;
    color: white;
}

#btnPublicar:hover {
    background: #e02088;
}

#btnPublicar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
