@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

html, body {
    height: 100%;
}

body {
    font-family: "Poppins", sans-serif;
    background-color: #ffffff;
    color: #000000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----------------------------------------------------
   HEADER + SLIDER (COMPATIBLE EN TODOS LOS IPHONES)
---------------------------------------------------- */

.header {
    position: relative;
    min-height: 100vh;
    height: 100vh;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 120px; /* evita que el menú tape el carrusel */
}

/* Eliminar carrusel viejo que fallaba en Safari */
.header::before {
    content: none !important;
}

/* Barra negra superior */
.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 105px;
    background-color: black;
    opacity: 1;
    z-index: 1;
}

/* Fondo oscuro */
.header .background {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: -1;
    pointer-events: none;
}

/* Slider nuevo compatible */
.slider-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.slide-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: fadeSlider 20s infinite ease-in-out;
}

.slide-img:nth-child(1) { animation-delay: 0s; }
.slide-img:nth-child(2) { animation-delay: 5s; }
.slide-img:nth-child(3) { animation-delay: 10s; }
.slide-img:nth-child(4) { animation-delay: 15s; }

@keyframes fadeSlider {
    0% { opacity: 0; }
    5% { opacity: 1; }
    25% { opacity: 1; }
    30% { opacity: 0; }
    100% { opacity: 0; }
}

/* ----------------------------------------------------
   MENÚ
---------------------------------------------------- */

.menu {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background-color: #000;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    width: 220px;
    height: auto;
}

.navbar {
    display: flex;
}

.navbar ul {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar ul li a {
    font-size: 15px;
    padding: 12px 18px;
    color: #ffffff;
    font-weight: 600;
    position: relative;
}

.navbar ul li a::after {
    content: '';
    position: absolute;
    left: 100%;
    bottom: 0;
    width: 1px;
    height: 70%;
    background-color: gray;
    transform: translateX(-50%);
}

.navbar ul li:last-child a::after {
    display: none;
}

.navbar ul li a:hover,
.navbar ul li a.active {
    color: #27ae60;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    margin-left: 10px;
    z-index: 20;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ----------------------------------------------------
   TEXTO HEADER
---------------------------------------------------- */

#Inicio {
    scroll-margin-top: 120px;
}

.header-content {
    position: relative;
    z-index: 3;
    width: 100%;
}

.header-content.container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 180px;
}

.header-content p {
    color: #ffffff;
    font-size: 25px;
    max-width: 650px;
    margin-bottom: 25px;
    line-height: 1.5;
    font-weight: 600;
}

.btn-cotizacion {
    display: inline-block;
    padding: 15px 30px;
    background-color: #27ae60;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-cotizacion:hover {
    background-color: #1e8e4e;
    transform: translateY(-2px);
}

/* ----------------------------------------------------
   SERVICIOS
---------------------------------------------------- */

#Servicios {
    scroll-margin-top: 120px;
}

.Servicios {
    padding: 60px 0 40px;
    background-color: #ffffff;
}

.Servicios-content h2 {
    font-size: 40px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 35px;
    position: relative;
}

.Servicios-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20%;
    height: 4px;
    background-color: #27ae60;
}

.Servicios-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
}

.Servicio-1 {
    width: 320px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.Servicio-1:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.Servicio-1 img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.Servicio-1 h3 {
    color: #27ae60;
    font-size: 19px;
    text-align: center;
    min-height: 56px;
}

.Servicio-1 p {
    color: #333;
    font-size: 15px;
    line-height: 1.6;
}

/* ==============================
   SECCIÓN NOSOTROS ORIGINAL (FUNCIONA)
================================= */

#Nosotros {
    scroll-margin-top: 120px;
}

.Nosotros {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
}

/* CONTENEDOR INTERNO CORRECTO */
.content-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
}

.Nosotros-1,
.Nosotros-2 {
    width: 50%;
}

/* COLUMNA IZQUIERDA (TEXTO) */
.Nosotros-1 {
    background-color: beige;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.Nosotros h2 {
    font-size: 42px;
    color: #000000;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.Nosotros h2::after {
    content: '';
    width: 25%;
    height: 4px;
    background-color: #27ae60;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
}

.Nosotros p {
    font-size: 20px;
    line-height: 1.7;
    color: #000000;
    margin-top: 25px;
}

/* COLUMNA DERECHA (IMAGEN) */
.Nosotros-2 {
    min-height: 400px;
    background-image: url('imagenes/Nosotros.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

/* ==============================
   RESPONSIVE
================================= */
@media (max-width: 991px) {

    .Nosotros-1,
    .Nosotros-2 {
        width: 100%;
    }

    .Nosotros-1 {
        padding: 40px 30px;
    }

    .Nosotros-2 {
        min-height: 300px;
        background-attachment: scroll;
    }
}


/* ----------------------------------------------------
   ALIADOS
---------------------------------------------------- */

.Aliados {
    padding: 60px 0 40px;
    background-color: #ffffff;
}

.Aliados-content h2 {
    font-size: 38px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 35px;
    position: relative;
}

.Aliados-content h2::after {
    content: '';
    width: 15%;
    height: 4px;
    background-color: #27ae60;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
}

.Aliados-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 25px;
    justify-items: center;
}

.Aliados-1 img {
    width: 190px;
    height: 110px;
    object-fit: contain;
}

/* ----------------------------------------------------
   CONTACTO
---------------------------------------------------- */

#Contacto {
    scroll-margin-top: 120px;
}

.footer {
    background-color: #000;
    color: #fff;
    padding: 50px 0 35px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.map-title {
    font-size: 34px;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.map-title::after {
    content: '';
    width: 15%;
    height: 4px;
    background-color: #27ae60;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -8px;
}

.map-container iframe {
    width: 100%;
    height: 380px;
    border-radius: 10px;
    border: none;
}

.contact-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 80px;
    width: 100%;
}

.contactenos {
    width: 45%;
}

.contactenos-header {
    display: flex;
    align-items: center;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-logo {
    width: 260px;
    height: auto;
}

.contact-info {
    max-width: 380px;
}

.contact-info h3 {
    font-size: 28px;
    margin-bottom: 12px;
    position: relative;
    padding-bottom: 10px;
}

.contact-info h3::after {
    content: '';
    width: 40%;
    height: 4px;
    background-color: #27ae60;
    position: absolute;
    left: 0;
    bottom: 0;
}

.contact-info p {
    font-size: 15px;
    margin-bottom: 8px;
}

.contact-form {
    width: 45%;
}

.form-container {
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #fff;
}

.form-group input,
.form-group textarea {
    padding: 10px;
    font-size: 15px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: transparent;
    color: #fff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #ddd;
}

button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    color: #fff;
    background-color: #27ae60;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.whatsapp-icon {
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 50;
}

.whatsapp-icon img {
    width: 65px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ----------------------------------------------------
   RESPONSIVE
---------------------------------------------------- */

@media (max-width: 991px) {

    .logo-img {
        width: 190px;
    }

    .header-content p {
        font-size: 22px;
    }

    .Nosotros-1,
    .Nosotros-2 {
        width: 100%;
    }

    .Nosotros-2 {
        height: 380px;
        background-attachment: scroll;
    }

    .contactenos-header {
        flex-direction: column;
        text-align: center;
    }

    .contact-info {
        text-align: center;
    }
}

@media (max-width: 768px) {

    .menu {
        height: 70px !important;
        padding: 6px 12px !important;
    }

    .header::after {
        height: 70px !important;
    }

    .logo-img {
        width: 160px !important;
    }

    .header {
        padding-top: 90px !important;
    }

    .navbar ul {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .navbar {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 70%;
        height: calc(100vh - 70px);
        background: rgba(0,0,0,0.96);
        padding-top: 25px;
        transition: right 0.35s ease;
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar.active {
        right: 0;
    }

    .navbar ul {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
        padding-left: 20px;
    }

    .header-content.container {
        padding-top: 150px;
        padding-bottom: 50px;
    }

    .header-content p {
        font-size: 18px;
    }

    .btn-cotizacion {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    .Servicio-1 {
        width: 100%;
    }

    .contact-wrapper {
        flex-direction: column !important;
        gap: 25px;
    }

    .contactenos {
        width: 100% !important;
        text-align: center !important;
    }

    .contact-form {
        width: 95% !important;
        margin: 0 auto !important;
    }

    .whatsapp-icon img {
        width: 55px;
    }
}

@media (max-width: 480px) {

    .logo-img {
        width: 160px;
    }

    .navbar {
        width: 80%;
    }

    .header-content p {
        font-size: 16px;
    }

    .Aliados-group {
        grid-template-columns: 1fr;
    }

    .Aliados-1 img {
        width: 170px;
        height: 100px;
    }
}

/* FIX anti-parpadeo para Safari */
.header,
.background,
.slider-bg,
.slide-img {
    will-change: opacity, transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}
