/* =========================================
   VARIABLES CSS (Basadas en el Branding)
   ========================================= */
:root {
    --primary: #001489; /* PANTONE Reflex Blue C */
    --secondary: #8BADD6; /* PANTONE 278 C */
    --accent: #E4002B; /* PANTONE 185 C */
    --text-dark: #2D3748;
    --text-gray: #808080; /* Black 50% */
    --bg-white: #FFFFFF;
    --bg-light: #F7FAFC;
    
    --font-main: 'Montserrat', sans-serif;
    
    --shadow-soft: 0 10px 40px rgba(0, 20, 137, 0.08);
    --shadow-hover: 0 15px 50px rgba(0, 20, 137, 0.15);
    --radius-lg: 24px;
    --radius-md: 12px;
    
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================
   RESET & BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    color: var(--primary);
    line-height: 1.2;
    font-weight: 600;
}

p {
    color: var(--text-gray);
    margin-bottom: 1rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2.5rem; }
.bg-light { background-color: var(--bg-light); }

/* =========================================
   TYPOGRAPHY
   ========================================= */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-soft);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: row; /* Esto es clave: fuerza que la imagen esté AL LADO del texto */
    align-items: center; /* Centra la imagen y el texto verticalmente */
    gap: 15px; /* Separación entre el logo y las letras */
    text-decoration: none;
}

/* Control exacto de las proporciones de la imagen */
.logo-icon img {
    height: 55px; /* Controla el alto. 55px es ideal para tu padding actual */
    width: auto;  /* Mantiene la proporción original */
    object-fit: contain; /* Evita que se estire o deforme */
}

/* Contenedor exclusivo para los textos */
.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-name {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.2;
}

.logo-spec {
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn i { font-size: 1.2rem; }

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 20, 137, 0.2);
}

.btn-primary:hover {
    background-color: #00106b;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

.btn-white-solid {
    background-color: white;
    color: var(--primary);
}

.btn-white-solid:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.2rem;
}

/* =========================================
   LAYOUT GRIDS
   ========================================= */
section { padding: 100px 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.flex-reverse { direction: rtl; }
.flex-reverse > * { direction: ltr; }

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    padding-top: 150px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero h1 span { color: var(--secondary); }

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.rounded-img {
    border-radius: var(--radius-lg);
    object-fit: cover;
}

/* =========================================
   CARDS & COMPONENTS
   ========================================= */
.card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.5);
}

.icon-primary {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.specialty-card { padding: 0; overflow: hidden; }

.card-header {
    padding: 20px;
    color: white;
}

.card-header h3 { color: white; margin: 0; font-size: 1.2rem;}

.border-blue { background: var(--primary); }
.border-light-blue { background: var(--secondary); }

.clean-list {
    list-style: none;
    padding: 30px;
}

.clean-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
}

.clean-list i { color: var(--secondary); }

.features-list { list-style: none; }
.features-list li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-dark);
}
.features-list i { color: var(--primary); width: 25px; }

.quote-card i {
    font-size: 2rem;
    color: var(--secondary);
    opacity: 0.3;
    margin-bottom: 15px;
}
.quote-card p { font-style: italic; color: var(--text-dark); }
.quote-card h4 { margin-top: 20px; color: var(--primary); }

/* =========================================
   FAQ ACCORDION
   ========================================= */
.faq-container { max-width: 800px; margin: 0 auto; }

.faq-item {
    background: white;
    margin-bottom: 15px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 20px;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-main);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 20px;
}

.faq-answer p { margin-bottom: 20px; }

.faq-item.active .faq-answer { max-height: 200px; }
.faq-item.active .faq-question i { transform: rotate(180deg); transition: 0.3s; }

/* =========================================
   HOSPITALES SECTION
   ========================================= */
.section {
    padding: 95px 0;
}

.wrap {
    width: min(1240px, 92%);
    margin: 0 auto;
}

.section-soft {
    background:
        radial-gradient(circle at 8% 12%, rgba(205, 220, 243, 0.55), transparent 42%),
        radial-gradient(circle at 88% 4%, rgba(169, 192, 228, 0.34), transparent 33%),
        #eef3fb;
}

#hospitales .section-head {
    max-width: 900px;
    margin: 0 auto 42px;
    text-align: center;
}

#hospitales .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #0f2c75;
    font-weight: 700;
    margin-bottom: 14px;
}

#hospitales .eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    border-radius: 20px;
    background: #d62a4a;
}

#hospitales h2 {
    font-size: clamp(2rem, 4.2vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    color: #081b56;
}

#hospitales .section-head p {
    margin-bottom: 0;
    font-size: clamp(1.05rem, 1.35vw, 1.85rem);
    color: #4e608e;
}

.hospital-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.hospital-card {
    background: #ffffff;
    border: 1px solid #d8e2f0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(7, 25, 85, 0.12);
}

.hospital-map {
    width: 100%;
    height: 225px;
    border: 0;
    display: block;
}

.hospital-info {
    padding: 22px 22px 24px;
}

.tag {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 1.02rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #001f89;
    font-weight: 700;
}

.hospital-info h3 {
    font-size: clamp(1.25rem, 1.9vw, 1.85rem);
    line-height: 1.2;
    margin-bottom: 10px;
    color: #051952;
}

.hospital-detail {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 8px;
    color: #4f5d84;
    font-size: 0.97rem;
    line-height: 1.45;
}

.hospital-detail i {
    width: 16px;
    margin-top: 5px;
    color: #5a6c98;
    flex-shrink: 0;
}

.btn-navy {
    width: 100%;
    margin-top: 18px;
    border-radius: 999px;
    background: #14229a;
    color: #ffffff;
    border: 2px solid #14229a;
    padding: 13px 20px;
    font-size: 0.98rem;
    box-shadow: 0 12px 22px rgba(15, 39, 135, 0.24);
}

.btn-navy:hover {
    transform: translateY(-2px);
    background: #0f1c84;
    border-color: #0f1c84;
}

/* =========================================
   GIANT CTA & FOOTER
   ========================================= */
.giant-cta {
    background: var(--primary);
    color: white;
    padding: 120px 0;
}

.giant-cta h2 { color: white; font-size: 3rem; }
.giant-cta p { color: rgba(255,255,255,0.8); font-size: 1.2rem; }

.footer {
    background: #000a45;
    color: white;
    padding: 50px 0;
}

.footer p { color: rgba(255,255,255,0.6); margin-bottom: 5px; }
.text-small { font-size: 0.8rem; }

/* =========================================
   WHATSAPP FLOATING BUTTON
   ========================================= */
.wa-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
    text-decoration: none;
}

.wa-float:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 25px rgba(37, 211, 102, 0.6);
}

/* =========================================
   ANIMATIONS (SCROLL REVEAL)
   ========================================= */
.reveal {
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(0, 0);
}

.fade-up { transform: translateY(40px); }
.fade-left { transform: translateX(40px); }
.fade-right { transform: translateX(-40px); }
.reveal-delay-1 { transition-delay: 0.15s; }

.logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 1024px) {
    .hero h1 { font-size: 2.8rem; }
    .hero-grid { gap: 40px; }
    .section-title { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .hero-grid { grid-template-columns: 1fr; }
    .hero { padding-top: 120px; text-align: center; }
    .hero h1 { font-size: 2.2rem; }
    .flex-reverse { direction: ltr; }
    .about-content, .tech-content, .hospital-content { text-align: center; }
    .features-list li { display: flex; flex-direction: column; align-items: center; text-align: center;}
    .features-list i { margin-bottom: 5px; }
    .giant-cta h2 { font-size: 2rem; }
    .navbar .btn { display: none; } /* Ocultar botón nav en mobile para no saturar */

    .section { padding: 80px 0; }
    .hospital-grid { grid-template-columns: 1fr; }
    .hospital-map { height: 210px; }
    .hospital-info { padding: 20px 16px 20px; }
    .tag { font-size: 0.92rem; }
    .hospital-info h3 { font-size: 1.58rem; }
    .hospital-detail { font-size: 1rem; }
}

@media (max-width: 1150px) {
    .hospital-grid { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; }
}