/* =========================
   RESET / BASE
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Montserrat', sans-serif;
    height: 100%;
}

body {
    overflow-x: hidden;
    background: #e7e7e8;
}


/* =========================
   NAVBAR
========================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: transparent;
    z-index: 1000;
}

.nav-inner {
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    width: 100%;
}

.logo img {
    width: 10vw;
    height: auto;
    display: block;
}

.nav-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
}


/* =========================
   HAMBURGER BUTTON
========================= */

.menu-toggle {
    width: clamp(24px, 2vw, 32px);
    height: clamp(18px, 2.5vh, 24px);
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle span {
    height: 4px;
    width: 100%;
    background: #003449;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}


/* =========================
   SIDE MENU
========================= */

.side-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: #d0d8df;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 1050;
    padding-top: 120px;
}

.side-menu.open {
    transform: translateX(0);
}

.side-menu ul {
    list-style: none;
    padding: 0 32px;
}

.side-menu li {
    margin-bottom: 24px;
}

.side-menu a {
    color: #003449;
    text-decoration: none;
    font-size: 1.2rem;
}

.side-menu a:hover {
    opacity: 0.7;
}

.menu-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: #003449;
    font-size: 2rem;
    cursor: pointer;
}


/* =========================
   MENU OVERLAY
========================= */

.menu-overlay {
    position: fixed;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1040;
}

.menu-overlay.open {
    opacity: 1;
    pointer-events: all;
}


/* =========================
   CONTACT BUTTON
========================= */

.contact-btn {
    background: #bcc7d0;
    color: #003449;
    border: none;
    padding: 20px 20px;
    border-radius: 20px;
    font-size: 1.2rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease, color 0.3s ease;
}

.contact-btn:hover {
    background: #003449;
    color: white;
}

.contact-btn--menu {
    width: 100%;
    margin-top: 20px;
    text-align: center;
}


/* =========================
   CONTACT MODAL
========================= */

#form-result {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #003449;
    min-height: 20px;
}


.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
}

.contact-modal.open {
    display: block;
}

.contact-overlay {
    position: absolute;
    inset: 0;
    background: rgba(77, 87, 91, 0.6);
    backdrop-filter: blur(4px);
}

.contact-box {
    position: relative;
    width: 90%;
    max-width: 500px;
    margin: 10vh auto;
    background: #bcc7d0;
    padding: 32px;
    color: #003449;
    border-radius: 12px;
    z-index: 1;
}

.contact-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #003449;
    font-size: 1.5rem;
    cursor: pointer;
}

.contact-box h2 {
    margin-bottom: 16px;
}

.contact-box form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-box input,
.contact-box textarea {
    background: #d0d8df;
    border: 1px solid #d0d8df;
    color: #003449;
    padding: 10px;
    border-radius: 6px;
    font-family: inherit;
}

.contact-box textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-box button[type="submit"] {
    background: #003449;
    border: none;
    color: white;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
}

.contact-box button[type="submit"]:hover {
    opacity: 0.9;
}


/* =========================
   SECTIONS
========================= */

section {
    min-height: 100vh;
    width: 100%;
    background: #e7e7e8;
    display: flex;
    align-items: center;
}

section article {
    width: 100%;
    margin: 0;
    display: flex;
    align-items: flex-start;
    padding: 0px 5vw 0px 15vw;
}

/* =========================
   TEXT BLOCK
========================= */

.text {
    flex: 1;
    max-width: 550px;
    color: #003449;
    margin-right: 25px;
}

.text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.text h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.text p {
    font-size: 1.2rem;
    line-height: 1.7;
    max-width: 520px;
}


.highlight {
    background: linear-gradient(transparent 0%,#d0d8df 7%);
    border-radius: 4px;
    padding: 0 4px;
}


/* =========================
   SUB_IMAGE BLOCK
========================= */

.sub_image {
    padding-top: 30px;
}

.sub_image figure {
    padding: 15px 30px 15px 30px;
    border-radius: 25px;
    background-color: #d0d8df;
}

.sub_image img {
    width: 25vw;
    height: auto;

}


/* =========================
   IMAGE BLOCK
========================= */

.image {
    flex: 1;
    justify-content: center;
    display: flex;
}

.image figure {
    max-width: 450px;
}

.image img {
    width: 35vw;
    height: auto;
    display: block;
    object-fit: contain;
}






/* =========================
   SPECIFICATION BLOCK
========================= */

.specification {
    margin-top: 2rem;

}

.specification p {
    font-size: 1rem;
    padding: 5px 5px 5px 5px;
    border-top: 1px solid #003449;
}





/* =========================
   PDF LIST (COMO PENSAMOS)
========================= */

.pdfs {
    display: flex;
    width: 35vw;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

/* clickable row */
.pdf-icon {
    display: flex;
    align-items: center;
    gap: 20px;

    padding: 20px;
    border-radius: 20px;
    background: #bcc7d0;

    text-decoration: none;
    color: #003449;

    transition: transform 0.2s ease, background 0.3s ease;
}

/* icon */
.pdf-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;

    /* THIS replaces invert */
    filter: brightness(0) saturate(100%) invert(16%) sepia(18%) saturate(1200%) hue-rotate(165deg);
}

/* text */
.pdf-text {
    display: flex;
    flex-direction: column;
}

.pdf-text h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.pdf-text p {
    font-size: 0.95rem;
    line-height: 1.4;
    opacity: 0.8;
}

/* hover */
.pdf-icon:hover {
    transform: translateX(5px);
    background: #003449;
    color: white;
}

/* make text fully white on hover */
.pdf-icon:hover h3,
.pdf-icon:hover p {
    color: white;
    opacity: 1;
}

/* make SVG white properly */
.pdf-icon:hover img {
    filter: brightness(0) invert(1);
}





/* =========================
   PDF MODAL
========================= */

.pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: none;
}

.pdf-modal.open {
    display: block;
}

.pdf-overlay {
    position: absolute;
    inset: 0;
    background: rgba(77, 87, 91, 0.6);
    backdrop-filter: blur(4px);
}

.pdf-box {
    position: relative;
    width: 90%;
    max-width: 500px;
    margin: 20px auto;
    background: #bcc7d0;
    padding: 32px;
    color: #003449;
    border-radius: 12px;
    z-index: 1;
}

.contact-box,
.pdf-box {
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pdf-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #003449;
    font-size: 1.5rem;
    cursor: pointer;
}

.pdf-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.pdf-list a {
    text-decoration: none;
    background: #d0d8df;
    padding: 12px;
    border-radius: 8px;
    color: #003449;
    transition: 0.2s ease;
}

.pdf-list a:hover {
    background: #003449;
    color: white;
}







/* =========================
   CONTACT SECTION LAYOUT
========================= */

.contacto {
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
}

.contacto article {
    padding: 0px 5vw 30px 5vw;
    margin-top: 100px;
    justify-content: center;
}


/* =========================
   FOOTER
========================= */

.site-footer {
    width: 100%;
    background: #bcc7d0;
    color: #003449;
    padding: 64px 15vw 32px;
}

.footer-col {
    font-size: 0.9rem;
    line-height: 1.6;
}

.site-footer a {
    color: #003449;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(0,0,0,0.2);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
}

/* =========================
   FOOTER SOCIAL
========================= */

.footer-top {
    max-width: 1200px;
    margin: 0 auto 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}


.footer-contact {
    flex: 1;
}

.footer-social {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    align-items: start;
}


.social-icons {
    display: flex;
    padding: 0px 10vw 0px;
    gap: 30px;
}

.social-icons img {
    width: 50px;
    height: auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icons img:hover {
    transform: scale(1.1);
    opacity: 0.8;
}






/* =========================
   PROYECTOS SECTION LAYOUT
========================= */

.proyectos article {
    flex-direction: column;
    align-items: flex-start;
}

/* =========================
   PROYECTOS CAROUSEL
========================= */

.proyectos-carousel {
    position: relative;
    width: 90%;
    padding: 0 70px;
}

.carousel-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;

    display: flex;
    align-items: center;
}

.carousel-track {
    position: relative;
    width: 100%;
    min-height: 500px;

    display: flex;
    align-items: center;
}

.proyecto-card {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 40px 30px;
    gap: 20px;

    opacity: 0;
    pointer-events: none;


}

.proyecto-card.active {
    opacity: 1;
    pointer-events: auto;
}

/* text grows naturally */
.cardtext {
    flex: 1 1 500px;
    max-width: 700px;
    color: #003449;
}

.cardtext h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.cardtext p {
    font-size: 1rem;
    line-height: 1.7;
}

/* image right */
/* image takes only what it needs */
.cardimage {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
}

.cardimage img {
    width: clamp(100px, 15vw, 200px);
    height: auto;
    object-fit: contain;
}

/* arrows */

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #bcc7d0;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    color: #003449;
    z-index: 10;
    transition: background 0.3s ease;
}

.carousel-btn:hover {
    background: #003449;
    color: white;
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}






/* ==================================================
   MOBILE LANDSCAPE
================================================== */

@media (max-width: 900px) and (orientation: landscape) {


    html,
    body {
        overscroll-behavior: none;
        touch-action: none;
    }

    .contact-box,
    .pdf-box {
        touch-action: auto;
        overflow-y: auto;
    }



    /* =========================
       NAVBAR
    ========================= */

    .navbar {
        height: 56px;
    }

    .logo img {
        width: 80px;
    }

    /* =========================
       GLOBAL LAYOUT
    ========================= */

    section {
        min-height: 90vh;
    }

    section article {
        padding: 50px 4vw 20px 15vw;
        align-items: center;
    }

    /* =========================
       TEXT
    ========================= */

    .text {
        max-width: 380px;
        margin-right: 16px;
    }

    .text h1 {
        font-size: 1.5rem;
        line-height: 1.08;
        margin-bottom: 10px;
    }

    .text h2 {
        font-size: 1rem;
        line-height: 1.08;
        margin-bottom: 10px;
    }

    .text p {
        font-size: 0.65rem;
        line-height: 1.45;
    }

    /* =========================
       BUTTONS
    ========================= */

    .contact-btn {
        font-size: 1rem;
        padding: 12px 14px;
        border-radius: 14px;
    }

    .contact-btn--menu {
        margin-top: 14px;
    }

    /* =========================
       MAIN IMAGE
    ========================= */

    .image img {
        width: 30vw;
    }

    /* =========================
       SUB IMAGE
    ========================= */

    .sub_image {
        padding-top: 16px;
    }

    .sub_image figure {
        padding: 8px 14px;
        border-radius: 18px;
    }

    .sub_image img {
        width: 30vw;
    }

    /* =========================
       PDF SECTION
    ========================= */

    .pdfs {
        width: 31vw;
        gap: 6px;
        margin-top: 6px;
    }

    .pdf-icon {
        padding: 10px;
        gap: 10px;
        border-radius: 14px;
    }

    .pdf-icon img {
        width: 30px;
        height: 30px;
    }

    .pdf-text h3 {
        font-size: 0.70rem;
        margin-bottom: 2px;
    }

    .pdf-text p {
        font-size: 0.65rem;
        line-height: 1.25;
    }

    .pdf-box {
    margin: 2vh auto;
    }

    .pdf-box h2 {
        font-size: 0.75rem;
    }

    .pdf-list a {
        font-size: 0.35rem;
        padding: 5px;
    }


    .pdf-list {
    gap: 5px;
    }

    /* =========================
       SPECIFICATION
    ========================= */

    .specification {
        margin-top: 16px;
    }

    .specification p {
        font-size: 0.6rem;
        line-height: 1.3;
    }

    /* =========================
       SIDE MENU
    ========================= */

    .side-menu {
        width: 260px;
        padding-top: 80px;
    }

    .side-menu li {
        margin-bottom: 14px;
    }

    .side-menu a {
        font-size: 1rem;
    }

    /* =========================
       PROYECTOS
    ========================= */


    .proyectos h2 {
        margin-bottom: 0px;
    }

    .proyectos-carousel {
        width: 100%;
        padding: 0 30px;
    }

    .carousel-track {
        min-height: 200px;
    }

    .proyecto-card {
        padding: 10px;
        gap: 16px;
    }

    .cardtext {
        max-width: 520px;
    }

    .cardtext h1 {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }

    .cardtext p {
        font-size: 0.4rem;
        line-height: 1.4;
    }

    .cardimage img {
        width: 10vw;
    }

    .carousel-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    /* =========================
    CONTACT SECTION
    ========================= */

    .contacto {
        height: 80vh;

        display: flex;
        flex-direction: column;

        justify-content: space-between;

        overflow: hidden;
    }


    .contacto h1 {
        font-size: 1.2rem;
    }

    .contacto article {
        flex: 1;

        margin-top: 20px;

        display: flex;
        align-items: center;
        justify-content: center;

        min-height: 0;
    }


    .contacto .text {
        max-width: 500px;
    }


    .contact-box {
        height: 75vh;
        margin: 20px auto;
        background: #bcc7d0;
        padding: 20px;
        color: #003449;
        border-radius: 12px;
        z-index: 1;
    }

    .contact-box h2 {
    font-size: 1.2rem;
    }

    .contact-box form {
    gap: 5px;
    }

    .contact-box textarea {
    min-height: 50px;
    }


        /* =========================
        FOOTER
        ========================= */

        .site-footer {
            padding: 20px 8vw 30px 8vw;
            flex-shrink: 0;
        }

        .footer-col {
            font-size: 0.5rem;
        }

        .footer-bottom {
            font-size: 0.5rem;
            padding-top: 5px;
        }

        .social-icons {
            gap: 10px;
            padding: 0;
        }

        .social-icons img {
            width: 25px;
        }

    }



/* ==================================================
   MOBILE PORTRAIT
================================================== */

@media (max-width: 600px) {



    html,
    body {
        overscroll-behavior: none;
        touch-action: none;
    }

    .contact-box,
    .pdf-box {
        touch-action: auto;
        overflow-y: auto;
    }

    /* =========================
       GLOBAL LAYOUT
    ========================= */

    section {
        min-height: 90vh;
        padding: 0;

        display: flex;
        align-items: center;

        overflow: hidden;
    }

    section article {
        height: 100%;

        display: flex;
        flex-direction: column;

        justify-content: center;
        align-items: center;

        gap: 14px;

        padding:
            80px   /* top navbar space */
            7vw
            24px;
    }

    .inicio article,
    .quehacemos article,
    .quehacemosposible article {
        flex-direction: column-reverse;
        gap: 40px;
    }

    .comopensamos article {
        gap: 50px;
    }

    /* =========================
    TRUE VERTICAL CENTERING
    ========================= */

    section article {
        justify-content: center;
        align-items: center;

        padding-top: 80px;
        padding-bottom: 40px;
    }

    /* remove leftover horizontal-layout spacing */
    .text {
        margin: 0;
    }

    /* make image blocks stop reserving weird space */
    .image,
    .pdfs,
    .sub_image {
        flex: 0 0 auto;
    }

    /* prevent sections from sticking to the top */
    .text,
    .image,
    .pdfs {
        justify-content: center;
    }


    /* =========================
       NAVBAR
    ========================= */

    .navbar {
        height: 64px;
    }

    .nav-inner {
        padding: 0 16px;
    }

    .logo img {
        width: 120px;
    }

    .menu-toggle {
        width: 24px;
        height: 18px;
    }

    .menu-toggle span {
        height: 3px;
    }


    /* =========================
       TEXT
    ========================= */

    .text {
        width: 100%;
        max-width: 100%;

        margin-right: 0;

        text-align: left;
    }

    .text h1 {
        font-size: 2rem;
        line-height: 1.05;
        margin-bottom: 10px;
    }

    .text h2 {
        font-size: 1.6rem;
        line-height: 1.05;
        margin-bottom: 10px;
    }

    .text p {
        font-size: 1rem;
        line-height: 1.45;
        max-width: 100%;
    }


    /* =========================
       BUTTONS
    ========================= */

    .contact-btn {
        font-size: 1.2rem;

        padding: 20px;

        border-radius: 25px;
    }

    .contact-btn--menu {
        margin-top: 12px;
    }


    /* =========================
       MAIN IMAGES
    ========================= */

    .image {
        width: 100%;
    }

    .image figure {
        max-width: 100%;
    }

    .image img {
        width: 85vw;
        object-fit: contain;
    }


    /* =========================
       SUB IMAGE
    ========================= */

    .sub_image {
        padding-top: 14px;
    }

    .sub_image figure {
        padding: 10px 14px;
        border-radius: 18px;
    }

    .sub_image img {
        width: 75vw;
        max-width: 400px;
    }


    /* =========================
       SPECIFICATION
    ========================= */

    .specification {
        margin-top: 14px;
    }

    .specification p {
        font-size: 0.68rem;
        line-height: 1.3;
        border-top: 1px solid #5f8290;
        color: #5f8290;
    }


    /* =========================
       PDF SECTION
    ========================= */

    .pdfs {
        width: 100%;

        gap: 10px;

        margin-top: 10px;
    }

    .pdf-icon {
        gap: 10px;

        padding: 12px;

        border-radius: 14px;
    }

    .pdf-icon img {
        width: 50px;
        height: 50px;
    }

    .pdf-text h3 {
        font-size: 1rem;
        margin-bottom: 2px;
    }

    .pdf-text p {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .pdf-list a {
        font-size: .8rem;
        padding: 6px;
    }
    /* =========================
       SIDE MENU
    ========================= */

    .side-menu {
        width: 100%;
        padding-top: 80px;
    }

    .side-menu li {
        margin-bottom: 16px;
    }

    .side-menu a {
        font-size: 1.5rem;
    }


    /* =========================
       PROYECTOS
    ========================= */

    .proyectos article {
        justify-content: center;
        gap: 10px;
    }

    .proyectos-carousel {
        width: 100%;

        margin-top: 0;

        padding: 10px 50px;
    }

    .proyecto-card {
        flex-direction: column-reverse;

        align-items: center;

        gap: 10px;

        padding: 0;
    }

    .cardtext {
        max-width: 100%;
        flex: 0;
    }

    .cardtext h1 {
        margin-bottom: 6px;
    }

    .cardtext p {
        font-size: 0.9rem;
        line-height: 1.4;
        
    }

    .cardimage img {
        width: 30vw;
    }

    .carousel-btn {
        width: 30px;
        height: 30px;

        font-size: 18px;
    }


    /* =========================
    CONTACT SECTION
    ========================= */

    .contacto {
        min-height: 90vh;

        display: flex;
        flex-direction: column;

        justify-content: space-between;
    }

    .contacto article {
        flex: 1;

        margin-top: 0;

        display: flex;
        align-items: center;
        justify-content: center;

        padding:
            80px
            7vw
            40px;
    }

    .contacto .text {
        max-width: 500px;
    }

     /* =========================
       FOOTER
    ========================= */

    .site-footer {
        padding: 30px 8vw 30px;
    }

    .footer-top {
        flex-direction: column;
        gap: 30px;
    }

    .social-icons {
        padding: 0;
        gap: 20px;
    }

    .social-icons img {
        width: 40px;
    }

}