.contact-section {
    background-color: var(--color-background);
    padding: 80px 0;
    text-align: center;
}

.contact-section .cta-button {
    background-color: var(--color-primary);
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.contact-section .cta-button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.contact-hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 120px 15px 80px 15px;
    overflow: hidden;
}

.contact-form-container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-form-container h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: #fff;
    text-align: center;
}

.storytelling-text {
    font-size: 1.1rem;
    color: #f0f0f0;
    line-height: 1.7;
    margin-bottom: 20px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info-section {
    padding: 80px 0;
    background-color: var(--color-background);
}

.contact-info-container {
    min-width: 300px;
    max-width: 900px;
    margin: 40px auto 0 auto;
}

.contact-info-container h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
    display: inline-block;
    color: var(--color-text);
}

.contact-info-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.contact-info-list li {
    margin-bottom: 15px;
    font-size: 1.1em;
    color: var(--color-text-secondary);
}

.contact-info-list li strong {
    color: var(--color-text);
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.contact-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #000;
}

.contact-infinity-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scale(1.15);
    object-fit: cover;
    opacity: 0.5;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

#lamarr-contact-form {
    max-width: 100%;
    margin: 40px 0 0 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    position: relative;
    margin-bottom: 25px;
    text-align: left;
}

#lamarr-contact-form input,
#lamarr-contact-form textarea,
#lamarr-contact-form select {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    outline: none;
    font-size: 1em;
    font-family: var(--font-primary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    color: #fff;
}

#lamarr-contact-form select {
    cursor: pointer;
}

#lamarr-contact-form select:invalid {
    color: #ccc;
}

#lamarr-contact-form select option {
    color: #000;
    background: #fff;
}

#lamarr-contact-form input:focus,
#lamarr-contact-form textarea:focus,
#lamarr-contact-form select:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.2);
}

#lamarr-contact-form label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #ccc;
    pointer-events: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    background-color: transparent;
    padding: 0 5px;
}

#lamarr-contact-form label.label-select {
    top: -10px;
    font-size: 0.8em;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.65);
}

#lamarr-contact-form input:focus + label,
#lamarr-contact-form textarea:focus + label,
#lamarr-contact-form input:not(:placeholder-shown) + label,
#lamarr-contact-form textarea:not(:placeholder-shown) + label {
    top: -10px;
    font-size: 0.8em;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.65);
}

#lamarr-contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

#lamarr-contact-form button {
    background-color: var(--color-primary);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#lamarr-contact-form button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.contact-info {
    padding: 0;
    text-align: left;
}

.contact-info ul {
    list-style: none;
    padding: 0;
}

.contact-info li {
    margin-bottom: 15px;
    font-size: 1.1em;
}

@media (max-width: 992px) {
    .contact-hero-section {
        min-height: 0;
        padding: 0;
        display: block;
    }
    .contact-video-wrapper {
        display: none; /* Ocultar video en móvil para optimizar rendimiento */
    }
    /* --- MEJORAS VISUALES EN EL FORMULARIO MÓVIL --- */
    .contact-form-container {
        border-radius: 0;
        padding: 25px 20px; /* Reducir padding */
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: var(--color-background); /* Fondo Blanco */
        box-shadow: none;
        margin-top: 0;
    }
    .contact-form-container h2 {
        color: var(--color-text); /* Título oscuro */
        font-size: 2.2rem;
    }
    .storytelling-text {
        color: var(--color-text-secondary); /* Texto gris */
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    /* Campos de formulario */
    #lamarr-contact-form input,
    #lamarr-contact-form textarea,
    #lamarr-contact-form select {
        background: #f8fafc; /* Fondo gris claro */
        border: 1px solid var(--color-border);
        color: var(--color-text);
        padding: 12px;
        font-size: 0.95rem;
    }
    #lamarr-contact-form input:focus,
    #lamarr-contact-form textarea:focus,
    #lamarr-contact-form select:focus {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
        background-color: #fff;
    }
    
    /* Etiquetas Flotantes */
    #lamarr-contact-form label {
        color: var(--color-text-secondary);
        background-color: transparent;
        top: 12px;
        left: 12px;
        font-size: 0.95rem;
    }

    #lamarr-contact-form input:focus + label,
    #lamarr-contact-form textarea:focus + label,
    #lamarr-contact-form input:not(:placeholder-shown) + label,
    #lamarr-contact-form textarea:not(:placeholder-shown) + label,
    #lamarr-contact-form label.label-select {
        top: -8px;
        font-size: 0.75rem;
        color: var(--color-primary); /* Texto de etiqueta en azul */
        background-color: var(--color-background); /* Fondo blanco para aislar */
        padding: 0 4px;
        left: 10px;
    }

    #lamarr-contact-form textarea {
        min-height: 120px;
    }

    /* Botón */
    #lamarr-contact-form button {
        width: 100%;
        padding: 14px 30px;
        font-weight: 700;
        border-radius: 50px;
    }
}


@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
    padding: 15px;
}

.popup-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    width: 100%;
    position: relative;
    transform: scale(0.9);
    animation: scaleIn 0.3s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes scaleIn {
    to { transform: scale(1); }
}

.popup-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.8rem;
    font-weight: bold;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.popup-close-btn:hover {
    color: #333;
}

.popup-content h3 {
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 15px;
}

.popup-content p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 25px;
}

.popup-content .btn-primary {
    width: 100%;
    text-align: center;
}