/* ================================================
   CSS para la página de RENTAR - Mobile First
   ================================================ */

/* Estilos principales móvil */
.page-rentar {
    padding: 1rem 0;
    animation: fadeInUp 0.5s ease-out;
}

.form-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

.rent-form {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
}

/* Header móvil */
.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--color-gray);
    font-weight: 400;
    display: inline-block;
}

/* ================================================
   PASOS DEL FORMULARIO - MOBILE FIRST
   ================================================ */
.form-step {
    display: none;
    animation: fadeIn 0.3s ease-out;
    padding: 0 0.5rem;
}

.form-step.active {
    display: block;
}

.step-title {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.step-subtitle {
    text-align: center;
    color: var(--color-gray);
    margin-top: -1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Campos obligatorios y errores móvil */
.required-asterisk {
    color: #ef4444;
    font-weight: bold;
    margin-left: 2px;
}

.error-message {
    display: none;
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    margin-left: 0.25rem;
}

.error-message.show {
    display: block;
}

.form-input.error,
.form-textarea.error {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
}

.form-input.success,
.form-textarea.success {
    border-color: #22c55e !important;
}

.form-help-text {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 1rem;
    font-style: italic;
}

.terms-link {
    color: var(--color-primary) !important;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-default);
}

.terms-link:hover {
    color: #1ea34f !important;
    text-decoration: underline;
}

.terms-group {
    margin-top: 1.5rem;
    padding: 1rem 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
}

/* ================================================
   OPCIONES TIPO TARJETA - MOBILE FIRST
   ================================================ */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.option-card {
    cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-align: center;
    background: white;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.option-card input[type="radio"]:checked + .option-content {
    border-color: var(--color-primary);
    background: rgba(34, 197, 94, 0.05);
}

.option-card:active .option-content {
    transform: scale(0.98);
}

.option-icon {
    font-size: 1.8rem;
}

.option-text {
    font-weight: 500;
    color: var(--color-dark);
    font-size: 0.9rem;
}

/* ================================================
   GRUPOS DE FORMULARIO - MOBILE FIRST
   ================================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-dark);
    font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: var(--transition-default);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.input-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--color-gray);
}

/* Precio input móvil */
.price-input-wrapper {
    position: relative;
}

.price-input {
    padding-right: 3.5rem;
}

.price-suffix {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Checkboxes móvil */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem 0;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

/* ================================================
   UPLOAD DE FOTOS - MOBILE FIRST
   ================================================ */
.photo-upload {
    margin-bottom: 1rem;
}

.photo-input {
    display: none;
}

.photo-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    border: 2px dashed var(--color-primary);
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.05);
    cursor: pointer;
    transition: var(--transition-default);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.photo-label:hover {
    background: rgba(34, 197, 94, 0.1);
}

.photo-label:active {
    transform: scale(0.98);
}

.photo-label svg {
    width: 36px;
    height: 36px;
    color: var(--color-primary);
}

.photo-label span {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.95rem;
    text-align: center;
}

.photo-label small {
    color: var(--color-gray);
    font-size: 0.8rem;
    text-align: center;
}

.photo-preview {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* ================================================
   AUTENTICACIÓN UNIFICADA - MOBILE FIRST
   ================================================ */
.auth-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border: 2px solid #e2e8f0;
}

.auth-section-title {
    font-size: 1.2rem;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-align: center;
}

.auth-section-desc {
    color: var(--color-gray);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.5;
}

/* Botones de login social móvil */
.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 1.5rem;
}

.social-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--color-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.social-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.social-login-btn:active {
    transform: scale(0.98);
}

.social-login-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Estilo específico para Instagram móvil */
.social-login-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border-color: transparent;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.social-login-btn.instagram::before {
    content: '';
    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;
}

.social-login-btn.instagram:hover::before {
    left: 100%;
}

.social-login-btn.instagram:hover {
    box-shadow: 0 8px 24px rgba(240, 148, 51, 0.4);
}

/* Formulario unificado móvil */
.unified-auth-form {
    margin-top: 1rem;
}

.form-divider {
    text-align: center;
    position: relative;
    margin: 1.25rem 0;
}

.form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.form-divider span {
    background: white;
    padding: 0 0.875rem;
    position: relative;
    color: var(--color-gray);
    font-size: 0.85rem;
    font-weight: 600;
}

.auth-explanation {
    margin-bottom: 1.25rem;
    text-align: center;
}

.auth-explanation p {
    color: var(--color-gray);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.unified-login-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.btn-unified-auth {
    width: 100%;
    padding: 0.75rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

.btn-unified-auth:hover {
    background: #1ea34f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-unified-auth:active {
    transform: scale(0.98);
}

.btn-unified-auth:disabled {
    background: #d1d5db !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.6;
    box-shadow: none !important;
}

/* Estados de carga móvil */
.btn-unified-auth.loading {
    position: relative;
    color: transparent;
}

.btn-unified-auth.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Estado de autenticación exitosa móvil */
.auth-success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 2px solid var(--color-primary);
    border-radius: 12px;
    padding: 1.25rem;
    animation: slideInUp 0.5s ease-out;
}

.auth-success-content {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
}

.success-icon {
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
    flex-shrink: 0;
}

.success-message h4 {
    color: var(--color-dark);
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.success-message p {
    color: var(--color-gray);
    margin: 0;
    font-size: 0.85rem;
    word-break: break-all;
    line-height: 1.4;
}

/* ================================================
   NAVEGACIÓN DEL FORMULARIO - MOBILE FIRST (CORREGIDO)
   ================================================ */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 1rem;
    /* Asegurar que no se salga del contenedor */
    width: 100%;
    box-sizing: border-box;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-default);
    font-size: 0.9rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    /* Evitar que se salga del contenedor */
    max-width: calc(50% - 0.5rem);
    min-width: 120px;
    box-sizing: border-box;
    justify-content: center;
    text-align: center;
}

.nav-btn:hover {
    background: #1ea34f;
    transform: translateY(-2px);
}

.nav-btn:active {
    transform: scale(0.98);
}

.nav-btn:disabled {
    background: #d1d5db !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.5;
}

.nav-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-prev {
    background: transparent;
    color: var(--color-gray);
    border: 2px solid #e5e7eb;
}

.btn-prev:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

.btn-back-home {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-back-home:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

/* Indicadores de paso móvil */
.step-indicators {
    display: flex;
    gap: 0.5rem;
    order: -1;
    width: 100%;
    justify-content: center;
    margin-bottom: 1rem;
}

.step-indicator {
    width: 30px;
    height: 3px;
    background: #e5e7eb;
    border-radius: 2px;
    transition: var(--transition-default);
}

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

/* ================================================
   RESUMEN DEL ANUNCIO - MOBILE FIRST
   ================================================ */
.announcement-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.announcement-summary[open] {
    border-color: var(--color-primary);
}

.summary-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--color-dark);
    font-weight: 600;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    margin: 0;
}

.summary-title:hover {
    background: #f8fafc;
}

.summary-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.announcement-summary[open] .summary-icon {
    transform: rotate(90deg);
}

.announcement-preview {
    padding: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-gray);
    background: #f9fafb;
}

.announcement-preview .preview-item {
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.announcement-preview .preview-label {
    font-weight: 600;
    color: var(--color-dark);
    font-size: 0.8rem;
    color: var(--color-gray);
}

.announcement-preview .preview-value {
    color: var(--color-dark);
    font-weight: 500;
}

/* ================================================
   SECCIÓN DE REDES SOCIALES - MOBILE FIRST
   ================================================ */
.social-publish-section {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border: 1px solid #e5e7eb;
}

.subsection-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--color-dark);
    font-weight: 600;
}

.subsection-desc {
    color: var(--color-gray);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.social-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-option {
    padding: 0.875rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
    background: white;
}

.social-option:hover {
    border-color: var(--color-primary);
    background: rgba(34, 197, 94, 0.05);
}

.social-option span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.social-option svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.social-option input[type="checkbox"]:checked + span {
    color: var(--color-primary);
    font-weight: 600;
}

/* ================================================
   MENSAJE RÁPIDO - MOBILE FIRST
   ================================================ */
.quick-message-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.divider-or {
    text-align: center;
    position: relative;
    margin-bottom: 1.5rem;
}

.divider-or::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 0px;
    background: #e5e7eb;
}

.divider-or span {
        font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.btn-quick-message {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-quick-message:hover {
    background: #1ea34f;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35);
}

.btn-quick-message:active {
    transform: scale(0.98);
}

.btn-quick-message svg {
    width: 22px;
    height: 22px;
}

.quick-message-hint {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--color-gray);
}

/* Formulario de mensaje rápido móvil */
.quick-type-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.quick-type-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.quick-type-option:hover {
    border-color: var(--color-primary);
    background: rgba(34, 197, 94, 0.05);
}

.quick-type-option:active {
    transform: scale(0.98);
}

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

.quick-type-option input[type="radio"]:checked + span {
    color: var(--color-primary);
    font-weight: 600;
}

.quick-type-option span {
    font-size: 0.95rem;
    color: var(--color-dark);
    transition: color 0.2s ease;
}

.message-textarea {
    font-family: var(--font-primary);
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
}

.character-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--color-gray);
    margin-top: 0.25rem;
}

.social-checkboxes {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.social-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    width: 100%;
}

.social-check:hover {
    background: rgba(34, 197, 94, 0.05);
}

.social-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.social-check span {
    font-size: 0.9rem;
    color: var(--color-dark);
}

.hashtag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hashtag {
    display: inline-block;
    background: linear-gradient(45deg, #e5f3ff, #cce7ff);
    color: #0066cc;
    padding: 0.25rem 0.5rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #b3d9ff;
    transition: all 0.2s ease;
}

.hashtag:hover {
    background: linear-gradient(45deg, #cce7ff, #99d6ff);
    transform: translateY(-1px);
}

/* ================================================
   SISTEMA DE NOTIFICACIONES - MOBILE FIRST
   ================================================ */
.modern-notification {
    position: fixed;
    top: 20px;
    right: -100%;
    left: 10px;
    max-width: calc(100% - 20px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 0.875rem 1rem;
    z-index: 10001;
    transition: right 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid #3b82f6;
    font-size: 0.9rem;
}

.modern-notification.show {
    right: auto;
    left: 10px;
}

.modern-notification.success {
    border-left-color: #22c55e;
}

.modern-notification.error {
    border-left-color: #ef4444;
}

.modern-notification.warning {
    border-left-color: #f59e0b;
}

.modern-notification.info {
    border-left-color: #3b82f6;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.modern-notification.success .notification-icon {
    background: #dcfce7;
    color: #22c55e;
}

.modern-notification.error .notification-icon {
    background: #fee2e2;
    color: #ef4444;
}

.modern-notification.warning .notification-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.modern-notification.info .notification-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.notification-message {
    color: #1f2937;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ================================================
   ANIMACIONES
   ================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.shake {
    animation: shake 0.4s;
}

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states para accesibilidad móvil */
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.social-login-btn:focus,
.btn-unified-auth:focus,
.nav-btn:focus,
.contact-btn:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Mejoras para dispositivos táctiles */
@media (hover: none) {
    .option-card:hover .option-content,
    .social-login-btn:hover,
    .btn-unified-auth:hover,
    .nav-btn:hover,
    .btn-quick-message:hover,
    .social-option:hover,
    .quick-type-option:hover {
        transform: none;
    }
    
    .option-card:active .option-content,
    .social-login-btn:active,
    .btn-unified-auth:active,
    .nav-btn:active,
    .btn-quick-message:active,
    .quick-type-option:active {
        transform: scale(0.95);
    }
}

/* Mejora específica para navegación en pantallas pequeñas */
@media (max-width: 480px) {
    .form-navigation {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .nav-btn {
        max-width: 100%;
        width: 100%;
    }
    
    .step-indicators {
        order: -1;
        margin-bottom: 1.5rem;
    }
}

/* ================================================
   MEDIA QUERIES - TABLET (768px+) - CORREGIDO
   ================================================ */
@media (min-width: 768px) {
    .page-rentar {
        padding: 2rem 0;
    }
    
    .form-container {
        max-width: 600px;
        padding: 0 1.5rem;
    }
    
    .rent-form {
        padding: 2rem;
    }
    
    .page-header {
        margin-bottom: 2rem;
    }
    
    .page-title {
        font-size: 1.8rem;
        flex-direction: row;
        gap: 1rem;
    }
    
    .page-subtitle {
        font-size: 0.95rem;
    }
    
    .form-step {
        padding: 0;
    }
    
    .step-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .step-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        margin-top: -1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .form-textarea {
        min-height: 120px;
    }
    
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
        margin-bottom: 2rem;
    }
    
    .option-content {
        padding: 1.5rem;
    }
    
    .option-icon {
        font-size: 2rem;
    }
    
    .option-text {
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .checkbox-label {
        font-size: 0.95rem;
    }
    
    .checkbox-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
    
    .photo-label {
        padding: 2rem;
    }
    
    .photo-label svg {
        width: 40px;
        height: 40px;
    }
    
    .photo-label span {
        font-size: 1rem;
    }
    
    .photo-label small {
        font-size: 0.85rem;
    }
    
    .auth-section {
        padding: 1.5rem;
        margin: 2rem 0;
        border-radius: 16px;
    }
    
    .auth-section-title {
        font-size: 1.4rem;
    }
    
    .auth-section-desc {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .social-login-buttons {
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .social-login-btn {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .social-login-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .auth-explanation p {
        font-size: 0.95rem;
        padding: 1rem;
    }
    
    .unified-login-form {
        gap: 1rem;
    }
    
    .btn-unified-auth {
        font-size: 1rem;
        padding: 0.875rem;
    }
    
    .auth-success {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .auth-success-content {
        flex-direction: row;
        text-align: left;
        gap: 1rem;
    }
    
    .success-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .success-message h4 {
        font-size: 1.1rem;
    }
    
    .success-message p {
        font-size: 0.9rem;
    }
    
    .form-navigation {
        margin-top: 2rem;
        padding-top: 2rem;
        flex-wrap: nowrap;
        gap: 1.5rem;
        /* Mantener control del ancho */
        max-width: 100%;
    }
    
    .nav-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        /* Permitir que los botones crezcan pero con límites */
        max-width: none;
        min-width: 140px;
        flex: 0 1 auto;
    }
    
    .nav-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .step-indicators {
        order: initial;
        width: auto;
        justify-content: center;
        margin-bottom: 0;
    }
    
    .announcement-summary {
        margin-bottom: 2rem;
    }
    
    .summary-title {
        padding: 1.25rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .summary-icon {
        width: 20px;
        height: 20px;
    }
    
    .announcement-preview {
        padding: 1.5rem;
        font-size: 0.95rem;
    }
    
    .announcement-preview .preview-item {
        margin-bottom: 0.75rem;
        flex-direction: row;
        gap: 1rem;
    }
    
    .announcement-preview .preview-label {
        min-width: 100px;
        flex-shrink: 0;
        font-size: 0.95rem;
        color: var(--color-gray);
    }
    
    .social-publish-section {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .subsection-title {
        font-size: 1.2rem;
    }
    
    .subsection-desc {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .social-options {
        gap: 1rem;
    }
    
    .social-option {
        padding: 0.75rem 1rem;
    }
    
    .social-option span {
        gap: 0.75rem;
        font-size: 1rem;
    }
    
    .social-option svg {
        width: 24px;
        height: 24px;
    }
    
    .quick-type-buttons {
        grid-template-columns: 1fr 1fr;
    }
    
    .social-checkboxes {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .social-check {
        width: auto;
    }
    
    .btn-quick-message {
        font-size: 1.1rem;
        padding: 1.25rem 2rem;
    }
    
    .btn-quick-message svg {
        width: 24px;
        height: 24px;
    }
    
    .quick-message-hint {
        font-size: 0.9rem;
    }
    
    .modern-notification {
        left: auto;
        right: -400px;
        max-width: 400px;
        font-size: 0.95rem;
    }
    
    .modern-notification.show {
        right: 20px;
        left: auto;
    }
    
    .notification-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .notification-message {
        font-size: 0.95rem;
    }
}

/* ================================================
   MEDIA QUERIES - DESKTOP (1024px+) - CORREGIDO
   ================================================ */
@media (min-width: 1024px) {
    .page-title {
        font-size: 2rem;
    }
    
    .step-title {
        font-size: 2rem;
    }
    
    .auth-section-title {
        font-size: 1.5rem;
    }
    
    .subsection-title {
        font-size: 1.3rem;
    }
    
    .form-navigation {
        gap: 2rem;
        padding: 2rem 0;
        margin-top: 2.5rem;
    }
    
    .nav-btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
        min-width: 160px;
    }
    
    /* Asegurar que el contenedor padre tenga el ancho correcto */
    .form-container {
        max-width: 700px;
    }
    
    .rent-form {
        padding: 2.5rem;
        box-sizing: border-box;
    }
}

/* ================================================
   AJUSTES ADICIONALES PARA EVITAR OVERFLOW
   ================================================ */

/* Asegurar que todos los elementos del formulario respeten el contenedor */
.form-step,
.form-group,
.form-row {
    box-sizing: border-box;
    max-width: 100%;
}

.form-input,
.form-select,
.form-textarea {
    box-sizing: border-box;
    max-width: 100%;
}

/* Asegurar que el contenido no se salga en ninguna resolución */
@media (min-width: 1200px) {
    .form-container {
        max-width: 800px;
    }
}

/* Mejora para pantallas muy anchas */
@media (min-width: 1400px) {
    .form-container {
        max-width: 900px;
    }
    
    .nav-btn {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
    }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================================
   MENSAJE RÁPIDO REUBICADO - FUERA DEL FORMULARIO
   ================================================ */

/* Ajuste para la nueva posición fuera del formulario */
.form-container > .quick-message-section {
    margin-top: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid #e5e7eb;
}

/* Ajuste del divisor "o" */
.form-container > .quick-message-section .divider-or {
    margin-bottom: 1.5rem;
}

.form-container > .quick-message-section .divider-or::before {
    background: #f8fafc;
}

/* Botón de mensaje rápido en nueva posición */
.form-container > .quick-message-section .btn-quick-message {
    margin-bottom: 1rem;
}

.form-container > .quick-message-section .quick-message-hint {
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Responsive - tablet y desktop */
@media (min-width: 768px) {
    .form-container > .quick-message-section {
        margin-top: 2.5rem;
        padding: 2rem 0;
    }
    
    .form-container > .quick-message-section .divider-or {
        margin-bottom: 2rem;
    }
}

/* ================================================
   SISTEMA DE CÓDIGO DE ACCESO - MOBILE FIRST
   ================================================ */

/* Enlace "¿Has olvidado tu contraseña?" */
.access-code-link {
    text-align: center;
    margin-top: 1rem;
}

.forgot-password-link {
    color: var(--color-primary) !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-default);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.forgot-password-link:hover {
    color: #1ea34f !important;
    text-decoration: underline;
}

/* Sección principal del código de acceso */
.access-code-section {
    background: #7d93fb;
    border: 2px solid #8b5cf6;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1rem;
    animation: slideInDown 0.3s ease-out;
}

.access-code-title {
    font-size: 1.1rem;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.access-code-title::before {
    content: "🔑";
    font-size: 1.2rem;
}

.access-code-desc {
    color: #ffffff;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    text-align: center;
    line-height: 1.5;
}

/* Formulario para enviar código */
.access-code-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 1.5rem;
}

.btn-send-code {
    width: 100%;
    padding: 0.75rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2);
}

.btn-send-code:hover {
    background: #8b5cf6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-send-code:active {
    transform: scale(0.98);
}

.btn-send-code:disabled {
    background: #94a3b8 !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.6;
    box-shadow: none !important;
}

/* Sección para introducir código */
.code-input-section {
    border-top: 1px solid #bae6fd;
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    animation: fadeInUp 0.5s ease-out;
}

.code-sent-message {
    background: #dcfce7;
    border: 1px solid #22c55e;
    border-radius: 8px;
    padding: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #15803d;
    text-align: center;
    justify-content: center;
}

.code-sent-message .success-icon {
    width: 20px;
    height: 20px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    flex-shrink: 0;
}

/* Formulario de código */
.code-input-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.code-input {
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.25rem;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    transition: var(--transition-default);
}

.code-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.code-input.error {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
    animation: shake 0.4s;
}

.btn-verify-code {
    width: 100%;
    padding: 0.875rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-verify-code:hover {
    background: #1ea34f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-verify-code:active {
    transform: scale(0.98);
}

.btn-verify-code:disabled {
    background: #94a3b8 !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.6;
    box-shadow: none !important;
}

/* Timer del código */
.code-timer {
    text-align: center;
    margin: 1rem 0;
    font-size: 0.85rem;
    color: #6b7280;
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.code-timer::before {
    content: "⏰";
    font-size: 1rem;
}

/* Enlace para reenviar código */
.resend-code {
    text-align: center;
    margin-top: 0.75rem;
}

.resend-code-link {
    color: #0ea5e9 !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-default);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.resend-code-link:hover {
    color: #0284c7 !important;
    background: rgba(14, 165, 233, 0.15);
    text-decoration: none;
}

/* Enlace para volver al login tradicional */
.back-to-login {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #bae6fd;
}

.back-to-login-link {
    color: #6b7280 !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-default);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-to-login-link:hover {
    color: var(--color-primary) !important;
    text-decoration: none;
}

/* Efectos de carga para los botones */
.btn-send-code.loading,
.btn-verify-code.loading {
    position: relative;
    color: transparent;
}

.btn-send-code.loading::after,
.btn-verify-code.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animaciones específicas */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Estados de validación */
.access-code-form .form-input.error {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.access-code-form .form-input.success {
    border-color: #22c55e !important;
    background-color: #f0fdf4;
}

/* Mejoras para dispositivos táctiles */
@media (hover: none) {
    .forgot-password-link:hover,
    .btn-send-code:hover,
    .btn-verify-code:hover,
    .resend-code-link:hover,
    .back-to-login-link:hover {
        transform: none;
    }
    
    .forgot-password-link:active,
    .btn-send-code:active,
    .btn-verify-code:active {
        transform: scale(0.95);
    }
}

/* ================================================
   MEDIA QUERIES - TABLET (768px+)
   ================================================ */
@media (min-width: 768px) {
    .access-code-section {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .access-code-title {
        font-size: 1.2rem;
    }
    
    .access-code-desc {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .access-code-form {
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .btn-send-code,
    .btn-verify-code {
        font-size: 1rem;
        padding: 0.875rem 1rem;
    }
    
    .code-input-section {
        padding-top: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .code-sent-message {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .code-input-form {
        gap: 1rem;
    }
    
    .code-input {
        font-size: 1rem;
        padding: 1.25rem;
        letter-spacing: 0.5rem;
    }
    
    .code-timer {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    .resend-code-link {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
    
    .back-to-login-link {
        font-size: 0.9rem;
    }
    
    .forgot-password-link {
        font-size: 0.95rem;
    }
}

/* ================================================
   MEDIA QUERIES - DESKTOP (1024px+)
   ================================================ */
@media (min-width: 1024px) {
    .access-code-section {
        padding: 2rem;
    }
    
    .access-code-title {
        font-size: 1.3rem;
    }
    
    .code-input {
        font-size: 1rem;
        padding: 1.5rem;
        letter-spacing: 0.75rem;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .btn-send-code,
    .btn-verify-code {
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
    }
}

/* Mejoras de accesibilidad */
.code-input:focus,
.btn-send-code:focus,
.btn-verify-code:focus,
.forgot-password-link:focus,
.resend-code-link:focus,
.back-to-login-link:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Modo de alto contraste */
@media (prefers-contrast: high) {
    .access-code-section {
        border-width: 3px;
    }
    
    .code-input {
        border-width: 3px;
    }
    
    .btn-send-code,
    .btn-verify-code {
        box-shadow: none;
        border: 2px solid transparent;
    }
    
    .btn-send-code:focus,
    .btn-verify-code:focus {
        border-color: white;
    }
}

/* Reducir movimiento para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {
    .access-code-section,
    .code-input-section {
        animation: none;
    }
    
    .btn-send-code:hover,
    .btn-verify-code:hover {
        transform: none;
    }
    
    .code-input.error {
        animation: none;
    }
}

/* ================================================
   MEJORAS UX - OCULTAR CAMPOS DESPUÉS DE ENVIAR CÓDIGO
   ================================================ */

/* Estado cuando el código ha sido enviado */
.access-code-section.code-sent .access-code-form {
    display: none !important;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease-out;
}

.access-code-section.code-sent .code-input-section {
    display: block !important;
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    animation: slideInUp 0.5s ease-out;
}

/* Mejorar el mensaje de código enviado */
.code-sent-message {
    background: #dcfce7;
    border: 2px solid #22c55e;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #15803d;
    text-align: center;
    animation: slideInUp 0.5s ease-out;
}

.code-sent-message .success-icon {
    width: 24px;
    height: 24px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0;
}

/* Actualizar título cuando código enviado */
.access-code-section.code-sent .access-code-title {
    color: #22c55e;
}

.access-code-section.code-sent .access-code-title::before {
    content: "✅";
    font-size: 1.2rem;
}

.access-code-section.code-sent .access-code-desc {
    color: #15803d;
    font-weight: 500;
    background: #dcfce7;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* Animación para ocultar elementos */
@keyframes fadeOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Animación para mostrar código input */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive para código enviado */
@media (min-width: 768px) {
    .code-sent-message {
        font-size: 1rem;
        padding: 1.25rem;
        margin-bottom: 2rem;
    }
    
    .code-sent-message .success-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
}