@import '_global.css';

body{
    background: #fff;
}

header.topPage{
    position: relative;
    /* background-color: #464646; */
    color:#fff;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 16 / 7;
    overflow: visible;
    video{
        width: 100%;
        height: 100%;
        position: absolute;
        inset: 0;
        z-index: 1;
        object-fit: cover;
        object-position: center top;
    }
}
/* =====================================================================
   HEADER PROMOCIONAL · PROYECTO EL TAMARUGAL (Antofagasta)
   Se añade el 2026-06-02. Convive con el header antiguo (.topPage) que
   quedó comentado en index.php. Si se vuelve a la versión anterior, este
   bloque queda inactivo automáticamente (sólo aplica con .tamHero).
===================================================================== */
header.topPage.tamHero{
    aspect-ratio: auto;
    min-height: clamp(580px, 88vh, 920px);
    overflow: hidden;
    justify-content: flex-start;
    align-items: stretch;
    color: #fff;
}
.tamHeroMedia{
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    animation: tamHeroZoom 22s ease-out forwards;
}
.tamHeroMedia picture{
    display: block;
}
.tamHeroMedia img,
.tamHeroMedia video{
    position: absolute;
    top: -15%;
    left: 0;
    width: 100%;
    height: 165%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    will-change: transform;
}
.tamHeroMedia video{
    display: block;
}
@keyframes tamHeroZoom{
    from{ transform: scale(1.08); }
    to{ transform: scale(1); }
}
.tamHeroOverlay{
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.33) 0%, rgba(0,0,0,0.28) 30%, rgba(0,0,0,0.15) 58%, rgba(0,0,0,0.06) 84%, rgba(0,0,0,0.02) 100%),
        linear-gradient(0deg, rgba(0,0,0,0.26) 0%, rgba(0,0,0,0.17) 24%, rgba(0,0,0,0.07) 52%, rgba(0,0,0,0.10) 100%),
        radial-gradient(ellipse at 22% 66%, rgba(0,0,0,0.21) 0%, rgba(0,0,0,0.11) 34%, transparent 70%);
}
.tamHeroInner{
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    width: 100%;
}
.tamHeroContent{
    position: relative;
    max-width: 760px;
    padding: 64px 0;
    animation: tamHeroRise 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes tamHeroRise{
    from{ opacity: 0; transform: translateY(26px); }
    to{ opacity: 1; transform: translateY(0); }
}
.tamHeroBadge{
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    padding: 9px 18px 9px 16px;
    border: 1px solid rgba(255,255,255,0.32);
    border-radius: 100px;
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.tamHeroBadgeDot{
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color1);
    box-shadow: 0 0 0 0 rgba(196,40,26,0.6);
    animation: tamHeroPulse 2.2s infinite;
}
@keyframes tamHeroPulse{
    0%{ box-shadow: 0 0 0 0 rgba(196,40,26,0.55); }
    70%{ box-shadow: 0 0 0 13px rgba(196,40,26,0); }
    100%{ box-shadow: 0 0 0 0 rgba(196,40,26,0); }
}
/* Titular principal: las frases animadas (espíritu de marca).
   Estructura fija de 2 líneas: "Construimos" arriba y la palabra
   animada abajo (sin partirse), con altura reservada para que el
   contenido que sigue nunca se mueva al cambiar la frase. */
/* Fila del titular: pilar rojo de marca + frase animada */
.tamHeroHeadline{
    display: flex;
    align-items: stretch;
    gap: clamp(16px, 1.6vw, 26px);
    margin: 0 0 22px;
}
.tamHeroPillar{
    flex: 0 0 auto;
    width: clamp(7px, 0.7vw, 11px);
    align-self: stretch;
    background-color: var(--color1);
}
.tamHero .tamHeroType{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin: 0;
    font-size: clamp(2rem, 6vw, 4.6rem);
    font-weight: 300;
    line-height: 1.06;
    letter-spacing: -0.01em;
    height: calc(2 * 1.06em);
    overflow: hidden;
}
.tamHeroTypeLight{
    display: block;
    height: 1.06em;
    font-weight: 200;
    color: rgba(255,255,255,0.92);
}
.tamHeroTypeBold{
    display: block;
    width: fit-content;
    height: 1.06em;
    white-space: nowrap;
    font-weight: 800;
    color: #fff;
}
/* Datos del proyecto: secundarios, menor jerarquía */
.tamHeroKicker{
    margin: 26px 0 2px;
    font-size: clamp(0.78rem, 1.4vw, 0.95rem);
    font-weight: 400;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
}
.tamHeroTitle{
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0;
    color: rgba(255,255,255,0.95);
}
.tamHeroLead{
    margin: 18px 0 0;
    max-width: 31em;
    font-size: clamp(0.95rem, 1.3vw, 1.05rem);
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255,255,255,0.82);
}
.tamHeroActions{
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    margin-top: 42px;
}
.tamHeroBtn{
    padding: 17px 44px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: 2px;
    box-shadow: 0 20px 44px -20px rgba(196,40,26,0.85);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tamHeroBtn:hover{
    transform: translateY(-2px);
    box-shadow: 0 26px 52px -20px rgba(196,40,26,0.9);
}
.tamHeroDesde{
    font-size: 0.95rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.9);
}
.tamHeroDesde strong{
    font-weight: 700;
    letter-spacing: 0.02em;
}
@media screen and (width <= 768px){
    header.topPage.tamHero{
        min-height: clamp(560px, 92vh, 760px);
    }
    .tamHeroMedia video{
        object-position: right center;
    }
    .tamHeroOverlay{
        background:
            linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.10) 28%, rgba(0,0,0,0.28) 68%, rgba(0,0,0,0.35) 100%),
            radial-gradient(ellipse at 50% 82%, rgba(0,0,0,0.22) 0%, transparent 66%);
    }
    .tamHeroInner{
        align-items: flex-end;
    }
    .tamHeroContent{
        padding: 0 0 54px;
        max-width: 100%;
    }
    .tamHeroLead{
        font-size: 1rem;
    }
    .tamHeroActions{
        gap: 18px;
        margin-top: 34px;
    }
    .tamHeroBtn{
        flex: 1 1 auto;
        text-align: center;
    }
}
@media (prefers-reduced-motion: reduce){
    .tamHeroMedia,
    .tamHeroContent,
    .tamHeroBadgeDot{
        animation: none;
    }
    .tamHeroMedia img{
        top: 0;
        height: 100%;
        transform: none;
    }
    .tamHeroMedia video{
        top: 0;
        height: 100%;
        transform: none;
    }
}

main#home{
    background: #fff;
    section.promos-section{
        .wrap{
            .headerPromo{
                display: flex;
                flex-wrap: wrap;
                justify-content: center;
                align-items: center;
                padding:70px 0px 50px;
             
                text-align: center;
                h1{
                    text-transform: uppercase;
                    font-size: 2rem;
                    font-weight: 900;
                    margin: 0;
                    color: var(--color1);
                }
                a{
                    color: var(--color2);
                    font-size: 1.4rem;
                }
            }
            .promoCards{
                display: grid;
                grid-template-columns: repeat(1, 1fr);
                gap:0px 40px;
            }
            .boxButton{
                text-align: center;
                margin-top: clamp(72px, 7vw, 118px);
                margin-bottom: 80px;
                a{
                    min-width: 260px;
                    padding:15px 30px;
                }
            }
            @media screen and (width >= 768px) {
                .promoCards{
                    grid-template-columns: repeat(2, 1fr);
                }
            }
            @media screen and (width >= 768px) and (width <= 1024px) {
                .headerPromo h1{
                    font-size: 2em;
                }
            }
            @media screen and (width > 1024px) {
                .headerPromo{
                    justify-content: space-between;
                    text-align: left;
                }
            }
        }
    }
    section#instagram{
        .wrap{
            padding:90px 20px;
            .header{
                display: flex;
                flex-wrap: wrap;
                gap: 1rem;
                align-items: center;
                margin-bottom: 30px;
                .imgLogo{
                    width: 60px;
                    height: 60px;
                    border-radius: 50%;
                    overflow: hidden;
                    border:1px solid var(--color1);
                    img{
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                        object-position: center;
                    }
                }
                .txt{
                    h3{
                        font-size: 1.1em;
                        margin: 0;
                    }
                    span.fecha{
                        display: block;
                        font-size: .8em;
                    }
                }
            }
            ul{
                display: grid;
                grid-template-columns: repeat(1, 1fr);
                gap:1rem;
                list-style: none;
                li{
                    border-radius: var(--border-radius-big);
                    overflow: hidden;
                    position: relative;
                    transition: box-shadow 0.25s ease, transform 0.25s ease;
                    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
                    &:hover{
                        box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
                        transform: translateY(-3px);
                    }
                    &:nth-child(even){
                        grid-row: span 2;
                    }
                    &:nth-child(7){
                        grid-row: span 2;
                    }
                    &:nth-child(10){
                        grid-row: span 1;
                    }
                    &>img{
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                        object-position: center;
                        background-color: #464646;
                    }
                    &::before{
                        content: '';
                        position: absolute;
                        top:0;
                        left:0;
                        width: 100%;
                        height: 100%;
                        background-image: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,0) 50%);
                        z-index: 2;
                    }
                    .info{
                        position:absolute;
                        bottom:0;
                        left:0;
                        width: 100%;
                        height: auto;
                        z-index: 5;
                        display: grid;
                        grid-template-columns: 45px 1fr;
                        gap: 10px;
                        align-items: center;
                        padding:1rem;
                        color:#fff;
                        .instaLogo{
                            width: 45px;
                            height: 45px;
                            border-radius: 50%;
                            overflow: hidden;
                            border: 1px solid var(--color1);
                            img{
                                width: 100%;
                                height: 100%;
                                object-fit: cover;
                                object-position: center;
                            };
                        }
                        .txt{
                            h4{
                                font-size: .9em;
                                margin: 0;
                            }
                            span{
                                font-size: .75em;
                            }
                        }
                    }
                }
            }
            @media screen and (width > 1024px) {
                ul{
                    grid-template-columns: repeat(5, 1fr);
                    grid-template-rows: repeat(3, 150px);
                }
                
            }
        }
    }
}
div#titulo{
    position: absolute;
    left: 0;
    right: 0;
    bottom: -150px;
    z-index: 5;
    padding: 52px 0;
    pointer-events: none;
    width: 85vw;
    margin: 0 auto;
}
.tituloWrap{
    pointer-events: auto;
}
.tituloWrap{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    background-color: var(--color2);
    padding: 0 0 0 30px;
    text-align: left;
}
.tituloText h2,
.tituloText h1{
    margin: 0;
    color: #fff;
    font-size: 3em;
    font-weight: 300;
    letter-spacing: 0.02em;
}
@media screen and (width <= 768px){
    div#titulo{
        padding: 12px 0;
        bottom: -120px;
    }
    .tituloText .tituloLight{
        padding-left: 0;
        margin: 0;
        display: block;
    }
    .tituloText h2,
    .tituloText h1{
        font-size: 1.5em;
        line-height: 0.9;
    }
    .tituloType{
        min-height: calc(2 * 0.9em);
        overflow: hidden;
    }
    .tituloWrap{
        padding: 0 0 0 10px;
    }
    .tituloLogo{
        height: 140px;
        width: 60%;
        margin-left: auto;
    }
    .tituloLogoBox{
        width: calc(100% + 15px);
        background-color: #fff;
    }
    .tituloLogoBox .tituloBar{
        display: none;
    }
    .tituloLogo img{
        height: 26px;
        width: 65%;
        padding-right: 65px;
    }
    #logotitulo{
        padding-right: 10px;
        transform: translateX(-20px);
    }
}
@media screen and (width >= 769px){
    #home .promoCards .prInfo{
        align-items: center;
        min-height: 316px;
        position: relative;
        padding-bottom: 70px;
    }
    #home .promoCards .prInfo .desde{
        order: 1;
    }
    #home .promoCards .prInfo .estado{
        order: 2;
    }
    #home .promoCards .prInfo .txtInfo{
        order: 3;
        margin-top: -17px;
    }
    #home .promoCards .prInfo .promoBadges{
        order: 4;
        margin-top: 8px;
    }
    #home .promoCards .prInfo .promoProjectBtn{
        order: 5;
        margin-top: 0;
        align-self: center;
        position: absolute;
        bottom: 20px;
        left: 0;
        right: 0;
        width: fit-content;
        margin-inline: auto;
        transform: none;
        text-align: center;
    }
}
@media screen and (width >= 1024px){
    #home .promoCards{
        grid-template-columns: repeat(2, 1fr);
    }
}
@media screen and (width >= 769px){
    #home .promoCards .promoDivider{
        display: none;
    }
}
.tituloType{
    display: inline-flex;
    gap: 10px;
    align-items: baseline;
    flex-wrap: wrap;
}
.tituloTypeText{
    border-right: 2px solid #fff;
    padding-right: 6px;
    animation: tituloCaret 0.8s steps(1) infinite;
}
@keyframes tituloCaret{
    50%{
        border-color: transparent;
    }
}
.tituloText .tituloLight{
    font-weight: 300;
    padding: 0;
}
.tituloText .tituloBold{
    font-weight: 900;
}
.tituloLogoBox{
    display: flex;
    align-items: center;
    gap: 0;
    justify-self: end;
}
.tituloBar{
    width: 10px;
    height: 70px;
    background-color: var(--color1);
    display: inline-block;
    padding: 3px;
}
.tituloLogo{
    background-color: #fff;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    height: 200px;
}
.tituloLogo img{
    height: 50px;
    width: auto;
    display: block;
    padding-right: 40px;
}
@media screen and (width <= 768px){
    .tituloLogo{
        height: 140px;
    }
}
@media screen and (width <= 768px){
    #home .promos-section .wrap{
        max-width: none;
        padding: 0;
    }
    #home .promoCards{
        gap: 0;
    }
    #home .promoCards .promoDivider{
        display: block;
        width: 100%;
        height: 1px;
        margin: 0;
        border: 0;
        background: #e5e5e5;
    }
    #home .promoCards .prImg{
        border-radius: 0;
    }
    #home .promoCards .prImg.prImgVideo{
        padding-bottom: calc(73.333% - 55px);
    }
    #home .promoCards .prImg img,
    #home .promoCards .prImg video{
        border-radius: 0;
    }
    #home .promoCards .prInfo{
        align-items: center;
        min-height: 316px;
        position: relative;
        padding-bottom: 70px;
    }
    #home .promoCards .prInfo .desde{
        order: 1;
    }
    #home .promoCards .prInfo .estado{
        order: 2;
    }
    #home .promoCards .prInfo .promoBadges{
        order: 4;
        margin-top: 8px;
    }
    #home .promoCards .prInfo .promoProjectBtn{
        order: 5;
        width: fit-content;
        text-align: center;
        align-self: center;
        margin-top: 0;
        position: absolute;
        bottom: 20px;
        left: 0;
        right: 0;
        margin-inline: auto;
        transform: none;
    }
    #home .promoCards .prInfo .txtInfo{
        order: 3;
        margin-top: -17px;
    }
    #home .promoCards .prLogo .logoBold{
        font-size: clamp(1rem, 4.8vw, 1.32rem);
        white-space: nowrap;
    }
    #home .promoCards .prLogo .logoSub{
        font-size: 0.76em;
    }
}
@media screen and (width >= 769px){
    .tituloLogo{
        width: 250px;
        padding: 14px 22px;
    }
    #logotitulo{
        padding-left: 32px;
        transform: scale(1.2);
        transform-origin: left center;
    }
}
.floatingAgent{
    appearance: none;
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 92px;
    height: 92px;
    padding: 0;
    border-radius: 50%;
    background-color: #fff;
    display: grid;
    place-items: center;
    z-index: 999;
    border: 2px solid var(--color1);
    box-shadow: 0 0 0 rgba(196, 40, 26, 0.45);
    animation: floatingPulse 2.2s ease-out infinite;
    overflow: visible;
    cursor: pointer;
}
.floatingAgent img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.floatingAgentText{
    position: absolute;
    right: 110%;
    bottom: 6px;
    background-color: #fff;
    color: var(--color2);
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}
@media (width <= 768px){
    .floatingAgentText{
        display: none;
    }
}
.elfsight-app-00c1e084-d70c-4301-a26f-06dddb049867{
    padding-top: 120px;
    margin-top: 40px;
}
.viewportFade{
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
    pointer-events: none;
    z-index: 900;
}
@keyframes floatingPulse{
    0%{
        box-shadow: 0 0 0 0 rgba(196, 40, 26, 0.45);
    }
    70%{
        box-shadow: 0 0 0 18px rgba(196, 40, 26, 0);
    }
    100%{
        box-shadow: 0 0 0 0 rgba(196, 40, 26, 0);
    }
}
@keyframes promoBtnPulse{
    0%{
        box-shadow: 0 0 0 0 rgba(200, 24, 24, 0.45);
        transform: translateZ(0);
    }
    70%{
        box-shadow: 0 0 0 14px rgba(200, 24, 24, 0);
        transform: translateZ(0);
    }
    100%{
        box-shadow: 0 0 0 0 rgba(200, 24, 24, 0);
        transform: translateZ(0);
    }
}
.promoProjectBtn{
    align-self: flex-start;
    margin-top: 12px;
    padding: 12px 28px;
    font-size: 1.05rem;
    animation: promoBtnPulse 2.4s ease-in-out infinite;
}
.infoIcon{
    font-size: 20px;
    line-height: 1;
    color: var(--color2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

@media screen and (width >= 769px){
    #home .promoCards{
        gap: 100px 40px;
    }
    #home .promoCards .prCard{
        overflow: visible;
    }
    #home .promoCards .prImg,
    #home .promoCards .prImg img,
    #home .promoCards .prImg video{
        border-radius: var(--border-radius-big) !important;
    }
    #home .promoCards .prInfo{
        z-index: 3;
        margin: -34px 18px 0;
        min-height: 316px;
        padding-bottom: 70px;
        background: #fff;
        border-radius: var(--border-radius-big);
        box-shadow: 0 18px 44px rgba(36, 35, 30, 0.12);
    }
    #home .promoCards .prInfo .promoProjectBtn{
        position: absolute;
        bottom: 20px;
        left: 0;
        right: 0;
        width: fit-content;
        margin-inline: auto;
    }
}

@media screen and (width <= 768px){
    #home .promoCards{
        gap: 18px;
    }
    #home .promoCards .prInfo{
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

#home .promoCards .prCard,
#home .promoCards .prCard.scrollReveal,
#home .promoCards .prCard.reveal-left,
#home .promoCards .prCard.reveal-right,
#home .promoCards .prCard.reveal-up{
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}
#home .promoCards .scrollReveal,
#home .promoCards .reveal-left,
#home .promoCards .reveal-right,
#home .promoCards .reveal-up{
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    transition-delay: 0ms !important;
}

#home .promos-section,
#home .promos-section.scrollReveal,
#home .promos-section .wrap,
#home .promos-section .wrap.scrollReveal,
#home .promos-section .headerPromo,
#home .promos-section .headerPromo.scrollReveal{
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

@media screen and (width >= 769px){
    #home .promoCards{
        row-gap: 90px !important;
        column-gap: 40px !important;
    }
}
