.main-proyec {
    font-family: 'Sora', sans-serif;
}

.main-proyec {
    --azul: #003149;
    --rojo: #aa0d2e;
    --card: #ffffff;
    --suave: #6b7280;
    --borde: rgba(0, 49, 73, 0.10);
    --sombra: 0 4px 24px rgba(0, 49, 73, 0.08);
    --sombra-h: 0 14px 40px rgba(0, 49, 73, 0.16);
    --r: var(--radius-card, 10px);
    --r-sm: 10px;

    max-width: var(--content-max, 1280px);
    margin: 48px auto;
    padding: 0 24px 80px;
    color: #2d3748;
}

/* ============================================================
   ENCABEZADOS DE SECCIÓN
============================================================ */

.section-proyec {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(.85rem, 1.2vw, 1rem);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--rojo);
    margin-bottom: 6px;
}

.section-proyec::before {
    content: '';
    width: 20px;
    height: 2px;
    background: var(--rojo);
    border-radius: 2px;
}

.title-proyeccion {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.5rem, 4vw, 3rem);
    color: var(--azul);
    margin-bottom: 6px;
    line-height: 1.2;
}

.bar-proyec {
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, var(--rojo), var(--azul));
    border-radius: 3px;
    margin-bottom: 28px;
}

/* ============================================================
   TARJETAS GENERALES
============================================================ */

.intro-card,
.secondary-card,
.carousel-section,
.energia-card,
.showcase-section {
    background: var(--card);
    border-radius: var(--r);
    box-shadow: var(--sombra);
    border: 1px solid var(--borde);
    transition: transform .35s ease, box-shadow .35s ease;
}

.intro-card:hover,
.secondary-card:hover,
.carousel-section:hover,
.energia-card:hover,
.showcase-section:hover {
    transform: translateY(-4px);
    box-shadow: var(--sombra-h);
}

/* ============================================================
   INTRODUCCIÓN
============================================================ */

.intro-card {
    padding: clamp(24px, 3vw, 40px);
    margin-bottom: 36px;
}

.intro-card p {
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    color: var(--suave);
    line-height: 1.85;
    text-align: left;
    margin: 0;
}

.intro-card p+p {
    margin-top: 12px;
}

/* ============================================================
   PROYECTOS / SHOWCASE
============================================================ */

.showcase-section {
    padding: clamp(24px, 3vw, 40px);
    margin-bottom: 48px;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.show-card {
    border-radius: var(--r-sm);
    overflow: hidden;
    position: relative;
    height: 320px;
    box-shadow: var(--sombra);
    transition: transform .4s ease, box-shadow .4s ease;
    cursor: pointer;
    isolation: isolate;
}

.show-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--sombra-h);
}

.show-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.show-card:hover img {
    transform: scale(1.08);
}

.show-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 49, 73, .82) 0%,
            rgba(0, 49, 73, .15) 55%,
            transparent 100%);
    pointer-events: none;
}

.show-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
}

.show-info h3 {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.4;
}

/* ============================================================
   INGENIERÍA EN CONSTRUCCIÓN
============================================================ */

.secondary-card {
    padding: clamp(24px, 3vw, 40px);
    margin-bottom: 36px;
}

.secondary-card p {
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    color: var(--suave);
    line-height: 1.85;
    margin-bottom: 16px;
    text-align: left;
}

.secondary-card ul {
    padding-left: 0;
    list-style: none;
    margin: 24px 0 0;
}

.secondary-card ul li {
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    color: var(--suave);
    padding: 12px 0 12px 32px;
    border-bottom: 1px solid var(--borde);
    position: relative;
    line-height: 1.6;
}

.secondary-card ul li:last-child {
    border-bottom: none;
}

.secondary-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--azul), var(--rojo));
}

/* ============================================================
   CARRUSEL
============================================================ */

.carousel-section {
    padding: clamp(24px, 3vw, 40px);
    margin-bottom: 48px;
}

.carrusel {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 420px;
    margin: 0 auto;
    perspective: 1000px;
}

.slide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 100%;
    transform: translate(-50%, -50%) scale(.7);
    opacity: 0;
    transition:
        transform .8s ease,
        opacity .8s ease,
        filter .8s ease;
    border-radius: var(--r-sm);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .20);
    pointer-events: none;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide.activo {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    z-index: 5;
    pointer-events: auto;
}

.slide.anterior {
    transform: translate(-125%, -50%) scale(.6) rotateY(20deg);
    opacity: .5;
    z-index: 3;
    filter: blur(2px);
}

.slide.siguiente {
    transform: translate(25%, -50%) scale(.6) rotateY(-20deg);
    opacity: .5;
    z-index: 3;
    filter: blur(2px);
}

.texto-nube {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, .94);
    padding: 9px 18px;
    border-radius: 6px;
    font-size: clamp(.85rem, 1.1vw, 1rem);
    color: var(--azul);
    font-weight: 600;
    box-shadow: var(--sombra);
    white-space: nowrap;
    max-width: calc(100% - 40px);
    overflow: hidden;
    text-overflow: ellipsis;
}

.flecha-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .94);
    border: none;
    font-size: 1.5rem;
    color: var(--azul);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--sombra);
    transition:
        background .3s ease,
        color .3s ease,
        transform .3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flecha-btn:hover {
    background: var(--azul);
    color: #fff;
    transform: translateY(-50%) scale(1.08);
}

.flecha-btn.ant {
    left: 10px;
}

.flecha-btn.sig {
    right: 10px;
}

/* ============================================================
   TRANSICIÓN ENERGÉTICA
============================================================ */

.energia-card {
    padding: 40px;
    margin-bottom: 36px;
}

.energia-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
    margin-bottom: 32px;
}

.energia-img {
    overflow: hidden;
    border-radius: var(--r-sm);
    box-shadow: var(--sombra);
}

.energia-img img {
    width: 100%;
    display: block;
    border-radius: var(--r-sm);
    transition: transform .6s ease;
}

.energia-img:hover img {
    transform: scale(1.04);
}

.energia-texts p {
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    color: var(--suave);
    line-height: 1.75;
    margin: 0 0 16px;
    text-align: left;
}

.energia-texts strong {
    color: var(--azul);
}

/* ============================================================
   TARJETAS DE HIDRÓGENO
============================================================ */

.energia-card .container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.energia-card .row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0;
}

.energia-card .col-md-4 {
    width: auto;
    padding: 0;
}

.card {
    position: relative;
    height: 330px;
    border-radius: var(--r-sm);
    overflow: hidden;
    border: 1px solid var(--borde);
    box-shadow: var(--sombra);
    cursor: pointer;
    transition: transform .4s ease, box-shadow .4s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--sombra-h);
}

.card>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
}

.card:hover>img {
    transform: scale(1.08);
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 49, 73, .92) 0%,
            rgba(0, 49, 73, .25) 55%,
            transparent 100%);
    pointer-events: none;
}

.card__content {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 2;
    transform: translateY(42px);
    transition: transform .4s ease;
}

.card:hover .card__content {
    transform: translateY(0);
}

.card__title {
    color: #fff;
    font-size: 1.9rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.card__description {
    color: rgba(255, 255, 255, .92);
    font-size: 1.4rem;
    line-height: 1.55;
    margin: 0;
    opacity: 0;
    transition: opacity .3s ease;
}

.card:hover .card__description {
    opacity: 1;
}

/* ============================================================
   BANNER DE CIERRE
============================================================ */

.banner-cierre {
    max-width: 1180px;
    margin: 0 auto 70px;
    padding: 0 24px;
}

.banner-cierre img {
    width: 100%;
    display: block;
    border-radius: var(--r);
    box-shadow: var(--sombra);
}

/* ============================================================
   ANIMACIONES
============================================================ */

.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity .7s ease,
        transform .7s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 900px) {

    .showcase-grid,
    .energia-card .row {
        grid-template-columns: 1fr;
    }

    .show-card {
        height: 380px;
    }

    .energia-grid {
        grid-template-columns: 1fr;
    }

    .energia-img {
        max-width: 650px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {

    .main-proyec {
        margin: 32px auto;
        padding: 0 16px 50px;
    }

    .intro-card,
    .secondary-card,
    .showcase-section,
    .carousel-section,
    .energia-card {
        padding: 24px;
    }

    .show-card {
        height: 300px;
    }

    .carrusel {
        height: 280px;
    }

    .slide {
        width: 88%;
    }

    .slide.anterior,
    .slide.siguiente {
        opacity: .18;
    }

    .texto-nube {
        font-size: 1rem;
        padding: 8px 18px;
    }

    .flecha-btn {
        width: 42px;
        height: 42px;
        font-size: 1.5rem;
    }

    .card {
        height: 300px;
    }

    .card__content {
        transform: translateY(0);
    }

    .card__description {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}