/* Variables CSS extendidas si hiciera falta, pero usamos las de base.css */
.join-main {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
}

.wizard-section {
    background-color: var(--color-background);
}

.wizard-container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

.wizard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.wizard-header h1 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.step {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--color-background);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 2;
    transition: var(--transition-fast);
    border: 2px solid var(--color-blue-light);
}

.step.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.step.completed {
    background-color: var(--color-blue-sky);
    color: white;
    border-color: var(--color-blue-sky);
}

.step-line {
    flex-grow: 1;
    height: 4px;
    background-color: var(--color-background);
    z-index: 1;
    margin: 0 -5px;
    border-radius: 2px;
}

.step.completed + .step-line {
    background-color: var(--color-blue-sky);
}

.wizard-step {
    display: none;
}

.wizard-step.active-step {
    display: block;
    animation: slideUpFade 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.wizard-step h2 {
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--color-background);
    padding-bottom: 0.5rem;
}

/* Scrollable Content (Derechos/Deberes) */
.scrollable-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    color: #444;
    white-space: pre-wrap;
    font-size: 0.95rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-primary);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-blue-sky);
    box-shadow: 0 0 0 3px rgba(84, 164, 188, 0.2);
}

/* Teléfono con prefijo */
.phone-input-wrap {
    display: flex;
    gap: 0.5rem;
}
.phone-input-wrap select {
    width: 120px;
    flex-shrink: 0;
}
.phone-input-wrap input {
    flex-grow: 1;
}

/* Inputs Radio */
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 1rem;
    font-weight: normal;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-fast);
    user-select: none;
}

.radio-label:hover {
    background-color: var(--color-background);
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    background-color: var(--color-primary);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.lang-selection, .auth-selection {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Archivos */
.file-help {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
}

input[type="file"] {
    padding: 0.5rem 0;
    transition: var(--transition-fast);
}

input[type="file"]:hover {
    color: var(--color-primary);
}

.image-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.preview-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--color-blue-light);
    animation: fadeIn 0.3s ease-out;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
}

.remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: var(--transition-fast);
}

.remove-btn:hover {
    background: #cc0000;
    transform: scale(1.1);
}

/* Animaciones de inputs */
.animate-input {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

.form-row .animate-input:nth-child(1) { animation-delay: 0.1s; }
.form-row .animate-input:nth-child(2) { animation-delay: 0.2s; }

/* Botones */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn::after {
    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.3s ease, height 0.3s ease;
}

.btn:active::after {
    width: 200px;
    height: 200px;
    opacity: 0;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    margin-left: auto;
}

.btn-primary:hover {
    background-color: var(--color-blue-medium);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 35, 78, 0.2);
}

.btn-secondary {
    background-color: var(--color-background);
    color: var(--color-primary);
}

.btn-secondary:hover {
    background-color: #d1ccce;
    transform: translateY(-2px);
}

/* Modal y Estados */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1.5rem;
}

.modal-content h2 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.modal-content p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

#already-submitted-msg h2 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

/* Authorization Sections */
.authorization-section {
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: box-shadow var(--transition-fast);
}

.authorization-section:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.authorization-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    user-select: none;
    gap: 0.75rem;
}

.authorization-header:hover {
    background-color: #f0f0f0;
}

.authorization-header input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.authorization-header .section-title {
    display: flex;
    align-items: center;
    flex-grow: 1;
    gap: 0.75rem;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 600;
    color: var(--color-secondary);
}

.authorization-header .toggle-icon {
    margin-left: auto;
    transition: transform var(--transition-fast);
    color: var(--color-primary);
}

.authorization-header.expanded .toggle-icon {
    transform: rotate(180deg);
}

.authorization-content {
    background-color: #ffffff;
    border-top: 1px solid #eee;
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.authorization-content.collapsed {
    max-height: 0;
    padding: 0 1rem;
    overflow: hidden;
}

.authorization-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .wizard-container {
        padding: 1.5rem;
    }
    
    .step {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
}
