﻿/* ===================== Reset y Base ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: Ubuntu, sans-serif;
    font-size: 18px;
    background: #f0f0f0;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===================== Header y Navegación ===================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: background-color 0.3s ease;
}

    header.scrolled {
        background: black;
    }

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px 20px 20px;
    ;
}

.logo img {
    height: 40px;
    transition: opacity 0.3s ease;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
}

    .hamburger span {
        display: block;
        width: 100%;
        height: 4px;
        background: white;
        transition: all 0.3s ease;
    }

    .hamburger:hover span {
        background: #cd5533;
    }

.nav-links {
    position: absolute;
    /* Para mantener la misma estructura en escritorio */
    position-area: center;
    display: flex;
    gap: 20px;
    justify-content: space-evenly;
    align-items: center;
    align-content: center;
    flex-wrap: wrap;
    flex-direction: row;
}

    .nav-links a {
        text-decoration: none;
        color: white;
        font-weight: bold;
        transition: color 0.3s ease;
    }

        .nav-links a:hover {
            color: #cd5533;
        }

.language-switch button {
    padding: 5px 10px;
    border: none;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

    .language-switch button:hover {
        background-color: #0056b3;
    }

/* ===================== Responsiveness (Header) ===================== */
@media (max-width: 768px) {
    .nav-links {
        /* Centramos los enlaces debajo del header */
        display: none;
        flex-direction: column;
        gap: 10px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin: auto;
        background: black;
        padding: 10px;
        border-radius: 5px;
        text-align: center;
    }

        .nav-links.active {
            display: flex;
        }

    .hamburger {
        display: flex;
    }
}

/* ===================== Sección General ===================== */
section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 20px;
    text-align: center;
}

.isologo {
    width: 25rem;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 5s ease, transform 3s ease;
}

    .isologo.fade-in {
        opacity: 1;
        transform: scale(1);
    }

/* ===================== Footer ===================== */
footer {
    width: 100%;
    padding: 10px 20px;
    background: #333;
    color: #fff;
    text-align: center;
    font-size: 14px;
}

    footer .social-links img {
        width: 30px;
        margin: 0 10px;
        vertical-align: middle;
        transition: transform 0.3s ease;
    }

        footer .social-links img:hover {
            transform: scale(1.2);
        }

/* ===================== Main Card (Proyectos) ===================== */
.main-card {
    width: 95%;
    height: 95%;
    margin: 40px auto;
    display: flex;
    flex-wrap: wrap;
    background-color: rgba(0, 0, 0, 0.7);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 8px;
    overflow: hidden;
    color: #fff;
}

.card-left,
.card-right {
    flex: 1 1 50%;
    padding: 20px;
    min-height: 40rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .card-left h2,
    .card-right h2 {
        margin-bottom: 15px;
        letter-spacing: 0.2rem;
        font-size: 2rem;
        text-align: center;
        color: #cd5533;
        font-weight: 700;
    }

/* ===================== Botones de Proyectos ===================== */
.project-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.project-button {
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 0.4rem;
    border-color:transparent;
    padding: 10px 20px;
    font-size: 1.2rem;
    color: #777;
    letter-spacing: 0.2rem;
    transition: background-color 0.3s, border-color 0.3s;
    font-weight: 600;
}

    .project-button:hover {
        background-color: #cd55338d;
    }

    .project-button.active {
        background-color: #cd55336e;
        color: #fff;
    }

/* ===================== Información del Proyecto ===================== */
.project-info {
    flex: 1;
    padding: 15px;
    border-radius: 5px;
    line-height: 1.6;
    min-height: 200px;
    overflow: hidden;
    transition: all 0.4s ease;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 200;
}

/* ===================== Galería de Vista Previa ===================== */
.gallery-preview {
    flex: 1;
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr;
    transition: all 0.4s ease;
}

    .gallery-preview img {
        width: 95%;
        height: 95%;
        object-fit: cover;
        cursor: pointer;
        border-radius: 8px;
        /*transition: transform 0.3s ease, border-color 0.3s ease;*/
    }

     /*   .gallery-preview img:hover {
            transform: scale(0.1);
            border-color: #777;
        }*/

/* ===================== Modal ===================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hide {
    display: none !important;
}

.modal-content {
    position: relative;
    max-width: 80%;
    max-height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: fadeIn 0.4s forwards;
}

/* Ajuste para centrar el contenido en dispositivos móviles */
@media (max-width: 600px) {
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }

        .modal-content img {
            width: 100%;
            height: auto;
            object-fit: contain;
            object-position: center;
        }
}

.close,
.arrow {
    color: #fff;
    cursor: pointer;
    font-size: 2rem;
    user-select: none;
    font-weight: bold;
    transition: transform 0.3s ease;
}

    .close:hover,
    .arrow:hover {
        color: #cd5533;
        transform: scale(1.2);
    }

.close {
    position: absolute;
    top: 10px;
    right: 15px;
}

.left-arrow {
    position: absolute;
    left: 15px;
}

.right-arrow {
    position: absolute;
    right: 15px;
}

.modal-content img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    transition: opacity 0.5s ease;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* ===================== Animaciones ===================== */
@keyframes slideInLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease forwards;
}

@keyframes slideInRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease forwards;
}

@keyframes slideOutLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}

.slide-out-left {
    animation: slideOutLeft 0.8s ease forwards;
}

@keyframes slideOutRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

.slide-out-right {
    animation: slideOutRight 0.8s ease forwards;
}

/* ===================== Sección Nosotros ===================== */
#nosotros {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

    #nosotros .background-gallery {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        overflow: hidden;
    }

        #nosotros .background-gallery img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 0;
            transition: opacity 2s ease;
        }

            #nosotros .background-gallery img.active {
                opacity: 1;
            }

    #nosotros .card {
        width: 100%;
        height: 90%;
        display: flex;
        background-color: rgba(0,0,0,0.7);
        border-radius: 10px;
        color: white;
        box-shadow: 0 4px 10px rgba(0,0,0,0.5);
        overflow: hidden;
    }

    /* En escritorio, se mantienen dos columnas */

    #nosotros .card-right {
        max-height: 300px; /* Ajusta la altura máxima según el espacio disponible */
        overflow-y: auto; /* Habilita el desplazamiento vertical */
    }

/* Asegurarse de que en pantallas pequeñas se mantenga el scroll */
@media (max-width: 768px) {
    #nosotros .card-right {
        max-height: 400px; /* Ajusta según el espacio disponible */
        
    }
}


    #nosotros .card-left {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px;
        gap: 10px;
    }

    #nosotros .card-right {
        flex: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px;
        text-align: center;
    }

#nosotros .card-left button {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.1);
    color: white;
    font-size: 1.9rem;
    letter-spacing: 0.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

        #nosotros .card-left button:hover {
            background: #cd553386;
            color: white;
        }

    #nosotros .card-right h2 {
        margin-bottom: 15px;
        font-size: 2.5rem;
        transition: opacity 0.5s ease, transform 0.5s ease;
        opacity: 1;
    }

    #nosotros .card-right p {
        display: none;
        font-size: 1.2rem;
        line-height: 1.6;
        transition: opacity 1s ease;
    }

        #nosotros .card-right p.active {
            display: block;
            opacity: 1;
        }

    #nosotros .card-right h2.fade-out {
        opacity: 0;
        transform: translateY(-10px);
    }

    #nosotros .card-right h2.fade-in {
        opacity: 1;
        transform: translateY(0);
    }

    /* ===================== Sección Valores ===================== */
    .valores-section {
        padding: 60px 20px;
        background-color: #fff;
    }

    .valores-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 40px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .valor-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        background-color: #000000ab;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

        .valor-item img {
            width: 100%;
            max-width: 100%;
            height: auto;
            margin-bottom: 20px;
        }

    .valor-text h3 {
        font-size: 1.6rem;
        margin-bottom: 10px;
        color: #cd5533;
        font-weight: 600;
    }

    .valor-text p {
        font-size: 1.2rem;
        color: #fff;
        font-weight: 200;
    }

    .valores-section .valor-item.visible {
        opacity: 1;
        transform: translateY(0);
    }

    /* ===================== Sección Contacto ===================== */
    .contacto-section {
        opacity: 0.9;
        transform: translateY(0px);
        transition: opacity 1s ease;
    }

        .contacto-section.visible {
            opacity: 1;
            transform: translateY(0);
        }

    .contacto-card {
        flex-wrap: wrap;
        background-color: rgba(0,0,0,0.7);
        border-radius: 10px;
        color: #fff;
        box-shadow: 0 4px 10px rgba(0,0,0,0.5);
        overflow: hidden;
        max-width: 1200px;
        width: 100%;
        padding: 20px;
        animation: fadeIn 1s forwards;
    }

    .contacto-left {
        flex: 1 1 50%;
        padding: 20px;
    }

        .contacto-left h2 {
            margin-bottom: 20px;
            font-size: 2rem;
            text-align: center;
            color: #cd5533;
        }

        .contacto-left form .form-group {
            margin-bottom: 15px;
        }

        .contacto-left form label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }

        .contacto-left form input,
        .contacto-left form textarea {
            width: 100%;
            padding: 10px;
            border: none;
            border-radius: 5px;
            font-family: 'Ubuntu', sans-serif;
            font-size: 1rem;
        }

        .contacto-left form textarea {
            resize: vertical;
            height: 100px;
        }

    .send-button {
        width: 100%;
        padding: 10px;
        background-color: #cd5533;
        color: #fff;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        font-size: 1rem;
        transition: background-color 0.3s ease;
        font-weight: bold;
    }

        .send-button:hover {
            background-color: #a63e29;
        }

    .contacto-right {
        flex: 1 1 50%;
        padding: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .contacto-isologo {
        width: 150px;
        margin-bottom: 30px;
        opacity: 1;
        margin-top: 1.5rem;
        transform: scale(0.8);
        transition: opacity 2s ease, transform 2s ease;
    }

    .contacto-right.fade-in .contacto-isologo {
        opacity: 1;
        transform: scale(1);
    }

    .contacto-info {
        width: 100%;
        margin-top: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .info-item {
        display: flex;
        align-items: center;
        gap: 15px;
        font-size: 0.9rem;
    }

        .info-item i {
            color: #cd5533 !important;
            font-size: 1.5rem;
            width: 1.5rem !important;
            height: 1.5rem !important;
            transition: color 0.3s ease;
        }

            .info-item i:hover {
                color: #a63e29;
            }

    @keyframes fadeInUp {
        0% {
            opacity: 0;
            transform: translateY(50px);
        }

        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes slideInLeft {
        0% {
            opacity: 0;
            transform: translateX(-50px);
        }

        100% {
            opacity: 1;
            transform: translateX(0);
        }
    }

    @keyframes slideInRight {
        0% {
            opacity: 0;
            transform: translateX(50px);
        }

        100% {
            opacity: 1;
            transform: translateX(0);
        }
    }

    /* ===================== Notificación de Envío ===================== */
    .form-notification {
        position: fixed;
        bottom: 30px;
        right: 30px;
        background-color: #4BB543;
        color: #fff;
        padding: 15px 20px;
        border-radius: 5px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.5s ease, transform 0.5s ease;
        z-index: 10000;
    }

        .form-notification.show {
            opacity: 1;
            transform: translateY(0);
        }

        .form-notification.hide {
            display: none;
        }

    /* ===================== Media Queries para Móviles ===================== */
    @media (max-width: 600px) {
        .nav-links {
            display: none;
            flex-direction: column;
            gap: 10px;
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            margin: auto;
            background: black;
            padding: 10px;
            border-radius: 5px;
            text-align: center;
        }

            .nav-links.active {
                display: flex;
            }

        .hamburger {
            display: flex;
        }

        .logo img {
            height: 30px;
        }

        section {
            padding: 10px;
        }

        .main-card {
            width: 100%;
            flex-direction: column;
        }

        .card-left,
        .card-right {
            flex: 1 1 100%;
            min-height: auto;
        }
        /* Forzar scroll en la información del proyecto en móvil */
        .project-info {
            max-height: 40vh !important;
            overflow-y: auto !important;
            margin: 10px 0 !important;
            padding: 10px !important;
        }

        .gallery-preview {
            grid-template-columns: 1fr;
        }
        /* En la sección NOSOTROS, mostrar botones arriba y la info debajo */
        #nosotros .card {
            flex-direction: column;
        }
        /* Opcional: ocultar fondo para priorizar la info */
        #nosotros .background-gallery {
            display: none;
        }
        /* En la sección VALORES, forzamos a 1 columna para ver todos los cards */
        .valores-container {
            grid-template-columns: 1fr;
        }
    }

    /* ===================== Media Queries para Tablets ===================== */
    @media (min-width: 601px) and (max-width: 1024px) {
        .nav-links {
            display: flex;
        }

        .logo img {
            height: 35px;
        }

        section {
            padding: 15px;
        }

        .main-card {
            width: 95%;
        }

        .card-left,
        .card-right {
            flex: 1 1 50%;
        }

        .gallery-preview {
            grid-template-columns: 1fr;
        }
    }

    /* ===================== Media Queries para Escritorio ===================== */
    @media (min-width: 1025px) {
        .nav-links {
            display: flex;
        }

        .logo img {
            height: 40px;
        }

        section {
            padding: 20px;
        }

        .main-card {
            width: 100%;
        }

        .card-left,
        .card-right {
            flex: 1 1 50%;
        }

        .gallery-preview {
            grid-template-columns: 1fr;
        }
    }
