/* ESTRUCTURA PRINCIPAL */
.custom-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

.custom-main-content {
    flex: 1;
    min-width: 0;
}

/* GRID DE POSTS */
.custom-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.custom-post-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    background: #fff;
}

.custom-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ELEMENTOS DE POST */
.post-thumbnail-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-title {
    font-size: 1.1rem;
    margin: 15px 15px 10px;
    line-height: 1.4;
}

.post-excerpt {
    font-size: 0.9rem;
    color: #555;
    padding: 0 15px 15px;
    line-height: 1.5;
}

/* SIDEBAR */
.custom-sidebar-wrapper {
    width: 300px;
    flex-shrink: 0;
}

/* PAGINACIÓN */
.custom-pagination {
    margin-top: 40px;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .custom-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .custom-container {
        flex-direction: column;
    }
    
    .custom-sidebar-wrapper {
        width: 100%;
        margin-top: 30px;
    }
    
    .custom-posts-grid {
        grid-template-columns: 1fr;
    }
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
    font-size: 0.85rem;
}

.post-meta i {
    margin-right: 5px;
    color: #666;
}

.post-familias {
    margin: 10px 0;
    font-size: 0.85rem;
    color: #444;
}

.post-familias i {
    margin-right: 5px;
}
.post-meta {
    padding-left: 15px; /* ya tienes margen, esto lo mejora */
}
.post-meta span {
    margin-left: 10px;
}
.post-meta span:first-child {
    margin-left: 0;
}

.estado-activa { background: #e8f5e9; color: #2e7d32; padding: 2px 6px; border-radius: 3px; }
.estado-cubierta { background: #e3f2fd; color: #1565c0; padding: 2px 6px; border-radius: 3px; }
.estado-cancelada { background: #ffebee; color: #c62828; padding: 2px 6px; border-radius: 3px; }

.post-familias {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 10px 0;
    font-size: 0.85rem;
    color: #444;
    padding-left: 15px;
}

.post-familias i {
    margin-right: 5px;
    color: #666;
    font-size: 1em;
    line-height: 1;
}

/* SINGLE POST */

.custom-single-post {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
}

.custom-single-post .post-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.custom-single-post .post-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.custom-single-post .post-meta {
    color: #666;
    font-size: 0.9rem;
    justify-content: center;
}

.custom-single-post .post-thumbnail {
    text-align: center;
    margin-bottom: 1.5rem;
}

.custom-single-post .post-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Post content (contenido principal) */
.custom-single-post .post-content {
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1rem;
    color: #333;
}

/* ACF sections */

.acf-section {
    margin-bottom: 1.5rem;
}

.acf-section h3 {
    margin-bottom: 0.7rem;
    font-weight: 600;
    color: #222;
    border-bottom: 2px solid #ddd;
    padding-bottom: 4px;
}

.acf-section.descripcion {
    white-space: pre-wrap;
    font-size: 1rem;
    color: #444;
    line-height: 1.5;
}

/* Detalles de los campos ACF */
.acf-details .acf-section strong {
    display: inline-block;
    width: 180px;
    color: #555;
    font-weight: 600;
}

.acf-details .acf-section {
    padding-left: 10px;
}

/* Adaptación del sidebar para que no quede demasiado separado en mobile */
@media (max-width: 768px) {
    .custom-container {
        flex-direction: column;
        padding: 10px;
    }
    .custom-sidebar-wrapper {
        width: 100%;
        margin-top: 30px;
    }
}
.custom-form-wrapper {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.custom-search-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.custom-search-form input[type="text"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.custom-search-form button {
    padding: 10px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.custom-search-form button:hover {
    background-color: #005c87;
}
/* Estilos generales para formularios ACF */
.acf-form .acf-fields {
    background: #fafafa;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.acf-form .acf-field {
    margin-bottom: 20px;
}

.acf-form .acf-label label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.acf-form input[type="text"],
.acf-form input[type="date"],
.acf-form select,
.acf-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background: #fff;
    box-sizing: border-box;
}

/* Botón de envío */
.acf-form input[type="submit"] {
    background-color: #1976d2;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.acf-form input[type="submit"]:hover {
    background-color: #1565c0;
}
.custom-sidebar-wrapper {
    width: 300px;
    flex-shrink: 0;
    background-color: #f0f5ff;
    padding: 20px;
    border: 1px solid #cfd8dc;
    box-sizing: border-box;
}
.custom-sidebar-wrapper * {
    box-sizing: border-box;
}

.custom-sidebar-wrapper > * {
    margin-bottom: 20px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.custom-sidebar-wrapper ul,
.custom-sidebar-wrapper ol {
    padding-left: 20px;
    margin: 10px 0;
}

.custom-sidebar-wrapper li {
    margin-bottom: 6px;
}

.custom-sidebar-wrapper .widget-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #333;
}

/* Estructura del formulario ACF */
.custom-acf-form .acf-fields > .acf-field {
    float: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
}

.acf-fields-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.acf-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.full-width {
    flex-direction: column;
    gap: 0;
}

/* Campos específicos */
.acf-field[data-name="puesto_de_trabajo"],
.acf-field[data-name="descripcion"],
.acf-field[data-type="image"] {
    width: 100% !important;
}

/* Dos columnas */
.acf-field[data-name="familias"] {
    flex: 1;
    min-width: calc(50% - 10px);
}

.acf-field-group[data-name="grupo_titulaciones_perfiles"] {
    flex: 1;
    min-width: calc(50% - 10px);
}

/* Tres columnas */
.acf-field[data-name="lugar"],
.acf-field[data-name="fecha_de_inicio"],
.acf-field[data-name="estado_de_la_oferta"] {
    flex: 1;
    min-width: calc(33.33% - 14px);
}

/* Estilos para los campos */
.acf-field {
    background: #fff;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    margin-bottom: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .acf-field[data-name="familias"],
    .acf-field-group[data-name="grupo_titulaciones_perfiles"],
    .acf-field[data-name="lugar"],
    .acf-field[data-name="fecha_de_inicio"],
    .acf-field[data-name="estado_de_la_oferta"] {
        min-width: 100% !important;
    }
}
/* Estructura del formulario personalizado */
.custom-acf-form-structured {
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.acf-field-full {
    width: 100%;
}

.acf-field-row {
    display: flex;
    gap: 20px;
    width: 100%;
}

.acf-field-half {
    flex: 1;
    min-width: calc(50% - 10px);
}

.acf-field-third {
    flex: 1;
    min-width: calc(33.33% - 14px);
}

/* Estilos para los campos ACF */
.acf-field {
    background: #fff;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    margin-bottom: 0 !important;
}

.acf-label {
    margin-bottom: 8px;
}

.acf-label label {
    font-weight: 600;
    color: #333;
    display: block;
}

.acf-input input[type="text"],
.acf-input input[type="date"],
.acf-input select,
.acf-input textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.acf-input textarea {
    min-height: 120px;
}

/* Campos requeridos */
.acf-field.required .acf-label label:after {
    content: " *";
    color: #d32f2f;
}

/* Botón de enviar */
.acf-submit-wrapper {
    margin-top: 20px;
    text-align: right;
}

.acf-button {
    background-color: #1976d2;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.acf-button:hover {
    background-color: #1565c0;
}

/* Responsive */
@media (max-width: 768px) {
    .acf-field-row {
        flex-direction: column;
    }
    
    .acf-field-half,
    .acf-field-third {
        min-width: 100% !important;
    }
    
    .custom-acf-form-structured {
        padding: 15px;
    }
}

