* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: sans-serif;
    color: #FFFFFF;
    overflow-x: hidden;
}

body,
div,
ul,
nav,
header,
footer,
a,
li,
label {
    margin: 0;
    padding: 0;
}

.grid-container {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
        "header"
        "banner"
        "main"
        "footer";
    min-height: 100vh;
}

/*------- Header Section firts mobile -------*/
.header {
    width: 100vw;
    grid-area: header;
    background-color: #1A2A5A;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 20;
    text-align: center;
    font-size: 20px;
}

.header__open-nav-button {
    color: #355bcd;
    font-size: 2.5rem;
    font-weight: 600;
    position: absolute;
    right: 10px;
}

.header__checkbox {
    display: none;
}

.header__nav{
    display: none;
    position: absolute;
    background-color: inherit;
    height: 100vh;
    width: 100vw;
    top: 0;
    z-index: -1;
}


.header__nav-list {
    display: flex;
    flex-direction: column;
    height: 40vh;
    margin: auto;
    justify-content: space-evenly;
}

.header__checkbox:checked~.header__nav {
    display: flex;
}

.header__logo-container {
    padding-left: 20px;
}

.header__logo-container img {
    max-width: 200px;
    max-height: auto;
}

.header__nav-item {
    list-style: none;
}

.header__nav-item a {
    color: inherit;
    text-decoration: none;

}

.header__nav-item a:hover,
.header__nav-item a:active {
    text-decoration: underline;
}

/*------- Main Section firts desktop-------*/

.main {
    grid-area: main;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "about"
        "service"
        "gallery"
        "contact";
}

.main__img {
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}
/*------- Animation Main Section -------*/

.main__img {
    animation: aparecer 1s both;
}

@keyframes aparecer {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/*-------  Banners Section -------*/
.banner-container {
    width: 100vw;
    grid-area: banner;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 20px 0;
    background-color: #1A2A5A;
}

.banner {
    position: relative;
    background-color: #161D3B;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    padding: 20px 50px;
    clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 100%, 0 80%);
}

.banner span {
    font-size: 36px;
    font-weight: bold;
    color: #fff;
    letter-spacing: 2px;
}


/*-------  About Section -------*/
.about {
    background-color: #f9f9f9;
    color: #1A2A5A;
}

.about__content {
    padding: 50px 20px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px; 
}

.about__column {
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 300px; 
    box-sizing: border-box;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about__column-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    min-width: 300px; 
    background: #112D68;
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about__description {
    font-size: 16px;
    line-height: 1.8;
    color: #4A4A4A;
    margin-bottom: 15px;
    text-align: justify;
}

.about__quote {
    font-size: 18px;
    font-style: italic;
    color: #1A2A5A;
    border-left: 4px solid #1A2A5A;
    padding-left: 10px;
    margin-top: 20px;
}

.faq{
    max-width: clamp(300px,70%, 700px);
    margin: auto;
    padding: 10px;
}
.faq__option{
    background-color: var(--faq-color);
    margin: 7px;
    padding: 7px;
    max-height: 34px;
    transition: max-height 1.5s;
    overflow: hidden;
    border-radius: 10px;
    display: block;
    transition: max-height .5s;
}
.faq__option b{
    background-color: var(--dark-color);
    padding: 2px 4px;
    color: #fff;
    border-radius: 50%;
    margin-right: 4px;
}
.faq__option:has(input[type="checkbox"]:checked) {
    max-height: 150px;

}
.faq__option:has(input[type="checkbox"]:checked)  .content{
    animation: aparecer 1s both;
}

.faq__ask{
    user-select: none;
    position: relative;
}
.content{
    padding:5px 10px;
    margin-bottom: 0;
    margin:10px;
    font-size: .8rem;
    color: var(--text-color);
}
.faq__ask::marker{
    content: '';
}
.faq__ask::before{
    content: '▼';;
    position: absolute;
    right: 0;
    font-weight: 900;
}
input[type="checkbox"]{
    display: none;
}
.faq__option:has(input[type="checkbox"]:checked) .faq__ask::before{
    content: '-';
}


@keyframes aparecer{
    from{
        opacity: 0;
        translate: 0 -20px;
    }
    50%{
        border-top: 1px solid transparent;
    }
    to{
    opacity: 1;
    translate: 0 0;
    border-top: 1px solid var(--bg-color);
    }
}


/* -----SERVICE SECTION----- */

/* Service Section */
.service {
    grid-area: service;
    background: linear-gradient(to bottom, #f4f6fb, #e6ecf3);
}

.service__wrapper {
    width: 100vw;
    min-height: auto;
    text-align: center;
    color: #1A2A5A;
    font-size: 16px;
    line-height: 1.8;
    padding: 40px 20px;
}

.service__wrapper h2 {
    font-size: 24px;
    color: #1A2A5A;
    margin-bottom: 30px;
    font-weight: 700;
}

.service__wrapper h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #1A2A5A;
    margin: 15px auto 0 auto;
    border-radius: 2px;
}



.cards {
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    gap: 20px;
    transition: transform 0.5s ease-in-out;
}

.card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    width: 100%; 
    max-width: 300px; 
    height: 400px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
}

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

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

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; 
    height: calc(100% - 200px);
}
.card-content h2 {
    font-size: 14px;
    color: #1a2a5a;
    margin-bottom: 10px;
    white-space: normal; 
    width: 100%; 
}

.card-content p {
    font-size: 12px;
    color: #666;
    white-space: normal; 
}

.service__list-container {
    margin-top: 20px;
    padding: 0 20px;
}

.service__list ol {
    display: flex;
    flex-direction: column;
    padding: 0;
    list-style: none; 
}

.service__list li {
    color: #1A2A5A;
    font-size: 20px;
    border-radius: 10px;
    text-align: center;
    padding: 40px;
    margin-top: 10px;
    background-color: #f9f9f9; 
}


.service__list li:nth-child(1) {
    background-color: #6CA8F1;
}

.service__list li:nth-child(2) {
    background-color:#accbe3 ;
}

.service__list li:nth-child(3) {
    background-color: #8ab1cd;
}

.service__list li:nth-child(4) {
    background-color: #A9CBEF;
}

.service__list li:nth-child(5) {
    background-color: #9ACDFB;
}

.service__list li:nth-child(6) {
    background-color: #4B86B4;
}

.service__list li:nth-child(7) {
    background-color: #D6E6F2;
}


@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}


/* -----Gallery SECTION----- */

.gallery {
    grid-area: gallery;
    width: 100vw;
}

.portfolio {
    background: #f8f8f8;
}

.portafolio__wrapper {
    margin: 0 auto;
    padding: 0;
}

.portfolio-header {
    text-align: center;
    margin-bottom: 20px;
}


.portfolio-header h2 {
    font-size: 20px;
    color: #1A2A5A;
    margin-bottom: 10px;
}

.portfolio-header h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #1A2A5A;
    margin: 15px auto 0 auto;
    border-radius: 2px;
}

.portfolio-header nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.portfolio-header nav ul li {
    font-size: 12px;
}

.portfolio-header nav ul li a {
    text-decoration: none;
    color: #333;
    padding: 3px 8px;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portfolio-header nav ul li a:hover,
.portfolio-header nav ul li a.active {
    color: #fff;
    background: #142042;
}

.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    grid-auto-rows: 10px;
    gap: 10px;
    margin: 0 auto;
    box-sizing: border-box;
}


.gallery-item {
    display: none;
    position: relative;
    break-inside: avoid;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    overflow: hidden;

}


.gallery-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item {
    grid-row-end: span calc(var(--span, 1));
}


.gallery-item.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.9);
}

.gallery__image-container {
    text-align: center;
    margin-bottom: 20px;
}

.gallery__image-container h2 {
    font-size: 18px;
    color: #1A2A5A;
    margin-bottom: 10px;
}

.gallery__image-container h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #1A2A5A;
    margin: 15px auto 0 auto;
    border-radius: 2px;
}


.gallery__image {
    overflow: hidden;
    position: relative;
    max-width: 100%;
}

.gallery__image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-width: 100%;
    max-height: 100%;
    display: block;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

/* -----CONTACT SECTION----- */
.contact {
    grid-area: contact;
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: space-between;
    align-items: center;
    justify-items: center;
    background: linear-gradient(to bottom, #f4f6fb, #e6ecf3);
    padding: 50px 20px;
    gap: 100px;
    position: relative;
    animation: aparecer both;
    animation-timeline: view();
    animation-range: cover 20% contain 50%;
}

.contact__container::before {
    content: '';
    width: 2px;
    height: 80%;
    background-color: #1A2A5A;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.contact__contact-list-container,
.form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 700px;
    width: 100%;
    padding: 20px;
}


.contact__contact-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact__contact-list li {
    font-size: 1.2em;
    font-weight: bold;
    color: #1A2A5A;
    transition: color 0.3s ease, transform 0.3s ease;
    text-align: left;
}

.contact__contact-list li:hover {
    color: #142042;
    transform: translateX(10px);
}

.contact__links-container {
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.contact__links img {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: grayscale(50%);
}

.contact__links img:hover {
    transform: scale(1.2);
    filter: grayscale(0%);
}


.form__form {
    padding: 30px;
    max-width: 600px;
    width: 100%;
    display: grid;
    gap: 20px;
    border-radius: 15px;
    background-color: #ffffff;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1);
    color: #1A2A5A;
}

.form__input-container :is(input, textarea, button) {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
    color: #1A2A5A;
    transition: all 0.3s ease;
}

.form__input-container input:focus,
.form__input-container textarea:focus {
    border-color: #1A2A5A;
    outline: none;
    box-shadow: 0 0 10px rgba(26, 42, 90, 0.2);
}

.form__input-container textarea {
    resize: none;
    min-height: 150px;
    font-family: inherit;
}

.form__input-container button[type="submit"] {
    padding: 15px;
    font-size: 1em;
    background-color: #1A2A5A;
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 10px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.form__input-container button[type="submit"]:hover {
    background-color: #142042;
    transform: scale(1.05);
}

.error {
    font-size: 1em;
    color: #D32F2F;
    font-weight: bold;
    text-align: left;
    margin-top: -5px;
}

/* ---RESPONSIVE DESIGN--- */
@media (max-width: 768px) {
    .contact__container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact__container::before {
        display: none;
        /* Ocultamos la línea en dispositivos pequeños */
    }

    .contact__links-container {
        justify-content: center;
    }

    .form__form {
        width: 100%;
        padding: 20px;
    }

    .form__input-container button[type="submit"] {
        font-size: 0.9em;
    }
}

/* -----Contact queries---- */
@container form(max-width:56.25rem) {
    .form__form {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "name lastname"
            "email email"
            "message message"
            "button button";
        gap: 12px;
    }

    .form__input-container:first-child {
        grid-area: name;
    }

    .form__input-container:nth-child(2) {
        grid-area: lastname;
    }

    .form__input-container input:nth-child(3) {
        grid-area: email;
    }

    .form__input-container input:nth-child(4) {
        grid-area: message;
    }

    .form__input-container input:nth-child(5) {
        grid-area: button;
    }

    .form__input-container :is(input, textarea) {
        box-shadow: none;
        border-radius: 4px;
    }

}

/* -----Contact ends---- */



/*------- Footer Section -------*/

.footer {
    grid-area: footer;
    padding: 20px;
    background: linear-gradient(to top, #020c30, #1A2A5A);
    display: flex;
    flex-direction: column;
    /* Column layout for mobile */
    align-items: center;
    gap: 20px;
    /* Space between sections */
}

ul li:last-child {
    border-bottom: none;
}

.footer__logo-container img {
    max-width: 200px;
    /* Smaller logo for mobile */
}

.footer__nav-list-container,
.footer__contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center items for mobile */
    padding: 10px 0;
}

.footer__nav-list,
.footer__contact-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    /* Less space between items */
}

.footer__nav-list a,
.footer__contact-list a {
    text-decoration: none;
    color: #FFFFFF;
    font-size: 0.9em;
    /* Smaller text for mobile */
    transition: color 0.3s ease;
}

.footer__nav-list a:hover,
.footer__contact-list a:hover {
    color: #1A2A5A;
    text-decoration: underline;
}

.footer__links-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: center;
}

.footer__links img {
    width: 20px;
    /* Smaller icons for mobile */
    height: 20px;
    transition: transform 0.3s ease;
}

.footer__links img:hover {
    transform: scale(1.1);
}

.footer__map {
    display: flex;
    justify-content: center;
    align-items: center;
}



/*------- Whatsapp bottom Section -------*/
.whatsapp-button-container {
    position: fixed;
    bottom: 80px;
    right: 5px;
    z-index: 20;
}

.whatsapp-button {
    display: inline-block; 
    background: transparent; 
    border: none; 
    padding: 0; 
    cursor: pointer;
    transition: transform 0.3s ease; 
}

.whatsapp-button img {
    width: 64px;
    height: 64px;
    display: block; 
    border-radius: 50%; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}

.whatsapp-button img:hover {
    transform: scale(1.1); 
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* ----- media queries firt desktop ------*/

/* -----Header queries---- */
@media screen and (min-width: 720px) {
    .header {
        height: 130px;
        animation: header-movements 1s both;
        animation-timeline: scroll();
        animation-range: 10px 100px;
        position: sticky;
        top: 0;
    }

    .header__nav {
        max-height: 100vh;
        display: flex;
        position: static;
        height: auto;
        width: auto;
        justify-content: space-between;
        background-color: transparent;
        align-items: center;
    }

    .header__nav-list {
        display: flex;
        flex-direction: row;
        height: auto;
        width: auto;
        gap: 20px;
        margin-right: 40px;
    }

    .header__open-nav-button {
        display: none;
    }
}

/* ----- main queries---- */

@media (max-width: 768px) {
    .main__img {
        background-position: center;
        max-height: 100vh;
    }
}

@media (max-width: 480px) {
    .main__img {
        display: none;
    }
}

@media (max-width: 360px) {
    .main__img {
        background-image: linear-gradient(to right, rgba(0, 7, 34, 0.8), rgba(7, 2, 68, 0.3));
        min-height: 50vh;
    }
}

/* ----- banner queries---- */
@media screen and (min-width:720px) {
    .banner-container {
        justify-content: flex-end;
        align-items: flex-start;
    }
}

/* ----- about queries---- */

@media (min-width: 720px) {
    .about__subtitle{
        font-size: 36px;
    }
    .about__description{
        font-size: 20px;
    }
    .about__quote{
        font-size: 24px;
    }
    .about__column-list h2{
        font-size: 36px;
    }
    .about__column-list li{
        font-size: 20px;
    }
}
/* ----- services queries---- */

@media (min-width: 768px) {
        .service__list ol {
            flex-direction: row;
            flex-wrap: wrap;
            gap: 10px;
        }
    
        .service__list li {
            width: calc(25% - 10px); 
        }

        .service__list li:nth-child(n+5) {
            width: calc(33.333% - 10px); 
        }
}

@media (min-width: 720px) {
    .cards {
        flex-direction: row; 
        flex-wrap: wrap;
        gap: 30px;
    }

    .card {
        width: calc(33.333% - 30px); 
        height: 400px; 
    }
    .card-content h2 {
        font-size: 15px;
        max-width: fit-content;
        word-wrap: break-word;
        overflow-wrap: break-word; 
        white-space: normal;
    }

    .card-content p {
        font-size: 14px;
    }
}

@media screen and(min-widht: 600px){
    .faq{
        max-width: clamp(300px, 70%, 700px);
    }
}

/* ----- gallery queries---- */

@media (min-width: 720px) {
    .portfolio-header h2 {
        font-size: 24px;
    }

    .portfolio-header nav ul li {
        font-size: 16px;
        justify-content: space-around;
    }

    .portfolio-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .gallery__image-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .gallery__image-container h2 {
        font-size: 28px;
    }

    .gallery__image {
        max-width: 50%;

    }

    .gallery__image-container h2 {
        font-size: 24px;
    }
}


@media (min-width: 1024px) {
    .portfolio-header h2 {
        font-size: 28px;
    }

    .portfolio-header nav ul {
        justify-content: center;
    }

    .portfolio-gallery {

        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .gallery__image-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .gallery__image-container h2 {
        font-size: 28px;
    }

    .gallery__image {
        max-width: 50%;

    }

    .portfolio-header nav ul li {
        font-size: 18px;
    }
}

/* ----- footer queries---- */

@media (min-width: 720px) {
    .footer {
        flex-direction: row;
        justify-content: space-between;
        padding: 50px;
    }

    .footer__logo-container img {
        max-width: 320px;
    }

    .footer__nav-list-container,
    .footer__contact-container {
        align-items: flex-start;
        padding: 20px 0;
    }

    .footer__nav-list,
    .footer__contact-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .footer__nav-list a,
    .footer__contact-list a {
        font-size: 1em;
    }

    .footer__links img {
        width: 24px;
        height: 24px;
    }
}



/*-------- animations queries -------*/

/* ------- ANIMATION HEADER ----- */
@keyframes header-movements {
    0% {
        padding: 20px 0;
        background-color: #1A2A5A;

    }

    100% {
        padding: 10px;
        background-color: #1a2a5ab5;
    }
}