/* ===== Sección de Contacto ===== */
.contacto-section {
    padding: 80px 20px;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.contacto-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.contacto-header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 0.8s ease-out;
}

.contacto-titulo {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(33, 150, 243, 0.2);
}

.contacto-subtitulo {
    font-size: 1.2rem;
    color: rgba(238, 242, 255, 0.7);
    max-width: 500px;
    margin: 0 auto;
}

/* ===== Contenido Principal ===== */
.contacto-contenido {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

/* ===== Información de Contacto ===== */
.contacto-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: rgba(33, 150, 243, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(33, 150, 243, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    animation: slideInLeft 0.8s ease-out;
}

.info-item:hover {
    background: rgba(33, 150, 243, 0.15);
    border-color: rgba(33, 150, 243, 0.4);
    transform: translateX(10px);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: rgba(33, 150, 243, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2196f3;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.info-item:hover .info-icon {
    background: rgba(33, 150, 243, 0.3);
    transform: scale(1.1);
    color: #1976d2;
}

.info-item h3 {
    color: #eef2ff;
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.info-item p {
    color: rgba(238, 242, 255, 0.7);
    margin: 0;
}

/* ===== Formulario ===== */
.contacto-form-wrapper {
    background: rgba(26, 26, 26, 0.4);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(33, 150, 243, 0.2);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px 0 rgba(33, 150, 243, 0.1),
        inset 0 0 20px rgba(33, 150, 243, 0.05);
    animation: slideInRight 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.contacto-form-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(33, 150, 243, 0.1), transparent 70%);
    animation: float 20s infinite ease-in-out;
    pointer-events: none;
}

.contacto-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
    z-index: 2;
}

/* ===== Grupos de Formulario ===== */
.form-grupo {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-label {
    font-weight: 600;
    color: #eef2ff;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.form-input,
.form-textarea,
select.form-input {
    padding: 12px 16px;
    border: 2px solid rgba(33, 150, 243, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: rgba(238, 242, 255, 0.05);
    color: #eef2ff;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(238, 242, 255, 0.4);
}

.form-input:focus,
.form-textarea:focus,
select.form-input:focus {
    outline: none;
    border-color: #2196f3;
    background: rgba(33, 150, 243, 0.1);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
}

.form-input:hover,
.form-textarea:hover,
select.form-input:hover {
    border-color: #2196f3;
    background: rgba(33, 150, 243, 0.08);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== Contador de caracteres ===== */
.form-char-count {
    font-size: 0.85rem;
    color: rgba(238, 242, 255, 0.5);
    text-align: right;
    position: absolute;
    right: 0;
    top: -25px;
}

/* ===== Errores ===== */
.form-error {
    color: #ff6b6b;
    font-size: 0.85rem;
    min-height: 20px;
    display: block;
}

.form-error:empty {
    display: none;
}

/* ===== Checkbox ===== */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(33, 150, 243, 0.1);
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2196f3;
}

.form-checkbox label {
    cursor: pointer;
    font-size: 0.95rem;
    color: rgba(238, 242, 255, 0.8);
    margin: 0;
}

/* ===== Botón ===== */
.btn-enviar {
    padding: 14px 30px;
    background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%);
    color: white;
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.btn-enviar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-enviar:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(33, 150, 243, 0.3);
    border-color: rgba(33, 150, 243, 0.5);
}

.btn-enviar:hover::before {
    width: 300px;
    height: 300px;
}

.btn-enviar:active {
    transform: translateY(0);
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-icon {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.btn-enviar:hover .btn-icon {
    transform: translateX(3px);
}

.btn-enviar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== Mensajes de Respuesta ===== */
.respuesta {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    animation: slideInDown 0.4s ease-out;
}

.respuesta.exito {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.respuesta.error {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* ===== Animaciones ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 30px) rotate(240deg);
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .contacto-section {
        padding: 60px 20px;
    }

    .contacto-titulo {
        font-size: 2rem;
    }

    .contacto-subtitulo {
        font-size: 1rem;
    }

    .contacto-contenido {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contacto-form-wrapper {
        padding: 25px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contacto-info {
        gap: 20px;
    }

    .info-item {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .info-icon {
        width: 40px;
        height: 40px;
        margin: 0 auto;
    }

    .form-input,
    .form-textarea,
    select.form-input {
        padding: 10px 12px;
        font-size: 16px; /* Previene zoom en iOS */
    }
}

@media (max-width: 480px) {
    .contacto-section {
        padding: 40px 15px;
    }

    .contacto-titulo {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .contacto-form-wrapper {
        padding: 20px;
        border-radius: 15px;
    }

    .contacto-form {
        gap: 20px;
    }

    .btn-enviar {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}
