/* ===================================
   Variables CSS - Paleta Rosada Femenina
   =================================== */
:root {
    --primary-color: #ec4899;
    --primary-hover: #db2777;
    --secondary-color: #f472b6;
    --accent-color: #fbbf24;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #fce7f3;
    --bg-gray: #fdf2f8;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(236, 72, 153, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(236, 72, 153, 0.15);
    --shadow-lg: 0 10px 25px -3px rgba(236, 72, 153, 0.25);
    --shadow-glow: 0 0 30px rgba(236, 72, 153, 0.3);
    --radius: 12px;
    --gradient-pink: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 50%, #f9a8d4 100%);
    --gradient-primary: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

/* ===================================
   Reset y Base
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 25%, #f9a8d4 50%, #f472b6 75%, #ec4899 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
    color: var(--text-primary);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(244, 114, 182, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(249, 168, 212, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

/* ===================================
   Contenedor Principal
   =================================== */
.container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.form-wrapper {
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    padding: 45px;
    animation: fadeInUp 0.6s ease-out;
    border: 2px solid rgba(236, 72, 153, 0.1);
    position: relative;
    overflow: hidden;
}

.form-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.form-wrapper::after {
    content: '✨';
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 24px;
    opacity: 0.6;
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Encabezado del Formulario
   =================================== */
.form-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.form-header::before {
    content: '💌';
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.form-header h1 {
    font-size: 32px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ===================================
   Honeypot (Anti-spam)
   =================================== */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

/* ===================================
   Grupos de Formulario
   =================================== */
.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
    margin-bottom: 24px;
}

label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

label::before {
    content: '◆';
    font-size: 8px;
    color: var(--secondary-color);
}

.required {
    color: var(--error-color);
    font-weight: 700;
}

/* ===================================
   Inputs y Textarea
   =================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--bg-gray);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
    transform: translateY(-1px);
}

input[type="text"].error,
input[type="email"].error,
input[type="tel"].error,
select.error,
textarea.error {
    border-color: var(--error-color);
    background-color: #fef2f2;
}

input[type="text"].success,
input[type="email"].success,
input[type="tel"].success,
select.success,
textarea.success {
    border-color: var(--success-color);
    background-color: #f0fdf4;
}

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

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ec4899' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* ===================================
   Contador de Caracteres
   =================================== */
.char-counter {
    text-align: right;
    font-size: 13px;
    color: var(--secondary-color);
    margin-top: 6px;
    font-weight: 500;
}

/* ===================================
   Checkbox Personalizado
   =================================== */
.checkbox-group {
    margin-bottom: 28px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.checkbox-label:hover .checkbox-custom {
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.privacy-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.privacy-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ===================================
   Mensajes de Error
   =================================== */
.error-message {
    display: block;
    color: var(--error-color);
    font-size: 13px;
    margin-top: 6px;
    min-height: 18px;
    font-weight: 500;
}

/* ===================================
   Botón de Envío
   =================================== */
.btn-submit {
    width: 100%;
    padding: 16px 24px;
    font-size: 17px;
    font-weight: 600;
    color: var(--white);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px -5px rgba(236, 72, 153, 0.5);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-submit:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid var(--white);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

/* ===================================
   Mensaje de Respuesta
   =================================== */
.response-message {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    display: none;
    animation: slideDown 0.4s ease-out;
}

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

.response-message.show {
    display: block;
}

.response-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.response-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* ===================================
   Modal de Aviso de Privacidad
   =================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    padding: 35px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: 300;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 24px;
}

.modal-body {
    color: var(--text-secondary);
    line-height: 1.8;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal-body li {
    margin-bottom: 8px;
}

.modal-body strong {
    color: var(--text-primary);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .form-wrapper {
        padding: 30px 20px;
    }

    .form-header h1 {
        font-size: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-group-small,
    .form-group-large {
        margin-bottom: 24px;
    }

    .modal-content {
        padding: 25px 20px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .form-wrapper {
        padding: 25px 18px;
        border-radius: 12px;
    }

    .form-header h1 {
        font-size: 22px;
    }

    .form-header p {
        font-size: 14px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px; /* Previene zoom en iOS */
    }
}

/* ===================================
   Accesibilidad
   =================================== */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
