/* Estilos Generales */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    color: #fff;
    background-color: #0d0d0d;
    height: 100vh;
    overflow-x: hidden; /* Evita scroll horizontal */
    overflow-y: auto; /* Permite scroll si la landing es larga */
}

/* Hero Header */
.hero-header {
    height: 100vh; /* Ocupa toda la altura de la ventana */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 0 20px;
    box-sizing: border-box;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    filter: brightness(0.4) grayscale(0.2);
    transform: scale(1.1);
    animation: parallaxEffect 30s infinite alternate ease-in-out;
}

@keyframes parallaxEffect {
    0% { transform: scale(1.1) translateX(0); }
    50% { transform: scale(1.2) translateX(5%); }
    100% { transform: scale(1.1) translateX(0); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(231, 76, 60, 0.4), rgba(44, 62, 80, 0.6), rgba(231, 76, 60, 0.4));
    background-size: 300% 300%;
    animation: gradientShift 15s ease infinite;
    z-index: 1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.header-logo {
    position: absolute;
    top: 40px;
    left: 50px;
    z-index: 10;
}
.header-logo img {
    max-width: 160px;
    filter: drop-shadow(0 0 8px rgba(0,0,0,0.5));
}

.hero-content {
    max-width: 900px;
    z-index: 5;
    position: relative;
    padding: 20px;
}

.hero-content h1 {
    font-size: 4.2em;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 4px 10px rgba(0,0,0,0.4);
    line-height: 1.2;
    min-height: 1.2em; /* Asegura un espacio para el texto */
    position: relative;
    overflow: hidden; /* Oculta el texto durante la transición si es necesario */
}

/* Animación de fade para el texto del header */
.rotating-text {
    opacity: 0;
    transition: opacity 1s ease-in-out; /* Controlado por JS */
}
.rotating-text.is-visible {
    opacity: 1;
}


.hero-content p {
    font-size: 1.4em;
    max-width: 700px;
    margin: 0 auto 50px;
    font-weight: 300;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.btn-primary {
    background-color: #e74c3c;
    color: #fff;
    border: none;
    padding: 20px 50px;
    font-size: 1.3em;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.5);
    animation: pulseGlow 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    animation: none;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.5); }
    50% { box-shadow: 0 0 0 25px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

/* Modal del Formulario (NO Full-Screen, centrado) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto; /* Permite scroll si el contenido es muy largo */
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: 'Poppins', sans-serif;
    padding: 20px; /* Padding general para el modal */
    box-sizing: border-box;
}

.modal-content {
    background-color: #ffffff;
    padding: 40px;
    margin: 5% auto; /* Margen para centrar y dejar espacio arriba/abajo */
    border-radius: 10px;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    max-width: 900px; /* Ancho máximo para el formulario */
    color: #333;
    animation: slideInFromTop 0.4s ease-out; /* Animación de entrada */
}

@keyframes slideInFromTop {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 25px;
    top: 25px;
    transition: color 0.3s ease;
}
.close-btn:hover {
    color: #666;
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.modal-header h2 {
    margin: 0;
    font-size: 2.2em;
    font-weight: 700;
}
.modal-header p {
    font-size: 1em;
    color: #7f8c8d;
    margin-top: 5px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group-full {
    grid-column: 1 / -1;
}

label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.9em;
}

.input-icon-container {
    position: relative;
}

.input-icon-container .icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #bdc3c7;
    font-size: 1.1em;
    pointer-events: none;
}

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.select-container {
    position: relative;
}

.select-container select {
    appearance: none;
    -webkit-appearance: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E") no-repeat right 15px center;
    background-size: 20px;
}

.ql-toolbar.ql-snow {
    border-radius: 8px 8px 0 0 !important;
    border-color: #ddd !important;
    background-color: #f9f9f9;
}
.ql-container.ql-snow {
    border-radius: 0 0 8px 8px !important;
    border-color: #ddd !important;
    min-height: 150px;
    font-family: 'Poppins', sans-serif !important;
    font-size: 1em !important;
    color: #333 !important;
}

.btn-secondary {
    width: 100%;
    padding: 15px;
    background-color: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin-top: 30px;
}

.btn-secondary:hover {
    background-color: #34495e;
    transform: translateY(-2px);
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    display: none;
}
.form-message.success {
    background-color: #d4edda;
    color: #155724;
}
.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Media Queries para Responsividad */
@media (max-width: 768px) {
    .header-logo {
        top: 20px;
        left: 20px;
    }
    .header-logo img {
        max-width: 120px;
    }
    .hero-content h1 {
        font-size: 3em;
    }
    .hero-content p {
        font-size: 1.1em;
        margin-bottom: 30px;
    }
    .btn-primary {
        padding: 15px 35px;
        font-size: 1em;
    }

    .modal-content {
        padding: 25px;
        margin: 5% auto;
        max-width: 95%;
    }
    .modal-header h2 {
        font-size: 1.8em;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select {
        padding: 10px 10px 10px 40px;
    }
    .select-container select {
        background-position: right 10px center;
    }
}

@media (max-width: 480px) {
    .header-logo {
        top: 15px;
        left: 15px;
    }
    .header-logo img {
        max-width: 100px;
    }
    .hero-content h1 {
        font-size: 2.2em;
    }
    .hero-content p {
        font-size: 0.9em;
        margin-bottom: 25px;
    }
    .btn-primary {
        padding: 12px 25px;
        font-size: 0.9em;
    }

    .modal-content {
        padding: 20px;
    }
    .modal-header h2 {
        font-size: 1.5em;
    }
}