/* =====================================================================
   IR EDUSOLVE (IR MEDIA) - MODERN EDUCATIONAL PLATFORM STYLESHEET
   Slogan: Pahami Soal. Kuasai Ilmu.
   Design Identity: Aligned with irp.my.id (Teal #008080, Sky Blue #0284c7,
                    Mint #e6fffa, Slate Dark #0f172a, Plus Jakarta Sans)
   Prinsip: Minimalis, Segar, Cepat, Edukatif, Profesional, Mobile-first
   ===================================================================== */

:root {
    /* IR Media Official Palette (from irp.my.id) */
    --teal-primary: #008080;
    --teal-dark: #005656;
    --teal-light: #e6fffa;
    --teal-soft: rgba(0, 128, 128, 0.08);
    --teal-border: rgba(0, 128, 128, 0.15);
    
    --sky-blue: #0284c7;
    --sky-dark: #0369a1;
    --sky-light: #e0f2fe;
    --sky-soft: rgba(2, 132, 199, 0.08);

    --primary-color: #008080;
    --primary-dark: #0f172a;
    --primary-navy: #004d4d;
    --primary-green: #008080;
    --primary-blue: #0284c7;
    --primary-blue-hover: #005656;
    --primary-blue-light: #e6fffa;

    --accent-cyan: #38bdf8;
    --accent-gold: #f59e0b;
    --accent-gold-light: #fffbeb;

    --text-main: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --border-color: #e2e8f0;
    --border-focus: #008080;

    --card-radius: 20px;
    --card-shadow: 0 10px 30px rgba(0, 128, 128, 0.05), 0 2px 6px rgba(0, 0, 0, 0.03);
    --card-shadow-hover: 0 20px 40px rgba(0, 128, 128, 0.12), 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Base & Typography */
body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-main);
    background: linear-gradient(-45deg, #f8fafc, #e0f2fe, #e6fffa, #f0fdf4);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--teal-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--sky-blue);
}

/* Background Animasi & Ambient Floating Shapes (Sama dengan irp.my.id) */
.animated-bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    filter: blur(75px);
    opacity: 0.55;
    border-radius: 50%;
    animation: floatShape 12s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(0, 128, 128, 0.22);
    top: -80px;
    left: -80px;
    animation-delay: 0s;
}

.shape-2 {
    width: 440px;
    height: 440px;
    background: rgba(2, 132, 199, 0.22);
    bottom: -100px;
    right: -80px;
    animation-delay: -4s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: rgba(56, 189, 248, 0.18);
    top: 35%;
    left: 60%;
    transform: translate(-50%, -50%);
    animation-delay: -7s;
}

@keyframes floatShape {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-28px) rotate(8deg);
    }
}

/* =====================================================================
   ULTRA-MODERN FLOATING ISLAND HEADER
   ===================================================================== */
.header-nav-wrapper {
    position: sticky;
    top: 0;
    z-index: 1040;
    padding: 0.85rem 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-floating-island {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 128, 128, 0.18);
    border-radius: 100px;
    padding: 0.45rem 1.35rem;
    box-shadow: 0 16px 36px -6px rgba(0, 128, 128, 0.09), 
                0 4px 12px rgba(0, 0, 0, 0.03),
                inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-floating-island:hover {
    box-shadow: 0 20px 48px -6px rgba(0, 128, 128, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: rgba(0, 128, 128, 0.3);
}

/* Brand Logo Squircle & Text */
.brand-logo-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 2px 4px;
}

.brand-icon-squircle {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #ffffff;
    border: 1.5px solid rgba(0, 128, 128, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 128, 128, 0.12);
    transition: transform 0.25s ease;
    overflow: hidden;
}

.brand-logo-pill:hover .brand-icon-squircle {
    transform: scale(1.08) rotate(-3deg);
}

.brand-title-text {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #0f172a;
    line-height: 1.1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.brand-title-text span {
    background: linear-gradient(135deg, #008080 0%, #0284c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981;
    display: inline-block;
    animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.brand-sub-badge {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #64748b;
    text-transform: uppercase;
}

/* Nav Links as Sleek Floating Pills */
.nav-island-link {
    font-weight: 600;
    font-size: 0.915rem;
    color: #334155;
    padding: 0.45rem 0.95rem !important;
    border-radius: 50rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 1px;
}

.nav-island-link:hover {
    color: #008080 !important;
    background: rgba(0, 128, 128, 0.08);
    transform: translateY(-1px);
}

.nav-island-link.active {
    color: #008080 !important;
    background: rgba(0, 128, 128, 0.12) !important;
    font-weight: 700;
}

.nav-island-link .dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.nav-item.dropdown:hover .dropdown-arrow,
.nav-item.dropdown.show .dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
    color: #008080;
}

/* Special OSN & OSKANU Competition Pills */
.nav-island-special {
    border-radius: 50rem !important;
    padding: 0.38rem 0.95rem !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 0 2px;
}

.nav-island-special-osn {
    background: rgba(245, 158, 11, 0.12) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    color: #b45309 !important;
}

.nav-island-special-osn:hover,
.nav-island-special-osn.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    border-color: #f59e0b !important;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.nav-island-special-oskanu {
    background: rgba(0, 128, 128, 0.1) !important;
    border: 1px solid rgba(0, 128, 128, 0.3) !important;
    color: #008080 !important;
}

.nav-island-special-oskanu:hover,
.nav-island-special-oskanu.active {
    background: linear-gradient(135deg, #008080 0%, #0284c7 100%) !important;
    color: #ffffff !important;
    border-color: #008080 !important;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 14px rgba(0, 128, 128, 0.35);
}

/* Rich Card Dropdown Menus */
.dropdown-menu-island {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 128, 128, 0.18);
    border-radius: 20px;
    padding: 0.75rem;
    box-shadow: 0 20px 45px -8px rgba(0, 128, 128, 0.16), 0 4px 12px rgba(0, 0, 0, 0.04);
    min-width: 270px;
    margin-top: 0.75rem !important;
    animation: dropdownFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-item-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    color: #1e293b;
}

.dropdown-item-modern:hover {
    background: rgba(0, 128, 128, 0.08);
    transform: translateX(4px);
}

.dropdown-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* Action Buttons in Floating Island */
.btn-island-login {
    color: #334155;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 50rem;
    padding: 0.45rem 1.15rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-island-login:hover {
    color: #008080;
    background: rgba(0, 128, 128, 0.08);
    transform: translateY(-1px);
}

.btn-island-cta {
    background: linear-gradient(135deg, #008080 0%, #0284c7 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 50rem;
    padding: 0.48rem 1.3rem;
    border: none;
    box-shadow: 0 4px 14px rgba(0, 128, 128, 0.25);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-island-cta:hover {
    background: linear-gradient(135deg, #006666 0%, #0369a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 128, 128, 0.38);
}

@media (max-width: 991.98px) {
    .header-nav-wrapper {
        padding: 0.5rem 0;
    }
    .header-floating-island {
        border-radius: 24px;
        padding: 0.65rem 1rem;
    }
    .navbar-collapse {
        padding-top: 1rem;
        margin-top: 0.75rem;
        border-top: 1px solid rgba(0, 128, 128, 0.12);
    }
}

.btn-outline-teal {
    background: transparent;
    color: #008080 !important;
    border: 1.5px solid #008080;
    border-radius: 50rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.btn-outline-teal:hover {
    background: #008080;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 128, 128, 0.2);
}

/* Hero Section (Light & Airy like irp.my.id) */
.hero-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}

.hero-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 20%, rgba(2, 132, 199, 0.12) 0%, rgba(0, 128, 128, 0.08) 35%, transparent 70%),
                radial-gradient(circle at 15% 85%, rgba(0, 128, 128, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-badge {
    background: rgba(0, 128, 128, 0.08);
    border: 1px solid rgba(0, 128, 128, 0.22);
    box-shadow: 0 4px 14px rgba(0, 128, 128, 0.06);
    backdrop-filter: blur(8px);
    color: #008080;
    font-size: 0.825rem;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.hero-title {
    font-size: clamp(2.1rem, 4.5vw + 1rem, 3.4rem);
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
}

.hero-title-highlight {
    background: linear-gradient(135deg, #008080 0%, #0284c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.3vw + 0.4rem, 1.15rem);
    color: #475569;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* Large Hero Search Box */
.search-box-large {
    background: #ffffff;
    border-radius: 50rem;
    padding: 6px 8px 6px 18px;
    box-shadow: 0 15px 35px rgba(0, 128, 128, 0.08), 0 0 0 1px rgba(0, 128, 128, 0.15);
    border: 2px solid transparent;
    transition: all 0.25s ease;
}

.search-box-large:focus-within {
    box-shadow: 0 20px 40px rgba(0, 128, 128, 0.14), 0 0 0 4px rgba(0, 128, 128, 0.15);
    border-color: #008080;
}

.search-box-large input {
    font-size: 1.02rem;
    padding: 10px 14px;
    color: #0f172a;
}

.search-box-large input::placeholder {
    color: #94a3b8;
}

.btn-search-hero {
    background: linear-gradient(135deg, #008080 0%, #0284c7 100%);
    color: #ffffff;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 50rem;
    border: none;
    box-shadow: 0 4px 14px rgba(0, 128, 128, 0.28);
    transition: all 0.25s ease;
}

.btn-search-hero:hover {
    background: linear-gradient(135deg, #006666 0%, #0369a1 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 128, 128, 0.4);
}

/* Hero Popular Search Tags */
.badge-hero-tag {
    background: rgba(255, 255, 255, 0.85);
    color: #334155;
    border: 1px solid rgba(0, 128, 128, 0.15);
    border-radius: 50rem;
    padding: 0.3rem 0.9rem;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    backdrop-filter: blur(6px);
}

.badge-hero-tag:hover {
    background: #008080;
    color: #ffffff;
    border-color: #008080;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 128, 128, 0.2);
}

.badge-hero-tag-special {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
    font-weight: 700;
}

.badge-hero-tag-special:hover {
    background: #f59e0b;
    color: #ffffff;
    border-color: #f59e0b;
}

/* Feature Highlights Strip */
.feature-strip {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px);
    border-color: rgba(0, 128, 128, 0.1) !important;
}

.feature-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Category Level Card */
.category-level-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    border: 1px solid rgba(0, 128, 128, 0.12);
    box-shadow: var(--card-shadow);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
}

.category-level-card:hover {
    transform: translateY(-5px);
    border-color: #008080 !important;
    box-shadow: var(--card-shadow-hover) !important;
}

/* Category Pill Card */
.category-pill-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 16px;
    border: 1px solid rgba(0, 128, 128, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

.category-pill-card:hover {
    border-color: #008080;
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

/* Educational Cards */
.edu-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    border: 1px solid rgba(0, 128, 128, 0.1);
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    backdrop-filter: blur(8px);
}

.edu-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(0, 128, 128, 0.35);
}

/* Utility Helpers */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

.shadow-xs {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Subject Badges & Level Badges */
.badge-subject {
    background-color: #e6fffa;
    color: #006666;
    border: 1px solid #99f6e4;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
}

.badge-level {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
}

.badge-source {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
}

.badge-gold {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    font-weight: 700;
}

/* Learning Platform: Question & Discussion Styling */
.question-container {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(0, 128, 128, 0.15);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.question-badge-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.question-text-box {
    font-size: 1.1rem;
    font-weight: 500;
    color: #0f172a;
    line-height: 1.8;
}

/* Option List */
.option-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.option-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.option-box.is-correct {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.option-key-badge {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background-color: #e2e8f0;
    color: #334155;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.option-box.is-correct .option-key-badge {
    background-color: #10b981;
    color: #ffffff;
}

/* Learning Modular Cards */
.concept-card {
    background-color: #fffbeb;
    border-left: 4px solid #d97706;
    border-radius: 0 16px 16px 0;
    padding: 20px;
    margin-bottom: 24px;
}

.explanation-card {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 128, 128, 0.12);
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 24px;
    line-height: 1.8;
    box-shadow: var(--card-shadow);
}

.explanation-card h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--teal-primary);
}

.explanation-card p {
    margin-bottom: 1.25rem;
}

.analysis-section {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.conclusion-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 1.5px solid #a7f3d0;
    border-radius: 16px;
    padding: 24px;
}

/* KaTeX Math Formatting */
.katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.75rem 0;
    margin: 0.5rem 0;
}

/* Mobile-first responsive adjustments */
@media (max-width: 767.98px) {
    .hero-wrapper {
        padding-top: 2rem !important;
        padding-bottom: 2.5rem !important;
    }

    .search-box-large {
        padding: 6px;
    }

    .btn-search-hero {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .question-container {
        padding: 16px;
    }

    .explanation-card {
        padding: 18px;
    }
}
