:root {
    --negro: #000000;
    --amarillo: #f3ce37;
    --blanco: #ffffff;
    --naranja: #f8b133;
    --gris: #ede6d9;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--blanco);
    background-color: var(--naranja);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--amarillo);
}

ul {
    list-style: none;
}

/* Navbar */
.navbar {
    background-color: var(--negro);
    color: var(--blanco);
    padding: 15px 0;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    display: flex;
    align-items: center;
    margin-right: auto; /* Empuja los otros elementos a la derecha */
}

.navbar .logo img {
    height: 35px;
    filter: brightness(1.2);
}

.navbar .nav-menu {
    display: flex;
    align-items: center;
    gap: 30px; /* Espacio entre la lista de enlaces y el botón */
}

.navbar .nav-menu ul {
    display: flex;
    align-items: center;
    gap: 30px; /* Espacio entre los enlaces del menú */
    margin: 0;
    padding: 0;
}

.navbar .nav-menu ul li a {
    color: var(--blanco);
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    transition: color 0.3s ease;
}

.navbar .nav-menu ul li a:hover {
    color: var(--amarillo);
}

.navbar .nav-menu .btn-nav {
    background-color: var(--naranja);
    color: var(--negro);
    padding: 8px 18px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    border: none;
    cursor: pointer;
}

/* Botón de móvil oculto por defecto */
.btn-nav-mobile {
    display: none;
}

.menu-toggle {
    display: none;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Hero Section */
.hero-section {
    background-image: url(../img/contacto/portada-contacto.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--naranja);
    text-align: center;
    padding: 150px 20px;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-section .container {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero-section h1 {
    font-size: 3.8em;
    margin-bottom: 25px;
    color: var(--naranja);
    font-weight: 800;
    line-height: 1.15;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.hero-section p {
    font-size: 1.2em;
    margin-bottom: 0;
    color: var(--blanco);
    font-weight: 400;
    font-family: 'Poppins', sans-serif;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- SECCIÓN DE CONTACTO --- */
.contact-section {
    position: relative;
    padding: 100px 0;
    overflow: hidden; 
    color: var(--negro);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background-image: url(../img/contacto/portada-form.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.contact-top-line,
.contact-bottom-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--amarillo) 20%, var(--naranja) 80%, transparent);
    z-index: 1; 
}

.contact-top-line {
    top: 0;
}

.contact-bottom-line {
    bottom: 0;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.contact-form-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    background-color: transparent;
    padding: 50px;
    gap: 60px;
}

.contact-info-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.info-card {
    background-color: #ffe499;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.info-card:hover {
    background-color: #ffcb3d;
    transform: translateY(-5px);
}

.info-card i {
    font-size: 3em;
    color: var(--negro);
    margin-bottom: 15px;
}

.info-card h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 8px;
    color: #b54d00;
}

.info-card a {
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    color: var(--negro);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-card a:hover {
    color: #9c4b00;
    font-weight: bold;
}

.contact-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-form h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3em;
    font-weight: 700;
    color: var(--blanco);
    margin-bottom: 15px;
}

.contact-form p {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95em;
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--blanco);
}

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

.form-row {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
}

.form-row.full-width {
    flex-basis: 100%;
}

.form-row label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
    color: var(--blanco);
    margin-bottom: 8px;
    font-weight: 600;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row textarea {
    width: 100%;
    padding: 12px 15px;
    border: none;
    background-color: var(--naranja);
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95em;
    color: #b5791a;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: #b5791a;
    opacity: 1;
}

.form-row input:focus,
.form-row textarea:focus {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), 0 0 0 2px var(--primary-dark);
}

.form-row textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    background-color: transparent;
    color: var(--gris);
    padding: 15px 30px;
    border: 4px solid #d64502;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
    width: fit-content;
    align-self: center;
}

.submit-btn:hover {
    background-color: #d64502;
    color: var(--blanco);
    transform: translateY(-2px);
}

/* --- Footer General --- */
.footer {
    width: 100%;
}

.footer-top {
    background-image: url(../img/contacto/footer-C1.png);
    background-size: cover;
    background-position: initial;
    background-repeat: no-repeat;
    display: flex;
    justify-content: flex-start;
    padding: 60px 10%;
    color: var(--negro);
    position: relative;
    align-items: flex-start;
}

.footer-logo {
    display: flex;
    align-items: middle;
    justify-content: center;
    width: 100px;
    height: 150px;
    position: relative;
}

.footer-logo a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.footer-logo-image {
    position: absolute;
    left: 100px;
    width: 150px;
    max-height: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.footer-logo-image:hover {
    transform: scale(1.05);
}

.footer-links {
    display: flex;
    gap: 100px;
    margin-left: 300px;
    margin-top: -2%;
}

.link-column h4 {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--negro);
}

.link-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.link-column li {
    margin-bottom: 8px;
}

.link-column li a {
    font-size: 0.95em;
    color: var(--negro);
    text-decoration: none;
    transition: color 0.3s ease;
}

.link-column li a:hover {
    color: #d64502;
    cursor: pointer;
}

.footer-social-media {
    background-image: url(../img/contacto/footer-C2.png);
    background-size: cover;
    background-position: initial;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 20px 0;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--negro);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--naranja);
    font-size: 1.5em;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
    background-color: var(--blanco);
    color: var(--negro);
}

.footer-bottom {
    background-image: url(../img/contacto/footer-C3.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
    padding: 20px 5%;
    color: var(--negro);
    font-size: 0.9em;
}

/* ---------------------------------------------------- */
/* MEDIA QUERIES PARA RESPONSIVE DESIGN */
/* ---------------------------------------------------- */

@media (max-width: 1024px) {
    /* Ajustes para pantallas más pequeñas (Laptops y Tablets) */
    .container {
        padding: 0 15px;
    }

    .navbar .logo {
        margin-left: 0;
    }

    /* Ajuste de espaciado en pantallas más pequeñas */
    .navbar .nav-menu {
        gap: 20px;
    }
    
    .navbar .nav-menu ul {
        gap: 20px;
    }
    
    .hero-section {
        padding: 120px 10px;
        min-height: 50vh;
    }

    .hero-section h1 {
        font-size: 3em;
    }

    .hero-section p {
        font-size: 1.1em;
    }
    
    /* Contacto Section */
    .contact-form-wrapper {
        grid-template-columns: 1fr;
        padding: 30px;
        gap: 40px;
    }
    
    .contact-form h2 {
        font-size: 2.5em;
    }
    
    .form-row {
        flex-basis: 100%;
        min-width: unset;
    }

    /* Footer */
    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 40px 10%;
    }

    .footer-logo {
        position: static;
        width: 100px;
        height: auto;
        margin-bottom: 20px;
    }

    .footer-logo-image {
        position: static;
        width: 100px;
        max-height: none;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        margin-left: 0;
        margin-top: 20px;
    }

    .link-column h4 {
        margin-bottom: 10px;
    }

    .footer-social-media {
        padding: 15px 0;
    }
}

@media (max-width: 767px) {
    /* Estilos para móviles (teléfonos) */
    .navbar .container {
        flex-wrap: nowrap;
    }

    .navbar .nav-menu {
        display: block; /* Cambio: Usamos 'block' para que ocupe todo el ancho */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--negro);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        /* Cambio: Usamos 'height' y 'overflow' para la transición */
        height: 0;
        overflow: hidden; 
        transition: height 0.3s ease-in-out;
    }

    .navbar .nav-menu.active {
        /* Ajusta la altura del menú cuando está activo */
        height: 350px; /* Puedes ajustar este valor si el contenido del menú cambia */
    }

    .navbar .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--blanco);
        font-size: 1.5em;
        cursor: pointer;
    }

    .navbar .nav-menu ul {
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
        gap: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar .nav-menu ul li {
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar .nav-menu ul li a {
        display: block;
        padding: 15px 0;
    }
    
    /* Ocultar el botón de escritorio en móvil */
    .navbar .btn-desktop-li {
        display: none;
    }
    
    /* Mostrar y estilizar el botón de móvil */
    .btn-nav-mobile {
        display: block;
        background-color: var(--naranja);
        color: var(--negro);
        padding: 8px 18px;
        border-radius: 5px;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.9em;
        border: none;
        cursor: pointer;
    }

    .navbar .logo {
        margin-left: 0;
    }

    .hero-section {
        padding: 80px 10px;
    }

    .hero-section h1 {
        font-size: 2em;
    }

    .hero-section p {
        font-size: 1em;
    }

    /* Contacto Section */
    .contact-section {
        padding: 40px 0;
    }
    
    .contact-form-wrapper {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }

    .contact-form h2 {
        font-size: 2em;
    }
    
    .form-row {
        flex-basis: 100%;
    }
    
    .info-card h4 {
        font-size: 1.1em;
    }
    
    .info-card a {
        font-size: 0.9em;
    }

    /* Footer */
    .footer-top {
        padding: 30px 5%;
    }

    .footer-links {
        gap: 20px;
    }

    .link-column h4 {
        font-size: 1.1em;
    }

    .footer-social-media {
        padding: 15px 0;
    }
}

/* Media Query para pantallas más pequeñas, como móviles estrechos */
@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2em;
    }
    
    .contact-form h2 {
        font-size: 2em;
    }
    
    .contact-form p {
        font-size: 0.9em;
    }
    
    .info-card i {
        font-size: 2.5em;
    }
    
    .submit-btn {
        padding: 12px 25px;
        font-size: 1em;
    }
}