@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&display=swap');

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

.hero {
    width: 100%;
    height: 100vh;
    position: relative;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: center;
}

nav {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    padding: 0 8%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.1rem;
    background-color: rgba(255, 255, 255, 0.8);
}

nav .logo {
    width: 200px;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style-type: none;
    font-family: 'Montserrat', serif;
    margin: 0;
    padding: 0;
}

nav li {
    margin: 0 1.5rem;
    position: relative;
}

nav a {
    text-decoration: none;
    color: #221712;
    padding: 1rem 0;
    transition: color 0.3s ease;
}

nav a::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: rgb(110, 110, 110);
    transition: width 0.3s ease;
}

nav a:hover {
    color: rgb(110, 110, 110);
}

nav a:hover::before {
    width: 100%;
}

.contenedor {
    text-align: center;
    display: block;
}

.contenedor h1 {
    font-size: 60px;
    color: #fff;
    font-weight: 400;
    transition: 0.5s;
    /* Transición de color */
    white-space: nowrap;
    /* Mantener el texto en una sola línea */
    overflow: hidden;
    /* Evitar desbordamiento */
    border-right: 2px solid #fff;
    /* Cursor de escritura */
    border-right: none;
    -webkit-text-stroke: 2px #fff;
}

.contenedor h1:hover {
    -webkit-text-stroke: 2px #fff;
    color: transparent;
}

.contenedor a {
    text-decoration: none;
    display: inline-block;
    color: #fff;
    font-size: 18px;
    border: 2px solid #fff;
    padding: 14px 50px;
    border-radius: 50px;
    margin-top: 10px;
}

.back-video {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: -1;
}

/* 3 barras */
#checkbox {
    display: none;
}

.toggle {
    position: relative;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition-duration: .3s;
}

.bars {
    width: 100%;
    height: 4px;
    background-color: rgb(0, 0, 0);
    border-radius: 5px;
    transition-duration: .3s;
}

#checkbox:checked+.toggle .bars {
    margin-left: 13px;
}

#checkbox:checked+.toggle #bar2 {
    transform: rotate(135deg);
    margin-left: 0;
    transform-origin: center;
    transition-duration: .3s;
}

#checkbox:checked+.toggle #bar1 {
    transform: rotate(45deg);
    transition-duration: .3s;
    transform-origin: left center;
}

#checkbox:checked+.toggle #bar3 {
    transform: rotate(-45deg);
    transition-duration: .3s;
    transform-origin: left center;
}

/* Fin de 3 barras */

.toggle {
    display: none;
}

/*****************************************/
/* INICIO PROYECTOS */
/*****************************************/

.projects-page-wrapper {
    width: 100%;
    overflow-x: hidden;
    /* Evita desbordamiento horizontal */
}

/* --- Contenedor de CADA sección (Residencial, Comercial, etc.) --- */
.project-category-section {
    width: 100%;
    padding: 4rem 2rem;
    /* Espacio vertical y horizontal */
    box-sizing: border-box;
}

/* Damos un color de fondo alterno para separar visualmente las categorías */
.project-category-section:nth-child(odd) {
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Título de la Categoría (Residencial, Comercial, etc.) */
.category-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: #6d6d6d;
    /* Azul corporativo HERA */
    text-align: center;
    margin-bottom: 3.5rem;
    border-bottom: 3px solid #6d6d6d;
    padding-bottom: 1rem;
    display: inline-block;
    /* Para que el border-bottom se ajuste al texto */
    /* Centrado */
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* Lista que contiene los 5 proyectos */
.project-list-container {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    /* Espacio entre cada proyecto */
}

/* --- Cada Fila de Proyecto (Imagen + Texto) --- */
.project-item {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.1);
}

/* --- LA MAGIA DE LA ALTERNANCIA --- */
/* Por defecto: Imagen Izquierda, Texto Derecha */
.project-image {
    flex: 1;
    /* Ocupa 50% */
    min-width: 50%;
}

.project-description {
    flex: 1;
    /* Ocupa 50% */
    min-width: 50%;
    padding: 3rem;
    box-sizing: border-box;
}

/* En el item #2, #4 (hijo par), invertimos el orden */
.project-item:nth-child(even) {
    flex-direction: row-reverse;
}

/* En las secciones con fondo blanco, las tarjetas son grises */
.project-category-section:nth-child(odd) .project-item {
    background-color: #f9f9f9;
}


.project-image img {
    width: 100%;
    height: 400px;
    /* Altura fija para alinear todo */
    object-fit: cover;
    /* Evita que la imagen se deforme */
    display: block;
}

.project-description .project-tag {
    display: inline-block;
    background-color: #e0eafc;
    /* Azul claro */
    color: #0d47a1;
    /* Azul oscuro */
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.project-description h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 1rem 0;
}

.project-description p {
    font-size: 1rem;
    font-weight: 300;
    color: #555;
    line-height: 1.7;
    margin: 0;
}

/* --- EL DISEÑO MÓVIL "AÚN MEJOR" --- */
@media (max-width: 768px) {
    .project-category-section {
        padding: 3rem 1rem;
        /* Menos padding en móvil */
    }

    .category-title {
        font-size: 2rem;
        /* Título más pequeño */
        margin-bottom: 2.5rem;
    }

    /* Forzamos a que TODOS los items sean una columna */
    .project-item,
    .project-item:nth-child(even) {
        flex-direction: column;
    }

    .project-item {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    }

    .project-image {
        width: 100%;
        min-width: 100%;
    }

    .project-image img {
        height: 250px;
        /* Altura más adecuada para móvil */
    }

    .project-description {
        width: 100%;
        min-width: 100%;
        padding: 2rem;
    }

    .project-description h3 {
        font-size: 1.5rem;
    }
}

/*****************************************/
/* FIN DE PROYECTOS */
/*****************************************/


/*****************************************/
/* INICIO DE FOOTER */
/*****************************************/
.site-footer {
    background-color: #4e4e4e;
    /* Azul corporativo muy oscuro */
    color: #dddddd;
    /* Texto gris-azulado claro */
    padding: 4rem 2rem 0 2rem;
    box-sizing: border-box;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    /* 4 columnas en desktop */
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    /* Espacio entre columnas */
}

/* --- Estilos comunes para las columnas --- */
.footer-column {
    padding: 0 1rem;
}

.footer-column h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    /* Títulos en blanco */
    margin: 0 0 1.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #d1d1d1;
    /* Línea de acento azul */
    padding-bottom: 0.5rem;
    display: inline-block;
}

.footer-column p,
.footer-column li {
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 300;
}

.footer-column a {
    color: #dbdcdd;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-column a:hover {
    color: #ffffff;
    padding-left: 5px;
    /* Pequeño efecto de hover */
}

/* --- Columna 1: Logo, Frases, Misión/Visión --- */
.footer-logo {
    width: 120px;
    height: auto;
    margin-bottom: 1.5rem;
}

.footer-phrase {
    font-style: italic;
    color: #ffffff;
    font-weight: 400;
    margin-bottom: 0.5rem;
    border-left: 3px solid #eaebec;
    padding-left: 1rem;
}

.footer-phrase:last-of-type {
    margin-bottom: 2rem;
}

.footer-mission-vision h5 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    margin: 1.5rem 0 0.5rem 0;
}

/* --- Columna 2: Navegación --- */
.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav-list li {
    margin-bottom: 1rem;
}

/* --- Columna 3: Contacto --- */
.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.footer-contact-list .icon {
    width: 18px;
    height: 18px;
    margin-right: 1rem;
    flex-shrink: 0;
    margin-top: 5px;
    /* Alinear con el texto */
}

/* --- Columna 4: Mapa --- */
.footer-map {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    /* <--- AÑADIDO: Necesario para posicionar el botón */
}

.footer-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(100%) opacity(0.8);
    transition: filter 0.3s ease;
}

.footer-map:hover iframe {
    filter: grayscale(0%) opacity(1);
}

/* --- NUEVO: Botón "Cómo Llegar" sobre el mapa --- */
.footer-map-button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;

    background-color: white;
    color: #0d47a1;
    /* Azul corporativo */
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
    /* Evita que el texto se parta */
}

.footer-map-button:hover {
    transform: translateX(-50%) scale(1.05);
    background-color: #000000;
}

/* --- Sub-Footer (Copyright y Redes) --- */
.sub-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
}

.sub-footer p {
    margin: 0;
    font-size: 0.85rem;
}

.footer-social-links {
    display: flex;
    gap: 1rem;
}

.footer-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
/* --- Responsive --- */

/* Tablets */
@media (max-width: 992px) {
    .footer-container {
        /* 2 columnas */
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-column.map {
        /* El mapa ocupa todo el ancho en 2da fila */
        grid-column: 1 / -1;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .footer-container {
        /* 1 columna */
        grid-template-columns: 1fr;
    }

    .footer-column {
        padding: 0;
        /* Sin padding lateral */
    }

    .sub-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-social-links {
        order: -1;
        /* Redes primero */
    }
}

/*****************************************/
/* FIN DE FOOTER */
/*****************************************/


@media (max-width: 768px) {
    nav ul {
        display: none;
        /* Ocultar el menú por defecto en móviles */
        flex-direction: column;
        position: absolute;
        top: 60px;
        /* Ajusta según sea necesario */
        left: 0;
        background-color: transparent;
        /* Fondo del menú */
        width: 100%;
        padding: 10px 0;
    }

    nav ul.active {
        display: flex;
        /* Mostrar el menú al activar */
    }

    .toggle {
        display: flex;
        /* Mostrar el toggle en móviles */
    }

    nav li {
        margin: 50px 0;
        /* Espaciado para elementos de menú en móvil */
        text-align: center;
        /* Centrar texto */
    }

    .hero {
        padding: 0 2%;
        /* Reduce el padding para móviles */
    }

    .back-video {
        position: absolute;
        top: 50%;
        /* Centrar verticalmente */
        left: 50%;
        /* Centrar horizontalmente */
        width: 100%;
        /* Ancho completo */
        height: 100%;
        /* Altura completa */
        object-fit: cover;
        /* Asegura que el video cubra el contenedor sin distorsión */
        transform: translate(-50%, -50%);
        /* Centrar el video */
        z-index: -1;
        /* Asegurar que esté detrás de otros elementos */
    }

    nav {
        padding: 25px 5%;
        /* Ajustar padding en móviles */
        font-size: 0.9rem;
        /* Tamaño de fuente más pequeño en móviles */
    }

    nav .logo {
        width: 150px;
        /* Tamaño del logo más pequeño */
    }

    nav ul {
        flex-direction: column;
        /* Cambiar a columna en móviles */
        display: none;
        /* Ocultar el menú por defecto */
        position: absolute;
        top: 90px;
        /* Ajustar según sea necesario */
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.3);
        /* Fondo del menú */
        padding: 30px 0;
    }

    nav ul.active {
        display: flex;
        /* Mostrar el menú al activar */
    }

    nav li {
        margin: 10px 0;
        /* Ajustar margen para elementos en móvil */
        text-align: center;
        /* Centrar texto */
    }

    .contenedor {
        padding: 0 5%;
        /* Añadir padding para evitar que el texto toque los bordes */
    }

    .contenedor h1 {
        font-size: 5.5vw;
        /* Adaptar tamaño del texto */
        color: #fff;
    }


    .contenedor a {
        font-size: 3vw;
        /* Tamaño de fuente responsive */
        padding: 10px 4vw;
        /* Ajustar padding del botón */
    }

    /* Linea de negocio */
    .business-line-section {
        padding: 20px 0;
        /* Reducir el espaciado superior e inferior */
        margin-bottom: 0;
    }

    .line-title-container {
        flex-direction: column;
        /* Cambiar a columna */
        align-items: center;
        /* Centrar elementos */
        margin-bottom: 20px;
        /* Reducir el margen inferior */
    }

    .line-title {
        flex-basis: 100%;
        /* Hacer que ocupe el 100% del ancho */
        text-align: center;
        /* Centrar el texto */
    }

    .line-title h2 {
        font-size: 28px;
        /* Reducir tamaño de fuente */
    }

    .description-container {
        flex-basis: 100%;
        /* Hacer que ocupe el 100% del ancho */
        display: block;
        /* Cambiar a bloque */
        position: static;
        /* Eliminar posición absoluta */
        margin-top: 20px;
        /* Añadir margen superior */
    }

    .description-container .vertical-line {
        display: none;
        /* Ocultar línea vertical en pantallas pequeñas */
    }

    .description {
        font-size: 16px;
        /* Reducir tamaño de fuente */
        padding-left: 0;
        /* Eliminar padding */
        text-align: center;
        /* Centrar texto */
    }

    .progress-container {
        flex-direction: row;
        /* Mantener alineación horizontal */
        flex-wrap: wrap;
        /* Permitir que los elementos se envuelvan */
    }

    .progress-item {
        flex-basis: 50%;
        /* Cambiar a 50% para dos elementos por fila */
        margin-bottom: 20px;
        /* Añadir margen inferior */
    }

    .progress-circle {
        width: 80px;
        /* Reducir tamaño del círculo */
        height: 80px;
        /* Reducir tamaño del círculo */
    }

    .item-icon {
        width: 40px;
        /* Reducir tamaño del icono */
        height: 40px;
        /* Reducir tamaño del icono */
    }

    .progress-item h4 {
        font-size: 12px;
        /* Reducir tamaño de fuente */
    }

    /* Fin de linea de negocio*/

    /* Galería de Imágenes */
    .imagen-con-texto {
        width: 100%;
        /* Ancho completo en pantallas pequeñas */
        margin: 0;
        /* Sin margen en pantallas pequeñas */
    }

    .texto-sobre-imagen {
        opacity: 0;
        /* Mantener oculto inicialmente */
    }

    /* Fin Galería de Imágenes */

    /* Acerca de Nosotros*/
    .about-content {
        flex-direction: column;
        align-items: center;
    }

    .about-text {
        padding-right: 0;
        padding-bottom: 20px;
    }

    .about-image {
        width: 90%;
        /* Ancho de la imagen en pantallas pequeñas */
        max-width: 400px;
        /* Ancho máximo para la imagen */
    }

    .about-us h2 {
        font-size: 28px;
        /* Tamaño de fuente más pequeño para el título */
        margin-bottom: 30px;
        /* Espacio debajo del título */
    }

    .about-text p {
        font-size: 18px;
        /* Tamaño de fuente más pequeño para el texto */
    }

    /* Fin Acerca de nosotros*/

    /*Clientes*/
    .slider-area h2 {
        font-size: 28px;
        /* Tamaño de fuente más pequeño para el título */
        margin-bottom: 20px;
        /* Espacio debajo del título */
    }

    .logos {
        padding: 40px 0;
        /* Reducir el padding en pantallas pequeñas */
    }

    .logos-slide img {
        height: 40px;
        /* Tamaño más pequeño para los logos */
        margin: 0 20px;
        /* Espacio reducido entre los logos */
    }

    .logos:before,
    .logos::after {
        width: 100px;
        /* Reducir el ancho de los gradientes en pantallas pequeñas */
    }

    /* Fin clientes */
}