/* ==========================================================================
   Join Us Section Styles
   ========================================================================== */

/* Section Headings */
.join-section .section-heading h2 {
    color: #061b49;
    font-weight: 700;
    font-size: 36px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.join-section .section-heading h4.sub-heading {
    color: #0d2a5a;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.join-section .section-heading p {
    color: #666;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 0;
}

.benefits-section .section-heading h2 {
    color: #061b49;
    font-weight: 700;
    font-size: 32px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.benefits-section .section-heading h4.sub-heading {
    color: #0d2a5a;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.join-section {
    padding: 80px 0;
    background: #fff;
}

.join-form-wrap {
    background: #fff;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(6, 27, 73, 0.1);
    border: 2px solid #f0f4ff;
    position: relative;
    overflow: hidden;
}

.join-form-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, #061b49 0%, #0d2a5a 100%);
}

.join-form .form-group {
    margin-bottom: 25px;
}

.join-form .form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.join-form .form-control {
    height: 55px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.3s ease;
    background: #fff;
    color: #333;
}

.join-form .form-control:focus {
    border-color: #061b49;
    box-shadow: 0 0 0 0.3rem rgba(6, 27, 73, 0.15);
    outline: none;
    transform: translateY(-2px);
}

.join-form .form-control::placeholder {
    color: #999;
    font-style: italic;
}

/* Área de carga de archivos mejorada */
.file-upload-area {
    position: relative;
    border: 3px dashed #e8e8e8;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: #061b49;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.file-upload-area.drag-over {
    border-color: #061b49;
    background: #e8f0ff;
    transform: scale(1.02);
}

.file-upload-area.file-selected {
    border-color: #28a745;
    background: #f8fff9;
}

.file-upload-area.file-error {
    border-color: #dc3545;
    background: #fff5f5;
}

.file-upload-area .form-control-file {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-text {
    text-align: center;
    padding: 20px;
    z-index: 1;
}

.file-upload-text i {
    font-size: 48px;
    color: #061b49;
    margin-bottom: 10px;
    display: block;
}

.file-upload-text .file-text {
    display: block;
    font-weight: 600;
    color: #061b49;
    margin-bottom: 5px;
    font-size: 16px;
}

.file-upload-text .file-info {
    display: block;
    color: #666;
    font-size: 14px;
}

.file-selected {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8fff9;
    border-radius: 8px;
    width: 100%;
    gap: 10px;
}

.file-selected i {
    font-size: 24px;
    color: #28a745;
    flex-shrink: 0;
}

.file-selected .file-name {
    flex: 1;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    word-break: break-all;
}

.file-selected .file-size {
    color: #666;
    font-size: 12px;
    flex-shrink: 0;
}

.btn-remove-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.btn-remove-file:hover {
    background: #c82333;
    transform: scale(1.1);
}

.join-form textarea.form-control {
    height: auto;
    min-height: 120px;
    resize: vertical;
}

.join-form .form-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.join-form .default-btn {
    background: linear-gradient(135deg, #061b49 0%, #0d2a5a 100%);
    color: #fff;
    border: none;
    padding: 18px 50px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    min-width: 250px;
    box-shadow: 0 8px 20px rgba(6, 27, 73, 0.2);
}

.join-form .default-btn:hover {
    background: linear-gradient(135deg, #0d2a5a 0%, #061b49 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(6, 27, 73, 0.4);
}

.join-form .default-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(6, 27, 73, 0.3);
}

.join-form .default-btn i {
    margin-right: 10px;
}

/* Botón de envío profesional y simple */
.btn-send-application {
    width: 100%;
    max-width: 300px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #061b49 0%, #0d2a5a 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(6, 27, 73, 0.3);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-send-application:hover {
    background: linear-gradient(135deg, #0d2a5a 0%, #061b49 100%);
    box-shadow: 0 6px 20px rgba(6, 27, 73, 0.4);
    color: #fff;
}

.btn-send-application:active {
    box-shadow: 0 2px 10px rgba(6, 27, 73, 0.3);
}

/* Animación de onda azul */
.btn-wave {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: block;
    height: 0;
    position: absolute;
    transform: translate(-50%, -50%);
    width: 0;
    left: 50%;
    top: 50%;
    transition: all 0.6s ease;
    z-index: 0;
}

.btn-send-application:hover .btn-wave {
    height: 400px;
    width: 400px;
    opacity: 0.1;
}

/* Asegurar que el contenido esté por encima de la onda */
.btn-send-application .email-icon,
.btn-send-application span:not(.btn-wave) {
    position: relative;
    z-index: 1;
}

.btn-send-application:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #666;
    box-shadow: none;
}

.btn-send-application:disabled:hover {
    background: #666;
    box-shadow: none;
}

/* Icono personalizado de envío de correo */
.email-icon {
    display: inline-block;
    width: 20px;
    height: 16px;
    background: #fff;
    position: relative;
    border-radius: 2px;
    margin-right: 8px;
}

.email-icon::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 6px solid #fff;
}

.email-icon::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, #061b49 0%, #0d2a5a 100%);
    border-radius: 1px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet y dispositivos medianos */
@media (max-width: 768px) {
    .join-section {
        padding: 60px 0;
    }
    
    .join-form-wrap {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .join-form .form-control {
        height: 50px;
        font-size: 14px;
        padding: 0 15px;
    }
    
    .btn-send-application {
        height: 55px;
        font-size: 15px;
        max-width: 100%;
    }
    
    .benefits-section {
        padding: 60px 0;
    }
    
    .benefit-box {
        padding: 30px 20px;
        margin-bottom: 20px;
    }
    
    .benefit-icon {
        width: 80px;
        height: 80px;
    }
    
    .benefit-icon i {
        font-size: 40px;
    }
    
    .benefit-box h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .benefit-box p {
        font-size: 14px;
    }
}

/* Móviles */
@media (max-width: 576px) {
    .join-section {
        padding: 40px 0;
    }
    
    .join-form-wrap {
        padding: 25px 15px;
        margin: 0 10px;
        border-radius: 10px;
    }
    
    .join-section .section-heading h2 {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .join-section .section-heading h4.sub-heading {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .join-form .form-group {
        margin-bottom: 20px;
    }
    
    .join-form .form-control {
        height: 48px;
        font-size: 14px;
        padding: 0 12px;
    }
    
    .join-form .form-control-file {
        padding: 15px;
    }
    
    .btn-send-application {
        height: 50px;
        font-size: 14px;
        letter-spacing: 0.5px;
        gap: 8px;
    }
    
    .email-icon {
        width: 18px;
        height: 14px;
        margin-right: 6px;
    }
    
    .email-icon::before {
        border-left: 9px solid transparent;
        border-right: 9px solid transparent;
        border-bottom: 5px solid #fff;
    }
    
    .benefits-section {
        padding: 40px 0;
    }
    
    .benefits-section .section-heading h2 {
        font-size: 26px;
        margin-bottom: 15px;
    }
    
    .benefits-section .section-heading h4.sub-heading {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .benefit-box {
        padding: 25px 15px;
        margin-bottom: 15px;
    }
    
    .benefit-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 15px;
    }
    
    .benefit-icon i {
        font-size: 35px;
    }
    
    .benefit-box h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .benefit-box p {
        font-size: 13px;
        line-height: 1.6;
    }
}

/* Pantallas muy pequeñas */
@media (max-width: 480px) {
    .join-form-wrap {
        padding: 20px 12px;
        margin: 0 5px;
    }
    
    .join-section .section-heading h2 {
        font-size: 24px;
    }
    
    .join-form .form-control {
        height: 45px;
        font-size: 13px;
    }
    
    .btn-send-application {
        height: 48px;
        font-size: 13px;
    }
    
    .benefit-box {
        padding: 20px 12px;
    }
    
    .benefit-box h3 {
        font-size: 16px;
    }
    
    .benefit-box p {
        font-size: 12px;
    }
}

.join-form .default-btn span {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.join-form .default-btn:hover span {
    left: 100%;
}

/* Benefits Section */
.benefits-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.benefit-box {
    padding: 40px 30px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(6, 27, 73, 0.08);
    transition: all 0.4s ease;
    height: 100%;
    border: 2px solid #f8f9fa;
    position: relative;
    overflow: hidden;
}

.benefit-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #061b49 0%, #0d2a5a 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.benefit-box:hover::before {
    transform: scaleX(1);
}

.benefit-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(6, 27, 73, 0.15);
    border-color: #e8f0ff;
}

.benefit-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 50%;
    border: 2px solid rgba(255, 107, 53, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.benefit-icon i {
    font-size: 50px;
    color: #ff6b35;
    font-weight: normal;
    z-index: 2;
    position: relative;
    transition: transform 0.3s ease;
}

.benefit-box:hover .benefit-icon {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.4);
    border-color: rgba(255, 107, 53, 0.5);
}

.benefit-box:hover .benefit-icon i {
    transform: scale(1.1);
}

.benefit-box h3 {
    font-size: 22px;
    font-weight: 700;
    color: #061b49;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.benefit-box p {
    color: #666;
    line-height: 1.8;
    margin: 0;
    font-size: 15px;
    font-weight: 400;
}

/* Form Validation Styles */
.join-form .form-control.is-invalid {
    border-color: #dc3545;
}

.join-form .form-control.is-valid {
    border-color: #28a745;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 12px;
    color: #dc3545;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 12px;
    color: #28a745;
}

/* Loading State */
.join-form .default-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.join-form .default-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

.success-message.show {
    display: block;
}

/* Error Message */
.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .join-form-wrap {
        padding: 30px 20px;
    }
    
    .join-form .default-btn {
        width: 100%;
        padding: 15px 20px;
    }
    
    .benefit-box {
        margin-bottom: 30px;
    }
}

@media (max-width: 576px) {
    .join-section {
        padding: 60px 0;
    }
    
    .benefits-section {
        padding: 60px 0;
    }
    
    .join-form-wrap {
        padding: 20px 15px;
    }
}
