/* ═══════════════════════════════════════════════
   Sección: Formulario de consulta directa
   Archivo: css/posgrados/contact-form.css
   ═══════════════════════════════════════════════ */

.contact-form-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    padding: 72px 20px;
    border-top: 1px solid #e5e7eb;
}

.contact-form-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Header ── */
.contact-form-header {
    text-align: center;
    margin-bottom: 52px;
}

.contact-form-badge {
    display: inline-block;
    background: #f3f0ff;
    color: #6c3fcf;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.contact-form-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.contact-form-subtitle {
    font-size: 16px;
    color: #6b7280;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Body: dos columnas ── */
.contact-form-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* ── Beneficios ── */
.contact-form-benefits {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px 24px;
    background: #1a1a2e;
    border-radius: 20px;
    position: sticky;
    top: calc(var(--header-height, 104px) + 20px);
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.benefit-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffd700;
}

.benefit-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.benefit-text strong {
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.benefit-text span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

/* ── Formulario ── */
.contact-form-wrapper {
    background: white;
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 20px;
}

.cf-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cf-group-full {
    grid-column: span 2;
}

.cf-group label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.cf-required { color: #ef4444; margin-left: 2px; }

.cf-input {
    padding: 11px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #374151;
    background: #fafafa;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
    width: 100%;
}

.cf-input:focus {
    border-color: #6c3fcf;
    background: white;
    box-shadow: 0 0 0 3px rgba(108, 63, 207, 0.08);
}

.cf-input.error {
    border-color: #ef4444;
    background: #fff5f5;
}

.cf-textarea {
    resize: vertical;
    min-height: 88px;
}

.cf-char-count {
    font-size: 11px;
    color: #9ca3af;
    text-align: right;
    margin-top: -2px;
}

/* ── Error message ── */
.cf-error-msg {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: #991b1b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cf-error-msg::before {
    content: '⚠';
    font-size: 15px;
}

/* ── Submit button ── */
.cf-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: #1a1a2e;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 14px;
}

.cf-submit-btn:hover:not(:disabled) {
    background: #16213e;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 26, 46, 0.25);
}

.cf-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cf-submit-btn.loading svg {
    animation: cfSpin 1s linear infinite;
}

@keyframes cfSpin { to { transform: rotate(360deg); } }

/* ── Privacy note ── */
.cf-privacy-note {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    line-height: 1.5;
}

/* ── Success state ── */
.cf-success {
    text-align: center;
    padding: 20px 10px;
}

.cf-success-icon {
    width: 64px;
    height: 64px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: cfPopIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cfPopIn {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.cf-success-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.cf-success-text {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto 24px;
}

.cf-new-query-btn {
    padding: 10px 24px;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.cf-new-query-btn:hover { background: #e5e7eb; }

/* ══ Responsive ══ */
@media (max-width: 900px) {
    .contact-form-body {
        grid-template-columns: 1fr;
    }

    .contact-form-benefits {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
        position: static;
        padding: 20px;
    }

    .benefit-item { flex: 1; min-width: 180px; }
}

@media (max-width: 640px) {
    .contact-form-section { padding: 48px 16px; }
    .contact-form-title   { font-size: 26px; }
    .contact-form-wrapper { padding: 24px 18px; }

    .contact-form-grid {
        grid-template-columns: 1fr;
    }

    .cf-group-full { grid-column: span 1; }

    .contact-form-benefits { display: none; }
}
