.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2.1875rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close-modal:hover {
    color: #e74c3c;
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h2 {
    color: #2c3e50;
    font-size: 1.75rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.modal-header .subtitle {
    color: #7f8c8d;
    font-size: 1rem;
    margin-bottom: 15px;
}

.service-badge {
    display: inline-block;
    background: #a52a2a;
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 10px;
}

/* Indicador de progreso */
.progress-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 10px;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-weight: bold;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    position: relative;
}

.progress-step.active {
    background: #a52a2a;
    color: white;
}

.progress-step.completed {
    background: #27ae60;
    color: white;
}

.progress-step::after {
    content: attr(data-label);
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #7f8c8d;
    white-space: nowrap;
}

.progress-line {
    width: 80px;
    height: 3px;
    background: #ecf0f1;
    transition: all 0.3s ease;
}

.progress-line.active {
    background: #a52a2a;
}

/* Pasos del formulario */
.form-step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.step-title {
    color: #2c3e50;
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    padding: 20px 0;
}

/* Estilos del formulario */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #a52a2a;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group input::placeholder {
    color: #bdc3c7;
}

.form-group select:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-group select:disabled:focus {
    border-color: #e0e0e0;
    box-shadow: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Sección de subservicios */
.subservices-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.subservices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.subservice-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.subservice-card:hover {
    border-color: #a52a2a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.subservice-card.selected {
    border-color: #a52a2a;
    background: #e8f4f8;
}

.subservice-card h4 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 8px;
}

.subservice-card p {
    color: #7f8c8d;
    font-size: 0.875rem;
    line-height: 1.4;
}

.subservice-card .check-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #a52a2a;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.subservice-card.selected .check-icon {
    display: flex;
}

/* Campos dinámicos */
.dynamic-fields {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 4px solid #a52a2a;
}

.dynamic-fields h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.125rem;
}

/* Opciones de entrega */
.delivery-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.delivery-option {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.delivery-option:hover {
    border-color: #a52a2a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.delivery-option.selected {
    border-color: #a52a2a;
    background: #e8f4f8;
}

.delivery-option .icon {
    font-size: 1.875rem;
    margin-bottom: 10px;
}

.delivery-option h4 {
    color: #2c3e50;
    margin-bottom: 8px;
}

.delivery-option p {
    color: #7f8c8d;
    font-size: 0.875rem;
}

/* Botones */
.btn-container {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 30px;
}

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
    border: 2px solid #bdc3c7;
}

.btn-secondary:hover {
    background: #d5dbdb;
    border-color: #95a5a6;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ESTILOS DEL MODAL DE CITAS */
.appointment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.appointment-modal.show {
    opacity: 1;
    visibility: visible;
}

.appointment-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8) translateY(30px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.appointment-modal.show .appointment-modal-content {
    transform: scale(1) translateY(0);
}

.appointment-modal-header {
    background: linear-gradient(45deg, #991815, #ff4444);
    color: white;
    padding: 24px;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.appointment-modal-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.appointment-modal-date {
    font-size: 0.9rem;
    opacity: 0.9;
}

.appointment-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.3rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.appointment-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.appointment-modal-body {
    padding: 24px;
}

.appointment-form-group {
    margin-bottom: 20px;
}

.appointment-form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.appointment-form-input,
.appointment-form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.appointment-form-input:focus,
.appointment-form-select:focus {
    outline: none;
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.time-slot {
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

.time-slot:hover {
    border-color: #4f46e5;
    background: #f0f0ff;
}

.time-slot.selected {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.time-slot.disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.appointment-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.appointment-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.appointment-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.appointment-btn-cancel:hover {
    background: #e5e7eb;
}

.appointment-btn-primary {
    background: linear-gradient(45deg, #991815, #ff4444);
    color: white;
}

.appointment-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(216, 62, 62, 0.4);
}

.appointment-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.required {
    color: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        padding: 25px;
        margin: 10px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .progress-indicator {
        flex-wrap: wrap;
    }

    .btn-container {
        flex-direction: column;
    }

    .progress-step::after {
        font-size: 0.625rem;
        top: 45px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    animation: fadeIn 0.6s ease forwards;
}