/* Layout de la página de Contacto */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8fafc;
    color: #333;
    min-height: 100vh;
}

#backgroundCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Barra superior Glassmorphism */
.form-header-minimal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    padding-top: calc(15px + env(safe-area-inset-top, 0px));
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.form-header-minimal a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.form-header-minimal .logo {
    height: 40px;
    transition: transform 0.3s ease;
}

.form-header-minimal .logo:hover {
    transform: scale(1.05);
}

.form-header-minimal .brand-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
}

.form-header-minimal .btn-back {
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-header-minimal .btn-back:hover {
    background-color: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Master Layout Dividido */
.contact-layout-master {
    display: flex;
    max-width: 1000px;
    margin: 40px auto 60px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 600px;
}

/* Panel Izquierdo: Sidebar de Contacto */
.contact-sidebar {
    width: 40%;
    background-size: cover;
    background-position: center;
    padding: 50px 40px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 15px;
    border: none;
    padding: 0;
    color: white;
}

.sidebar-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 40px;
}

.contact-info-premium {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: auto;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-icon {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.info-item div {
    font-size: 0.9rem;
    opacity: 0.95;
    line-height: 1.4;
    color: #f1f5f9;
}

.info-item strong {
    color: white;
    font-size: 1rem;
}

/* Panel Derecho: Formulario */
.contact-form-wrapper {
    width: 60%;
    padding: 50px 60px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-main-title {
    font-size: 1.8rem;
    color: #0f172a;
    margin: 0 0 5px 0;
    font-weight: 800;
}

.form-main-subtitle {
    color: #64748b;
    margin-bottom: 35px;
    font-size: 0.95rem;
}

/* Estructura Interna del Formulario */
.unified-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.form-row {
    display: flex;
    gap: 20px;
    width: 100%;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.input-group label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.8px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
}

/* Soft UI Inputs */
input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 16px 20px;
    background-color: #f8fafc;
    border: 2px solid transparent;
    border-radius: 14px;
    font-size: 1rem;
    color: #1e293b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    background-color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Botón Premium */
.btn-submit {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    margin-top: 10px;
    width: 100%;
}

.btn-submit:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px -5px rgba(37, 99, 235, 0.5);
}

/* Responsive */
@media (max-width: 900px) {
    .contact-layout-master {
        flex-direction: column;
        margin: 20px;
        max-width: 100%;
        min-height: auto;
    }

    .contact-sidebar {
        width: 100%;
        padding: 40px 30px;
    }

    .contact-form-wrapper {
        width: 100%;
        padding: 40px 30px;
    }

    .form-row {
        flex-direction: column;
        gap: 20px;
    }

    .form-header-minimal {
        padding: 15px 20px;
    }
}

@media (max-width: 768px) {
    .contact-layout-master {
        margin: 15px;
        border-radius: 16px;
    }

    .contact-form-wrapper {
        padding: 30px 20px;
    }

    .form-row {
        gap: 15px;
    }

    .unified-form {
        gap: 15px;
    }

    .btn-submit {
        width: 100%;
        min-height: 48px;
        font-size: 1.1rem;
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .form-header-minimal {
        padding: 10px 15px;
        padding-top: calc(10px + env(safe-area-inset-top, 0px));
    }

    .form-header-minimal .logo {
        height: 32px;
    }

    .form-header-minimal .brand-text {
        display: none;
    }

    .form-header-minimal .btn-back {
        padding: 6px 12px;
        font-size: 13px;
    }

    .contact-layout-master {
        margin: 10px;
        border-radius: 12px;
    }

    .contact-sidebar {
        padding: 30px 20px;
    }

    .sidebar-title {
        font-size: 1.5rem;
    }

    .contact-form-wrapper {
        padding: 25px 15px;
    }

    .form-main-title {
        font-size: 1.5rem;
    }
}