﻿/* =========================================================
   ALLAN MENDOZA INGENIERÍA
========================================================= */

:root {
    --azul: #2567A8;
    --azul-oscuro: #3F5060;
    --gris: #9FABB6;
    --gris-oscuro: #252225;
    --gris-claro: #EEF0F2;
    --blanco: #FFFFFF;
    --texto: #3F5060;
    --texto-secundario: #66727D;
}


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    color: var(--texto);
    background: white;
    line-height: 1.6;
}


a {
    text-decoration: none;
}


img {
    max-width: 100%;
}


.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar-custom {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 18px 0;
    background: transparent;
    transition: all .35s ease;
}


.navbar-container {
    width: 92%;
    max-width: 1400px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* =========================================================
   LOGO
========================================================= */

.navbar-logo {
    position: relative;
    display: flex;
    align-items: center;
}


    .navbar-logo img {
        width: 310px;
        height: auto;
        max-height: 105px;
        object-fit: contain;
        transition: opacity .25s ease, width .35s ease;
    }


    /* Logo blanco cuando está sobre el Hero */

    .navbar-logo .logo-white {
        opacity: 1;
    }


    /* Logo oscuro oculto */

    .navbar-logo .logo-dark {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        opacity: 0;
    }


/* =========================================================
   MENU
========================================================= */

.main-navigation {
    display: flex;
    align-items: center;
}


.navbar-menu {
    display: flex;
    align-items: center;
    gap: 42px;
    list-style: none;
    margin: 0;
    padding: 0;
}


    .navbar-menu li {
        position: relative;
    }


    .navbar-menu a {
        position: relative;
        display: block;
        color: var(--blanco);
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 2px;
        padding: 10px 0;
        transition: color .3s ease;
    }


        .navbar-menu a::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 0;
            height: 3px;
            background: var(--azul);
            transition: width .3s ease;
        }


        .navbar-menu a:hover::after,
        .navbar-menu a.active::after {
            width: 100%;
        }


        .navbar-menu a:hover {
            color: #7DB4E6;
        }


/* =========================================================
   NAVBAR SCROLLED
========================================================= */

.navbar-custom.scrolled {
    position: fixed;
    background: var(--gris);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 25px rgba(37,34,37,.12);
    padding: 8px 0;
}


    .navbar-custom.scrolled
    .navbar-logo img {
        width: 220px;
    }


    .navbar-custom.scrolled
    .navbar-menu a {
        color: var(--azul-oscuro);
    }


        .navbar-custom.scrolled
        .navbar-menu a:hover {
            color: var(--azul);
        }

/* =========================================================
   LOGO CUANDO EL NAVBAR TIENE FONDO BLANCO
========================================================= */

    .navbar-custom.scrolled .logo-white {
        opacity: 0;
    }


    .navbar-custom.scrolled .logo-dark {
        opacity: 1;
    }


    .navbar-custom.scrolled
    .navbar-logo img {
        width: 220px;
    }

/* =========================================================
   HERO
========================================================= */

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 680px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-image: url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?auto=format&fit=crop&w=2200&q=85');
    background-size: cover;
    background-position: center;
}


/* =========================================================
   OVERLAY
========================================================= */

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( 90deg, rgba(37,34,37,.82) 0%, rgba(63,80,96,.68) 45%, rgba(63,80,96,.35) 100% );
}


/* =========================================================
   HERO CONTENT
========================================================= */

.hero-content {
    position: relative;
    z-index: 5;
    width: 90%;
    max-width: 1400px;
    margin: auto;
    color: white;
}


.hero-text {
    max-width: 850px;
    padding-top: 90px;
}


/* =========================================================
   SUBTITLE
========================================================= */

.hero-subtitle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    color: white;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 4px;
}


    .hero-subtitle span {
        color: #5D9ED5;
        font-size: 18px;
    }


/* =========================================================
   HERO TITLE
========================================================= */

.hero h1 {
    color: white;
    font-size: clamp(55px, 6vw, 92px);
    line-height: .98;
    font-weight: 300;
    letter-spacing: -2px;
    margin-bottom: 25px;
}


    .hero h1 strong {
        display: block;
        font-weight: 800;
    }


    .hero h1 span {
        display: block;
        font-weight: 300;
        color: #E4E8EB;
    }


/* =========================================================
   HERO DESCRIPTION
========================================================= */

.hero-description {
    max-width: 750px;
    color: #F0F2F4;
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 35px;
}


/* =========================================================
   HERO BUTTONS
========================================================= */

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}


.btn-primary-custom,
.btn-outline-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-width: 190px;
    padding: 17px 30px;
    font-size: 14px;
    font-weight: 700;
    transition: all .3s ease;
}


.btn-primary-custom {
    color: white;
    background: var(--azul);
    border: 2px solid var(--azul);
}


    .btn-primary-custom:hover {
        color: white;
        background: #1D578F;
        border-color: #1D578F;
        transform: translateY(-3px);
    }


.btn-outline-custom {
    color: white;
    background: rgba(255,255,255,.04);
    border: 2px solid white;
}


    .btn-outline-custom:hover {
        color: var(--azul-oscuro);
        background: white;
        transform: translateY(-3px);
    }


/* =========================================================
   FIGURAS GEOMÉTRICAS
========================================================= */

.hero-shape {
    position: absolute;
    z-index: 4;
    width: 0;
    height: 0;
    pointer-events: none;
}


.shape-blue-1 {
    right: 7%;
    bottom: 7%;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid var(--azul);
}


.shape-blue-2 {
    right: 16%;
    bottom: 20%;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 52px solid var(--azul);
}


.shape-gray-1 {
    right: 10%;
    bottom: 2%;
    border-left: 45px solid transparent;
    border-right: 45px solid transparent;
    border-top: 75px solid var(--azul-oscuro);
}


.shape-gray-2 {
    right: 21%;
    bottom: 12%;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 45px solid #67747F;
}


.shape-white {
    right: 16%;
    bottom: 3%;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid rgba(255,255,255,.75);
}


/* =========================================================
   SECCIONES
========================================================= */

.about-section,
.services-section,
.projects-section,
.contact-section {
    padding: 110px 0;
}


/* =========================================================
   TITULOS
========================================================= */

.section-title {
    margin-bottom: 60px;
}


    .section-title span {
        display: block;
        color: var(--azul);
        font-size: 13px;
        font-weight: 800;
        letter-spacing: 3px;
        margin-bottom: 10px;
    }


    .section-title h2 {
        color: var(--azul-oscuro);
        font-size: 46px;
        line-height: 1.15;
        font-weight: 700;
    }


    .section-title p {
        max-width: 650px;
        margin-top: 15px;
        color: var(--texto-secundario);
        font-size: 17px;
        line-height: 1.8;
    }


    .section-title.center {
        text-align: center;
    }


        .section-title.center p {
            margin-left: auto;
            margin-right: auto;
        }


/* =========================================================
   NOSOTROS
========================================================= */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}


.about-text p {
    color: var(--texto-secundario);
    font-size: 17px;
    line-height: 1.9;
    margin-bottom: 25px;
}


.about-image {
    position: relative;
}


    .about-image::before {
        content: "";
        position: absolute;
        left: -20px;
        bottom: -20px;
        width: 100px;
        height: 100px;
        background: var(--azul);
        z-index: 0;
    }


    .about-image img {
        position: relative;
        z-index: 1;
        width: 100%;
        height: 460px;
        object-fit: cover;
        display: block;
    }


/* =========================================================
   SERVICIOS
========================================================= */

.services-section {
    background: var(--gris-claro);
}


.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}


.service-card {
    position: relative;
    background: white;
    padding: 40px 35px;
    min-height: 270px;
    border-bottom: 4px solid transparent;
    transition: all .3s ease;
}


    .service-card:hover {
        transform: translateY(-8px);
        border-bottom-color: var(--azul);
        box-shadow: 0 20px 40px rgba(37,34,37,.10);
    }


.service-icon {
    color: var(--azul);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 30px;
}


.service-card h3 {
    color: var(--azul-oscuro);
    font-size: 21px;
    margin-bottom: 15px;
}


.service-card p {
    color: var(--texto-secundario);
    font-size: 15px;
    line-height: 1.7;
}


/* =========================================================
   PROYECTOS
========================================================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}


.project-card {
    position: relative;
    height: 430px;
    overflow: hidden;
    background: var(--azul-oscuro);
}


    .project-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .6s ease;
    }


    .project-card:hover img {
        transform: scale(1.08);
    }


    .project-card::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient( to top, rgba(37,34,37,.9), transparent 65% );
    }


.project-info {
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    color: white;
}


    .project-info span {
        color: #7DB4E6;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 2px;
    }


    .project-info h3 {
        margin-top: 8px;
        font-size: 22px;
    }


/* =========================================================
   CONTACTO
========================================================= */

.contact-section {
    position: relative;
    overflow: hidden;
    background: var(--azul-oscuro);
    color: white;
}


.contact-box {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}


    .contact-box span {
        color: #7DB4E6;
        font-size: 13px;
        font-weight: 800;
        letter-spacing: 3px;
    }


    .contact-box h2 {
        max-width: 750px;
        margin: 15px 0;
        color: white;
        font-size: 44px;
        line-height: 1.2;
    }


    .contact-box p {
        color: #DCE3E8;
        font-size: 17px;
    }


/* =========================================================
   FOOTER
========================================================= */

footer {
    background: var(--gris);
    padding: 50px 0;
    color: #3F5060;
}


.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}


.footer-logo {
    width: 200px;
}


.footer-text {
    color: #3F5060;
    font-size: 13px;
}


    .footer-text p {
        margin-bottom: 5px;
    }


.footer-links {
    display: flex;
    gap: 25px;
}


    .footer-links a {
        color: #3F5060;
        font-size: 13px;
    }


        .footer-links a:hover {
            color: #2567A8;
        }


/* =========================================================
   MOBILE MENU
========================================================= */

/* =========================================================
   BOTÓN MENÚ MOBILE
========================================================= */

.mobile-menu-button {
    display: none;
    width: 48px;
    height: 48px;
    padding: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
}


    /* Las tres líneas */

    .mobile-menu-button span {
        display: block;
        width: 28px;
        height: 3px;
        background: var(--blanco);
        border-radius: 2px;
        transition: all .3s ease;
    }

.navbar-custom.scrolled
.mobile-menu-button span {
    background: var(--azul-oscuro);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .navbar-logo img {
        width: 250px;
    }


    .navbar-menu {
        gap: 22px;
    }


        .navbar-menu a {
            font-size: 12px;
        }


    .hero h1 {
        font-size: 65px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .navbar-custom {
        padding: 12px 0;
    }


    .navbar-container {
        width: 90%;
    }


    /* LOGO */

    .navbar-logo img {
        width: 220px;
        max-height: 80px;
    }


    /* =====================================================
       CONTENEDOR DEL MENÚ
    ===================================================== */

    .main-navigation {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
    }


    /* =====================================================
       MENÚ
    ===================================================== */

    .navbar-menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 90%;
        margin-left: 5%;
        padding: 10px 0;
        list-style: none;
        background: var(--gris);
        box-shadow: 0 15px 35px rgba(37,34,37,.20);
        border-top: 3px solid var(--azul);
    }


        /* MENÚ ABIERTO */

        .navbar-menu.mobile-open {
            display: flex;
        }


            /* ITEMS */

            .navbar-menu.mobile-open li {
                width: 100%;
            }


                /* LINKS */

                .navbar-menu.mobile-open li a {
                    display: block;
                    width: 100%;
                    padding: 18px 30px;
                    color: var(--azul-oscuro);
                    font-size: 14px;
                    font-weight: 600;
                    letter-spacing: 2px;
                    border-bottom: 1px solid rgba(63,80,96,.15);
                    transition: all .3s ease;
                }


                    .navbar-menu.mobile-open li a:hover {
                        color: var(--azul);
                        background: rgba(255,255,255,.25);
                        padding-left: 38px;
                    }


    /* =====================================================
       BOTÓN HAMBURGUESA
    ===================================================== */

    .mobile-menu-button {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        width: 45px;
        height: 45px;
        padding: 0;
        background: transparent;
        border: none;
        cursor: pointer;
    }


        /* LÍNEAS */

        .mobile-menu-button span {
            display: block;
            width: 28px;
            height: 3px;
            background: var(--blanco);
            border-radius: 2px;
            transition: all .3s ease;
        }


    /* BOTÓN CUANDO NAVBAR HACE SCROLL */

    .navbar-custom.scrolled .mobile-menu-button span {
        background: var(--azul-oscuro);
    }


    /* =====================================================
       HAMBURGUESA → X
    ===================================================== */

    .mobile-menu-button.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }


    .mobile-menu-button.active span:nth-child(2) {
        opacity: 0;
    }


    .mobile-menu-button.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }


    /* =====================================================
       HERO MOBILE
    ===================================================== */

    .hero {
        min-height: 700px;
        height: auto;
        padding: 160px 0 100px;
    }


    .hero-text {
        padding-top: 40px;
    }


    .hero-subtitle {
        font-size: 11px;
        letter-spacing: 2px;
    }


    .hero h1 {
        font-size: 46px;
        letter-spacing: -1px;
    }


    .hero-description {
        font-size: 16px;
    }


    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }


    .about-grid {
        grid-template-columns: 1fr;
    }


    .services-grid {
        grid-template-columns: 1fr;
    }


    .projects-grid {
        grid-template-columns: 1fr;
    }


    .contact-box {
        flex-direction: column;
        align-items: flex-start;
    }


        .contact-box h2 {
            font-size: 35px;
        }


    .footer-content {
        flex-direction: column;
        text-align: center;
    }


    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}
/* =========================================================
   ANIMACIÓN HAMBURGUESA → X
========================================================= */

.mobile-menu-button.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}


.mobile-menu-button.active span:nth-child(2) {
    opacity: 0;
}


.mobile-menu-button.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}


/* =========================================================
   MOBILE PEQUEÑO
========================================================= */

@media (max-width: 480px) {

    .navbar-logo img {
        width: 190px;
    }


    .hero h1 {
        font-size: 38px;
    }


    .hero-subtitle {
        flex-wrap: wrap;
    }


    .section-title h2 {
        font-size: 35px;
    }


    .contact-box h2 {
        font-size: 30px;
    }
}
