/* CTC Contact Form Styles */

/* Reset y estilos base para el plugin */
.form-container * {
    box-sizing: border-box;
}

.form-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    max-width: 1060px;
    margin: 30px auto;
    font-family: "Raleway", Arial, Helvetica, sans-serif;
}

.contact-form {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

/* Estilos para el formulario */
.wpcf7 {
    width: 100%;
}

.wpcf7-form p {
    margin-bottom: -15px;
}

.wpcf7-form label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 600;
    font-size: 15px;
    position: relative;
    line-height: 1.2;
}

/* Estilos para los iconos de Font Awesome */
.wpcf7-form label i {
    color: #FF4444;
    margin-right: 8px;
}

.wpcf7-form-control-wrap {
    display: block;
    width: 100%;
    margin-top: 3px;
}

.wpcf7-text,
.wpcf7-email,
.wpcf7-textarea,
.wpcf7-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    font-family: "Raleway", sans-serif;
    transition: all 0.3s ease;
    background: #fafafa;
}

.wpcf7-text:focus,
.wpcf7-email:focus,
.wpcf7-textarea:focus,
.wpcf7-select:focus {
    outline: none;
    border-color: #FF4444;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 68, 68, 0.1);
}

/* Estilo para la opción placeholder del select */
.wpcf7-select option[value=""] {
    color: #999;
    font-style: italic;
}

.wpcf7-textarea {
    resize: vertical;
    line-height: 1.6;
    min-height: 120px;
}

.wpcf7-submit {
    background: linear-gradient(135deg, #FF4444, #FF6B6B);
    color: white;
    padding: 18px 45px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 30px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(255, 68, 68, 0.25);
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    display: block;
    margin-top: 30px;
}

.wpcf7-submit span,
.wpcf7-submit {
    position: relative;
    z-index: 2;
}

.wpcf7-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(255, 68, 68, 0.35);
}

.wpcf7-submit:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

/* Estados del botón de envío */
.wpcf7-submit .btn-text {
    display: inline;
}

.wpcf7-submit .btn-loading {
    display: none;
}

/* Estado enviando */
.wpcf7-form.submitting .wpcf7-submit,
.ctc-contact-form.submitting .wpcf7-submit {
    pointer-events: none;
    opacity: 0.9;
}

.wpcf7-form.submitting .wpcf7-submit .btn-text,
.ctc-contact-form.submitting .wpcf7-submit .btn-text {
    display: none;
}

.wpcf7-form.submitting .wpcf7-submit .btn-loading,
.ctc-contact-form.submitting .wpcf7-submit .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Spinner animado */
.wpcf7-form.submitting .wpcf7-submit .btn-loading::before,
.ctc-contact-form.submitting .wpcf7-submit .btn-loading::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: buttonSpin 0.8s linear infinite;
}

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

/* Ocultar el efecto shine durante envío */
.wpcf7-form.submitting .wpcf7-submit::before,
.ctc-contact-form.submitting .wpcf7-submit::before {
    display: none !important;
    animation: none !important;
}

.wpcf7-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        rgba(255, 255, 255, 0.5),
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transform: skewX(-25deg);
    animation: autoShine 3s infinite;
    z-index: 1;
}

@keyframes autoShine {
    0%, 70% {
        left: -150%;
    }
    100% {
        left: 150%;
    }
}

.wpcf7-submit:hover::before {
    animation: hoverShine 0.6s ease;
}

@keyframes hoverShine {
    0% {
        left: -150%;
    }
    100% {
        left: 150%;
    }
}

/* Ocultar spinner original de CF7 */
.wpcf7-spinner {
    display: none !important;
}

/* Mensajes de respuesta */
.wpcf7-response-output {
    margin: 20px 0 0;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.wpcf7-response-output.show {
    display: block;
}

.wpcf7-response-output.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
    animation: slideIn 0.5s ease;
}

.wpcf7-response-output.error {
    background: #fff3e0;
    color: #e65100;
    border: 2px solid #ffcc80;
}

/* Errores de validación individuales */
.wpcf7-not-valid {
    border-color: #f44336 !important;
    animation: shake 0.5s ease;
}

.wpcf7-not-valid-tip {
    color: #f44336;
    font-size: 14px;
    margin-top: 5px;
    display: block !important;
    font-weight: 500;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Info boxes */
.form-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-box {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.info-box-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.info-box-header i {
    font-size: 24px;
    color: #FF4444;
}

.info-box-header h3 {
    margin: 0;
    color: #333;
    font-weight: 700;
}

.info-box h3,
.info-box h4 {
    color: #333;
    font-weight: 700;
}

.info-box h3 {
    font-size: 20px;
}

.info-box h4 {
    font-size: 18px;
}

.info-box p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
}

.email-link {
    display: inline-block;
    font-size: 18px;
    color: #FF4444;
    text-decoration: none;
    font-weight: 600;
    margin: 10px 0;
    transition: all 0.3s ease;
}

.email-link:hover {
    color: #FF6B6B;
    text-decoration: underline;
}

.highlight-box {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.05) 0%, rgba(255, 68, 68, 0.02) 100%);
    border-color: rgba(255, 68, 68, 0.2);
    text-align: center;
}

.highlight-box > i {
    font-size: 48px;
    color: #FF4444;
    margin-bottom: 15px;
}

/* Animaciones */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .form-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-container {
        padding: 20px;
        gap: 30px;
    }
    
    .contact-form {
        padding: 25px;
    }
    
    .info-box {
        padding: 20px;
    }
}

/* Grid para campos en dos columnas (opcional) */
.wpcf7-form {
    display: grid;
    gap: 0;
}

.wpcf7-form p:nth-child(2),
.wpcf7-form p:nth-child(3) {
    display: inline-block;
    width: calc(50% - 10px);
}

.wpcf7-form p:nth-child(2) {
    margin-right: 20px;
}

@media (max-width: 768px) {
    .wpcf7-form p:nth-child(2),
    .wpcf7-form p:nth-child(3) {
        display: block;
        width: 100%;
        margin-right: 0;
    }
}

/* Ocultar elementos de Contact Form 7 no utilizados */
.wpcf7 .screen-reader-response {
    position: absolute !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    height: 1px !important;
    width: 1px !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Ocultar badge de reCAPTCHA v3 en toda la web */
.grecaptcha-badge {
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Aviso legal de reCAPTCHA solo en el formulario */
.ctc-recaptcha-notice {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    line-height: 1.4;
}

.ctc-recaptcha-notice a {
    color: #FF4444;
    text-decoration: none;
}

.ctc-recaptcha-notice a:hover {
    text-decoration: underline;
}