/* Client-specific styles using landing.css variables */

nav {
    gap: 0px !important;
}

/* Global lazy loading overlay */
#globalLoadingOverlay {
    position: fixed;
    inset: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2200;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#globalLoadingOverlay .loader-content {
    text-align: center;
    position: relative;
}

#globalLoadingOverlay .loader-content i {
    font-size: 5rem;
    color: var(--primary-color);
    animation: rocketLaunch 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    display: block;
    transform-origin: center center;
    position: relative;
    z-index: 2;
    margin-bottom: 1.5rem;
}

#globalLoadingOverlay .loader-content .platform-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    animation: platformNameFade 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}

/* Estela de fuego detrás del cohete */
#globalLoadingOverlay .loader-content::after {
    content: '';
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translateX(-50%);
}

#globalLoadingOverlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none !important;
}

/* Asegurar que el overlay no bloquee cuando está oculto */
#globalLoadingOverlay:not(.is-hidden) {
    pointer-events: auto;
}

@keyframes rocketLaunch {
    0% {
        transform: translateY(0) translateX(0) rotate(-45deg) scale(0.8);
        opacity: 0;
    }
    15% {
        transform: translateY(-15px) translateX(0) rotate(-45deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-60px) translateX(0) rotate(-45deg) scale(1.1);
        opacity: 1;
    }
    85% {
        transform: translateY(-120px) translateX(0) rotate(-45deg) scale(0.9);
        opacity: 0.7;
    }
    100% {
        transform: translateY(-180px) translateX(0) rotate(-45deg) scale(0.6);
        opacity: 0;
    }
}

@keyframes rocketTrail {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(-45deg) translateY(30px) scaleY(0.5);
    }
    15% {
        opacity: 0.6;
        transform: translate(-50%, -50%) rotate(-45deg) translateY(20px) scaleY(0.7);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) rotate(-45deg) translateY(0px) scaleY(1);
    }
    85% {
        opacity: 0.4;
        transform: translate(-50%, -50%) rotate(-45deg) translateY(-20px) scaleY(0.8);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(-45deg) translateY(-40px) scaleY(0.5);
    }
}

@keyframes platformNameFade {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    20% {
        opacity: 1;
        transform: translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Navbar */
.navbar-modern {
    background: white;
    box-shadow: 0 2px 10px var(--shadow-color-light);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-modern.scrolled {
    box-shadow: 0 2px 20px var(--shadow-color);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.navbar-brand i {
    margin-right: 10px;
}

.nav-link {
    color: var(--dark-color) !important;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-nav {
    margin-left: auto !important;
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .navbar-brand {
        font-size: 1.15rem;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 0.35rem 0.65rem !important;
    }

    .navbar-nav {
        flex-wrap: nowrap;
    }

    .navbar-nav .dropdown-toggle::after {
        margin-left: 0.25rem;
    }

    .menu-toggle {
        display: none;
    }

    .navbar.navbar-landing {
        padding: 0.35rem 0;
    }

    .navbar.navbar-landing .navbar-brand {
        font-size: 1.05rem;
    }

    .navbar.navbar-landing .nav-link {
        font-size: 0.85rem;
        padding: 0.3rem 0.5rem !important;
    }
}

.nav-btn-modern {
    background: transparent;
    border: none;
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn-modern:hover {
    background: var(--light-color);
    color: var(--primary-color);
    text-decoration: none;
}

.nav-btn-primary {
    background: var(--primary-color);
    color: white !important;
    border-radius: 8px;
}

.nav-btn-primary:hover {
    background: var(--primary-dark);
    color: white !important;
}

/* Project Header */
.project-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 50px 0 40px;
    margin-bottom: 30px;
    margin-top: 70px;
}

/* Espaciado para páginas de student sin header */
body .container.py-5 {
    margin-top: 70px;
}

.project-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.status-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: none;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.status-lead_created { background: #F59E0B; color: white; }
.status-onboarding { background: var(--primary-color); color: white; }
.status-data_collection { background: var(--secondary-color); color: white; }
.status-generation { background: #F97316; color: white; }
.status-review { background: var(--secondary-color); color: white; }
.status-published { background: var(--secondary-color); color: white; }

/* Progress Container */
.progress-container {
    background: white;
    padding: 30px 0;
    border-radius: 12px;
}

.progress {
    height: 12px;
    border-radius: 6px;
    background: var(--light-color);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 6px;
    transition: width 0.6s ease;
}

/* Message Card */
.message-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 1px 3px var(--shadow-color);
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.message-card h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    font-weight: 700;
}

.message-card p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Buttons - Apple Style from Landing */
.cta-button {
    background: var(--primary-color);
    color: white;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
    border: none;
    box-shadow: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
}

.cta-button:hover {
    background: var(--primary-color);
    opacity: 0.85;
    transform: none;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
    color: white;
    text-decoration: none;
}

.cta-button:active {
    transform: scale(0.98);
}

/* Override Bootstrap primary buttons */
.btn-primary,
.btn.btn-primary {
    background: var(--primary-color) !important;
    color: white !important;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
    border: none !important;
    box-shadow: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover,
.btn.btn-primary:hover {
    background: var(--primary-color) !important;
    opacity: 0.85;
    transform: none;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15) !important;
    color: white !important;
}

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

.btn-primary:focus,
.btn.btn-primary:focus {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08) !important;
    outline: none;
}

/* Small buttons */
.btn-sm.btn-primary {
    padding: 10px 18px;
    font-size: 0.9375rem;
}

/* Large buttons */
.btn-lg.btn-primary {
    font-size: 1.05rem;
    height: auto;
    line-height: 1.5;
}

/* Success button - same style as primary */
.btn-success,
.btn.btn-success {
    background: #198754 !important;
    color: white !important;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
    border: none !important;
    box-shadow: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: -0.01em;
    height: auto;
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Secondary button - Apple style */
.btn-secondary,
.btn.btn-secondary {
    background: #f5f5f7 !important;
    color: #1d1d1f !important;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
    border: 1px solid #d2d2d7 !important;
    box-shadow: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-secondary:hover,
.btn.btn-secondary:hover {
    background: #e5e5e7 !important;
    border-color: #d2d2d7 !important;
    color: #1d1d1f !important;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    text-decoration: none;
}

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

.btn-secondary:focus,
.btn.btn-secondary:focus {
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05) !important;
    outline: none;
}

.btn-success:hover,
.btn.btn-success:hover {
    background: #059669 !important;
    opacity: 0.85;
    transform: none;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15) !important;
    color: white !important;
}

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

.btn-success:focus,
.btn.btn-success:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.08) !important;
    outline: none;
}

/* Large success buttons - same height as primary */
.btn-lg.btn-success {
    padding: 16px 28px;
    font-size: 1.05rem;
    height: auto;
    line-height: 1.5;
    min-height: 52px;
}

.btn-lg.btn-primary {
    min-height: 52px;
}

/* Step Preview */
.step-preview {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px var(--shadow-color);
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.step-preview:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px var(--shadow-color);
    border-color: var(--primary-color);
}

.step-preview.completed {
    border-left: 4px solid var(--secondary-color);
}

.step-preview.current {
    border-left: 4px solid var(--primary-color);
    background: var(--primary-rgba-light);
}

.step-preview.pending {
    border-left: 4px solid var(--border-color);
    opacity: 0.7;
}

/* Step Details Styles */
.step-details-collapse {
    border-top: 1px solid var(--border-color);
    margin-top: 15px;
    padding-top: 15px;
}

.step-details-content {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.question-detail-item {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.question-detail-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.question-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.question-detail-header h6 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.question-detail-header .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
    flex-shrink: 0;
}

.answer-detail-content {
    margin-top: 12px;
}

.text-answer-detail {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    line-height: 1.6;
    color: #495057;
}

.text-answer-detail strong {
    color: #212529;
    font-weight: 600;
}

.text-answer-detail p {
    margin: 0;
    color: #495057;
}

.file-answer-detail {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-answer-detail i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.no-answer-detail {
    background: #fff3cd;
    color: #856404;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 3px solid #ffc107;
    display: flex;
    align-items: center;
    gap: 8px;
    font-style: italic;
}

.follow-up-answers-detail {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.follow-up-answers-header-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
}

.follow-up-answers-header-detail i {
    color: var(--primary-color);
}

.follow-up-answer-detail-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-left: 3px solid #dee2e6;
}

.follow-up-answer-index-detail {
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.follow-up-answer-content-detail {
    flex: 1;
    color: #495057;
    line-height: 1.5;
    font-size: 0.9rem;
}

.follow-up-answer-meta-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .project-header h1 {
        font-size: 1.75rem;
    }
    
    .message-card {
        padding: 30px 20px;
    }
    
    .message-card h2 {
        font-size: 1.5rem;
    }
    
    .progress-container {
        padding: 20px;
    }
}

/* SweetAlert2 Custom Styles - Apple Style */
.swal2-popup {
    border-radius: 18px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    padding: 32px !important;
}

.swal2-title {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    color: #1d1d1f !important;
    margin-bottom: 12px !important;
}

.swal2-content {
    font-size: 1rem !important;
    color: #86868b !important;
    line-height: 1.5 !important;
}

.swal2-confirm {
    background: var(--primary-color) !important;
    border-radius: 10px !important;
    padding: 14px 24px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em !important;
    border: none !important;
    box-shadow: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.swal2-confirm:hover {
    background: var(--primary-color) !important;
    opacity: 0.85 !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15) !important;
}

.swal2-confirm:active {
    transform: scale(0.98) !important;
}

.swal2-cancel {
    background: #f5f5f7 !important;
    color: #1d1d1f !important;
    border-radius: 10px !important;
    padding: 14px 24px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em !important;
    border: 1px solid #d2d2d7 !important;
    box-shadow: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.swal2-cancel:hover {
    background: #e5e5e7 !important;
    border-color: #d2d2d7 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.swal2-cancel:active {
    transform: scale(0.98) !important;
}

.swal2-icon {
    margin-bottom: 20px !important;
}

.swal2-actions {
    gap: 12px !important;
    margin-top: 24px !important;
}

/* File Upload Styles - Drag & Drop */
.file-upload-area {
    border: 2px dashed #DDDDDD;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #FAFAFA;
    min-height: 150px;
    position: relative;
}

.file-upload-area:hover {
    border-color: var(--primary-color, #007bff);
    background: #F0F8FF;
}

.file-upload-area.drag-over {
    border-color: var(--primary-color, #007bff);
    background: #F0F8FF;
    border-style: solid;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color, #007bff);
    margin-bottom: 15px;
}

.current-file {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: #E8F5E8;
    border: 1px solid #C8E6C9;
    border-radius: 8px;
    color: #2E7D32;
    font-weight: 500;
}

.file-preview-container {
    display: none;
    margin-top: 20px;
}

.file-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.file-preview-item:hover {
    transform: scale(1.05);
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-item .file-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px;
    font-size: 0.875rem;
    text-align: center;
}

.remove-file {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(220, 53, 69, 0.9);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.remove-file i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.remove-file:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

@media (max-width: 767px) {
    .file-upload-area {
        padding: 20px;
        min-height: 120px;
    }

    .upload-icon {
        font-size: 2.5rem;
    }
}

/* Follow-up Answers Styles */
.follow-up-answers-section {
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.follow-up-answers-header {
    background: linear-gradient(135deg, var(--primary-color, #007bff) 0%, #0056b3 100%);
    color: white;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.follow-up-answer-item {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 16px;
    transition: all 0.2s ease;
    position: relative;
}

.follow-up-answer-item:last-child {
    border-bottom: none;
}

.follow-up-answer-item:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

.follow-up-answer-content {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #495057;
}

.follow-up-answer-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #6c757d;
}

.follow-up-answer-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.follow-up-answer-index {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-color, #007bff);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Add Follow-up Button */
.add-follow-up-btn {
    margin-top: 16px;
    padding: 12px 20px;
    border: 2px dashed var(--primary-color, #007bff);
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05) 0%, rgba(0, 86, 179, 0.05) 100%);
    color: var(--primary-color, #007bff);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
}


.add-follow-up-btn i {
    font-size: 1.1rem;
}

/* Follow-up Form */
.follow-up-form-container {
    margin-top: 16px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    animation: slideDown 0.3s ease;
}

.follow-up-form-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--primary-color, #007bff);
    font-weight: 600;
}

.follow-up-form-group {
    margin-bottom: 16px;
}

.follow-up-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.follow-up-form-group textarea {
    width: 100%;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
    min-height: 80px;
}

.follow-up-form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.follow-up-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.follow-up-submit-btn {
    background: var(--primary-color, #007bff);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.follow-up-submit-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.follow-up-cancel-btn {
    background: #6c757d;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.follow-up-cancel-btn:hover {
    background: #545b62;
    transform: translateY(-1px);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.follow-up-answer-item {
    animation: fadeIn 0.3s ease;
}

.follow-up-answer-item:nth-child(1) { animation-delay: 0.1s; }
.follow-up-answer-item:nth-child(2) { animation-delay: 0.2s; }
.follow-up-answer-item:nth-child(3) { animation-delay: 0.3s; }
.follow-up-answer-item:nth-child(4) { animation-delay: 0.4s; }
.follow-up-answer-item:nth-child(5) { animation-delay: 0.5s; }

/* Mobile responsive */
@media (max-width: 576px) {
    .follow-up-answers-section {
        margin-top: 16px;
    }

    .follow-up-answers-header {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .follow-up-answer-item {
        padding: 12px;
    }

    .follow-up-answer-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .follow-up-answer-index {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
        top: 8px;
        right: 8px;
    }

    .follow-up-form-container {
        padding: 16px;
    }

    .follow-up-form-actions {
        justify-content: center;
    }

    .add-follow-up-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Project Summary Styles */
.project-summary-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #e9ecef;
}

.summary-header {
    text-align: center;
    margin-bottom: 40px;
}

.summary-header h3 {
    color: var(--primary-color, #007bff);
    font-weight: 600;
    margin-bottom: 10px;
}

.step-summary-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
}

.step-summary-header {
    background: var(--secondary-color);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    user-select: none;
}

.step-summary-header:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.step-summary-header:hover {
    background: var(--primary-color);
}

.step-summary-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.2s ease;
}

.step-summary-header:hover h4 {
    opacity: 0.9;
}

.step-summary-header .badge {
    font-size: 0.8rem;
    padding: 6px 12px;
}

.step-progress {
    margin-left: auto;
    flex-shrink: 0;
}

.step-collapse-icon {
    transition: transform 0.3s ease;
}

.step-collapse-icon.collapsed {
    transform: rotate(-90deg);
}

.step-summary-header[aria-expanded="true"] .step-collapse-icon {
    transform: rotate(0deg);
}

.step-summary-header[aria-expanded="false"] .step-collapse-icon {
    transform: rotate(-90deg);
}

.step-questions {
    padding: 0;
}

.question-summary-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 24px;
}

.question-summary-item:last-child {
    border-bottom: none;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

.question-text {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
    flex: 1;
}

.question-header .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    flex-shrink: 0;
}

.answer-content {
    margin-bottom: 16px;
}

.text-answer {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color, #007bff);
    line-height: 1.6;
    color: #495057;
    position: relative;
    padding-right: 140px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-answer {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color, #007bff);
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-answer i {
    color: var(--primary-color, #007bff);
    font-size: 1.5rem;
}

.image-answer {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color, #007bff);
}

.uploaded-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
    margin-bottom: 12px;
    max-height: 500px;
    object-fit: contain;
}

.file-link {
    color: var(--primary-color, #007bff);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.file-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.no-answer {
    background: #fff3cd;
    color: #856404;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    display: flex;
    align-items: center;
    gap: 8px;
    font-style: italic;
}

.answer-date {
    color: #6c757d;
    font-size: 0.75rem;
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.answer-score {
    color: #6c757d;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Responsive para text-answer en móvil */
@media (max-width: 767px) {
    .text-answer {
        padding-right: 16px;
        padding-bottom: 50px;
    }
    
    .text-answer .answer-date,
    .text-answer .answer-score {
        position: static !important;
        display: flex;
        align-items: center;
        gap: 4px;
        margin-top: 8px;
    }
    
    .text-answer > small {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }
}

.add-comment-section {
    margin-top: 16px;
}

/* Mobile responsive for project summary */
@media (max-width: 768px) {
    .project-summary-section {
        margin-top: 30px;
        padding-top: 30px;
    }

    .summary-header {
        margin-bottom: 30px;
    }

    .summary-header h3 {
        font-size: 1.5rem;
    }

    .step-summary-card {
        margin-bottom: 20px;
    }

    .step-summary-header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .step-summary-header h4 {
        font-size: 1rem;
    }

    .question-summary-item {
        padding: 16px;
    }

    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .question-text {
        font-size: 0.95rem;
    }

    .text-answer, .file-answer, .no-answer {
        padding: 12px;
    }

    .step-details-content {
        padding: 15px;
        max-height: 400px;
    }

    .question-detail-item {
        padding: 12px;
    }

    .question-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .question-detail-header h6 {
        font-size: 0.9rem;
    }

    .follow-up-answer-detail-item {
        flex-direction: column;
        gap: 8px;
    }

    .follow-up-answer-meta-detail {
        align-self: flex-start;
    }
}

/* Client Footer - Simple */
.client-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 0;
}

.client-footer p {
    margin: 0;
    color: #6c757d;
    font-size: 0.875rem;
}

/* ========== SIDEBAR LATERAL GENERAL ========== */
.sidebar {
    background: #FFFFFF;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 80px;
    left: 0;
    width: 250px;
    padding: 0;
    padding-top: 25px;
    z-index: 1050;
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - 70px);
}

@media (min-width: 768px) and (max-width: 991px) {
    .sidebar {
        width: 220px;
    }
}

.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid #DDDDDD;
    margin-bottom: 20px;
}

.sidebar-logo a:hover {
    opacity: 0.8;
}

.sidebar-item {
    padding: 10px 20px;
    color: #222222;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 1rem; 
    margin-bottom: 0;
    line-height: 1.4;
}

.sidebar-item:hover,
.sidebar-item.active,
button.sidebar-item.active {
    background-color: #ECECEC !important;
    border-left-color: #3498db !important;
    color: #3498db !important;
}

.sidebar-item i {
    font-size: 1.2rem;
}

.main-content-with-sidebar {
    margin-left: 0;
    padding-top: 70px !important;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

.main-content-with-sidebar #grammar-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
    left: 0;
    right: 0;
}

@media (min-width: 768px) {
    .main-content-with-sidebar {
        margin-left: 250px !important;
        width: calc(100% - 250px) !important;
        max-width: none !important;
    }
    
    .main-content-with-sidebar #videocall-section {
        max-width: 100% !important;
        width: calc(100% + 30px) !important;
        margin-left: -15px !important;
        margin-right: -15px !important;
        padding-left: 50px !important;
        padding-right: 50px !important;
        position: relative;
    }
}

/* En móvil: quitar márgenes negativos y padding extra */
@media (max-width: 767px) {
    .main-content-with-sidebar #videocall-section {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .main-content-with-sidebar:has(#videocall-section) {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .main-content-with-sidebar:has(#videocall-section) {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .main-content-with-sidebar {
        margin-left: 220px !important;
        width: calc(100% - 220px) !important;
    }
}

@media (max-width: 767px) {
    .main-content-with-sidebar {
        margin-left: 0 !important;
        padding-top: 70px !important;
        width: 100% !important;
    }
}

/* ========== MENÚ MÓVIL GENERAL ========== */
.mobile-nav-toggle {
    position: fixed;
    top: 90px;
    left: 15px;
    z-index: 999;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mobile-nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    padding-top: 80px;
}

.mobile-nav-menu.active {
    left: 0;
}

.mobile-nav-header {
    padding: 20px;
    border-bottom: 1px solid #DDDDDD;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #222222;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-body {
    padding: 10px 0;
}

.mobile-nav-item {
    width: 100%;
    padding: 15px 24px;
    color: #222222;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    background-color: #ECECEC;
    border-left-color: #3498db;
    color: #3498db;
}

.mobile-nav-item i {
    font-size: 1.1rem;
}

/* Overlay para móvil */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.mobile-nav-overlay.active {
    display: block;
}

/* Step Status Badge */
.step-status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.step-status-badge i {
    font-size: 1rem;
}

.step-status-completed {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.step-status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffecb5;
}

/* Payment Plans */
.payment-required-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.payment-required-card h4 {
    color: white;
    margin-bottom: 0.5rem;
}

.payment-required-card .text-muted {
    color: rgba(255, 255, 255, 0.9) !important;
}

.payment-plans {
    margin-top: 1.5rem;
}

.payment-plan-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.payment-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.payment-plan-card.recommended {
    border: 2px solid var(--primary-color, #007bff);
}

.recommended-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary-color, #007bff);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.plan-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.plan-header h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color, #333);
    margin-bottom: 1rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 0.5rem;
}

.plan-price .currency {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color, #333);
}

.plan-price .amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color, #007bff);
    line-height: 1;
}

.plan-price .period {
    font-size: 1rem;
    color: var(--text-muted, #6c757d);
    font-weight: 500;
}

.plan-setup {
    margin-top: 0.5rem;
    color: var(--text-muted, #6c757d);
}

.plan-savings {
    margin-top: 0.5rem;
}

.plan-savings small {
    font-weight: 600;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
}

.plan-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--dark-color, #333);
    font-size: 0.9rem;
}

.plan-features li i {
    color: var(--primary-color, #007bff);
    font-size: 1rem;
}

.payment-plan-card .btn {
    margin-top: auto;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.payment-plan-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.payment-status-card {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.payment-status-card h5 {
    color: #0f5132;
    margin-bottom: 0.5rem;
}

.payment-status-card .text-muted {
    color: #0f5132 !important;
    opacity: 0.8;
}

/* Payment Modal */
.payment-modal-content {
    border-radius: 16px;
    overflow: hidden;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.payment-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-bottom: none;
    position: relative;
    display: flex;
    align-items: center;
}

.payment-modal-header > div {
    flex: 1;
}

.payment-modal-header .modal-title {
    color: white !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin: 0 !important;
    display: block !important;
    align-items: unset !important;
    gap: 0 !important;
    letter-spacing: normal !important;
}

.payment-modal-header .text-white {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 1.1rem;
    text-align: center;
}

.payment-modal-header .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
    z-index: 10;
    margin: 0;
}

.payment-modal-header .btn-close-white:hover {
    opacity: 1;
}

.payment-modal-body {
    padding: 2.5rem;
    background: #f8f9fa;
}

@media (max-width: 768px) {
    
    .client-footer .container {
        padding: 0 15px;
    }
    
    .step-status-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .payment-required-card {
        padding: 1.5rem;
    }
    
    .payment-plan-card {
        margin-bottom: 1rem;
    }
    
    .plan-price .amount {
        font-size: 2rem;
    }
    
    .payment-modal-header {
        padding: 1.5rem;
    }
    
    .payment-modal-header .modal-title {
        font-size: 1.5rem;
    }
    
    .payment-modal-body {
        padding: 1.5rem;
    }
}

/* ============================================
   IONIC-STYLE MOBILE RESPONSIVE (Max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Container - Más compacto */
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* Project Header - Más compacto tipo Ionic */
    .project-header {
        padding: 20px 0 16px;
        margin-bottom: 16px;
        text-align: center;
    }
    
    .project-header .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .project-header .row {
        justify-content: center;
        text-align: center;
    }
    
    .project-header .col-md-12 {
        text-align: center;
    }
    
    .project-header h1 {
        font-size: 1.5rem;
        font-weight: 600;
        margin-bottom: 4px;
        letter-spacing: -0.02em;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .project-header h1 i {
        font-size: 1.375rem;
    }
    
    .project-header p {
        font-size: 0.875rem;
        opacity: 0.85;
        text-align: center;
        max-width: 100%;
    }
    
    /* Progress Container - Estilo Ionic compacto */
    .progress-container {
        padding: 16px;
        border-radius: 16px;
        margin-bottom: 16px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }
    
    /* Títulos de sección elegantes */
    .section-title {
        font-size: 1.35rem;
        font-weight: 600;
        color: #000000;
        display: flex;
        align-items: center;
        gap: 10px;
        padding-bottom: 8px;
        margin-bottom: 1.5rem !important;
        position: relative;
        letter-spacing: -0.01em;
    }
    
    .section-title i {
        color: #000000;
        font-size: 1.2rem;
        opacity: 0.8;
    }
    
    .section-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 40px;
        height: 2px;
        background: #000000;
    }
    
    .progress-container h5 {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 12px;
        letter-spacing: -0.01em;
    }
    
    /* Progress Bar - Más delgado y compacto */
    .progress {
        height: 8px;
        border-radius: 4px;
    }
    
    /* Cards - Estilo Ionic compacto */
    .card {
        border-radius: 16px;
        border: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        margin-bottom: 12px;
    }
    
    .card-body {
        padding: 16px !important;
    }
    
    .card-title {
        font-size: 1.125rem;
        font-weight: 600;
        margin-bottom: 8px;
        letter-spacing: -0.01em;
    }
    
    /* Estadísticas Cards - Grid más compacto */
    .row.g-4 {
        --bs-gutter-y: 12px;
        --bs-gutter-x: 12px;
    }
    
    /* Cards de estadísticas - Más compactas */
    .card.bg-primary,
    .card.bg-success,
    .card.bg-danger,
    .card.bg-info {
        border-radius: 12px;
    }
    
    .card.bg-primary .card-body,
    .card.bg-success .card-body,
    .card.bg-danger .card-body,
    .card.bg-info .card-body {
        padding: 16px !important;
    }
    
    .card.bg-primary h2,
    .card.bg-success h2,
    .card.bg-danger h2,
    .card.bg-info h2 {
        font-size: 1.75rem;
        margin-bottom: 4px;
    }
    
    .card.bg-primary h6,
    .card.bg-success h6,
    .card.bg-danger h6,
    .card.bg-info h6 {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }
    
    .card.bg-primary i,
    .card.bg-success i,
    .card.bg-danger i,
    .card.bg-info i {
        font-size: 2rem !important;
        opacity: 0.2;
    }
    
    /* Message Card - Compacto */
    .message-card {
        padding: 20px 16px;
        border-radius: 16px;
        margin-bottom: 16px;
    }
    
    .message-card h2 {
        font-size: 1.25rem;
        margin-bottom: 12px;
        font-weight: 600;
    }
    
    .message-card p {
        font-size: 0.9375rem;
        margin-bottom: 16px;
        line-height: 1.5;
    }
    
    /* Buttons - Estilo Ionic táctil (mínimo 44px) */
    .btn,
    .cta-button {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 0.9375rem;
        font-weight: 500;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        letter-spacing: -0.01em;
    }
    
    .btn-primary,
    .btn.btn-primary,
    .cta-button {
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    }
    
    .btn-primary:active,
    .btn.btn-primary:active,
    .cta-button:active {
        transform: scale(0.96);
        box-shadow: 0 1px 4px rgba(37, 99, 235, 0.15);
    }
    
    .btn-lg,
    .btn-lg.btn-primary,
    .btn-lg.btn-success {
        min-height: 48px;
        font-size: 1rem;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: 8px 16px;
        font-size: 0.875rem;
    }
    
    /* Step Preview - Compacto tipo Ionic */
    .step-preview {
        padding: 16px;
        border-radius: 12px;
        margin-bottom: 12px;
        border: 1px solid #e9ecef;
    }
    
    .step-preview h6 {
        font-size: 0.9375rem;
        font-weight: 600;
        margin-bottom: 4px;
    }
    
    .step-preview small {
        font-size: 0.8125rem;
    }
    
    /* Cards de cursos - badges alineados a la derecha en móvil */
    @media (max-width: 575px) {
        .col-lg-6 .d-flex.flex-column.flex-sm-row > div:last-child.d-flex {
            width: 100%;
            justify-content: flex-end;
            margin-left: 0 !important;
        }
    }
    
    /* Botones de step-preview - Responsivo */
    .step-preview .step-preview-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        align-items: stretch;
    }
    
    @media (min-width: 768px) {
        .step-preview > div.d-flex.justify-content-between {
            justify-content: space-between !important;
        }
        .step-preview .step-preview-buttons {
            flex-direction: row;
            width: auto;
            margin-left: auto;
            align-items: center;
            flex: 0 0 auto;
        }
    }
    
    /* Dashboard Emocional - Compacto */
    .progress-container .card {
        border-radius: 16px;
    }
    
    .progress-container .card-body {
        padding: 24px 16px !important;
    }
    
    .progress-container .card-body h2 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .progress-container .card-body p {
        font-size: 1rem;
        margin-bottom: 16px;
    }
    
    /* Cards de Cursos - Grid más compacto */
    .col-lg-6,
    .col-xl-5,
    .col-xxl-4 {
        margin-bottom: 12px;
    }
    
    /* Estadísticas del curso - Más compactas */
    .bg-light.rounded-3 {
        padding: 12px !important;
        border-radius: 12px !important;
    }
    
    .bg-light.rounded-3 .row {
        --bs-gutter-x: 8px;
        --bs-gutter-y: 8px;
    }
    
    .bg-light.rounded-3 .fw-bold {
        font-size: 1rem;
    }
    
    .bg-light.rounded-3 .small {
        font-size: 0.75rem;
    }
    
    /* Badges - Más compactos */
    .badge {
        font-size: 0.6875rem;
        padding: 4px 8px;
        border-radius: 8px;
        font-weight: 500;
    }
    
    /* Alerts - Compactos */
    .alert {
        padding: 12px 16px;
        border-radius: 12px;
        font-size: 0.875rem;
        margin-bottom: 12px;
    }
    
    .alert h5,
    .alert h6 {
        font-size: 0.9375rem;
        margin-bottom: 4px;
    }
    
    /* Form Controls - Más grandes y táctiles */
    .form-control,
    .form-select {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 1rem;
        border-radius: 12px;
        border: 1.5px solid #e9ecef;
    }
    
    .form-control:focus,
    .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }
    
    textarea.form-control {
        min-height: 100px;
    }
    
    /* Form Check - Más grandes */
    .form-check-input {
        width: 20px;
        height: 20px;
        margin-top: 0.25em;
    }
    
    .form-check-label {
        font-size: 0.9375rem;
        padding-left: 8px;
    }
    
    /* Vocabulary Cards - Compactas */
    .vocabulary-card .card {
        border-radius: 16px;
    }
    
    .vocabulary-card .card-body {
        padding: 16px !important;
    }
    
    .vocabulary-image-container {
        height: 180px !important;
    }
    
    .vocabulary-image-container h1 {
        font-size: 2rem !important;
    }
    
    /* Interactive Story - Compacto */
    .interactive-story-container .card {
        border-radius: 16px;
    }
    
    .interactive-story-container .card-body {
        padding: 16px !important;
    }
    
    .story-scene {
        min-height: 200px !important;
        padding: 24px 16px !important;
    }
    
    .story-scene h2 {
        font-size: 1.25rem !important;
    }
    
    .option-btn {
        min-height: 48px;
        padding: 12px 16px !important;
        font-size: 0.9375rem;
        border-radius: 12px;
        margin-bottom: 8px;
    }
    
    /* Rich Text - Compacto */
    .text-section {
        padding: 16px !important;
        border-radius: 12px;
        margin-bottom: 12px;
    }
    
    /* Game - Compacto */
    .game-container {
        padding: 16px;
    }
    
    /* Spacing - Reducido en móvil */
    .mb-4 {
        margin-bottom: 16px !important;
    }
    
    .mb-5 {
        margin-bottom: 20px !important;
    }
    
    .mt-4 {
        margin-top: 16px !important;
    }
    
    .mt-5 {
        margin-top: 20px !important;
    }
    
    .py-5 {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
    
    /* Typography - Más compacta */
    h1 {
        font-size: 1.75rem;
        font-weight: 600;
        letter-spacing: -0.02em;
    }
    
    h2 {
        font-size: 1.5rem;
        font-weight: 600;
        letter-spacing: -0.01em;
    }
    
    h3 {
        font-size: 1.25rem;
        font-weight: 600;
    }
    
    h4 {
        font-size: 1.125rem;
        font-weight: 600;
    }
    
    h5 {
        font-size: 1rem;
        font-weight: 600;
    }
    
    h6 {
        font-size: 0.9375rem;
        font-weight: 600;
    }
    
    p {
        font-size: 0.9375rem;
        line-height: 1.5;
    }
    
    small {
        font-size: 0.8125rem;
    }
    
    /* Navbar - Más compacto en móvil */
    .navbar {
        padding: 8px 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    /* Footer - Compacto */
    .client-footer {
        padding: 16px 0;
    }
    
    /* Eliminar hover effects en móvil */
    .step-preview:hover {
        transform: none;
    }
    
    .card:hover {
        transform: none;
    }
    
    /* Header con título y botón - Mejor distribución en móvil */
    .d-flex.justify-content-between.align-items-center.mb-4 {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }
    
    .d-flex.justify-content-between.align-items-center.mb-4 > div:first-child {
        width: 100%;
    }
    
    .d-flex.justify-content-between.align-items-center.mb-4 > a,
    .d-flex.justify-content-between.align-items-center.mb-4 > .btn {
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }
    
    /* Ocultar flecha en botones "Volver" en móvil */
    .btn-outline-secondary i.bi-arrow-left,
    .btn-outline-light i.bi-arrow-left,
    .btn i.bi-arrow-left {
        display: none;
    }
    
    /* Ajustar texto del botón sin flecha */
    .btn-outline-secondary,
    .btn-outline-light {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* Mejorar scroll en móvil */
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Safe area para dispositivos con notch */
    @supports (padding: max(0px)) {
        .container {
            padding-left: max(12px, env(safe-area-inset-left));
            padding-right: max(12px, env(safe-area-inset-right));
        }
        
        .project-header {
            padding-top: max(20px, env(safe-area-inset-top));
        }
    }
}

/* ============================================
   EXTRA SMALL DEVICES (Max-width: 576px)
   ============================================ */
@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .project-header {
        padding: 30px 0 12px;
        text-align: center;
    }
    
    .project-header h1 {
        font-size: 1.375rem;
        text-align: center;
        justify-content: center;
    }
    
    .project-header p {
        text-align: center;
    }
    
    .progress-container {
        padding: 12px;
    }
    
    .btn,
    .cta-button {
        width: 100%;
        min-height: 48px;
    }
    
    .row.g-4 {
        --bs-gutter-y: 8px;
        --bs-gutter-x: 8px;
    }
    
    /* Estadísticas en una sola columna */
    .col-lg-3,
    .col-md-6 {
        margin-bottom: 8px;
    }
    
    /* Header con título y botón - Extra compacto */
    .d-flex.justify-content-between.align-items-center.mb-4 {
        gap: 8px;
    }
    
    .d-flex.justify-content-between.align-items-center.mb-4 h1,
    .d-flex.justify-content-between.align-items-center.mb-4 h2 {
        font-size: 1.25rem;
    }
    
    .d-flex.justify-content-between.align-items-center.mb-4 p {
        font-size: 0.875rem;
    }
}

/* Dashboard Actions - Botones responsive */
.dashboard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-actions .btn {
    min-width: 160px;
}

/* Estadísticas - 2 cards por fila en tablets */
@media (min-width: 768px) and (max-width: 991px) {
    .stats-cards-row .col-sm-6,
    .stats-cards-row .col-md-6 {
        flex: 0 0 auto;
        width: 50% !important;
        max-width: 50% !important;
    }
}

@media (max-width: 768px) {
    .dashboard-actions {
        justify-content: center;
        flex-direction: column;
        width: 100%;
    }

    .dashboard-actions .btn {
        width: 100%;
        max-width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 576px) {
    .dashboard-actions {
        flex-direction: column;
    }

    .dashboard-actions .btn {
        width: 100%;
        min-height: 48px;
    }
}

/* Modal de Progreso entre Lecciones */
#lessonProgressModal .modal-content {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#lessonProgressModal .progress-container {
    padding: 2.5rem 2rem;
}

#lessonProgressModal .progress-bar {
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

#lessonProgressModal .modal-footer {
    padding: 1.5rem;
}

@media (max-width: 768px) {
    #lessonProgressModal .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    #lessonProgressModal .progress-container {
        padding: 1.5rem 1.25rem;
    }
    
    #lessonProgressModal .progress-container h2 {
        font-size: 1.5rem;
    }
    
    #lessonProgressModal .progress-container p {
        font-size: 1rem;
    }
    
    #lessonProgressModal #progressEmoji {
        font-size: 3.5rem !important;
    }
    
    #lessonProgressModal .alert {
        font-size: 0.95rem;
        padding: 0.75rem;
    }
    
    #lessonProgressModal #nextMilestone h5 {
        font-size: 1rem;
    }
    
    #lessonProgressModal #nextMilestone p {
        font-size: 0.85rem;
    }
/* =================== Estilos del botón del diccionario =================== */
.dictionary-card__button {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff !important;
    border-radius: 999px;
    padding: 0.65rem 1.8rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dictionary-card__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.35);
}
}

/* Ocultar preguntas cuando hay rich-text hasta que se complete */
.progress-container.has-rich-text .form-group {
    display: none !important;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, display 0.3s ease-in-out;
}

/* Mostrar preguntas cuando se complete el rich-text */
.progress-container.has-rich-text .form-group.exercises-visible {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Asegurar que el rich-text siempre sea visible */
.progress-container .rich-text-lesson {
    display: block !important;
    opacity: 1;
}

/* Contenedor de ejercicios dentro de rich-text-content */
.rich-text-content .exercises-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #dee2e6;
}

.rich-text-content .exercises-container .complete-message {
    margin-bottom: 2rem;
}

.rich-text-content .exercises-container .form-group {
    margin-bottom: 1.5rem;
}

/* Mostrar también los botones de acción cuando se muestren las preguntas */
.progress-container.has-rich-text #actionButtons {
    display: block !important;
    opacity: 1 !important;
}
