/* =========================================================
   HOME CSS ADAPTADO AL ESTILO DEL PRIMER CSS
   Mantiene la estructura del home, pero con la estética:
   - verde institucional
   - tarjetas blancas
   - bordes suaves
   - sombras limpias
   - radios grandes
========================================================= */

:root {
    --home-primary: #1f5c42;
    --home-primary-dark: #174a35;
    --home-accent: #c63d3d;
    --home-bg: #f4f7f5;
    --home-surface: #ffffff;
    --home-text: #1f2937;
    --home-muted: #6b7280;
    --home-border: #dbe4dc;
    --home-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --home-shadow-hover: 0 16px 34px rgba(0, 0, 0, 0.10);
    --home-radius-sm: 12px;
    --home-radius-md: 16px;
    --home-radius-lg: 18px;
    --home-radius-xl: 24px;
}

/* HERO */
.hero-home {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #000;
    margin-top: 0;
    padding-top: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -56%);
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.15s linear;
    will-change: transform;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.52) 0%, rgba(0, 0, 0, 0.30) 45%, rgba(0, 0, 0, 0.16) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.22));
    transition: opacity 0.2s linear;
    will-change: opacity;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    transition: transform 0.2s linear, opacity 0.2s linear;
    will-change: transform, opacity;
}

.hero-text {
    max-width: 680px;
    padding: 110px 0;
    opacity: 1;
    visibility: visible;
}

.hero-text h1 {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
    opacity: 1;
    visibility: visible;
}

.hero-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.94);
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 560px;
    opacity: 1;
    visibility: visible;
}

.hero-home.hero-hidden .hero-content {
    opacity: 0;
    transform: translateY(40px);
}

.hero-home.hero-hidden .hero-overlay {
    opacity: 0.35;
}

/* HOME TOP */
.section-home-top-cards {
    padding-top: 48px;
    padding-bottom: 48px;
    background: var(--home-bg);
}

.home-top-grid {
    display: grid;
    gap: 28px;
}

.home-admision-banner {
    display: block;
    border-radius: var(--home-radius-xl);
    overflow: hidden;
    box-shadow: var(--home-shadow);
    background: var(--home-surface);
    border: 1px solid #edf2ee;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-admision-banner:hover {
    transform: translateY(-4px);
    box-shadow: var(--home-shadow-hover);
}

.home-admision-banner img {
    width: 100%;
    min-height: 240px;
    max-height: 360px;
    object-fit: cover;
}

.home-quick-cards {
    display: flex;
    gap: 28px;
    margin-top: 10px;
}

.home-quick-card {
    flex: 1;
    height: 190px;
    border-radius: var(--home-radius-xl);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: end;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: var(--home-shadow);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-quick-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.52));
    transition: 0.3s;
}

.home-quick-card span {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
    padding: 28px 18px 22px;
    font-size: clamp(1.3rem, 2vw, 2rem);
    font-weight: 700;
}

.home-quick-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--home-shadow-hover);
}

.home-quick-card:hover::before {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.38));
}

/* BIENVENIDA */
.bienvenida-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 42px;
    align-items: center;
}

.bienvenida-text p {
    margin: 0 0 18px;
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--home-text);
}

.bienvenida-emblema {
    display: flex;
    justify-content: center;
    align-items: center;
}

.bienvenida-emblema img {
    width: min(100%, 230px);
    height: auto;
    opacity: 0.95;
}

/* EXPLORA */
.section-explora {
    padding-top: 26px;
    padding-bottom: 26px;
}

.explora-card {
    background: linear-gradient(135deg, var(--home-primary) 0%, var(--home-primary-dark) 100%);
    color: #fff;
    border-radius: var(--home-radius-xl);
    padding: 38px 44px;
    box-shadow: var(--home-shadow);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.explora-text h2 {
    margin: 0;
    font-size: clamp(1.7rem, 2.6vw, 2.7rem);
    line-height: 1.2;
    font-weight: 800;
}

/* TOURS */
.section-tour {
    padding-top: 18px;
    padding-bottom: 18px;
}

.tour-card {
    position: relative;
    border-radius: var(--home-radius-xl);
    overflow: hidden;
    box-shadow: var(--home-shadow);
    min-height: 210px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.08);
}

.section-tour-red .tour-card {
    background: linear-gradient(135deg, #a12626 0%, #c63d3d 100%);
}

.section-tour-green .tour-card {
    background: linear-gradient(135deg, #1f5c42 0%, #2d7a58 100%);
}

.tour-card-wave::before,
.tour-card-wave::after {
    content: "";
    position: absolute;
    left: -5%;
    width: 110%;
    border-radius: 50%;
    opacity: 0.18;
}

.tour-card-wave::before {
    bottom: -70px;
    height: 140px;
    background: rgba(255, 255, 255, 0.22);
}

.tour-card-wave::after {
    bottom: -38px;
    height: 110px;
    background: rgba(0, 0, 0, 0.1);
}

.tour-card-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 36px 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.tour-card-content h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.8rem, 2.6vw, 3rem);
    line-height: 1.2;
    font-weight: 800;
}

.tour-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.tour-btn {
    min-width: 220px;
    color: #fff;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    transition: 0.2s ease;
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.tour-btn-orange {
    background: #dd6b20;
}

.tour-btn-orange:hover {
    background: #c75d19;
}

.tour-btn-green {
    background: #2d8f49;
}

.tour-btn-green:hover {
    background: #25753c;
}

/* INSTITUCIONES */
.section-instituciones-intro {
    padding-bottom: 20px;
}

.section-instituciones-tabs {
    padding-top: 10px;
}

.instituciones-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 36px;
    justify-content: flex-start;
}

.institucion-tab {
    border: 1px solid var(--home-border);
    background: #fff;
    color: var(--home-text);
    min-height: 46px;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.institucion-tab.active,
.institucion-tab:hover {
    background: var(--home-primary);
    color: #fff;
    border-color: var(--home-primary);
    transform: translateY(-2px);
}

.institucion-panel {
    display: none;
}

.institucion-panel.active {
    display: block;
}

/* LINKS DE INTERES */
.links-interes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.link-interes-card {
    background: var(--home-surface);
    border-radius: var(--home-radius-lg);
    padding: 18px 16px;
    text-align: center;
    box-shadow: var(--home-shadow);
    border: 1px solid #edf2ee;
    color: var(--home-text);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.link-interes-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--home-shadow-hover);
}

.link-interes-image {
    width: 78px;
    height: 78px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-interes-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.link-interes-card span {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}

/* NOTICIAS */
.section-noticias {
    padding-top: 64px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.news-card {
    background: var(--home-surface);
    border-radius: var(--home-radius-lg);
    overflow: hidden;
    box-shadow: var(--home-shadow);
    border: 1px solid #edf2ee;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--home-shadow-hover);
}

.news-card-image {
    background: #d9d9d9;
}

.news-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.news-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-body h3 {
    margin: 0 0 14px;
    color: var(--home-text);
    font-size: 1.2rem;
    line-height: 1.35;
    font-weight: 800;
}

.news-card-body p {
    margin: 0 0 22px;
    color: var(--home-muted);
    font-size: 0.98rem;
    line-height: 1.7;
    flex: 1;
}

.section-action-center {
    margin-top: 34px;
    text-align: center;
}

/* QUICK LINKS */
.section-quick-links {
    padding-top: 42px;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.quick-link-card {
    min-height: 112px;
    padding: 20px;
    background: linear-gradient(135deg, var(--home-primary) 0%, #2d7a58 100%);
    color: #fff;
    border-radius: var(--home-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: var(--home-shadow);
    border: 1px solid rgba(255,255,255,0.06);
    font-size: clamp(1.25rem, 2vw, 2rem);
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.quick-link-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--home-shadow-hover);
    background: linear-gradient(135deg, var(--home-primary-dark) 0%, var(--home-primary) 100%);
}

/* ESPACIADOS */
.section-trayectoria {
    padding-top: 82px;
}

.section-about,
.section-trayectoria-alt,
.section-instituciones,
.section-links-interes {
    padding-top: 64px;
}

/* HOME NEWS EXTRA */
.home-news-section {
    padding: 70px 20px;
    background: var(--home-bg);
}

.home-news-container {
    max-width: 1200px;
    margin: 0 auto;
}

.home-news-header {
    text-align: center;
    margin-bottom: 35px;
}

.home-news-header h2 {
    margin: 0 0 12px;
    font-size: 36px;
    color: var(--home-primary);
}

.home-news-header p {
    max-width: 760px;
    margin: 0 auto;
    color: var(--home-muted);
    line-height: 1.7;
}

.home-news-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.home-news-card {
    background: #fff;
    border-radius: var(--home-radius-lg);
    overflow: hidden;
    box-shadow: var(--home-shadow);
    border: 1px solid #e8efe9;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--home-shadow-hover);
}

.home-news-image {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.home-news-placeholder {
    width: 100%;
    height: 210px;
    background: linear-gradient(135deg, #e7f2ea 0%, #f4f8f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--home-muted);
    font-weight: 700;
}

.home-news-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.home-news-date {
    color: var(--home-muted);
    font-size: 13px;
}

.home-news-body h3 {
    margin: 0;
    font-size: 21px;
    line-height: 1.35;
    color: var(--home-text);
}

.home-news-body p {
    margin: 0;
    color: #4b5563;
    line-height: 1.7;
}

.home-news-link,
.home-news-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 12px;
    transition: 0.2s ease;
}

.home-news-link {
    margin-top: auto;
    background: var(--home-primary);
    color: #fff;
    padding: 11px 16px;
}

.home-news-link:hover,
.home-news-all-btn:hover {
    background: var(--home-primary-dark);
    color: #fff;
}

.home-news-footer {
    text-align: center;
    margin-top: 28px;
}

.home-news-all-btn {
    background: var(--home-primary);
    color: #fff;
    padding: 13px 22px;
}

.home-news-empty {
    background: #fff;
    border-radius: var(--home-radius-lg);
    padding: 30px;
    text-align: center;
    color: var(--home-muted);
    border: 1px solid #e8efe9;
    box-shadow: var(--home-shadow);
}

/* BOTONES GENERALES REUTILIZABLES */
.btn-home,
.home-btn,
.section-action-center a,
.explora-card a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    transition: 0.2s ease;
}

.btn-home-primary {
    background: var(--home-primary);
    color: #fff;
}

.btn-home-primary:hover {
    background: var(--home-primary-dark);
}

.btn-home-outline {
    background: #fff;
    color: var(--home-text);
    border: 1px solid var(--home-border);
}

.btn-home-outline:hover {
    background: #f8faf8;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .bienvenida-grid {
        gap: 38px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .links-interes-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .tour-card-content {
        padding: 32px;
    }
}

@media (max-width: 1100px) {
    .home-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .hero-home {
        min-height: 62vh;
    }

    .bienvenida-grid,
    .home-top-grid {
        grid-template-columns: 1fr;
    }

    .explora-card,
    .tour-card-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .tour-btn {
        min-width: 180px;
    }

    .home-quick-cards {
        display: grid;
        gap: 24px;
    }

    .links-interes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-text {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-home {
        min-height: 56vh;
    }

    .hero-video {
        transform: translate(-50%, -54%);
    }

    .hero-text {
        padding: 68px 0;
    }

    .hero-text h1 {
        font-size: clamp(2.5rem, 11vw, 4rem);
    }

    .hero-text p,
    .bienvenida-text p {
        font-size: 1rem;
    }

    .explora-card {
        padding: 30px 24px;
    }

    .tour-card {
        min-height: 180px;
    }

    .tour-card-content {
        padding: 28px 24px;
    }

    .news-grid,
    .links-interes-grid,
    .quick-links-grid,
    .home-news-grid {
        grid-template-columns: 1fr;
    }

    .instituciones-tabs {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .home-news-header h2 {
        font-size: 30px;
    }
}

@media (max-width: 576px) {
    .hero-home {
        min-height: 50vh;
    }

    .hero-video {
        transform: translate(-50%, -53%);
    }

    .home-admision-banner img {
        min-height: 180px;
        max-height: 220px;
    }

    .news-card-image img {
        height: 200px;
    }

    .explora-text h2,
    .tour-card-content h2 {
        font-size: 1.6rem;
    }

    .quick-link-card,
    .home-quick-card {
        min-height: 90px;
        font-size: 1.25rem;
    }

    .home-quick-card {
        height: 150px;
    }
}