/* ==========================================================================
   Estilos para la Sección de Procedimientos (CPT Procedimiento)
   VERSIÓN 6.2.0 (OPTIMIZACIÓN: Imágenes Responsivas)
   - ADDED: Soporte para .category-header-bg (<img> real).
   ========================================================================== */

/* --- CATÁLOGO DE PROCEDIMIENTOS (archive-procedimiento.php) --- */
.procedimientos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.procedimiento-card {
    background-color: #fff;
    border-radius: var(--thw-border-radius);
    overflow: hidden;
    box-shadow: var(--thw-shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.procedimiento-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--thw-shadow-lg);
}
.procedimiento-card-image {
    overflow: hidden;
}
.procedimiento-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.procedimiento-card:hover .procedimiento-card-image img {
    transform: scale(1.05);
}
.procedimiento-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.procedimiento-card-title {
    font-size: 1.5rem;
    margin: 0 0 10px 0;
}
.procedimiento-card-title a {
    text-decoration: none;
    color: var(--thw-text-dark);
}
.procedimiento-card-excerpt {
    font-size: 1rem;
    color: var(--thw-text-light);
    flex-grow: 1;
    margin-bottom: 20px;
}
.procedimiento-card-link {
    display: inline-block;
    background-color: var(--thw-color-primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease;
    align-self: flex-start; /* Se alinea a la izquierda */
}
.procedimiento-card-link:hover {
    background-color: var(--thw-color-secondary);
    color: #fff;
    text-decoration: none;
}

/* --- PÁGINA DE PROCEDIMIENTO (single-procedimiento.php) --- */
.procedimiento-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: flex-start;
}
.procedimiento-photo {
    flex: 2 1 500px;
}
.procedimiento-photo img {
    border-radius: var(--thw-border-radius);
    box-shadow: var(--thw-shadow-md);
    width: 100%;
    height: auto;
}
.procedimiento-info {
    flex: 1 1 350px;
    position: sticky;
    top: 40px;
}
.procedimiento-info h2 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 20px;
}
.procedimiento-details-list {
    list-style: none;
    padding: 20px;
    margin: 0 0 30px 0;
    border: 1px solid var(--thw-color-border);
    border-radius: var(--thw-border-radius);
    background: var(--thw-color-light-bg);
}
.procedimiento-details-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--thw-color-border);
    font-size: 1rem;
}
.procedimiento-details-list li:last-child {
    border-bottom: none;
}

/* ESTILOS PARA LA CABECERA DE CATEGORÍA DE PROCEDIMIENTO */
.category-header {
    position: relative; /* Indispensable */
    padding: 100px 20px;
    background-color: #eee; /* Fallback */
    color: #fff;
    text-align: center;
    margin-bottom: 60px;
    border-radius: var(--thw-border-radius);
    overflow: hidden; /* Recorta la imagen */
}

/* NUEVO: Imagen de fondo real */
.category-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.category-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #7FFFD4, #00BFFF);
    background-size: 200% 200%;
    animation: aurora-flow 15s ease infinite;
    opacity: 0.85; /* Controla la intensidad del tinte */
    z-index: 1;
}
.category-header .container {
    position: relative;
    z-index: 2;
}
.category-header .page-title {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.category-header .category-description {
    font-size: 1.2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}