html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: 'Montserrat', sans-serif;
}

main {
    padding-top: var(--header-height);
}

:root {
    --sg-azul: #0000ff;
    --sg-azul-oscuro: #0000b3;
    --sg-cian: #32dbfd;
    --sg-morado: #674ea7;
    --sg-gris: #464646;
    --sg-gris-claro: #5a5a5a;
    --sg-bg: #ffffff;
    --sg-radius: 16px;
    --sg-shadow: 0 8px 30px rgba(0, 0, 60, 0.08);
    --sg-font-title: 'Gilroy-Bold', 'Montserrat', sans-serif;
    --sg-content-max: 1750px;
}

main {
    background: var(--sg-bg);
}

:focus-visible {
    outline: 3px solid var(--sg-azul);
    outline-offset: 3px;
}

/* ============ HERO ============ */
.sg-hero {
    background: linear-gradient(120deg, var(--sg-azul-oscuro) 0%, var(--sg-azul) 45%, var(--sg-cian) 100%);
    padding: clamp(48px, 8vw, 88px) 24px clamp(56px, 9vw, 96px);
    color: #fff;
}

.sg-hero__inner {
    max-width: var(--sg-content-max);
    margin: 0 auto;
}

.sg-hero__icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #fff;
}

.sg-hero__title {
    font-family: var(--sg-font-title);
    font-weight: 700;
    font-size: clamp(1.8rem, 4.2vw, 3rem);
    margin: 0 0 18px;
    line-height: 1.15;
    max-width: 1100px;
}

.sg-hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    max-width: 850px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 40px;
    font-weight: 500;
}

.sg-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(28px, 6vw, 64px);
}

.sg-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.sg-stat__num {
    font-family: var(--sg-font-title);
    font-weight: 700;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    color: var(--sg-cian);
    text-align: center;
}

.sg-stat__label {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

/* ============ SECCIONES GENERALES ============ */
.sg-section {
    max-width: var(--sg-content-max);
    margin: 0 auto;
    padding: clamp(40px, 6vw, 64px) 24px;
}

.sg-section--criterios {
    padding-top: 0;
}

.sg-section--autoeval {
    padding-top: 0;
    padding-bottom: clamp(56px, 8vw, 88px);
}

.sg-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.sg-section__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--sg-azul);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 16px;
}

.sg-section__header h2 {
    font-family: var(--sg-font-title);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 700;
    color: var(--sg-gris);
    margin: 0;
}

/* ============ ¿QUÉ ES EL SIGAC? ============ */
.sg-inst {
    background: #fff;
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow);
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    overflow: hidden;
}

.sg-inst__text {
    padding: clamp(24px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.sg-inst__title {
    font-family: var(--sg-font-title);
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
    font-weight: 700;
    color: var(--sg-azul);
    margin: 0;
    line-height: 1.25;
}

.sg-inst__text p {
    font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.1rem);
    line-height: 1.7;
    font-weight: 500;
    color: var(--sg-gris-claro);
    margin: 0;
    max-width: 80ch;
}

.sg-inst__img {
    margin: 0;
    min-height: 320px;
    background: #f5f6f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 3vw, 32px);
}

.sg-inst__img .sg-zoom {
    max-width: 560px;
}

/* ============ IMÁGENES AMPLIABLES ============ */
.sg-zoom {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    border-radius: 12px;
    overflow: hidden;
}

.sg-zoom img {
    display: block;
    width: 100%;
    height: auto;
}

/* ============ TARJETAS DE CRITERIOS ============ */
.sg-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.sg-card {
    --sg-accent: var(--sg-azul);
    background: #fff;
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow);
    border-top: 5px solid var(--sg-accent);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Colores tomados de la infografía de criterios */
.sg-card--c1 { --sg-accent: #6b7078; }
.sg-card--c2 { --sg-accent: var(--sg-cian); }
.sg-card--c3 { --sg-accent: #3a3aff; }
.sg-card--c4 { --sg-accent: #00008b; }
.sg-card--c5 { --sg-accent: var(--sg-morado); }
.sg-card--c6 { --sg-accent: #26d4ca; }
.sg-card--c7 { --sg-accent: #f5a623; }
.sg-card--c8 { --sg-accent: #ff4560; }

.sg-card__icon {
    background: #f5f6f9;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-card__icon i {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--sg-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.sg-card__body {
    padding: 22px 26px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.sg-card__tag {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--sg-accent);
    margin: 0;
}

.sg-card__title {
    font-family: var(--sg-font-title);
    font-size: clamp(1.15rem, 1.05rem + 0.25vw, 1.35rem);
    font-weight: 700;
    margin: 0;
    color: var(--sg-gris);
    line-height: 1.25;
}

.sg-card__list {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
}

.sg-card__list li {
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 9px 0;
    border-top: 1px solid #e8ebf2;
    font-size: clamp(0.94rem, 0.9rem + 0.15vw, 1.05rem);
    line-height: 1.45;
    font-weight: 500;
    color: var(--sg-gris-claro);
}

.sg-card__list li b {
    flex: 0 0 2.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--sg-accent);
}

/* ============ BOTÓN ============ */
.sg-more {
    text-align: center;
    margin: 36px 0 0;
}

.sg-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: 2px solid var(--sg-azul);
    border-radius: 999px;
    background: transparent;
    color: var(--sg-azul);
    font: 700 0.95rem 'Montserrat', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.sg-btn:hover {
    background: var(--sg-azul);
    color: #fff;
}

/* ============ MODELO DE AUTOEVALUACIÓN ============ */
.sg-callout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #fff;
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow);
    border-left: 6px solid var(--sg-azul);
    padding: clamp(22px, 3vw, 36px);
    margin-bottom: 32px;
}

.sg-callout__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--sg-azul);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
}

.sg-callout p {
    margin: 0;
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
    line-height: 1.7;
    font-weight: 600;
    color: var(--sg-gris);
}

.sg-text {
    max-width: 1100px;
    margin: 0 0 32px;
}

.sg-text p {
    font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.1rem);
    line-height: 1.7;
    font-weight: 500;
    color: var(--sg-gris-claro);
    margin: 0 0 16px;
}

.sg-text p strong {
    color: var(--sg-azul);
}

.sg-figure {
    margin: 0 0 32px;
    padding: 16px;
    background: #fff;
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow);
}

.sg-figure figcaption {
    margin-top: 12px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sg-gris-claro);
}

/* ============ VISOR DE IMÁGENES ============ */
.sg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 12, 30, 0.88);
}

.sg-lightbox[hidden] {
    display: none;
}

.sg-lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.sg-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--sg-gris);
    font-size: 1.2rem;
    cursor: pointer;
}

/* =============== PANTALLAS ULTRA ANCHAS =============== */
@media (min-width: 2200px) {
    :root {
        --sg-content-max: 2000px;
    }
}

/* =============== RESPONSIVE =============== */
@media (max-width: 1100px) {
    .sg-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .sg-inst {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .sg-hero__stats {
        gap: 24px;
    }
    .sg-inst__text {
        padding: 28px;
    }
}

@media (max-width: 600px) {
    .sg-cards {
        grid-template-columns: 1fr;
    }
    .sg-callout {
        flex-direction: column;
    }
}

/* =============== ACCESIBILIDAD =============== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .sg-btn {
        transition: none;
    }
}
