/* ============================= */
/* VARIABLES DE COLOR */
/* ============================= */

:root {
    --azul:#0f2a44;
    --azul-claro:#1e4f7a;

    --naranja:#ff7a00;
    --naranja-hover:#e56d00;

    --blanco:#ffffff;

    --gris:#f4f6f9;
    --gris-texto:#555;
}

/* ============================= */
/* RESET */
/* ============================= */

* {
    margin:0;
    padding:0;
    box-sizing:border-box;
    scroll-behavior:smooth;
}

body {
    font-family:'Poppins',sans-serif;
    background:var(--blanco);
    color:#333;
    line-height:1.6;
}

/* ============================= */
/* CONTENEDOR */
/* ============================= */

.container {
    width:90%;
    max-width:1200px;
    margin:auto;
}

/* ============================= */
/* HEADER */
/* ============================= */

header {
    position:fixed;
    top:0;
    width:100%;
    z-index:1000;
    background:var(--blanco);
    box-shadow:0 4px 15px rgba(0,0,0,0.08);
}

.nav-container {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px 0;
}

/* HAMBURGUESA */
.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

/* LOGO */

.logo {
    font-size:28px;
    font-weight:700;
    color:var(--azul);
}

.logo span {
    color:var(--naranja);
}

/* NAV */

nav a {
    margin-left:28px;
    text-decoration:none;
    color:var(--azul);
    font-weight:500;
    position:relative;
    transition:0.3s;
}

nav a::after {
    content:"";
    position:absolute;
    width:0;
    height:2px;
    background:var(--naranja);
    bottom:-5px;
    left:0;
    transition:0.3s;
}

nav a:hover::after {
    width:100%;
}

nav a:hover {
    color:var(--naranja);
}

/* ============================= */
/* HERO */
/* ============================= */

.hero {
    height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    color:white;
    background:
        linear-gradient(rgba(15,42,68,0.8),rgba(15,42,68,0.8)),
        url("../img/hero.jpg");
    background-size:cover;
    background-position:center;
    padding:20px;
}

.hero h1 {
    font-size:52px;
    margin-bottom:20px;
    animation:fadeUp 1s ease;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.hero p {
    font-size:18px;
    max-width:700px;
    margin:auto;
    margin-bottom:35px;
    animation:fadeUp 1.4s ease;
}

/* ============================= */
/* BOTONES */
/* ============================= */

.btn {
    display:inline-block;
    background:var(--naranja);
    color:white;
    padding:14px 28px;
    border-radius:6px;
    text-decoration:none;
    font-weight:500;
    transition:0.3s;
    box-shadow:0 6px 20px rgba(0,0,0,0.15);
}

.btn:hover {
    background:var(--naranja-hover);
    transform:translateY(-3px);
}

.btn-outline {
    display:inline-block;
    border:2px solid white;
    padding:12px 26px;
    border-radius:6px;
    color:white;
    text-decoration:none;
    margin-left:0;
    transition:0.3s;
}

.btn-outline:hover {
    background:white;
    color:var(--azul);
}

/* ============================= */
/* SECCIONES */
/* ============================= */

section {
    padding:100px 0;
}

.section-title {
    text-align:center;
    font-size:36px;
    margin-bottom:70px;
    color:var(--azul);
    position:relative;
}

.section-title::after {
    content:"";
    width:80px;
    height:4px;
    background:var(--naranja);
    display:block;
    margin:15px auto 0;
    border-radius:3px;
}

/* ============================= */
/* SERVICIOS – GRID CENTRADO */
/* ============================= */

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 35px;
    justify-content: center; /* Esto centra la fila con menos elementos */
}

.servicios-grid2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 35px;
    justify-content: center; /* Esto centra la fila con menos elementos */
    padding: 30px;
}

.card {
    background:var(--blanco);
    padding:35px;
    border-radius:10px;
    text-align:center;
    box-shadow:0 10px 25px rgba(0,0,0,0.08);
    transition:0.3s;
    border-top:4px solid transparent;
}

.card:hover {
    transform:translateY(-10px);
    border-top:4px solid var(--naranja);
    box-shadow:0 15px 35px rgba(0,0,0,0.15);
}

.card img {
    width:60px;
    margin-bottom:20px;
}

.card h3 {
    color:var(--azul);
    margin-bottom:10px;
}

.card p {
    color:var(--gris-texto);
}

/* ============================= */
/* PROYECTOS – SOLO FOTOS 12 */
/* ============================= */

#proyectos {
    background: var(--gris);
}

.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.proyecto {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.proyecto img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s;
}

.proyecto:hover img {
    transform: scale(1.08);
}

@media(max-width:1200px) {
    .proyectos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width:900px) {
    .proyectos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:600px) {
    .proyectos-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================= */
/* MARCAS – 2 FILAS DE 4 LOGOS GRANDES */
/* ============================= */

.marcas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
    justify-items: center;
    align-items: center;
}

.marcas-grid img {
    max-width: 180px;
    width: 100%;
    height: auto;
    transition: transform 0.3s;
}

.marcas-grid img:hover {
    transform: scale(1.1);
}

@media(max-width:900px) {
    .marcas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* ============================= */
/* CONTACTO */
/* ============================= */

#contacto {
    background:var(--gris);
}

.contact-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:40px;
}

input,
textarea {
    width:100%;
    padding:12px;
    border-radius:6px;
    border:1px solid #ddd;
    margin-bottom:15px;
    font-family:'Poppins';
}

input:focus,
textarea:focus {
    outline:none;
    border:1px solid var(--naranja);
}

/* ============================= */
/* FOOTER */
/* ============================= */

footer {
    background: #FCC492;
    color: black;
    padding: 30px 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

footer p {
    text-align: center;
    flex: 1;
    font-size: 14px;
}

.logo-izq,
.logo-der {
    height: 60px;
    width: auto;
}

/* ============================= */
/* ANIMACIONES */
/* ============================= */

@keyframes fadeUp {
    from {
        opacity:0;
        transform:translateY(40px);
    }
    to {
        opacity:1;
        transform:translateY(0);
    }
}

/* ============================= */
/* RESPONSIVE GENERAL */
/* ============================= */

@media(max-width:900px) {
    .hero h1 {
        font-size:36px;
    }
    .contact-grid {
        grid-template-columns:1fr;
    }
    nav {
        display:none;
    }
}

/* ============================= */
/* LOGO HEADER */
/* ============================= */

#logomeg img {
    height:90px;
    width:auto;
    display:block;
}

@media(max-width:900px) {

    /* MOSTRAR HAMBURGUESA */
    .menu-toggle {
        display: block;
    }

    /* MENÚ DESPLEGABLE */
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        display: none;
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
    }

    nav.active {
        display: flex;
    }

    nav a {
        margin: 12px 0;
    }

    /* BOTONES MÁS SEPARADOS */
    .hero-buttons {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    /* SERVICIOS MISMO ANCHO */
    .servicios-grid2 {
        grid-template-columns: 1fr;
        padding: 0;
    }

    footer {
        position: relative;
        display: flex;
        justify-content: center; /* centra el texto */
        align-items: center;
        padding: 30px 20px;
    }

    footer p {
        flex: none; /* evita que se estire */
        text-align: center;
        max-width: 150px; /* o el ancho que consideres adecuado */
        margin: 0 auto;
    }

    .logo-izq {
        position: absolute;
        left: 20px; /* distancia desde la esquina izquierda */
        top: 50%;
        transform: translateY(-50%);
        margin: 0; /* elimina cualquier margin que afecte al layout */
    }

    .logo-der {
        position: absolute;
        right: 20px; /* distancia desde la esquina derecha */
        top: 50%;
        transform: translateY(-50%);
        margin: 0; /* elimina cualquier margin que afecte al layout */
    }
}
