/* =============================================
   Portal CLASES HARUNO — Estilos Principales
   Versión 3.0 — Rediseño Stitch
   ============================================= */

/* === BASE === */
html,
body {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #05030e;
    background-image: radial-gradient(ellipse at 50% 0%, rgba(77, 25, 230, 0.12) 0%, #05030e 70%);
    color: #fff;
    min-height: 100vh;
}

/* === GLASS CARD === */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 40px -15px rgba(0, 0, 0, 0.5);
}

/* === CARD REVEAL ANIMATION === */
.card-hidden {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
    will-change: opacity, transform;
}

.card-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

/* === TARJETAS BLOQUEADAS === */
.card-locked {
    opacity: 0.7;
    border-style: dashed;
    cursor: not-allowed;
}

.card-locked:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(239, 68, 68, 0.4);
}

/* === SHIMMER EFFECT === */
.shimmer-effect {
    position: relative;
    overflow: hidden;
    border-color: rgba(34, 211, 238, 0.4);
    background: linear-gradient(145deg, rgba(8, 145, 178, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
}

.shimmer-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(34, 211, 238, 0.1) 50%, transparent 100%);
    transform: skewX(-25deg);
    animation: shimmer 3s infinite ease-in-out;
    pointer-events: none;
}

@keyframes shimmer {
    0% { left: -150%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

/* === PULSE BORDER === */
.pulse-border-emerald {
    animation: border-pulse-emerald 2s infinite;
    background: linear-gradient(145deg, rgba(6, 78, 59, 0.2) 0%, rgba(0, 0, 0, 0) 100%);
}

@keyframes border-pulse-emerald {
    0% { border-color: rgba(16, 185, 129, 0.3); box-shadow: 0 0 0 rgba(16, 185, 129, 0); }
    50% { border-color: rgba(16, 185, 129, 1); box-shadow: 0 0 20px rgba(16, 185, 129, 0.2); }
    100% { border-color: rgba(16, 185, 129, 0.3); box-shadow: 0 0 0 rgba(16, 185, 129, 0); }
}

/* === BADGE FLOAT === */
.badge-float {
    animation: float-badge 3s ease-in-out infinite;
}

@keyframes float-badge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* === ORBS DE FONDO === */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: -1;
    animation: float 15s infinite ease-in-out;
    will-change: transform;
    contain: strict;
    pointer-events: none;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: #4d19e6;
    top: -15%;
    left: -10%;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #1e1b4b;
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #064e3b;
    top: 50%;
    left: 50%;
    opacity: 0.1;
    animation-delay: -3s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, 30px); }
}

/* === TEXT GRADIENT === */
.text-gradient {
    background: linear-gradient(to right, #e9d5ff, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* === ANIMATE FADE IN UP === */
.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === MODAL SHAKE === */
.shake {
    animation: shake 0.82s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* === MODAL OVERLAY === */
#modal-overlay {
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

/* === MODAL ANIMATIONS === */
.modal {
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-backdrop {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active .modal-backdrop {
    opacity: 1;
}

/* === ACORDEÓN === */
.accordion-content {
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
    max-height: 2000px;
    opacity: 1;
    overflow: hidden;
}

.accordion-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    content-visibility: auto;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-btn[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #05030e;
}

::-webkit-scrollbar-thumb {
    background: #1a1530;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2a2050;
}

/* === SIDEBAR (Material / Admin) === */
.layout-3col {
    display: grid;
    grid-template-columns: 220px 1fr 240px;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.layout-2col {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
    min-height: 100vh;
}

.sidebar-nav {
    position: sticky;
    top: 3.5rem;
    height: calc(100vh - 3.5rem);
    overflow-y: auto;
    padding: 1.5rem;
    border-right: 1px solid rgba(255,255,255,0.06);
    background: rgba(5, 3, 14, 0.95);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sidebar-nav-item:hover,
.sidebar-nav-item.active {
    background: rgba(255,255,255,0.04);
    color: #e5e7eb;
}

.sidebar-nav-item.active {
    color: #a78bfa;
    background: rgba(139, 92, 246, 0.1);
    border-left: 2px solid #a78bfa;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .layout-3col {
        grid-template-columns: 1fr;
    }
    
    .layout-3col .sidebar-left,
    .layout-3col .sidebar-right {
        display: none;
    }
    
    .layout-2col {
        grid-template-columns: 1fr;
    }
    
    .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .admin-layout .sidebar-nav {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
}

/* === PATTERN GRID (holidays) === */
.pattern-grid-lg {
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}