/* ==============================================================================
   Custom Application Styling & Print Optimizations
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--font-sans);
}

/* Mobile-Friendly Safe Area Spacing */
@media (max-width: 768px) {
    .has-bottom-nav {
        padding-bottom: 5.5rem !important;
    }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Digital E-Book Reader Container */
.pdf-reader-frame {
    width: 100%;
    height: calc(100vh - 12rem);
    min-height: 550px;
    border: none;
    border-radius: 0.75rem;
    background: #1e293b;
}

/* Luxury Educational Micro-Interactions */
.glass-panel {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.gold-glow {
    box-shadow: 0 0 20px -3px rgba(245, 158, 11, 0.35);
}

.teal-glow {
    box-shadow: 0 0 20px -3px rgba(13, 148, 136, 0.35);
}

@keyframes subtle-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-4px); }
}

.animate-subtle-float {
    animation: subtle-float 4s ease-in-out infinite;
}

/* ==============================================================================
   Ultra-Premium Button Animations (Backend & Frontend)
   ============================================================================== */
.btn-premium {
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.25);
}

.btn-premium:active {
    transform: translateY(1px) scale(0.98);
}

/* Shimmer Light Reflection Effect */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(
        60deg,
        rgba(255, 255, 255, 0) 20%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0) 80%
    );
    transform: rotate(25deg);
    transition: none;
    pointer-events: none;
}

.btn-shimmer:hover::after {
    animation: shimmer-sweep 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes shimmer-sweep {
    0% {
        left: -60%;
    }
    100% {
        left: 140%;
    }
}

/* Pulsing Glow for High-Priority Buttons */
.btn-glow-pulse {
    animation: pulse-glow 2.5s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.5);
    }
    50% {
        box-shadow: 0 0 16px 4px rgba(20, 184, 166, 0.25);
    }
}

.btn-amber-pulse {
    animation: pulse-amber-glow 2.5s infinite;
}

@keyframes pulse-amber-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
    }
    50% {
        box-shadow: 0 0 16px 4px rgba(245, 158, 11, 0.3);
    }
}

/* ==============================================================================
   Hero Carousel Transitions: Snappy Zero-Lag 60fps GPU Composited
   ============================================================================== */
.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

.hero-slide .hero-content-anim {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    will-change: opacity, transform;
}

.hero-slide.active .hero-content-anim {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Apple/Tesla-style Interactive Slide Progress Line - Smooth 60fps JS Driven */
.hero-progress-line {
    transition: none !important;
    will-change: width;
}

.hero-tab {
    cursor: pointer;
    transition: all 0.2s ease;
}

.hero-tab:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

/* Notice Ticker Animation */
.ticker-marquee {
    display: inline-block;
    white-space: nowrap;
    animation: ticker-slide 28s linear infinite;
}

.ticker-marquee:hover {
    animation-play-state: paused;
}

@keyframes ticker-slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ==============================================================================
   Luxury Animated Welcome Hero Banner (Universal for all Portals)
   ============================================================================== */
@keyframes welcomeGradientSweep {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes glassSheenPass {
    0% { transform: translateX(-160%) skewX(-25deg); opacity: 0; }
    25% { opacity: 0.7; }
    50% { opacity: 0.9; }
    75% { opacity: 0.7; }
    100% { transform: translateX(360%) skewX(-25deg); opacity: 0; }
}
@keyframes waveHand {
    0%, 100% { transform: rotate(0deg); }
    20%, 60% { transform: rotate(14deg); }
    40%, 80% { transform: rotate(-10deg); }
}
@keyframes pulseGlowRing {
    0%, 100% { box-shadow: 0 4px 20px -2px rgba(234, 88, 12, 0.25); border-color: rgba(249, 115, 22, 0.35); }
    50% { box-shadow: 0 8px 30px 2px rgba(234, 88, 12, 0.45); border-color: rgba(249, 115, 22, 0.65); }
}
.animated-welcome-hero {
    background: linear-gradient(130deg, #020617 0%, #1e1b4b 22%, #431407 50%, #0f172a 78%, #020617 100%) !important;
    background-size: 300% 300% !important;
    animation: welcomeGradientSweep 10s ease infinite, pulseGlowRing 4s ease-in-out infinite !important;
}
.sheen-beam {
    animation: glassSheenPass 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
}
.animate-wave-emoji {
    display: inline-block;
    transform-origin: 70% 70%;
    animation: waveHand 2.2s infinite ease-in-out;
}

/* ==============================================================================
   Print Stylesheet: Optimized for Receipts & Report Cards
   ============================================================================== */
@media print {
    /* Hide navigational and decorative UI elements */
    header, 
    nav, 
    aside, 
    footer, 
    .no-print, 
    .mobile-bottom-bar,
    button:not(.print-include) {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .printable-card {
        box-shadow: none !important;
        border: 1px solid #d1d5db !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 1.5cm !important;
        page-break-inside: avoid;
    }

    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    th, td {
        border: 1px solid #9ca3af !important;
        padding: 6px 10px !important;
    }
}
