/* =========================================================
   VARIABLES & GLOBALES (WCAG 2.1 AA Compliant)
   ========================================================= */
:root {
    --primary-color: #2E5A44; /* Verde esmeralda oscuro conforme WCAG AA (>4.5:1) */
    --primary-light: #3D664D; /* Ratio >5.5:1 en fondo blanco */
    --background-color: #FDFBF7; /* Soft beige */
    --text-color: #1F2E27;
    --card-bg: #ffffff;
    --accent-color: #B87D4B; /* Earthy accent */
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
}

html {
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
}

section {
    padding: 60px 0;
}

/* Indicadores de enfoque accesibles para navegación por teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #2E5A44 !important;
    outline-offset: 2px !important;
}

/* =========================================================
   HEADER & NAVBAR (Single-Row Compact Layout)
   ========================================================= */
header {
    transition: all 0.3s ease;
}

.logo-quirosana {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.brand-text .h4 {
    color: var(--primary-color);
}

.nav-link {
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active {
    border-bottom: 2px solid var(--primary-color);
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero-section {
    background: linear-gradient(135deg, rgba(46, 90, 68, 0.08) 0%, rgba(184, 125, 75, 0.08) 100%);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.hero-section h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.hero-section .lead {
    font-size: 1.15rem;
    color: #333333;
    line-height: 1.8;
}

/* =========================================================
   TARJETAS Y COMPONENTES (BEM Isolated Classes)
   ========================================================= */
.service-card {
    padding: 30px 25px;
    border: none;
    border-radius: 16px;
    background-color: var(--card-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
}

.service-card p {
    margin-bottom: 0;
    line-height: 1.7;
    color: #444444;
}

.feature-card {
    border: none;
    border-radius: 16px;
    background-color: var(--card-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.asociacion-logo {
    text-align: center;
    margin-top: 40px;
}

.asociacion-logo img {
    width: 220px;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* =========================================================
   BOTÓN FLOTANTE (FAB) WHATSAPP
   ========================================================= */
.fab-whatsapp {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    z-index: 1050;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.fab-whatsapp:hover {
    color: #FFFFFF;
    background-color: #20ba5a;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.fab-tooltip {
    position: absolute;
    right: 70px;
    background-color: #2C3E35;
    color: #FFFFFF;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fab-whatsapp:hover .fab-tooltip {
    opacity: 1;
}

/* =========================================================
   FOOTER & SOCIAL LINKS
   ========================================================= */
footer {
    background-color: var(--card-bg);
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid #eaeaea;
}

.social-links a {
    color: var(--text-color);
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: scale(1.15);
}

/* =========================================================
   ACCESIBILIDAD (ALTO CONTRASTE REFACTORIZADO SIN !IMPORTANT)
   ========================================================= */
body.high-contrast-mode {
    --primary-color: #FFFF00;
    --primary-light: #FFFF00;
    --background-color: #000000;
    --text-color: #FFFFFF;
    --card-bg: #111111;
    --accent-color: #00FF00;
    font-size: 1.1rem;
    background-color: var(--background-color);
    color: var(--text-color);
}

body.high-contrast-mode h1,
body.high-contrast-mode h2,
body.high-contrast-mode h3,
body.high-contrast-mode h4,
body.high-contrast-mode h5,
body.high-contrast-mode h6 {
    color: var(--primary-color);
}

body.high-contrast-mode p,
body.high-contrast-mode span,
body.high-contrast-mode div,
body.high-contrast-mode li,
body.high-contrast-mode small {
    color: var(--text-color);
}

body.high-contrast-mode header {
    background-color: #000000;
    border-bottom: 2px solid #FFFF00;
}

body.high-contrast-mode footer {
    background-color: #111111;
    border-top: 2px solid #FFFF00;
}

body.high-contrast-mode .hero-section {
    background: #111111;
    border: 2px solid #FFFF00;
}

body.high-contrast-mode .card,
body.high-contrast-mode .service-card,
body.high-contrast-mode .feature-card {
    background-color: var(--card-bg);
    border: 1px solid #FFFFFF;
}

body.high-contrast-mode .fab-whatsapp {
    background-color: #00FF00;
    color: #000000;
    border: 2px solid #FFFFFF;
}

body.high-contrast-mode a:focus-visible,
body.high-contrast-mode button:focus-visible {
    outline: 3px solid #FFFF00 !important;
    outline-offset: 3px !important;
}

/* =========================================================
   MEDIA QUERIES
   ========================================================= */
@media (min-width: 992px) {
    .container {
        max-width: 1060px;
    }

    .hero-section h1 {
        font-size: 3.25rem;
    }
    
    .hero-section .lead {
        font-size: 1.25rem;
    }

    .nav-link.active {
        border-bottom: 2px solid var(--primary-color);
    }
}