/* ============================================================
   JAVA POO LEARNING - LAYOUT.CSS
   Solo estilos que Tailwind NO provee por defecto.
   ============================================================ */

/* ==================== BREAKPOINTS ==================== */
/* Mobile: < 640px (sm) */
/* Tablet: 640px - 1023px (md) */
/* Desktop: 1024px - 1279px (lg) */
/* Large: >= 1280px (xl) */

/* ==================== CONTENEDOR ==================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
@media (min-width: 640px)  { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* ==================== HEADER CON PATRÓN SVG ==================== */
.header {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--accent-purple) 100%);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

/* ==================== NAVEGACIÓN DE LABS ==================== */
.nav-labs {
    background: white;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-labs-list {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.nav-labs-list::-webkit-scrollbar {
    height: 4px;
}

.nav-labs-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.nav-labs-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
    font-size: 0.8rem;
    transition: all var(--transition-fast);
    white-space: nowrap;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.nav-labs-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-labs-btn.active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(0);
}

/* ==================== GRID CUSTOM ==================== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

@media (max-width: 1024px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}
@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 0.75rem; }
}

/* ==================== LAB CONTENT ==================== */
.lab-content {
    animation: fadeIn 0.3s ease-out;
    padding: 1rem;
}

@media (min-width: 640px) {
    .lab-content {
        padding: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .lab-content {
        padding: 2rem;
    }
}

/* ==================== TARJETAS RESPONSIVE ==================== */
.card-responsive {
    width: 100%;
    padding: 1rem;
    border-radius: 0.75rem;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

@media (min-width: 640px) {
    .card-responsive {
        padding: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .card-responsive {
        padding: 1.5rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
}

.card-responsive:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

/* ==================== BOTONES RESPONSIVE ==================== */
.btn-responsive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
}

@media (min-width: 640px) {
    .btn-responsive {
        width: auto;
        padding: 0.75rem 1.5rem;
    }
}

/* ==================== TEXTOS RESPONSIVE ==================== */
.text-responsive {
    font-size: 0.875rem;
    line-height: 1.5;
}

@media (min-width: 640px) {
    .text-responsive {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* ==================== FORMULARIOS RESPONSIVE ==================== */
.input-responsive {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-responsive:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

@media (min-width: 640px) {
    .input-responsive {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

/* ==================== MODALES RESPONSIVE ==================== */
.modal-responsive {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-responsive.active {
    opacity: 1;
    visibility: visible;
}

.modal-content-responsive {
    background: white;
    border-radius: 1rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-responsive.active .modal-content-responsive {
    transform: scale(1) translateY(0);
}

@media (min-width: 640px) {
    .modal-content-responsive {
        max-width: 600px;
    }
}

@media (min-width: 1024px) {
    .modal-content-responsive {
        max-width: 700px;
    }
}

/* ==================== PROGRESS BAR ==================== */
.progress-container {
    width: 100%;
    height: 0.5rem;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

@media (min-width: 640px) {
    .progress-container {
        height: 0.625rem;
    }
}

/* ==================== FOOTER ==================== */
.footer-responsive {
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    margin-top: 2rem;
}

@media (min-width: 640px) {
    .footer-responsive {
        padding: 2rem;
        font-size: 1rem;
    }
}

/* ==================== UTILIDADES RESPONSIVE ==================== */
.hide-mobile {
    display: none;
}

.show-mobile {
    display: block;
}

@media (min-width: 640px) {
    .hide-mobile {
        display: inline;
    }
    .show-mobile {
        display: none;
    }
}

.mt-responsive {
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .mt-responsive {
        margin-top: 1.5rem;
    }
}