/* ===================================================================
   CSS DEFINITIVO Y UNIFICADO - DR. BRUNO CAROCA
   Versión: 3.1
   Descripción: Estilos reconstruidos para ser fieles al diseño original de cada página.
   =================================================================== */

/* --- 1. RESET, GLOBALES Y VARIABLES --- */
:root {
    --primary-color: #00a99d; 
    --primary-hover-color: #008a7d; 
    --dark-color: #2c3e50;      
    --light-color: #ffffff;     
    --grey-bg-color: #f9f9f9;  
    --border-color: #e0e0e0;     
    --error-color: #e74c3c;      
    --overlay-color: rgba(0, 0, 0, 0.5); 
    --accent-color: #FDE900;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; color: var(--dark-color); line-height: 1.6; background-color: var(--light-color); display: flex; flex-direction: column; min-height: 100vh; }
main { flex-grow: 1; }
.container { max-width: 1200px; margin: auto; padding: 0 20px; }
a { text-decoration: none; color: var(--primary-color); font-weight: 600; }
h1, h2, h3, h4, h5, h6 { font-weight: 600; color: var(--dark-color); }
img { max-width: 100%; height: auto; display: block; }
.section-padding { padding: 60px 0; }
.bg-grey { background-color: var(--grey-bg-color); }

/* --- 2. LAYOUT COMPARTIDO (HEADER Y FOOTER) --- */
.main-header { background: var(--light-color); padding: 1rem 0; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 1000; }
.main-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--dark-color); }
.main-nav ul { display: flex; align-items: center; list-style: none; gap: 25px; }
.main-nav a { color: var(--dark-color); font-weight: 600; transition: color 0.3s ease; }
.main-nav a:hover, .main-nav a.active { color: var(--primary-color); }
.header-actions { display: flex; align-items: center; gap: 15px; }
.btn-portal { background-color: var(--primary-color); color: var(--light-color); padding: 8px 15px; border-radius: 5px; display: flex; align-items: center; gap: 8px; font-weight: 600; transition: background-color 0.3s ease, transform 0.2s ease; white-space: nowrap; }
.btn-portal:hover { background-color: var(--primary-hover-color); transform: translateY(-2px); color: var(--light-color); }
.social-icon { font-size: 1.2rem; color: var(--dark-color); transition: color 0.3s ease; }
.social-icon:hover { color: var(--primary-color); }
.main-footer { background: var(--dark-color); color: var(--light-color); text-align: center; padding: 2rem 0; margin-top: auto; }

/* --- 3. COMPONENTES GENERALES --- */
.btn { display: inline-block; padding: 12px 30px; border-radius: 5px; font-weight: 600; transition: background .3s ease, transform .2s ease; border: none; cursor: pointer; font-size: 1rem; text-align: center; }
.btn-primary { background: var(--primary-color); color: var(--light-color); }
.btn-primary:hover { background: var(--primary-hover-color); transform: translateY(-2px); }
.btn-urgency { background-color: var(--error-color); color: var(--light-color) !important; padding: 8px 15px; border-radius: 5px; transition: background-color 0.3s ease; }
.btn-urgency.active, .btn-urgency:hover { background-color: #c0392b; color: var(--light-color) !important; }
.page-header { color: var(--light-color); padding: 80px 0; text-align: center; background-size: cover; background-position: center; position: relative; }
.page-header::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--overlay-color); }
.page-header .container { position: relative; z-index: 2; }
.page-header h1 { font-size: 3rem; margin-bottom: 10px; color: var(--light-color); }
.page-header p { font-size: 1.2rem; max-width: 700px; margin: auto; }

/* --- 4. ESTILOS PÁGINA: INDEX --- */
.hero { height: 60vh; background: url('img/miclinica01.jpg') no-repeat center center/cover; display: flex; align-items: center; justify-content: flex-start; position: relative; color: var(--light-color); }
.hero::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--overlay-color); }
.hero-content { z-index: 10; max-width: 600px; }
.hero-content h1 { font-size: 3rem; line-height: 1.2; margin-bottom: 1rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero-content .highlight { background-color: var(--accent-color); color: var(--dark-color); padding: 0.2rem 0.5rem; font-weight: 700; }
.hero-content p { font-size: 1.2rem; margin-bottom: 2rem; text-shadow: 1px 1px 2px rgba(0,0,0,0.7); }
.cta-section { padding: 60px 0; background-color: #f9f9f9; }
.cta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.cta-card { background-size: cover; background-position: center; min-height: 250px; border-radius: 10px; overflow: hidden; position: relative; display: flex; align-items: flex-end; padding: 20px; transition: transform 0.3s ease, box-shadow 0.3s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.cta-card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.cta-card::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 50%); }
.cta-card h3 { color: var(--light-color); font-size: 1.8rem; z-index: 10; }

/* --- 5. ESTILOS PÁGINA: MI DOCTOR (cCaroca) --- */
.profile-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 50px; align-items: start; }
.profile-images { display: flex; flex-direction: column; gap: 20px; }
.main-profile-pic { width: 100%; border-radius: 10px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.image-slideshow { position: relative; width: 100%; height: 250px; border-radius: 10px; overflow: hidden; }
.image-slideshow img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.8s ease-in-out; }
.image-slideshow img.active { opacity: 1; }
.profile-info h1 { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 20px; }
.profile-info h2 { font-size: 1.8rem; margin-top: 30px; margin-bottom: 15px; }
.profile-info ul { list-style-position: inside; padding-left: 10px; }

/* --- 6. ESTILOS PÁGINA: MI CLÍNICA (cDesde) --- */
.page-title-simple { text-align: center; padding: 40px 0; }
.clinic-description h1 { color: var(--primary-color); margin-bottom: 1rem; }
.clinic-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 2rem; }
.gallery-item img { width: 100%; height: 250px; object-fit: cover; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.gallery-item img:hover { transform: scale(1.05); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }

/* --- 7. ESTILOS PÁGINA: MI STAFF (cStaff) --- */
.staff-intro { text-align: center; padding: 60px 20px; max-width: 800px; margin: auto; }
.staff-intro h2 { margin-bottom: 20px; color: var(--primary-color); }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; padding-bottom: 60px; }
.staff-card { background: var(--light-color); border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; text-align: center; display: block; }
.staff-card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }
.staff-card-img { height: 500px; background-size: cover; background-position: center; }
.staff-card-body { padding: 25px; }
.staff-card-body h3 { font-size: 1.4rem; margin-bottom: 5px; color: var(--dark-color); }
.staff-card-body .role { font-size: 1rem; color: #777; font-weight: 600; }

/* --- 8. ESTILOS PÁGINA: PACIENTES (cPacientes) --- */
.accordion { background-color: var(--light-color); border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.08); overflow: hidden; }
.accordion-item { border-bottom: 1px solid var(--border-color); }
.accordion-item:last-child { border-bottom: none; }
.accordion-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; cursor: pointer; background-color: var(--light-color); transition: background-color 0.3s ease; }
.accordion-header:hover { background-color: #f7f7f7; }
.accordion-header h3 { font-size: 1.4rem; color: var(--dark-color); }
.accordion-header i { font-size: 1.2rem; color: var(--primary-color); transition: transform 0.4s ease; }
.accordion-item.active .accordion-header i { transform: rotate(180deg); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; }
.accordion-content-inner { padding: 0px 25px 25px 25px; }
.accordion-content-inner p, .accordion-content-inner ul { margin-bottom: 15px; }
.accordion-content-inner h4 { margin-top: 20px; margin-bottom: 10px; color: var(--primary-color); }
.accordion-content-inner .btn { padding: 10px 25px; margin-top: 10px; }

/* --- 9. ESTILOS PÁGINA: CONTACTO Y RESERVA (Formularios) --- */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; background: var(--light-color); padding: 40px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.08); }
.contact-info h2, .contact-form h2 { margin-bottom: 25px; color: var(--primary-color); }
.info-item { display: flex; align-items: flex-start; margin-bottom: 20px; }
.info-item i { font-size: 1.5rem; color: var(--primary-color); margin-right: 15px; width: 30px; text-align: center; margin-top: 3px; }
.map-container { margin-top: 30px; border-radius: 8px; overflow: hidden; }
.map-container iframe { width: 100%; height: 250px; border: 0; }
.form-container { max-width: 700px; margin: 0 auto; padding: 40px; background: #fff; border-radius: 10px; box-shadow: 0 5px 25px rgba(0,0,0,0.1); }
.form-header { text-align: center; margin-bottom: 30px; }
.form-header img { width: 120px; margin: 0 auto 1rem auto; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; font-family: 'Poppins', sans-serif; font-size: 1rem; }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-buttons { display: flex; justify-content: flex-end; gap: 15px; margin-top: 30px; }

/* --- 10. ESTILOS PÁGINA: URGENCIAS (cUrgencia) --- */
.urgency-list { list-style: none; margin-bottom: 40px; }
.urgency-list li { display: flex; align-items: flex-start; font-size: 1.1rem; padding: 15px; border-bottom: 1px solid #f0f0f0; }
.urgency-list li:last-child { border-bottom: none; }
.urgency-list li i { font-size: 1.3rem; color: var(--error-color); margin-right: 20px; margin-top: 5px; }
.note-box { background-color: #fef9e7; border-left: 5px solid #f1c40f; padding: 20px; margin: 40px 0; border-radius: 5px; }
.emergency-call-box { background-color: var(--error-color); color: var(--light-color); text-align: center; padding: 40px; border-radius: 10px; margin-top: 40px; }
.emergency-call-box h3 { font-size: 1.8rem; margin-bottom: 15px; }
.emergency-call-box .phone-number { font-size: 2.5rem; font-weight: 700; letter-spacing: 2px; display: block; margin-bottom: 25px; }
.btn-call { display: inline-block; background: var(--light-color); color: var(--error-color); padding: 12px 30px; border-radius: 5px; font-weight: 700; font-size: 1.1rem; transition: transform 0.3s ease; }
.btn-call:hover { transform: scale(1.05); }

/* --- 11. RESPONSIVE DESIGN --- */
@media(max-width: 992px) { .profile-grid, .contact-wrapper { grid-template-columns: 1fr; } }
@media(max-width: 850px) { .main-header .container { flex-direction: column; gap: 15px; } .main-nav ul { flex-wrap: wrap; justify-content: center; gap: 15px; } }
@media(max-width: 768px) { .page-header h1, .hero-content h1 { font-size: 2.2rem; } .emergency-call-box .phone-number { font-size: 1.8rem; } .accordion-header h3 { font-size: 1.2rem; } }

.payment-methods-section {
    text-align: center;
    margin-top: 60px;
    padding: 30px;
    background-color: #fdfdfd;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.payment-methods-section h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 1.5rem;
}

.payment-logos-container {
    display: flex;
    align-items: center;
    justify-content: center; /* Centra los logos horizontalmente */
    gap: 25px; /* Aumenta el espacio entre logos */
    flex-wrap: wrap;
}

.payment-logo {
    height: 25px; /* Reducido de 35px a 25px */
    width: 25px;
}

/* [NUEVO] Estilos para el Formulario de Reserva */
.bg-grey {
    background-color: var(--grey-bg-color);
}
.form-container {
    max-width: 700px;
    margin: auto;
    background: var(--light-color);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.form-header {
    text-align: center;
    margin-bottom: 30px;
}
.form-header h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}
/* La herencia de .form-group y sus inputs del CSS unificado ya debería funcionar,
   pero añadimos estilos específicos para el select. */
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    background-color: white;
}
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}