* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#loader div {
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 6px solid #3498db;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.container-fluid {
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    width: 100%;
}

.encabezado-nosotros {
    background-image: url(/images/Nosotros/encabezado.jpg);
    box-shadow: inset -100rem -100rem rgba(0, 0, 0, 0.3);
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 70vh;
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.scale-up-center {
    text-align: left;
    animation: scale-up-center 0.4s ease-out;
}

@keyframes scale-up-center {
    0% {
        transform: scale(0.5);
    }
    100% {
        transform: scale(1);
    }
}

.encabezado-nosotros h1 {
    font-size: 4rem;
    margin-left: 6.5%;
    margin-bottom: 4.5rem;
    font-weight: 800;
}

.encabezado-nosotros p {
    font-size: 1.05rem;
    width: 40%;
    text-align: left;
    margin-left: 6.5%;
    font-weight: 700;
    line-height: 1.8rem;
}

.projects,
.icons,
.services,
.contact-map {
    text-align: center;
    margin-top: 90px;
}

/* Titulo general */
.animated-title {
    font-size: 32px;
    margin-bottom: 16px;
}

.hidden {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -100%, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fadeInDown {
    animation-name: fadeInDown;
}

.animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.projects h2,
.icons h2,
.services h2,
.contact-map h2 {
    font-size: 32px;
    margin-bottom: 16px;
    text-align: center;
}

.projects p,
.services p,
.contact-map p {
    font-size: 18px;
    margin-bottom: 32px;
}

.projects_casas,
.div_icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 80%;
    margin: auto;
}

.div_icons div {
    width: 50%;
    margin: auto;
}

.div_icons img {
    width: 100%;
    height: 100%;
}

.div_casa_general {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15);
    border-radius: 20px;
}

.div_casa_img,
.div_casa_texto {
    width: 95%;
    height: 100%;
    padding: 5px;
    margin-bottom: 5px;
}

.div_casa_texto h4 {
    padding: 5px;
    font-size: 20px;

}

.div_casa_texto p {
    font-size: 16px;
    border: #919090 1px solid;
    margin: 2px;
    padding: 5px;
}

.div_casa_texto p:hover{
    background-color: rgb(203, 239, 241);
} 

.div_casa_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.service-cards {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 1fr;
    width: 80%;
    margin: auto;
}

.service-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

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

.service-text {
    text-align: center;
    padding: 1rem;
}

.service-text h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.service-text p {
    font-size: 14px;
}

.map {
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.map p {
    margin-bottom: 15px;
    color: #555;
}

.map iframe {
    width: 100%;
    height: 400px;
    border: 0;
    border-radius: 10px;
}

@media (max-width: 1024px) {
    .projects_casas,
    .div_icons {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .encabezado-nosotros h1 {
        font-size: 3rem;
        margin-bottom: 3rem;
    }

    .encabezado-nosotros p {
        font-size: 1rem;
        width: 50%;
        line-height: 1.6rem;
    }

    .service-cards {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .service-card img {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .encabezado-nosotros h1 {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }

    .encabezado-nosotros p {
        font-size: 1rem;
        width: 70%;
        line-height: 1.5rem;
    }

    .animated-title {
        font-size: 28px;
    }

    .projects p,
    .services p,
    .contact-map p {
        font-size: 16px;
    }

    .projects_casas,
    .div_icons {
        width: 90%;
    }

    .service-cards {
        grid-template-columns: 1fr;
    }

    .service-card img {
        height: 160px;
    }
}

@media (max-width: 480px) {
    .encabezado-nosotros h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .encabezado-nosotros p {
        font-size: 0.9rem;
        width: 90%;
        line-height: 1.3rem;
    }

    .animated-title {
        font-size: 24px;
    }

    .projects p,
    .services p,
    .contact-map p {
        font-size: 16px;
    }

    .service-card img {
        height: 140px;
    }

    .service-text h3 {
        font-size: 18px;
    }

    .service-text p {
        font-size: 12px;
    }

    .map {
        padding: 15px;
    }
}
