* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

p {
    /* text-align: center; */
    font-size: 18px;
}

/* HEADER */

header {
    position: fixed;
    width: 100%;
    top: 0;
    padding: 0px 0;
    transition: 0.3s;
    z-index: 1000;
}

header.scrolled {
    background: #1B498A;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


nav a {
    margin-left: 25px;
    text-decoration: none;
    color: white;
    font-weight: 500;
}

.nav-btn {
    display: inline-block;
    background: #1E90FF;
    padding: 8px 18px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background-color: #0d6efd;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transform: translateY(-3px);
}

/* HERO */

.hero {
    height: 100vh;
    background: linear-gradient(135deg, #0B1E3D, #1B498A);
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    padding-top: 80px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    background: #1E90FF;
    padding: 14px 30px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #0f6cd1;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transform: translateY(-3px);
}

/* PROYECTOS*/
.proyectos {
    width: 90%;
    max-width: 1200px;
    margin: 50px auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.card {
    display: flex;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transition: 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-img {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px;
    background: #fafafa;
}

.card-img img {
    max-width: 160px;
    width: 100%;
    object-fit: contain;
}

.card-content {
    flex: 2;
    padding: 20px;
}

.card-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
}

.card-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}


/* SERVICIOS */

.services {
    padding: 120px 20px;
    background: #f4f6f9;
    text-align: center;
    padding-bottom: 1px;
}

.section-title {
    font-size: 32px;
    margin-bottom: 60px;
}

.grid {
    display: flex;
    gap: 30px;
}

.card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    flex: 1;
    transition: 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* ABOUT */

.about {
    padding: 120px 20px;
    text-align: center;
}

/* CTA */

.cta {
    background: linear-gradient(135deg, #1B498A, #1B498A);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.btn-secondary {
    display: inline-block;
    background: #1E90FF;
    padding: 14px 30px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #0f6cd1;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transform: translateY(-3px);
}

/* FOOTER */

footer {
    background: #0B1E3D;
    color: white;
    text-align: center;
    padding: 20px;
}

.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: white;
}

/* =========================
   FEATURES 4 COLUMNAS
========================= */

.features {
    padding: 100px 20px;
    background: #ffffff;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 40px 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.feature-card img {
    width: 70px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
}

.feature-card p {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}

/* Contenedor de imagen */
.feature-card .image-container {
    width: 100%;
    height: 220px; /* Desktop */
    overflow: hidden;
    border-radius: 12px;
}

/* Imagen */
.feature-card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

/* Zoom en desktop */
@media (hover: hover) {
    .feature-card .image-container:hover img {
        transform: scale(1.1);
    }
}

/* Tablet */
@media (max-width: 992px) {
    .feature-card .image-container {
        height: 200px;
    }
}

/* Móvil */
@media (max-width: 600px) {
    .feature-card .image-container {
        height: 180px;
    }
}

/* Extra pequeño */
@media (max-width: 400px) {
    .feature-card .image-container {
        height: 160px;
    }
}

/* =========================
   CUSTOM 3 + 2 LAYOUT
========================= */

.custom-layout {
    padding: 100px 20px;
    background: #f4f6f9;
}

.custom-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
}

/* Fila superior (3 cards) */
.custom-card:nth-child(1),
.custom-card:nth-child(2),
.custom-card:nth-child(3) {
    grid-column: span 2;
}

/* Fila inferior (2 cards centradas) */
.custom-card:nth-child(4) {
    grid-column: 2 / span 2;
}

.custom-card:nth-child(5) {
    grid-column: 4 / span 2;
}

.custom-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    text-align: center;
    transition: 0.3s;
}

.custom-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.custom-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.custom-card p {
    padding: 20px;
    font-size: 16px;
    color: #555;
}

/* =========================
   CONTACT SPLIT LAYOUT
========================= */

.contact-split {
    padding: 120px 20px;
    background: #f4f6f9;
}

.contact-wrapper {
    display: flex;
    gap: 50px;
    align-items: stretch;
}

/* Columna izquierda */
.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #1B498A;
}

.contact-info p {
    font-size: 18px;
    color: #555;
    line-height: 1.8;
}

/* Columna derecha */
.contact-form-card {
    flex: 1;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.contact-form-card input,
.contact-form-card textarea {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: 0.3s;
}

.contact-form-card input:focus,
.contact-form-card textarea:focus {
    border-color: #1B498A;
    outline: none;
    box-shadow: 0 0 0 3px rgba(27,73,138,0.1);
}

.contact-form-card button {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;

    background: #1E90FF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.contact-form-card button:hover {
   background: #0f6cd1;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transform: translateY(-3px);
}

.btn-form {
    display: inline-block;
    background: #1E90FF;
    padding: 14px 30px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-form:hover {
    background: #0f6cd1;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transform: translateY(-3px);
}

/*404 template*/
.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-page h1 {
    font-size: 80px;
    margin-bottom: 10px;
}

.error-page h2 {
    margin-bottom: 15px;
}

.btn-home {
    display: inline-block;
    padding: 12px 25px;
    background-color: #1E90FF;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-home:hover{
    background-color: #0d6efd;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transform: translateY(-3px);
}


/* FORM ONSUCCESS*/
.alerta {
    padding: 14px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 500;
    animation: slideDown 0.4s ease;
    transition: opacity 0.5s ease;
}

.alerta-exito {
    background-color: #e6f9f0;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.alerta-error {
    background-color: #fde2e1;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/*MAPA*/

.map-section {
    padding: 0px 20px;
    background: #f8f9fa;
    text-align: center;
}

.map-section h2 {
    margin-bottom: 30px;
    font-size: 28px;
}

/* Contenedor responsive */
.map-responsive {
    position: relative;
    width: 50%;              /* 🔥 mitad en desktop */
    margin: auto;
    padding-bottom: 28.125%; /* mitad de 56.25% para mantener proporción */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.map-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/*LOGO*/
.logo {
    margin: 0;
    display: flex;
    align-items: center;
}

/* LOGO */
.logo-img {
    height: 100px;      /* 🔥 controla altura */
    width: auto;       /* mantiene proporción */
    display: block;
}


/* 📱 En móvil ocupa todo */
@media (max-width: 768px) {
    .map-responsive {
        width: 100%;
        padding-bottom: 56.25%;
    }
}

/* 📱 En móvil ocupa todo */
@media (max-width: 768px) {
    .map-responsive {
        width: 100%;
        padding-bottom: 56.25%;
    }
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */

@media(max-width: 768px) {
    .grid {
        flex-direction: column;
    }

    .hero h1 {
        font-size: 32px;
    }
}

/* =========================
   RESPONSIVE MOBILE
========================= */

@media(max-width: 992px) {

    .hero h1 {
        font-size: 38px;
    }

    .grid {
        flex-wrap: wrap;
    }

    .card {
        flex: 0 0 48%;
    }
}

@media(max-width: 768px) {

    header {
        background: #1B498A;
    }

    .menu-toggle {
        display: block;
    }

    nav {
        position: absolute;
        top: 80px;
        right: 0;
        background: #0B1E3D;
        width: 100%;
        display: none;
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
    }

    nav.active {
        display: flex;
    }

    nav a {
        margin: 15px 0;
        display: block;
    }

    .hero {
        height: auto;
        padding: 120px 20px 80px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

    .grid {
        flex-direction: column;
    }

    .card {
        flex: 1;
    }

    .section-title {
        font-size: 26px;
    }

    .about,
    .services {
        padding: 80px 20px;
    }
}

@media(max-width: 480px) {

    .hero h1 {
        font-size: 24px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 14px;
    }

}

/* PROYECTOS*/

@media (max-width: 992px) {
    .proyectos {
        grid-template-columns: 1fr;
    }
}


/* Responsive */
@media (max-width: 768px) {
    .card {
        flex-direction: column;
        text-align: center;
    }

    .card-img {
        padding: 30px;
    }

    .card-content {
        padding: 20px;
    }
}

/* =========================
   RESPONSIVE FEATURES
========================= */

@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   RESPONSIVE 3+2 CARDS
========================= */

@media (max-width: 992px) {
    .custom-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .custom-card {
        grid-column: span 1 !important;
    }
}

@media (max-width: 600px) {
    .custom-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   RESPONSIVE SPLIT LAYOUT
========================= */

@media (max-width: 992px) {
    .contact-wrapper {
        flex-direction: column;
    }
}


/*LOGO*/
@media (max-width: 768px) {
    .logo-img {
        width: 130px;
    }
}