/* ==========================================================================
   TRATAMIENTOS ÓPTICOS - ESTRUCTURA CON IMAGEN EN HEADER
   ========================================================================== */

/* Usamos las mismas variables que materiales - NO creamos nuevas */
:root {
    --treatment-card-radius: var(--material-card-radius, 12px);
    --treatment-shadow: var(--material-shadow, 0 8px 30px rgba(133, 95, 49, 0.12));
    --treatment-shadow-hover: var(--material-shadow-hover, 0 15px 40px rgba(133, 95, 49, 0.18));
    --treatment-border: var(--material-border, 1px solid rgba(133, 95, 49, 0.12));
    --treatment-transition: var(--material-transition, all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1));
}

/* Hero Section Específico - Mismo que materiales */
.bg-tratamientos-hero {
    background: linear-gradient(135deg, var(--dark-color) 0%, #4a4a4a 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.bg-tratamientos-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
}

.bg-tratamientos-hero h2 {
    color: white;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    position: relative;
}

.bg-tratamientos-hero .lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

/* Contenedor Principal */
.tratamientos-main {
    padding: 30px 0 80px;
    background: #f9f9f9;
}

.treatment-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 40px;
}

/* Tarjeta de Tratamiento - Mismos estilos que material-card */
.treatment-card {
    background: white;
    border-radius: var(--treatment-card-radius);
    overflow: hidden;
    box-shadow: var(--treatment-shadow);
    transition: var(--treatment-transition);
    border: var(--treatment-border);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.treatment-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--treatment-shadow-hover);
    border-color: rgba(133, 95, 49, 0.25);
}

/* Header con imagen, número y título en horizontal - Igual que materiales */
.treatment-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(133, 95, 49, 0.05) 0%, rgba(194, 181, 155, 0.05) 100%);
    border-bottom: 2px solid rgba(133, 95, 49, 0.1);
}

/* Contenedor de imagen pequeña - Igual que materiales */
.treatment-header-image {
    flex-shrink: 0;
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.treatment-header-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform 0.5s ease;
}

.treatment-card:hover .treatment-header-image img {
    transform: scale(1.1);
}

/* Badge sobre imagen - Usa var(--gradient-primary) igual que materiales */
.treatment-image-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(133, 95, 49, 0.3);
    border: 3px solid white;
}

/* Video badge en imagen - Igual que materiales */
.treatment-video-badge {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 170, 0, 0.95);
    color: var(--dark-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 3px 10px rgba(255, 170, 0, 0.3);
    z-index: 2;
    white-space: nowrap;
}

/* Información del header - Usa variables CSS del tema */
.treatment-header-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.treatment-title {
    color: var(--dark-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.treatment-subtitle {
    color: var(--secondary-color);
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
}

/* Placeholder para imagen - Usa variables del tema */
.treatment-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--secondary-color);
    padding: 20px;
}

.treatment-image-placeholder i {
    font-size: 2rem;
    color: var(--primary-light);
    margin-bottom: 10px;
}

.treatment-image-placeholder span {
    font-size: 0.85rem;
    text-align: center;
}

/* Contenido principal */
.treatment-card-body {
    padding: 30px;
    flex-grow: 1;
}

/* Descripción del tratamiento - Usa variables del tema */
.treatment-description {
    color: var(--secondary-color);
    line-height: 1.7;
    font-size: 1.05rem;
    margin-bottom: 25px;
}

.treatment-description p {
    margin-bottom: 15px;
}

.treatment-description ul,
.treatment-description ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.treatment-list {
    list-style: none;
    padding-left: 0;
}

.treatment-list li {
    margin-bottom: 8px;
    padding-left: 25px;
    position: relative;
}

.treatment-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Beneficios en grid - Usa colores del tema */
.treatment-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
    padding: 25px;
    background: rgba(133, 95, 49, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(133, 95, 49, 0.08);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(133, 95, 49, 0.1);
    transition: var(--transition);
}

.benefit-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(133, 95, 49, 0.1);
}

.benefit-icon {
    width: 45px;
    height: 45px;
    background: var(--primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.benefit-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-color);
}

/* Footer de la tarjeta - Usa colores del tema */
.treatment-card-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(133, 95, 49, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    background: rgba(133, 95, 49, 0.02);
}

.treatment-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.treatment-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-treatment-action {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
}

.btn-treatment-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(133, 95, 49, 0.3);
    color: white;
}

.btn-treatment-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-light);
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
}

.btn-treatment-secondary:hover {
    background: var(--primary-light);
    color: white;
    transform: translateY(-3px);
}

/* Separador entre tratamientos - Igual que materiales */
.treatment-divider {
    text-align: center;
    position: relative;
    height: 40px;
    margin: 20px 0;
}

.treatment-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(133, 95, 49, 0.3), transparent);
}

.divider-icon {
    position: relative;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    border: 2px solid rgba(133, 95, 49, 0.2);
    z-index: 1;
}

/* Sección de características - Usa colores del tema */
.treatment-features {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.treatment-features .section-title {
    color: var(--dark-color);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.treatment-features .section-subtitle {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.treatment-features .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.treatment-features .feature-card {
    background: white;
    padding: 35px 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 5px solid var(--primary-color);
    height: 100%;
}

.treatment-features .feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.treatment-features .feature-icon-wrapper {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 2rem;
}

/* Información de contacto en modal - Usa colores del tema */
.contact-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.contact-info i {
    color: var(--primary-color);
    width: 20px;
}

/* Estados vacíos - Igual que materiales */
.no-treatments-message {
    background: white;
    padding: 60px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 2px dashed rgba(133, 95, 49, 0.2);
}

.no-treatments-message i {
    font-size: 4rem;
    color: var(--primary-light);
    margin-bottom: 20px;
    display: block;
}

.no-treatments-message h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
}

/* Animaciones - Igual que materiales */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.treatment-card {
    animation: slideInUp 0.6s ease forwards;
}

/* Retrasos escalonados - Igual que materiales */
.treatment-card:nth-child(1) { animation-delay: 0.1s; }
.treatment-card:nth-child(2) { animation-delay: 0.2s; }
.treatment-card:nth-child(3) { animation-delay: 0.3s; }
.treatment-card:nth-child(4) { animation-delay: 0.4s; }
.treatment-card:nth-child(5) { animation-delay: 0.5s; }

/* Responsive - Igual que materiales */
@media (max-width: 992px) {
    .treatment-card-header {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }
    
    .treatment-header-info {
        align-items: center;
    }
    
    .treatment-benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .treatment-features .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bg-tratamientos-hero {
        padding: 60px 0 40px;
    }
    
    .bg-tratamientos-hero h2 {
        font-size: 2.2rem;
    }
    
    .treatment-title {
        font-size: 1.6rem;
    }
    
    .treatment-benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .treatment-card-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .treatment-actions {
        justify-content: center;
    }
    
    .treatment-features .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .treatment-header-image {
        width: 100px;
        height: 100px;
    }
    
    .treatment-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-treatment-action,
    .btn-treatment-secondary {
        width: 100%;
        justify-content: center;
    }
}