:root {
    --primary: #2F5E2E;
    --primary-dark: #244a23;
    --secondary: #4f8a4b;
    --secondary-dark: #3f733d;


    --bg-main: #f7f9fb;
    --bg-card: #ffffff;
    --bg-soft: #eef4ef;

    --text-main: #2b2b2b;
    --text-muted: #555;
    --text-soft: #67726a;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.12);
    --shadow-focus: 0 0 0 3px rgba(79, 138, 75, 0.28);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

/* Scroll margin for anchor links (accounts for sticky header) */
section[id] {
    scroll-margin-top: 90px;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* =========================
   TYPOGRAPHY SYSTEM
========================= */
h1,
h2,
h3 {
    font-weight: 700;
    color: var(--primary);
}

h1 {
    font-size: 2.6rem;
    line-height: 1.15;
    margin-bottom: 1.4rem;
}

h2 {
    font-size: 2.1rem;
    line-height: 1.2;
    margin-bottom: 1.2rem;
}

h3 {
    font-size: 1.3rem;
    line-height: 1.3;
    margin-bottom: 0.6rem;
}

p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

/* Ritmo vertical */
section {
    margin-bottom: clamp(3rem, 5vw, 4.5rem);
}

.page-header p {
    font-size: 1.05rem;
    max-width: 620px;
    margin: 0 auto;
}

/* =========================
   HEADER
========================= */

.site-header {
    background: rgba(253, 254, 254, 0.96);
    backdrop-filter: blur(4px);
    /* blanco suave */
    box-shadow: 0 8px 20px rgba(24, 42, 24, 0.08);
    padding: 0;
    border-bottom: 1px solid rgba(47, 94, 46, 0.08);
    /* más angosto */
}

.site-header--sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 86px;
    gap: 1.2rem;
}


.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 72px;
    width: auto;
    display: block;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    flex-wrap: wrap;
}

.site-header nav a {
    position: relative;
    color: #1f3d1f;
    /* verde oscuro institucional */
    margin-left: 0;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    padding-bottom: 0.2rem;
    text-decoration: none;
    transition: color 0.25s ease;
}


.site-header nav a:hover {
    color: var(--primary);
}

.site-header nav a::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.site-header nav a:hover::after {
    width: 100%;
}

.site-header nav a:focus-visible {
    outline: none;
    color: var(--primary);
}

.site-header nav a:focus-visible::after {
    width: 100%;
}

/* =========================
   PAGE HEADER
========================= */

.page-header {
    text-align: center;
    padding: 3rem 1.5rem 2.5rem;
    margin-bottom: 3.5rem;
}

.page-header h1 {
    font-size: 2.6rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.05rem;
    max-width: 620px;
    margin: 0 auto;
    color: var(--text-muted);
}

.page-header::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary);
    margin: 2rem auto 0;
    border-radius: 2px;
}

/* =========================
   ANIMATIONS
========================= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   HERO
========================= */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 5rem 0 7rem;
    position: relative;
    width: 100%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text {
    animation: fadeUp 0.8s ease both;
}

/* FIX DEFINITIVO DE COLOR */
.hero h1,
.hero p {
    color: #ffffff;
}

.hero-text h1 {
    font-size: 2.7rem;
    letter-spacing: -0.6px;
}

.hero-text p {
    font-size: 1.05rem;
    max-width: 560px;
    opacity: 0.95;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeUp 0.8s ease both;
    animation-delay: 0.15s;
}

/* Fondo decorativo */
.hero-image::before {
    content: "";
    position: absolute;
    width: 90%;
    height: 90%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    transform: rotate(-3deg);
    z-index: 0;
}

.hero-image img {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.35),
        0 0 0 10px rgba(255, 255, 255, 0.05);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.hero-image img:hover {
    transform: translateY(-6px) scale(1.02);
}

/* CTA */
.hero-actions {
    display: flex;
    gap: 1.2rem;
    margin-top: 2.2rem;
    flex-wrap: wrap;
}


/* =========================
   BUTTONS
========================= */
.btn-primary {
    background: #ffffff;
    color: var(--primary);
    font-weight: 700;
    padding: 0.82rem 1.9rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    text-decoration: none;
    border: 1px solid rgba(47, 94, 46, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
    background: #f6fbf6;
}

.btn-primary:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    padding: 0.68rem 1.45rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.08);
}

.btn-secondary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.32);
}

.btn-secondary.btn-secondary--light {
    color: var(--primary);
    border-color: rgba(47, 94, 46, 0.36);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.btn-secondary.btn-secondary--light:hover {
    background: #f6fbf6;
    border-color: rgba(47, 94, 46, 0.52);
}

.btn-secondary.btn-secondary--light:focus-visible {
    box-shadow: var(--shadow-focus);
}

/* =========================
   PLANS
========================= */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.page-planes .plans-grid,
.page-planes-plans-grid {
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    max-width: 900px;
    margin: 2rem auto 0;
}

/* Inline sections on homepage (full-width hero) */
.page-planes-inline .planes-hero,
.page-nosotros-inline .planes-hero,
.page-cartilla-inline .cartilla-hero,
.page-centros-inline .centros-hero,
.page-noticias-inline .planes-hero,
.page-contacto-inline .planes-hero {
    width: 100%;
}

.noticias-cta-box {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(47, 94, 46, 0.08);
    max-width: 560px;
    margin: 0 auto;
}

.noticias-cta-box p {
    margin-bottom: 1.5rem;
}

.noticias-cta-box .btn-primary {
    display: inline-block;
}

.planes-hero {
    background: linear-gradient(135deg,
            var(--primary),
            var(--secondary));
    color: #ffffff;
    padding: 5rem 1.5rem 4.5rem;
    margin-bottom: 4rem;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.planes-hero h1 {
    color: #ffffff;
}

.planes-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
}

/* Línea decorativa */
.planes-hero::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: rgba(255, 255, 255, 0.85);
    margin: 2rem auto 0;
    border-radius: 2px;
}

/* =========================
   CENTROS DE ATENCIÓN
========================= */

.page-centros {
    max-width: 900px;
}

.centros-hero {
    background: linear-gradient(135deg,
            var(--primary),
            var(--secondary));
    color: #ffffff;
    padding: 5rem 1.5rem 4.5rem;
    margin-bottom: 4rem;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.centros-hero h1 {
    color: #ffffff;
}

.centros-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
}

.centros-hero::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: rgba(255, 255, 255, 0.85);
    margin: 2rem auto 0;
    border-radius: 2px;
}

.centros-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    margin: 3rem auto 0;
}

.centro-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 2rem 1.8rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(47, 94, 46, 0.08);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.centro-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.centro-card p {
    margin-bottom: 0;
    color: var(--text-muted);
}

.centros-mapas {
    text-align: center;
    margin-top: 4.25rem;
}

.centros-mapas h2 {
    font-size: 1.9rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.centros-mapas-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    margin: 2rem auto 0;
}

.centro-mapa-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.2rem 1.8rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(47, 94, 46, 0.08);
}

.centro-mapa-card h3 {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.centro-mapa-frame {
    width: 100%;
    height: 260px;
    border: 0;
    border-radius: var(--radius-md);
}

.plan-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(47, 94, 46, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

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


.plan-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    color: var(--primary);
    text-align: center;
}

.plan-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.plan-card li {
    padding-left: 1.6rem;
    margin-bottom: 0.75rem;
    position: relative;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Check institucional */
.plan-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: 700;
}

.plan-card.destacado {
    border: none;
    box-shadow: var(--shadow-md);
    transform: translateY(0);
}

.plan-card.destacado h3 {
    color: var(--primary);
}


.plan-note {
    max-width: 720px;
    margin: 3.5rem auto 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.plan-btn {
    display: inline-block;
    margin-top: 1.8rem;
    padding: 0.7rem 1.8rem;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: center;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.plan-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}



/* =========================
   CARTILLA MÉDICA
========================= */

.page-cartilla {
    max-width: 900px;
}

.cartilla-intro {
    max-width: 760px;
    margin: 0 auto 3.5rem;
}

.cartilla-intro h2 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.cartilla-intro p {
    margin-bottom: 1.2rem;
    font-size: 1rem;
    line-height: 1.7;
}

.cartilla-download {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.cartilla-hero {
    background: linear-gradient(135deg,
            var(--primary),
            var(--secondary));
    color: #ffffff;
    padding: 5rem 1.5rem 4.5rem;
    margin-bottom: 4rem;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.cartilla-hero h1 {
    color: #ffffff;
}

.cartilla-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
}

/* Línea decorativa */
.cartilla-hero::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: rgba(255, 255, 255, 0.85);
    margin: 2rem auto 0;
    border-radius: 2px;
}

.download-box {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(47, 94, 46, 0.08);
    text-align: center;
    max-width: 520px;
}

.download-box h3 {
    margin-bottom: 0.8rem;
}

.download-box p {
    margin-bottom: 1.8rem;
}

.cartilla-note {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}


/* =========================
   CONTACT PAGE
========================= */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: flex-start;
    margin-top: 2.5rem;
}

.contact-info {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(47, 94, 46, 0.08);
}

.contact-info h3 {
    margin-bottom: 1.4rem;
    color: var(--primary);
}

.contact-info p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-form {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 2.5rem 2.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(47, 94, 46, 0.08);
}

.contact-form h3 {
    margin-bottom: 1.6rem;
    color: var(--primary);
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.4rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid #d6dbe0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(46, 109, 164, 0.15);
}

.contact-form button {
    margin-top: 0.5rem;
}

/* =========================
   NEWS GRID (list page)
========================= */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    margin-top: 2rem;
}

.news-pagination-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    border: 1px solid rgba(47, 94, 46, 0.25);
    background: #ffffff;
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.95rem;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.news-pagination-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    background: #f5fbf5;
}

.news-pagination-link:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.news-status {
    text-align: center;
    color: var(--text-soft);
    background: #ffffff;
    border: 1px solid rgba(47, 94, 46, 0.12);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.2rem;
    max-width: 520px;
    margin: 1.5rem auto 0;
}

/* =========================
   FOOTER INSTITUCIONAL
========================= */

.site-footer {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: rgba(255, 255, 255, 0.9);
    padding-top: 3.5rem;
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    padding-bottom: 2.5rem;
}

.footer-column {
    max-width: 360px;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
}

.footer-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-links a:focus-visible {
    outline: none;
    text-decoration: underline;
}

/* Línea inferior */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.2rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}

/* =========================
   NOTICIA DETALLE
========================= */

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 0.3rem;
}

.news-detail {
    max-width: 820px;
    margin: 0 auto;
}

.news-detail h1 {
    margin-bottom: 0.5rem;
    text-wrap: balance;
}

.news-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.news-detail p {
    margin-bottom: 1.4rem;
    max-width: 74ch;
}

.news-back {
    margin-top: 3rem;
    text-align: center;
}

.page-noticia .news-detail {
    background: #ffffff;
    border: 1px solid rgba(47, 94, 46, 0.1);
    border-radius: var(--radius-lg);
    padding: clamp(1.4rem, 2.6vw, 2.1rem);
    box-shadow: var(--shadow-sm);
}

/* =========================
   NEWS CARDS
========================= */

#news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.news-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 2.2rem 2rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(47, 94, 46, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

.news-card h2 {
    font-size: 1.4rem;
    line-height: 1.25;
    margin-bottom: 0.6rem;
    color: var(--primary);
}

.news-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.9rem;
}

.news-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.6rem;
    flex-grow: 1;
}

.news-card a {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    align-self: flex-start;
    position: relative;
}

.news-card a::after {
    content: "→";
    margin-left: 0.4rem;
    transition: transform 0.2s ease;
}

.news-card a:hover::after {
    transform: translateX(4px);
}

.news-card a:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
    border-radius: var(--radius-sm);
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.reveal-in {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .site-header .container {
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
    }

    .header-content {
        align-items: flex-start;
        min-height: auto;
    }

    .logo img {
        height: 58px;
    }

    .nav-right {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.9rem;
    }

    .site-header nav {
        width: 100%;
        gap: 0.75rem 1rem;
    }

    .site-header nav a {
        font-size: 0.92rem;
        line-height: 1.2;
    }

    .social-icons {
        margin-left: 0;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image::before {
        display: none;
    }

    .hero-image img {
        max-width: 90%;
        margin-top: 2rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-actions {
        justify-content: center;
        gap: 0.7rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    p {
        font-size: 0.98rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-info,
    .contact-form {
        padding: 2rem 1.6rem;
    }

    .news-card {
        padding: 1.65rem 1.35rem;
    }

    .news-card h2 {
        font-size: 1.25rem;
    }
}

/* =========================
   BLOQUE INSTITUCIONAL
========================= */

.institutional {
    background: #ffffff;
    padding: 4rem 0 2.5rem;
    text-align: center;
}

.institutional h2 {
    font-size: 1.9rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.institutional p {
    max-width: 720px;
    margin: 0 auto 3rem;
    font-size: 1rem;
}

.section-subtitle {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.institutional-grid--compact {
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
    margin: 0 auto;
}

/* GRID 2x2 */
.institutional-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.5rem 4rem;
    max-width: 900px;
    margin: 0 auto;
}

/* ITEMS */
.institutional-item {
    text-align: center;
}

.institutional-item h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #000;
}

.institutional-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    color: #000;
}

/* =========================
   ICONOS SVG
========================= */

/* =========================
   ICONOS SVG REALES
========================= */

.icon-circle {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;

}

.icon-circle img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: none;

}

/* Hover sutil institucional */
.institutional-item:hover .icon-circle {
    transform: translateY(-2px);
    transition: transform 0.25s ease;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
    .institutional-grid,
    .institutional-grid--compact {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .institutional {
        padding: 3rem 0 2rem;
    }

    .centros-grid,
    .centros-mapas-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   BENEFITS
========================= */
.benefits {
    background: var(--bg-main);
    padding: 3.5rem 0 5.5rem;
    text-align: center;
    margin-top: 0;
}


.benefits h2 {
    font-size: 1.9rem;
    margin-bottom: 3rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem;
}

.benefit-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.18);
}

.benefit-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.benefit-card h3 {
    padding: 1.4rem;
    font-size: 1.1rem;
    color: var(--primary);
}

/* =========================
   HERO CARRUSEL
========================= */

.hero-carousel {
    position: relative;
    min-height: 560px;
    height: clamp(560px, 78vh, 760px);
    overflow: hidden;
    display: flex;
    align-items: center;
    color: #ffffff;
}

/* Slides */
.hero-slides {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-slide.active {
    opacity: 1;
}

/* Overlay institucional */
.hero-carousel .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            rgba(32, 74, 32, 0.8) 0%,
            rgba(32, 74, 32, 0.58) 45%,
            rgba(32, 74, 32, 0.28) 100%);
    z-index: 1;
}

/* Contenido */
.hero-content {
    position: relative;
    z-index: 2;
}

.hero-carousel h1 {
    font-size: clamp(2.1rem, 5vw, 3.1rem);
    line-height: 1.15;
    margin-bottom: 1.4rem;
    color: #ffffff;
    text-wrap: balance;
}

.hero-carousel p {
    font-size: clamp(1rem, 2.2vw, 1.14rem);
    max-width: 560px;
    opacity: 0.95;
}

/* Botones */
.hero-carousel .btn-primary {
    background: #ffffff;
    color: var(--primary);
}

.hero-carousel .btn-secondary {
    border-color: rgba(255, 255, 255, 0.8);
    color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-carousel {
        min-height: 500px;
        height: auto;
        text-align: center;
    }

    .hero-carousel h1 {
        font-size: 2.2rem;
    }

    .hero-carousel p {
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }
}

/* =========================
   NAVBAR + REDES
========================= */

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

/* =========================
   NAVBAR – REDES SOCIALES
========================= */

.social-icons {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-left: 0.5rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f6f4;
    /* blanco verdoso suave */
    transition: background 0.25s ease, transform 0.25s ease;
}

.social-icons a:hover {
    background: #e6efe8;
    transform: translateY(-1px);
}

.social-icons a:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.social-icons img {
    width: 30px;
    /* 👈 tamaño real del ícono */
    height: 30px;
    opacity: 0.85;
    transition: opacity 0.25s ease;
}

.social-icons a:hover img {
    opacity: 1;
}

/* =========================
   FOOTER – REDES SOCIALES
========================= */

.footer-social {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.2rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.25s ease, transform 0.25s ease;
}

.footer-social a:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.footer-social a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.32);
}

.footer-social img {
    width: 30px;
    height: 30px;
    opacity: 0.9;
}

/* =========================
   FOOTER – CONTACTO
========================= */

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0 0 1.4rem;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.footer-contact img {
    width: 16px;
    height: 16px;
    margin-top: 0.2rem;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    /* blanco sobre verde */
}

.footer-contact span {
    display: block;
}

/* Placeholder gris como el modelo */
.institutional-placeholder {
    background: #e6e6e6;
    min-height: 140px;
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation: none !important;
        transition: none !important;
    }
}
