/* home.css
    Mobile-first (mobile → tablet → desktop)
    - Responsive ONLY at the end
    - Cleaned duplicates
    - Consistent container + spacing
*/

/* ====== Fonts ====== */
@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* ====== Theme ====== */
:root{
    --bg: #ffffff;
    --text: #111;
    --muted: rgba(255,255,255,.75);
    --dark: #0b0b0b;
    --green: #2f6b4a;
    --green-2: #275a3e;

    --container: 1180px;
    --radius: 12px;

    /* Mobile-first hero height */
    --hero-h: 520px;

    /* Spacing */
    --section-pad: 3rem;

    /* Shadows */
    --shadow-1: 0 10px 28px rgba(0,0,0,.06);
    --shadow-2: 0 16px 36px rgba(0,0,0,.10);
}

/* ====== Base ====== */
*{ box-sizing: border-box; font-family: 'Montserrat', sans-serif; }

html, body{
    margin: 0;
    padding: 0;
    color: var(--text);
    background: var(--bg);
}

img{ max-width: 100%; display:block; }
a{ color: inherit; }
ul{ margin: 0; }
p{ margin: 0; }

/* ====== Layout helpers ====== */
.container{
    width: min(var(--container), 92%);
    margin: 0 auto;
}

.section{
    padding: var(--section-pad) 0;
}

.section h2{
    margin: 0 0 12px;
    line-height: 1.15;
}

.section p{
    max-width: 70ch;
    opacity: .85;
}

/* =========================================================
    HERO (Slider)
========================================================= */
.hero{
    position: relative;
    width: 100%;
    height: var(--hero-h);
    max-height: 100vh;
    overflow: hidden;
    color: #fff;
    margin: 0;
    padding: 0;
}

.hero-slider{
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide{
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease-in-out;
}

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

.hero__bg{
    position: absolute;
    inset: 0;
    background-color: rgba(0,0,0,0.5);
    background-size: cover;
    
    z-index: -1;
    transition: transform 0.5s ease-in-out;
}

.hero-slide.active .hero__bg{
    transform: scale(1.05);
}

.hero__bg::after{
    content:'';
    position:absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}

.hero__content{
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--container);
    padding: 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease 0.3s;
    text-align: left;
}

.hero-slide.active .hero__content{
    opacity: 1;
    transform: translateY(0);
}

.hero__title {
    font-size: 1.9rem;  
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,.3);
    display: inline-flex;  
    align-items: center;   
    gap: 8px;              
}

.hero__title-logo {
    height: 0.9em;        
    width: auto;
    display: inline-block; 
    vertical-align: middle; 
}

.hero__title-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero__subtitle{
    font-size: 1.05rem;
    margin: 0 0 1.5rem;
    opacity: .9;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
}

.hero__cta{
    display: inline-block;
    background-color: var(--green);
    color: #fff;
    padding: .9rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid var(--green);
    text-decoration: none;
}

.hero__cta:hover{
    background-color: transparent;
    color: #fff;
    border-color: #fff;
}

/* Hero controls */
.hero-controls{
    position: absolute;
    bottom: 7%;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    pointer-events: none;
}

.hero-control{
    pointer-events: auto;
    background: rgba(255,255,255,0.2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.hero-control:hover{
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.hero-control:focus{
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.hero-pagination{
    display: flex;
    gap: 10px;
    margin: 0 20px;
}

.hero-dot{
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active{
    background: #fff;
    transform: scale(1.2);
}

.hero-dot:focus{
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

@keyframes fadeIn{
    from{ opacity: 0; }
    to{ opacity: 1; }
}

/* =========================================================
    STATS (Impact Stats / Problem Snapshot)
========================================================= */
#impact-stats{
    background-color: #f5f5f5;
    padding: var(--section-pad) 0;
}

.stats__grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 2rem 0;
    perspective: 1000px;
}

.stat-card{
    background: transparent;
    height: 280px;
    perspective: 1000px;
}

.stat-card__inner{
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.stat-card:hover .stat-card__inner{
    transform: rotateY(180deg);
}

.stat-card__front,
.stat-card__back{
    position: absolute;
    inset: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.2rem;
    border-radius: 8px;
    background: #fff;
}

.stat-card__back{
    background-color: var(--green);
    color: #fff;
    transform: rotateY(180deg);
}

.stat__value{
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 0.5rem;
}

.stat__label{
    font-size: 1rem;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.stat__line{
    width: 50px;
    height: 3px;
    background-color: var(--green);
}

.stat__info{
    font-size: 1.05rem;
    font-weight: 600;
    padding: 10%;
}

/* =========================================================
    THE PROBLEM (carousel + text)
========================================================= */
.problem{
    padding: var(--section-pad) 0;
}

.problem__container{
    width: min(var(--container), 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: stretch;
}

.problem__media{
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 280px;
}

.carousel{
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-track{
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide{
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

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

.carousel-slide img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-nav{
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 2;
}

.carousel-dot{
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: 2px solid #fff;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.carousel-dot.active{
    background: var(--green);
    transform: scale(1.2);
}

.carousel-dot:focus{
    outline: none;
    box-shadow: 0 0 0 3px rgba(47,107,74,0.5);
}

.problem__overlay{
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(0,0,0,.10));
    pointer-events: none;
}

.problem__content{
    border-radius: 18px;
    padding: 22px;
    background: #fff;
    box-shadow: var(--shadow-1);
}

.problem__eyebrow{
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 10px;
    opacity: .7;
}

.problem__content h2{
    margin: 0 0 12px;
    line-height: 1.15;
}

.problem__content p{
    margin: 0 0 16px;
    line-height: 1.6;
}

.problem__list{
    padding-left: 18px;
    line-height: 1.7;
}

/* =========================================================
    OUR SOLUTION (cards)
========================================================= */
.solution-preview{
    background-color: #f5f5f5;
    padding: var(--section-pad) 0;
}

.solution-preview__container{
    width: min(var(--container), 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

.solution-preview__eyebrow{
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 10px;
    opacity: .7;
}

.solution-preview__content h2{
    margin: 0 0 12px;
    line-height: 1.15;
}

.solution-preview__content p{
    margin: 0 0 16px;
    line-height: 1.6;
}

.solution-preview__link{
    display: inline-block;
    font-weight: 600;
    text-decoration: none;
    color: var(--green);
}

.solution-preview__grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-top: 1.2rem;
}

.solution-card{
    background: #fff;
    border-radius: var(--radius);
    padding: 1.6rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.solution-card:hover{
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.solution-card__icon{
    width: 80px;
    height: 80px;
    background: var(--green);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.2rem;
    box-shadow: 0 4px 12px rgba(47,107,74,0.2);
}

.solution-card h3{
    margin: 0 0 6px;
    font-size: 16px;
}

.solution-card p{
    margin: 0;
    line-height: 1.5;
    opacity: .9;
}

/* =========================================================
    MATERIALS & PROCESS
========================================================= */
.process-preview{
    padding: var(--section-pad) 0;
}

.process-preview__container{
    width: min(var(--container), 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

.process-preview__eyebrow{
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 10px;
    opacity: .7;
}

.process-preview__content h2{
    margin: 0 0 12px;
    line-height: 1.15;
}

.process-preview__content p{
    margin: 0 0 16px;
    line-height: 1.6;
}

/* Chips */
.chips{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 22px;
}

.chip{
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(47,107,74,.10);
    border: 1px solid rgba(47,107,74,.18);
    color: var(--green);
    font-weight: 700;
    font-size: 13px;
}

/* Steps: 1 column on mobile */
.steps{
    margin: 1rem 0;
}

.step{
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: .5rem;
    background: #fff;
}

.step__num{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--green);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 4px;
}

.step__body h3{
    margin: 0 0 3px;
    color: var(--green);
    font-size: 1rem;
}

.step__body p{
    margin: 0;
    color: #555;
    font-size: 0.8rem;
    line-height: 1.5;
}

.process-preview__link{
    display: inline-block;
    font-weight: 600;
    text-decoration: none;
    color: var(--green);
}

.process-preview__media{
    border-radius: 18px;
    overflow: hidden;
    min-height: 260px;
}

.process-preview__media img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================================
    PROTOTYPES
========================================================= */
.prototypes-preview{
    background-color: #f5f5f5;
    padding: 4rem 0;
}

.prototypes-preview__container{
    width: min(var(--container), 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

.prototypes-preview__eyebrow{
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 10px;
    opacity: .7;
}

.prototypes-preview__content h2{
    margin: 0 0 12px;
    line-height: 1.15;
}

.prototypes-preview__content p{
    margin: 0 0 16px;
    line-height: 1.6;
}

.prototypes-preview__link{
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
    color: var(--green);
    margin: 30% auto;
    font-size: 18px;
}

.prototypes-preview__grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.prototype-card{
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-1);
    transition: transform .2s ease, box-shadow .2s ease;
}

.prototype-card:hover{
    transform: translateY(-4px);
    box-shadow: var(--shadow-2);
}

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

.prototype-card__body{
    padding: 12px 14px;
}

.prototype-card h3{
    margin: 0 0 4px;
    font-size: 15px;
}

.prototype-card p{
    margin: 0;
    opacity: .85;
    font-size: 14px;
}

/* =========================
    PANAMA EDITION – PROTOTYPE
    ========================= */
.prototype-card__media{
    position: relative;
    overflow: hidden;
}

/* Badge principal */
.panama-badge{
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 2px solid #1f3c88; /* azul Panamá */
    color: #1f3c88;
    font-weight: 900;
    font-size: .85rem;
    box-shadow: 0 8px 22px rgba(0,0,0,.18);
    z-index: 2;
    }

/* Refuerzo visual en la tarjeta */
.prototype-card--panama{
    border: 2px solid rgba(31,60,136,.35);
    box-shadow: 0 16px 36px rgba(0,0,0,.12);
}

/* Texto de origen */
.panama-origin{
    margin-top: 4px;
    font-size: .9rem;
    font-weight: 800;
    color: #1f3c88;
    }

/* Línea bandera Panamá (inequívoca) */
.prototype-card--panama::after{
    content:"";
    display:block;
    height:5px;
    width:100%;
    background: linear-gradient(
        0.25turn,
        #ff0000,
        #ffffff,
        #0000ff 
    );
}

/* =========================================================
    IMPACT
========================================================= */
.impact-preview{
    padding: var(--section-pad) 0;
}

.impact-preview__container{
    width: min(var(--container), 92%);
    margin: 0 auto;
}

.impact-preview__eyebrow{
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 10px;
    opacity: .7;
}

.impact-preview h2{
    margin: 0 0 10px;
    line-height: 1.15;
}

.impact-preview__subtitle{
    margin: 0 0 32px;
    opacity: .85;
}

.impact-preview__grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.impact-card{
    background: #fff;
    text-align: center;
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow-1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.impact-card:hover{
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.impact-card__icon{
    font-size: 26px;
    margin-bottom: 10px;
}

.impact-card h3{
    margin: 0 0 8px;
    font-size: 17px;
}

.impact-card p{
    margin: 0;
    line-height: 1.55;
    opacity: .9;
    text-align: left;
}

/* =========================================================
    FINAL CTA
========================================================= */
.final-cta{
    padding: 4rem 0;
    background: linear-gradient(135deg, #0f3d2e, #145a46);
    color: #fff;
}

.final-cta__container{
    width: min(var(--container), 92%);
    margin: 0 auto;
    text-align: center;
}

.final-cta h2{
    margin: 0 0 14px;
    font-size: clamp(24px, 2vw, 28px);
    line-height: 1.1;
}

.final-cta p{
    margin: 0 auto 28px;
    max-width: 50%;
    line-height: 1.6;
    opacity: .9;
}

.final-cta__actions{
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn{
    padding: 14px 22px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

.btn-primary{
    background: #fff;
    color: #0f3d2e;
}

.btn-secondary{
    border: 2px solid rgba(255,255,255,.7);
    color: #fff;
}

.btn-secondary:hover{
    background: rgba(255,255,255,.1);
}

/* =========================
    EcoSlides • Back to top
========================= */
.toTop{
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid rgba(47,107,74,.18);
    background: rgba(47,107,74,.92);
    color: #fff;

    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 999;

    box-shadow: 0 14px 30px rgba(0,0,0,.14);
    backdrop-filter: blur(8px);

    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(.98);
    transition: opacity .25s ease, transform .25s ease, background .2s ease, box-shadow .2s ease;
}

.toTop i{
    font-size: 18px;
    transform: translateY(-1px);
}

.toTop.is-visible{
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.toTop:hover{
    background: rgba(47,107,74,1);
    box-shadow: 0 18px 36px rgba(0,0,0,.18);
}

.toTop:active{
    transform: translateY(1px) scale(.98);
}

.toTop:focus-visible{
    outline: 3px solid rgba(47,107,74,.35);
    outline-offset: 3px;
}

/* =========================================================
    RESPONSIVE (Tablet → Desktop) — ONLY HERE
========================================================= */

/* Tablet */
@media (max-width: 480px){
    :root{
        --hero-h: 78vh;
    }

    .hero-slide:first-child .hero__bg {
        background-image: url('assets/img/Fotos/Home_2_min400.png');
        background-position: 80% 100%;
    }

    .stats__grid{
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .solution-preview__grid{
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .steps{
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .impact-preview__grid{
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .prototypes-preview__grid{
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .problem__media{
        height: 360px;
    }

    .hero__cta{
        padding: 1rem 2.2rem;
    }

    .toTop{
        width: 44px;
        height: 44px;
        right: 14px;
        bottom: 14px;
    }
    
    .toTop i{ font-size: 17px; }
}

/* Desktop */
@media (min-width: 900px){
    .stats__grid{
        grid-template-columns: repeat(4, minmax(0,1fr));
    }

    .problem__container{
        grid-template-columns: 1.2fr 1fr;
        gap: 28px;
    }

    .problem__media{
        height: 400px;
    }

    .solution-preview__container{
        grid-template-columns: 1fr;
    }

    .process-preview__container{
        grid-template-columns: 1fr 1.2fr;
        gap: 28px;
        align-items: center;
    }

    .prototypes-preview__grid{
        grid-template-columns: repeat(3, minmax(0,1fr));
    }

    .impact-preview__grid{
        grid-template-columns: repeat(3, minmax(0,1fr));
    }

    .solution-preview__grid{
        grid-template-columns: repeat(4, minmax(0,1fr));
    }

    .hero__title{
        font-size: 2.6rem;
    }

    .hero-controls{
        bottom: 15vh;
    }
}

/* Large desktop */
@media (min-width: 1100px){
    :root{
        --section-pad: 4rem;
    }
}
