/* ==========================================================================
   UGNIUS - Edukasi & Informatika
   Custom Stylesheet for cPanel Deployment (v2 - Mobile Modal Fix)
   ========================================================================== */

:root {
    --ugnius-blue: #0056b3;
    --ugnius-royal: #003d82;
    --ugnius-cyan: #00a8e8;
    --ugnius-sky: #f0f7ff;
    --ugnius-orange: #ff6b00;
    --ugnius-orange-hover: #e65c00;
}

html {
    scroll-behavior: smooth;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* Custom Gradients & Patterns */
.hero-bg-pattern {
    background-color: #f0f7ff;
    background-image: 
        radial-gradient(at 15% 20%, rgba(0, 168, 232, 0.14) 0px, transparent 50%),
        radial-gradient(at 85% 80%, rgba(0, 86, 179, 0.1) 0px, transparent 50%),
        radial-gradient(at 50% 10%, rgba(255, 107, 0, 0.06) 0px, transparent 40%);
}

.edu-grid-bg {
    background-size: 32px 32px;
    background-image: 
        linear-gradient(to right, rgba(0, 86, 179, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 86, 179, 0.05) 1px, transparent 1px);
}

/* Card & Micro-interaction Effects */
.card-edu {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) {
    .card-edu:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 35px -10px rgba(0, 86, 179, 0.15), 0 8px 15px -6px rgba(0, 86, 179, 0.06);
    }
}

/* Floating Animations */
.floating-badge {
    animation: floatSlow 4.5s ease-in-out infinite;
}

.floating-badge-delayed {
    animation: floatSlow 5s ease-in-out 1.8s infinite;
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-9px); }
}

/* Active States for Curriculum Tabs & Grade Buttons */
.tab-btn-active {
    background: linear-gradient(135deg, #0056b3 0%, #00a8e8 100%);
    color: #ffffff !important;
    box-shadow: 0 10px 20px -5px rgba(0, 86, 179, 0.35);
    border-color: transparent !important;
}

.grade-pill-active {
    background-color: #ff6b00 !important;
    color: #ffffff !important;
    border-color: #ff6b00 !important;
    box-shadow: 0 6px 15px -3px rgba(255, 107, 0, 0.35);
}

/* ==========================================================================
   MOBILE & DESKTOP MODAL (POP-UP) RELIABLE STYLES
   ========================================================================== */
#detailModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    z-index: 99999 !important;
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#detailModal.modal-open {
    display: flex !important;
}

.modal-card-box {
    background-color: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    max-height: 88dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    margin: auto;
}

.modal-body-scroll {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 24px;
    flex: 1 1 auto;
}

@keyframes modalPopIn {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Ensure buttons work smoothly on iOS/Android touchscreens */
button, [data-modal-target] {
    cursor: pointer;
    touch-action: manipulation;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}
