/* =========================================
   RESETEO Y VARIABLES (Nuevas tonalidades)
   ========================================= */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

:root {
    /* Tonalidades más profundas y premium de los colores originales */
    --main-color: #011b40; 
    --blue-lg: #0a3c7d;
    --secondary-color: #e59700; 
    --secondary-light: #fff8eb; 
    --white: #ffffff;
    --text-dark: #1a1a1a;
    --bg-light: #f8f9fa;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; 
}

@font-face {
    font-family: Artegra-Sans-regular;
    src: url("artegra_font/artegra-sans-condensed/ArtegraSansCnRegular.ttf");
}
@font-face {
    font-family: Artegra-Sans-regular-it;
    src: url("artegra_font/artegra-sans-condensed/ArtegraSansCnRegularIt.ttf");
}
@font-face {
    font-family: Artegra-Sans-bold;
    src: url("artegra_font/artegra-sans-condensed/ArtegraSansCnBold.ttf");
}
@font-face {
    font-family: Artegra-Sans-semi-bold;
    src: url("artegra_font/artegra-sans-condensed/ArtegraSansCnSemiBold.ttf");
}

body {
    font-family: Artegra-Sans-regular;
    width: 100%;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* =========================================
   HEADER Y NAVEGACIÓN
   ========================================= */
.menu-toggle {
    display: none;
    color: var(--secondary-color);
    font-size: 2rem;
    cursor: pointer;
}

header {
    background-color: var(--main-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    width: 100%;
    padding: 0 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

header .logo img {
    height: 60px;
    cursor: pointer;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 30px;    
}

header ul a {
    font-size: 1.2rem;
    font-family: Artegra-Sans-semi-bold;
    color: var(--white);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

header ul a:hover {
    color: var(--secondary-color);
}

/* =========================================
   HERO (Diseño Inmersivo)
   ========================================= */
.hero {
    position: relative;
    width: 100%;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; 
}

/* La imagen ahora actúa como fondo cubriendo todo */
.hero > div:last-child {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero > div:last-child img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.25); /* Oscurece la imagen para resaltar el texto */
}

/* El contenido flota sobre el fondo oscuro */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white); 
    width: 80%;
    max-width: 900px;
    padding: 0;
}

.hero-content h1 {
    font-size: 4rem;
    color: var(--white); 
    margin-bottom: 25px;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.4rem; 
    line-height: 1.6;
    color: #e0e0e0;
}

.hero-buttons {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.hero-buttons a {
    background-color: var(--secondary-color);
    color: var(--white); 
    padding: 15px 35px;
    font-size: 1.3rem;
    font-family: Artegra-Sans-bold;
    border-radius: 4px; /* Bordes más rectos para look industrial */
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease; 
}

.hero-buttons a:last-child {
    background-color: transparent;
    border: 2px solid var(--white);
}

.hero-buttons a:hover {
    background-color: var(--white);
    color: var(--main-color);
}

/* =========================================
   CLASES GENERALES
   ========================================= */
.section-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}
.section-header h2 {
    font-size: 3rem;
    color: var(--main-color);
    margin-bottom: 20px;
    font-family: Artegra-Sans-semi-bold;
    text-transform: uppercase;
}
.section-header p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto;
    color: #555;
    line-height: 1.6;
}
.text-white h2, .text-white p {
    color: var(--white);
}

/* =========================================
   ¿POR QUÉ ELEGIRNOS? (Layout invertido)
   ========================================= */
.why-us {
    padding: 100px 5%;
    background-color: var(--white);
}

/* Imagen a la izquierda, texto a la derecha */
.why-us-content {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 60px;
    margin-bottom: 80px;
}

.why-us h2 {
    text-align: left;
    font-size: 2.5rem;
    color: var(--main-color);
    margin-bottom: 30px;
    font-family: Artegra-Sans-bold;
}

.why-us-content > div:first-child {
    flex: 1;
}

.why-us-content h3 {
    margin-bottom: 20px;
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.why-us-content p {
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 15px;
    color: #444;
}

.why-us-content-img-container {
    flex: 1;
}

.why-us-content img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: -20px 20px 0px var(--secondary-light);
}

/* Tarjetas minimalistas con íconos a la izquierda */
.why-us-advantages h3 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

.why-us-advantages-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 25px;
}

.why-us-advantages-card {
    background-color: var(--white);
    border: 1px solid #eaeaea;
    border-left: 5px solid var(--secondary-color);
    padding: 30px 20px; 
    display: flex;
    align-items: center;
    gap: 20px;
    transition: box-shadow 0.3s ease;
}

.why-us-advantages-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.why-us-advantages-card i {
    font-size: 2rem;
    color: var(--main-color);
}

.why-us-advantages-card h4 {
    font-size: 1.2rem;
    text-align: left;
}

/* =========================================
   SERVICIOS (Filas horizontales alternas)
   ========================================= */
.services {
    padding: 100px 5%;
    background-color: var(--bg-light);
}

.services-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.service-card {
    display: flex;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
}

/* Invierte el orden en los elementos pares */
.service-card:nth-child(even) {
    flex-direction: row-reverse;
}

.service-card img {
    width: 45%;
    height: auto;
    min-height: 400px;
    object-fit: cover;
}

.service-content {
    width: 55%;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-content h3 {
    font-size: 2.2rem;
    color: var(--main-color);
    margin-bottom: 20px;
}

.service-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #555;
    line-height: 1.7;
}

.service-content ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.service-content ul li {
    font-size: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-card h4{
    margin-top: 25px;
    margin-bottom: 25px;
    font-size: 1.2rem;
    text-align: center;
}

.service-content ul li i {
    color: var(--secondary-color);
}

/* =========================================
   SECTORES (Oscuro y Minimalista)
   ========================================= */
.sectors {
    padding: 100px 5%;
    background-color: var(--main-color);
}

.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.sector-item {
    background: transparent;
    padding: 40px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--white);
    text-align: center;
    transition: all 0.3s ease;
}

.sector-item:hover {
    background: var(--blue-lg);
    border-color: var(--secondary-color);
    transform: translateY(-5px);
}

.sector-item i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 25px;
}

/* =========================================
   METODOLOGÍA (Tarjetas flotantes sin línea)
   ========================================= */
.methodology {
    padding: 100px 5%;
    background-color: var(--white);
}

.line {
    display: none; /* Eliminamos la línea para este rediseño */
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline-item {
    background: var(--bg-light);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: left;
    position: relative;
    border-top: 6px solid var(--main-color);
    transition: transform 0.3s ease;
}

.timeline-item:hover {
    transform: translateY(-10px);
    border-color: var(--secondary-color);
}

.timeline-number {
    width: 60px;
    height: 60px;
    background-color: var(--secondary-light);
    color: var(--secondary-color);
    font-size: 2rem;
    font-family: Artegra-Sans-bold;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    margin-bottom: 25px;
}

.timeline-content h3 {
    font-size: 1.6rem;
    color: var(--main-color);
    margin-bottom: 15px;
}

.timeline-content p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.5;
}

/* =========================================
   PROYECTOS (Grid compacto)
   ========================================= */
.projects {
    padding: 100px 5%;
    background-color: var(--bg-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
}

.gallery-grid img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    filter: grayscale(40%);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.gallery-grid img:hover {
    filter: grayscale(0%);
    transform: scale(1.03);
    z-index: 2;
    position: relative;
}

/* =========================================
   SECCIÓN FINAL (Formulario Flotante vs FAQ)
   ========================================= */
.final-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 100px 5%;
    background-color: var(--white);
    align-items: start;
}

/* Formulario - Estilo Tarjeta Oscura */
.cta-container {
    background-color: var(--main-color);
    padding: 50px;
    border-radius: 16px;
    color: var(--white);
    box-shadow: 0 20px 50px rgba(1, 27, 64, 0.2);
}

.cta-container h2 {
    font-size: 2.2rem;
    color: var(--white);
    margin-bottom: 15px;
}

.cta-container p {
    color: #ccc;
    margin-bottom: 30px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    font-family: Artegra-Sans-regular;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--white);
    border-radius: 4px;
}

.contact-form input::placeholder, .contact-form textarea::placeholder {
    color: #999;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 18px;
    font-size: 1.2rem;
    font-family: Artegra-Sans-bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #c98400;
}

/* FAQ Desplegables - Estilo Claro */
.faq-container h2 {
    font-size: 2.5rem;
    color: var(--main-color);
    margin-bottom: 30px;
    font-family: Artegra-Sans-bold;
}

details {
    background: var(--bg-light);
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
}

summary {
    padding: 20px;
    font-size: 1.3rem;
    font-family: Artegra-Sans-semi-bold;
    color: var(--main-color);
    cursor: pointer;
    list-style: none; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

details[open] summary i {
    transform: rotate(180deg);
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

details p {
    padding: 0 20px 20px 20px;
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
}

details[open] p {
    animation: desplegarContenido 0.4s ease-out forwards;
}

/* =========================================
   ANIMACIONES SCROLL
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
    CONTACTO
   ========================================= */
    .contacto{
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 200px;
        gap: 200px;
        font-size: 1.5rem;
        background-color: var(--bg-light);
        border-radius: 2rem;
    }

    .contacto-container{
        display: grid;
        grid-template-columns: (1fr);
        grid-template-rows: (1fr 1fr);
        gap: 10px;

    }

    .contacto-container h3{
        display: inline-block;
        margin-left: 10px;
    }

    .contacto-container a{
        text-decoration: none;
        color: var(--main-color);
    }

    .contacto-container a:hover{
        color: var(--secondary-color);
        transition:  ease 0.3s;
    }


    /* =========================================
   TOAST NOTIFICATION
   ========================================= */
.toast {
    visibility: hidden;
    min-width: 300px;
    background-color: var(--main-color);
    color: var(--white);
    text-align: center;
    border-radius: 8px;
    padding: 16px 24px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: -50px; /* Oculto por debajo de la pantalla */
    transform: translateX(-50%);
    font-size: 1.1rem;
    font-family: Artegra-Sans-semi-bold;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.4s ease, bottom 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 40px; /* Posición final en pantalla */
}

.toast.success {
    border-left: 5px solid #28a745; /* Verde para éxito */
}

.toast.success i {
    color: #28a745;
}

.toast.error {
    border-left: 5px solid #dc3545; /* Rojo para error */
}

.toast.error i {
    color: #dc3545;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 1024px) {
    .service-card, .service-card:nth-child(even) {
        flex-direction: column;
    }
    .service-card img, .service-content {
        width: 100%;
    }
    .timeline {
        grid-template-columns: repeat(2, 1fr);
    }
    .final-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 100px; /* Compensa el espacio del header fijo */
        padding-bottom: 80px; /* Le da respiro a los botones en la parte inferior */
        min-height: auto; /* Permite que la altura se adapte al contenido */
    }
    
    .hero-content {
        width: 90%; /* Aprovecha mejor el ancho de la pantalla en móviles */
    }
    .menu-toggle {
        display: block;
    }
    #nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--main-color);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }
    #nav-menu.active {
        max-height: 400px;
    }
    header nav ul {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    .hero-buttons {
        flex-direction: column;
    }
    
    .why-us-content {
        flex-direction: column;
    }
    .why-us-content img {
        height: 300px;
    }
    
    .service-content ul {
        grid-template-columns: 1fr;
    }
    
    .timeline {
        grid-template-columns: 1fr;
    }
    
    .cta-container {
        padding: 30px 20px;
    }

    .gallery-grid,
    .sectors-grid,
    .why-us-advantages-cards-container {
        grid-template-columns: 1fr;
    }

    .timeline-item{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .contacto{
        width: 320px;
        height: 250px;
        font-size: 1.2rem;
        flex-direction: column;
        align-items: start;
        gap:20px;
        padding-left: 20px;
    }
}