@import url('https://fonts.googleapis.com/css2?family=K2D:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

/* ==========================================================================
   BOTANY THEME CSS — งานสวนพฤกษศาสตร์โรงเรียน (โครงการ อพ.สธ.)
   โรงเรียนสวนกุหลาบวิทยาลัย (จิรประวัติ) นครสวรรค์
   Theme: Modern Royal Purple & Botanical Flora
   ========================================================================== */

:root {
    /* Royal Purple Spectrum (สีม่วง อพ.สธ. / สีม่วงประจำพระองค์) */
    --purple-950: #170428;
    --purple-900: #290845;
    --purple-850: #380c5e;
    --purple-800: #4c117e;
    --purple-700: #6317a3;
    --purple-600: #7e22ce;
    --purple-500: #9333ea;
    --purple-400: #a855f7;
    --purple-300: #c084fc;
    --purple-200: #e9d5ff;
    --purple-100: #f3e8ff;
    --purple-50:  #faf5ff;

    /* Royal Gold Accent (สีทองพระราชทาน) */
    --gold-600: #d97706;
    --gold-500: #f59e0b;
    --gold-400: #fbbf24;
    --gold-300: #fde68a;
    --gold-100: #fef3c7;
    --gold-50:  #fffbeb;

    /* Botanical Flora Emerald (เขียวพฤกษศาสตร์) */
    --flora-800: #064e3b;
    --flora-700: #047857;
    --flora-600: #059669;
    --flora-500: #10b981;
    --flora-100: #d1fae5;
    --flora-50:  #ecfdf5;

    /* Neutrals & Text */
    --bg-body: #f8f6fc;
    --bg-surface: #ffffff;
    --text-main: #190e2b;
    --text-secondary: #4b3e61;
    --text-muted: #6e6185;
    --border-color: #eadff3;

    /* Typography */
    --font-k2d: 'K2D', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.28s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base & Typography */
*, *::before, *::after, html, body, input, select, textarea, button, h1, h2, h3, h4, h5, h6, label, p, span, a, div, td, th {
    font-family: var(--font-k2d) !important;
}

body {
    font-family: var(--font-k2d) !important;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.65;
    font-size: 1rem;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--purple-950);
    letter-spacing: -0.015em;
}

a {
    color: var(--purple-600);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--purple-800);
}

/* Contrast helpers & Dark backgrounds */
.bg-dark-purple {
    background: linear-gradient(135deg, #170428 0%, #380c5e 50%, #6317a3 100%) !important;
    color: #ffffff !important;
}
.bg-purple {
    background: linear-gradient(135deg, #6317a3 0%, #7e22ce 100%) !important;
    color: #ffffff !important;
}
.bg-purple-darker {
    background: linear-gradient(90deg, #170428 0%, #290845 50%, #170428 100%) !important;
    color: #ffffff !important;
}
.bg-light-nature {
    background-color: #faf5ff !important;
}
.bg-purple-subtle {
    background-color: var(--purple-100) !important;
    color: var(--purple-800) !important;
    border: 1px solid var(--purple-200) !important;
}
.bg-gold-subtle {
    background-color: var(--gold-100) !important;
    color: #78350f !important;
    border: 1px solid var(--gold-300) !important;
}
.text-purple {
    color: var(--purple-700) !important;
}
.text-dark-purple {
    color: var(--purple-950) !important;
}
.text-gold {
    color: var(--gold-500) !important;
}

/* ==========================================================================
   TOPBAR & NAVBAR (Ultra Smooth Royal Purple & Glassmorphism)
   ========================================================================== */

/* Topbar */
.botany-topbar {
    background: linear-gradient(90deg, #120220 0%, #200537 50%, #120220 100%);
    color: #e9d5ff;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 1px solid rgba(192, 132, 252, 0.18);
    position: relative;
    z-index: 1035;
    transition: var(--transition);
}
.botany-topbar .topbar-item {
    color: #e9d5ff;
    display: inline-flex;
    align-items: center;
}
.botany-topbar .topbar-divider {
    display: inline-block;
    width: 1px;
    height: 12px;
    background: rgba(233, 213, 255, 0.25);
}
.topbar-badge {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.topbar-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    display: inline-block;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #22c55e; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.topbar-link {
    color: #f3e8ff;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 6px;
    transition: var(--transition);
}
.topbar-link:hover {
    color: var(--gold-400);
    background: rgba(255, 255, 255, 0.08);
}
.topbar-link-danger:hover {
    color: #fca5a5 !important;
    background: rgba(239, 68, 68, 0.15);
}
.topbar-user-pill {
    background: rgba(147, 51, 234, 0.25);
    border: 1px solid rgba(192, 132, 252, 0.35);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}
.topbar-user-pill:hover {
    background: rgba(147, 51, 234, 0.45);
    color: var(--gold-400);
}

/* Modern Sticky Purple Navbar */
.botany-navbar-modern {
    background: rgba(20, 3, 36, 0.90) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(192, 132, 252, 0.2);
    box-shadow: 0 8px 32px rgba(12, 1, 22, 0.35);
    padding: 10px 0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.botany-navbar-modern.is-scrolled {
    background: rgba(15, 2, 27, 0.98) !important;
    padding: 6px 0;
    border-bottom-color: rgba(192, 132, 252, 0.3);
    box-shadow: 0 12px 40px rgba(8, 1, 16, 0.55) !important;
}

/* Ensure container does not wrap on desktop */
@media (min-width: 1200px) {
    .botany-navbar-modern .container-fluid,
    .botany-navbar-modern .container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
    }
    .botany-navbar-modern .navbar-collapse {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        flex-basis: auto !important;
        flex-grow: 1 !important;
    }
    .botany-navbar-modern .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        margin: 0 auto !important;
        gap: 2px !important;
    }
    .botany-navbar-modern .nav-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        flex-shrink: 0 !important;
        margin-left: 12px !important;
    }
}

/* Brand Section */
.botany-navbar-modern .navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
    margin-right: 1rem;
    text-decoration: none;
    flex-shrink: 0;
    white-space: nowrap;
}
.brand-logo-wrap {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f3e8ff 100%);
    display: grid;
    place-items: center;
    position: relative;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(251, 191, 36, 0.5);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.navbar-brand:hover .brand-logo-wrap {
    transform: scale(1.05) rotate(-2deg);
    border-color: var(--gold-400);
}
.brand-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    position: relative;
    z-index: 2;
}
.brand-logo-glow {
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.4) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.navbar-brand:hover .brand-logo-glow {
    opacity: 1;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    white-space: nowrap;
}
.brand-title {
    color: #ffffff !important;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
    white-space: nowrap;
}
.brand-subtitle {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(233, 213, 255, 0.85);
    font-size: 0.70rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.brand-tag {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: #170428;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 5px;
    line-height: 1.2;
}

/* Nav Links Menu */
.botany-navbar-modern .nav-item {
    white-space: nowrap;
    flex-shrink: 0;
}
.botany-navbar-modern .nav-link {
    color: #e9d5ff !important;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 6px 12px !important;
    border-radius: 999px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    border: 1px solid transparent;
    white-space: nowrap !important;
}
.botany-navbar-modern .nav-link i {
    color: var(--purple-300);
    font-size: 0.95rem;
    transition: transform 0.25s ease, color 0.25s ease;
}
.botany-navbar-modern .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(216, 180, 254, 0.25);
    transform: translateY(-1px);
}
.botany-navbar-modern .nav-link:hover i {
    color: var(--gold-400);
    transform: scale(1.15);
}
.botany-navbar-modern .nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.45) 0%, rgba(126, 34, 206, 0.75) 100%);
    border: 1px solid rgba(216, 180, 254, 0.45);
    box-shadow: 0 4px 14px rgba(126, 34, 206, 0.35);
}
.botany-navbar-modern .nav-link.active i {
    color: var(--gold-400);
}

/* Nav Search Bar */
.nav-search-modern {
    height: 36px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(192, 132, 252, 0.28);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-search-modern:focus-within {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--gold-400);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.25), 0 4px 16px rgba(0, 0, 0, 0.2);
}
.nav-search-modern .search-icon {
    color: var(--purple-300);
    font-size: 0.86rem;
    transition: color 0.2s ease;
}
.nav-search-modern:focus-within .search-icon {
    color: var(--gold-400);
}
.nav-search-modern input {
    width: 105px;
    border: none;
    outline: none;
    padding-left: 6px;
    color: #ffffff;
    font-size: 0.82rem;
    background: transparent;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-search-modern input:focus {
    width: 160px;
}
.nav-search-modern input::placeholder {
    color: rgba(233, 213, 255, 0.6);
    font-size: 0.80rem;
}

/* Nav Admin Button */
.nav-btn-admin {
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 15px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    color: #170428 !important;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap !important;
    text-decoration: none;
    flex-shrink: 0;
}
.nav-btn-admin:hover {
    background: linear-gradient(135deg, #fef08a 0%, #fbbf24 50%, #f59e0b 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.5);
    color: #170428 !important;
}
.nav-btn-admin i {
    font-size: 0.9rem;
}

/* Modern Hamburger Toggler */
.modern-toggler {
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(192, 132, 252, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.modern-toggler:focus {
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.3);
    outline: none;
}
.modern-toggler:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--gold-400);
}
.toggler-icon-bar {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modern-toggler:not(.collapsed) .toggler-icon-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background-color: var(--gold-400);
}
.modern-toggler:not(.collapsed) .toggler-icon-bar:nth-child(2) {
    opacity: 0;
    transform: scale(0.5);
}
.modern-toggler:not(.collapsed) .toggler-icon-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background-color: var(--gold-400);
}

/* Mobile Responsive Drawer Styling */
@media (max-width: 1199.98px) {
    .botany-navbar-modern .navbar-collapse {
        background: rgba(23, 4, 40, 0.98);
        border: 1px solid rgba(192, 132, 252, 0.25);
        border-radius: 20px;
        padding: 20px;
        margin-top: 14px;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(24px);
    }
    .botany-navbar-modern .navbar-nav {
        gap: 6px;
        margin-bottom: 16px;
    }
    .botany-navbar-modern .nav-link {
        width: 100%;
        padding: 10px 16px !important;
        border-radius: 14px;
    }
    .nav-search-modern {
        width: 100%;
    }
    .nav-search-modern input {
        width: 100% !important;
    }
    .nav-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px !important;
    }
    .nav-btn-admin {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   HERO SECTION (Majestic Purple Theme with Animated Botanical Scene)
   ========================================================================== */
.botany-hero-modern {
    position: relative;
    min-height: 580px;
    background: 
        radial-gradient(circle at 85% 20%, rgba(168, 85, 247, 0.32) 0%, transparent 45%),
        radial-gradient(circle at 10% 85%, rgba(245, 158, 11, 0.18) 0%, transparent 40%),
        radial-gradient(circle at 45% 50%, rgba(5, 150, 105, 0.14) 0%, transparent 60%),
        linear-gradient(135deg, #10021c 0%, #200537 35%, #3d0a63 70%, #58128f 100%);
    color: #ffffff;
    padding: 50px 0 70px;
    overflow: hidden;
}
.botany-hero-modern::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='%23c084fc' fill-opacity='0.05' fill-rule='evenodd'%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/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* Interactive Canvas for Botanical Particle Engine */
.hero-botanical-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* Ambient Aurora Glow Waves */
.ambient-aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(85px);
    pointer-events: none;
    z-index: 1;
}
.aurora-1 {
    width: 520px;
    height: 520px;
    top: -120px;
    right: -80px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.45) 0%, rgba(126, 34, 206, 0.15) 60%, transparent 100%);
    animation: auroraFloat1 18s ease-in-out infinite;
}
.aurora-2 {
    width: 480px;
    height: 480px;
    bottom: -100px;
    left: -80px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.35) 0%, rgba(5, 150, 105, 0.18) 60%, transparent 100%);
    animation: auroraFloat2 22s ease-in-out infinite alternate;
}
.aurora-3 {
    width: 360px;
    height: 360px;
    top: 35%;
    left: 28%;
    background: radial-gradient(circle, rgba(192, 132, 252, 0.25) 0%, transparent 70%);
    animation: auroraPulse 12s ease-in-out infinite;
}

@keyframes auroraFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, 35px) scale(1.15); }
}
@keyframes auroraFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, -45px) scale(1.2); }
}
@keyframes auroraPulse {
    0%, 100% { opacity: 0.35; transform: scale(0.9); }
    50% { opacity: 0.75; transform: scale(1.2); }
}

/* Floating Graphic Botanical Leaves */
.floating-botanical {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.4));
    transition: transform 0.2s ease-out;
}
.leaf-monstera-left {
    top: 8%;
    left: 1%;
    width: clamp(120px, 14vw, 190px);
    height: auto;
    animation: floatMonstera 15s ease-in-out infinite;
}
.leaf-palm-right {
    bottom: 6%;
    right: 2%;
    width: clamp(140px, 16vw, 220px);
    height: auto;
    animation: floatPalm 18s ease-in-out infinite alternate;
}
.leaf-fern-top {
    top: 14%;
    right: 32%;
    width: clamp(60px, 7vw, 95px);
    height: auto;
    animation: floatFern 14s ease-in-out infinite;
}

@keyframes floatMonstera {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    50% { transform: translateY(-28px) rotate(10deg) scale(1.06); }
}
@keyframes floatPalm {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    50% { transform: translateY(-35px) rotate(-8deg) scale(1.05); }
}
@keyframes floatFern {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(22px) rotate(12deg) scale(1.08); }
}

.hero-card-modern {
    position: relative;
    z-index: 5;
    padding: clamp(1.8rem, 4vw, 3.5rem);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 30px 80px rgba(10, 2, 22, 0.45);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.hero-badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.45);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.hero-badge-modern i {
    color: var(--gold-400);
}
.hero-badge-modern b {
    color: rgba(255, 255, 255, 0.4);
}

.hero-school-name {
    margin: 1rem 0 0.8rem;
    color: #e9d5ff;
    font-size: clamp(0.95rem, 1.4vw, 1.25rem);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.hero-title-modern {
    font-size: clamp(2.2rem, 4.4vw, 3.8rem);
    line-height: 1.12;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.hero-title-modern span {
    background: linear-gradient(135deg, #ffffff 0%, #fde68a 50%, #fbbf24 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle-modern {
    color: #f3e8ff;
    font-size: 1.05rem;
    line-height: 1.85;
    max-width: 680px;
    margin-bottom: 1.5rem;
    opacity: 0.92;
}

/* Hero Search */
.hero-search-modern {
    display: flex;
    align-items: center;
    max-width: 640px;
    padding: 6px 6px 6px 18px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(10, 2, 22, 0.35);
    margin-bottom: 1.25rem;
}
.hero-search-modern > i {
    color: var(--purple-700);
    font-size: 1.2rem;
}
.hero-search-modern input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: #170428;
    background: transparent;
}
.hero-search-modern input::placeholder {
    color: #83729c;
}
.hero-search-modern button {
    border: none;
    border-radius: 14px;
    padding: 11px 22px;
    background: linear-gradient(135deg, var(--purple-700), var(--purple-600));
    color: #ffffff;
    font-weight: 700;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}
.hero-search-modern button:hover {
    background: linear-gradient(135deg, var(--purple-800), var(--purple-700));
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 23, 163, 0.4);
}

.hero-actions-modern {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.btn-hero-primary {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: #170428 !important;
    font-weight: 800;
    padding: 11px 22px;
    border-radius: 14px;
    border: 1px solid var(--gold-300);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
    transition: var(--transition);
}
.btn-hero-primary:hover {
    background: linear-gradient(135deg, #ffffff, var(--gold-300));
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.45);
}
.btn-hero-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    font-weight: 700;
    padding: 11px 22px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    transition: var(--transition);
}
.btn-hero-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Hero Showcase 3D Visual */
.hero-showcase {
    position: relative;
    width: 380px;
    height: 380px;
    margin: auto;
    display: grid;
    place-items: center;
}
.showcase-orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(192, 132, 252, 0.28);
}
.orbit-one {
    width: 340px;
    height: 340px;
    animation: spinSlow 32s linear infinite;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.15);
}
.orbit-two {
    width: 260px;
    height: 260px;
    border-style: dashed;
    border-color: rgba(251, 191, 36, 0.35);
    animation: spinReverse 22s linear infinite;
}
.orbit-three {
    width: 190px;
    height: 190px;
    border: 1.5px dotted rgba(52, 211, 153, 0.4);
    animation: spinSlow 16s linear infinite;
}
.showcase-center {
    position: relative;
    z-index: 3;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, #7e22ce 0%, #3b0764 70%, #1a032c 100%);
    border: 3px solid rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 45px rgba(168, 85, 247, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    animation: pulseCore 4s ease-in-out infinite;
}
.showcase-center i {
    font-size: 2.2rem;
    color: var(--gold-400);
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.6));
}
.showcase-center small {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--gold-300);
    letter-spacing: 0.08em;
    margin-top: 2px;
}
.showcase-center strong {
    font-size: 0.65rem;
    opacity: 0.85;
    line-height: 1.2;
}

@keyframes pulseCore {
    0%, 100% { transform: scale(1); box-shadow: 0 0 35px rgba(168, 85, 247, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(251, 191, 36, 0.5), 0 0 40px rgba(168, 85, 247, 0.8); }
}

.showcase-float {
    position: absolute;
    z-index: 4;
    padding: 10px 16px;
    border-radius: 16px;
    background: rgba(23, 4, 40, 0.88);
    border: 1px solid rgba(251, 191, 36, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    animation: floatBadge 6s ease-in-out infinite alternate;
}
.showcase-float i {
    font-size: 1.5rem;
    color: var(--gold-400);
}
.showcase-float span {
    display: flex;
    flex-direction: column;
}
.showcase-float b {
    font-size: 0.95rem;
    line-height: 1.2;
}
.showcase-float small {
    font-size: 0.72rem;
    color: #e9d5ff;
}
.float-top {
    top: 15px;
    left: -15px;
    animation-delay: 0s;
}
.float-bottom {
    bottom: 20px;
    right: -15px;
    animation-delay: 2.5s;
}

    /* ==========================================================================
   SCROLL REVEAL & STAGGER ANIMATIONS
   ========================================================================== */
@keyframes revealFadeIn {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes staggerFadeIn {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
    /* Fallback: auto-reveal via CSS animation if JS doesn't add .is-revealed */
    animation: revealFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}
.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
    animation: none; /* JS took over, cancel CSS fallback */
}

.stagger-group .stagger-item {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
    /* Fallback: auto-reveal via CSS animation if JS doesn't add .is-revealed */
    animation: staggerFadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}
.stagger-group .stagger-item:nth-child(2) { animation-delay: 0.9s; }
.stagger-group .stagger-item:nth-child(3) { animation-delay: 1.0s; }
.stagger-group .stagger-item:nth-child(4) { animation-delay: 1.1s; }
.stagger-group .stagger-item:nth-child(5) { animation-delay: 1.2s; }
.stagger-group .stagger-item:nth-child(6) { animation-delay: 1.3s; }

.stagger-group.is-revealed .stagger-item { animation: none; } /* JS took over */
.stagger-group.is-revealed .stagger-item:nth-child(1) { transition-delay: 0.04s; opacity: 1; transform: translateY(0); }
.stagger-group.is-revealed .stagger-item:nth-child(2) { transition-delay: 0.12s; opacity: 1; transform: translateY(0); }
.stagger-group.is-revealed .stagger-item:nth-child(3) { transition-delay: 0.20s; opacity: 1; transform: translateY(0); }
.stagger-group.is-revealed .stagger-item:nth-child(4) { transition-delay: 0.28s; opacity: 1; transform: translateY(0); }
.stagger-group.is-revealed .stagger-item:nth-child(5) { transition-delay: 0.36s; opacity: 1; transform: translateY(0); }
.stagger-group.is-revealed .stagger-item:nth-child(6) { transition-delay: 0.44s; opacity: 1; transform: translateY(0); }

/* Background Botanical Glow Watermark */
.section-bg-botanical-glow {
    position: absolute;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.09) 0%, transparent 70%);
    top: 50%;
    right: -120px;
    transform: translateY(-50%);
    pointer-events: none;
    animation: auroraPulse 14s ease-in-out infinite;
}

@keyframes floatBadge {
    0% { transform: translateY(0); }
    100% { transform: translateY(-14px); }
}
@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes spinReverse {
}

/* ==========================================================================
   QUICK STATS SECTION (Royal Purple Strip)
   ========================================================================== */
.stats-section {
    background: linear-gradient(90deg, #18032b 0%, #2c0847 50%, #18032b 100%) !important;
    border-top: 1px solid rgba(192, 132, 252, 0.18);
    border-bottom: 1px solid rgba(192, 132, 252, 0.18);
    padding: 24px 0;
}
.stats-section .stat-item {
    padding: 14px 10px;
    transition: var(--transition);
}
.stats-section .stat-item:hover {
    transform: translateY(-4px);
}
.stats-section .stat-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 10px;
    border-radius: 16px;
    background: rgba(126, 34, 206, 0.25);
    border: 1px solid rgba(251, 191, 36, 0.3);
    display: grid;
    place-items: center;
    color: var(--gold-400);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    animation: statIconPulse 4s ease-in-out infinite alternate;
}
.stats-section .stat-item:nth-child(2) .stat-icon { animation-delay: 0.8s; }
.stats-section .stat-item:nth-child(3) .stat-icon { animation-delay: 1.6s; }
.stats-section .stat-item:nth-child(4) .stat-icon { animation-delay: 2.4s; }

@keyframes statIconPulse {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-4px) scale(1.05); }
}

.stats-section .stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff !important;
    line-height: 1.1;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #ffffff 0%, #fef08a 60%, #fbbf24 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}
.stats-section .stat-label {
    color: #d8b4fe !important;
    font-size: 0.88rem !important;
    font-weight: 600;
}

/* ==========================================================================
   ROYAL TRIBUTE & PHILOSOPHY SECTION (อพ.สธ.)
   ========================================================================== */
.royal-tribute-section {
    position: relative;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 50%, #ede9fe 100%);
    padding: 60px 0;
    border-bottom: 1px solid #e9d5ff;
}
.royal-tribute-card {
    background: #ffffff;
    border-radius: 28px;
    padding: clamp(1.8rem, 3.5vw, 3rem);
    border: 2px solid rgba(251, 191, 36, 0.4);
    box-shadow: 0 20px 50px rgba(56, 12, 94, 0.08);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}
.royal-tribute-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 60px rgba(56, 12, 94, 0.14);
}
.royal-tribute-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--gold-500) 0%, var(--purple-600) 50%, var(--gold-500) 100%);
}
.royal-portrait-wrap {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, var(--gold-400), var(--purple-600));
    box-shadow: 0 10px 30px rgba(99, 23, 163, 0.25);
    margin: 0 auto 1.5rem;
    position: relative;
    transition: transform 0.4s ease;
}
.royal-portrait-wrap::before {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    border: 2px dashed rgba(251, 191, 36, 0.55);
    animation: royalHaloPulse 16s linear infinite;
    pointer-events: none;
}
.royal-portrait-wrap:hover {
    transform: scale(1.06);
}
@keyframes royalHaloPulse {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.rspg-logo-animated {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.royal-tribute-card:hover .rspg-logo-animated {
    transform: scale(1.08) rotate(3deg);
}
.royal-portrait-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
}
.royal-quote {
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    font-weight: 600;
    color: var(--purple-950);
    line-height: 1.8;
    position: relative;
    padding: 0 20px;
}
.royal-quote::before {
    content: '“';
    font-size: 3.5rem;
    color: var(--purple-300);
    position: absolute;
    left: -10px;
    top: -20px;
    font-family: Georgia, serif;
}
.royal-quote::after {
    content: '”';
    font-size: 3.5rem;
    color: var(--purple-300);
    position: absolute;
    right: -10px;
    bottom: -40px;
    font-family: Georgia, serif;
}

/* ==========================================================================
   5 ELEMENTS OF SCHOOL BOTANICAL GARDEN (5 องค์ประกอบ อพ.สธ.)
   ========================================================================== */
.section-header {
    margin-bottom: 2.8rem;
}
.section-badge-purple {
    background: var(--purple-100);
    color: var(--purple-700);
    border: 1px solid var(--purple-200);
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.86rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.section-title {
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
    font-weight: 800;
    color: var(--purple-950);
    margin-top: 0.6rem;
}
.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}
.title-divider {
    width: 60px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--purple-600), var(--gold-500));
    margin-top: 12px;
}

/* Element Cards */
.element-card {
    background: #ffffff;
    border: 1px solid rgba(126, 34, 206, 0.12) !important;
    border-radius: 24px !important;
    padding: 28px !important;
    box-shadow: 0 10px 30px rgba(56, 12, 94, 0.04);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}
.element-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--purple-500), var(--gold-400));
    opacity: 0;
    transition: var(--transition);
}
.element-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 48px rgba(56, 12, 94, 0.14);
    border-color: var(--purple-300) !important;
}
.element-card:hover::before {
    opacity: 1;
}

.element-icon-wrap {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--purple-100), var(--purple-50));
    border: 1px solid var(--purple-200);
    color: var(--purple-700);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 1.6rem;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.element-card:hover .element-icon-wrap {
    background: linear-gradient(135deg, var(--purple-700), var(--purple-600));
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(126, 34, 206, 0.35);
    transform: scale(1.05) rotate(-3deg);
}

.element-number {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gold-500);
    color: #170428;
    font-size: 0.76rem;
    font-weight: 900;
    display: grid;
    place-items: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}
.element-card:hover .element-number {
    transform: scale(1.18) rotate(10deg);
    background: var(--gold-400);
}

.element-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--purple-950);
    margin-bottom: 12px;
}
.element-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 0;
}

/* 3 Strands of Learning (3 สาระการเรียนรู้ อพ.สธ.) */
.strand-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(126, 34, 206, 0.12);
    box-shadow: 0 8px 24px rgba(56, 12, 94, 0.04);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.strand-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--purple-600), var(--gold-400));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.strand-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(107, 33, 168, 0.12);
    border-color: var(--purple-300);
}
.strand-card:hover::after {
    transform: scaleX(1);
}
.strand-badge {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: #170428;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 10px;
}

/* ==========================================================================
   FEATURED PLANTS & CATALOG CARDS
   ========================================================================== */
.plant-card {
    border-radius: 24px !important;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(56, 12, 94, 0.05);
    border: 1px solid rgba(126, 34, 206, 0.1) !important;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.plant-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 48px rgba(107, 33, 168, 0.16) !important;
    border-color: var(--purple-300) !important;
}

.plant-img-box {
    height: 220px;
    overflow: hidden;
    background: #f3e8ff;
    position: relative;
}
.plant-img-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-20deg);
    transition: left 0.75s ease;
    pointer-events: none;
}
.plant-card:hover .plant-img-box::after {
    left: 140%;
}
.plant-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.plant-card:hover .plant-img {
    transform: scale(1.08);
}

.plant-type-badge {
    background: rgba(23, 4, 40, 0.85);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}
.plant-card:hover .plant-type-badge {
    transform: scale(1.05);
}

.plant-code-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--purple-700);
    background: var(--purple-50);
    border: 1px solid var(--purple-200);
    padding: 2px 8px;
    border-radius: 6px;
    width: fit-content;
}

.plant-title {
    font-size: 1.22rem;
    font-weight: 800;
    color: var(--purple-950);
    margin-bottom: 2px;
}
.plant-sci-name {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-style: italic;
    margin-bottom: 8px;
}

.plant-family-chip {
    background: var(--purple-50);
    color: var(--purple-800);
    border: 1px solid var(--purple-200);
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}

/* ==========================================================================
   BOTANICAL OFFICIAL LABEL & QR CODE (ป้ายชื่อพรรณไม้ อพ.สธ.)
   ========================================================================== */
.botany-label-preview {
    background: #ffffff;
    border: 3px solid var(--purple-700);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(99, 23, 163, 0.15);
    position: relative;
}
.botany-label-header {
    background: linear-gradient(135deg, var(--purple-900), var(--purple-700));
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.botany-label-school {
    font-size: 0.8rem;
    color: var(--gold-400);
    font-weight: 600;
}
.botany-label-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
}

/* ==========================================================================
   NEWS & EDITORIAL CARDS
   ========================================================================== */
.news-card {
    background: #ffffff;
    border: 1px solid rgba(126, 34, 206, 0.12) !important;
    border-radius: 24px !important;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(56, 12, 94, 0.04);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgba(56, 12, 94, 0.12);
    border-color: var(--purple-300) !important;
}
.news-img-box {
    overflow: hidden;
    background: #f3e8ff;
}
.news-img {
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.news-card:hover .news-img {
    transform: scale(1.06);
}

/* ==========================================================================
   BUTTONS & FORM CONTROLS
   ========================================================================== */
.btn {
    font-family: var(--font-k2d) !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    transition: var(--transition);
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
}

.btn-purple {
    background: linear-gradient(135deg, var(--purple-700) 0%, var(--purple-600) 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 6px 18px rgba(126, 34, 206, 0.3) !important;
}
.btn-purple:hover {
    background: linear-gradient(135deg, var(--purple-800) 0%, var(--purple-700) 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(126, 34, 206, 0.45) !important;
}

.btn-outline-purple {
    color: var(--purple-700) !important;
    border: 2px solid var(--purple-600) !important;
    background: transparent !important;
}
.btn-outline-purple:hover {
    background: var(--purple-600) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(126, 34, 206, 0.3) !important;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500)) !important;
    color: #170428 !important;
    border: none !important;
    font-weight: 800 !important;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.3) !important;
}
.btn-gold:hover {
    background: linear-gradient(135deg, #ffffff, var(--gold-300)) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.45) !important;
    color: #170428 !important;
}

/* Filter Badges */
.badge-filter {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border-radius: 999px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}
.badge-filter:hover {
    border-color: var(--purple-400);
    color: var(--purple-700);
    background: var(--purple-50);
}
.badge-filter.active {
    background: linear-gradient(135deg, var(--purple-700), var(--purple-600));
    color: #ffffff;
    border-color: var(--purple-600);
    box-shadow: 0 4px 14px rgba(126, 34, 206, 0.3);
}

/* Page Headers */
.page-header-botany {
    background: 
        radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.25) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.15) 0%, transparent 40%),
        linear-gradient(135deg, #170428 0%, #2f0a52 50%, #581c87 100%);
    color: #ffffff;
    padding: 45px 0 50px;
    position: relative;
    border-bottom: 1px solid rgba(192, 132, 252, 0.2);
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 12px;
    border: 1.5px solid #d8cde6;
    padding: 0.6rem 1rem;
    font-size: 0.96rem;
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--purple-500);
    box-shadow: 0 0 0 3.5px rgba(147, 51, 234, 0.18);
}

/* ==========================================================================
   MODERN FOOTER (Royal Botanical Purple)
   ========================================================================== */
.modern-footer {
    background: linear-gradient(145deg, #120220 0%, #1e0533 50%, #120220 100%);
    color: #e9d5ff;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(192, 132, 252, 0.2);
}
.modern-footer::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    right: -150px;
    top: -150px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.08);
    pointer-events: none;
}

.footer-main {
    position: relative;
    z-index: 1;
    padding: 3rem 0 2rem;
}
.footer-logo-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(251, 191, 36, 0.4);
    display: grid;
    place-items: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}
.footer-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.footer-heading {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
}
.footer-school {
    color: #d8b4fe;
    font-size: 0.82rem;
}
.footer-desc {
    color: #c4b5fd;
    font-size: 0.88rem;
    line-height: 1.7;
}

.footer-title {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 1.1rem;
    position: relative;
    padding-bottom: 8px;
}
.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--gold-400);
}
.footer-links a {
    color: #d8b4fe !important;
    font-size: 0.86rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    padding: 4px 0;
    text-decoration: none;
}
.footer-links a:hover {
    color: var(--gold-400) !important;
    transform: translateX(4px);
}
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.contact-item {
    display: flex;
    gap: 10px;
    color: #d8b4fe;
    font-size: 0.86rem;
    line-height: 1.6;
}
.contact-item i {
    color: var(--gold-400);
    font-size: 1.05rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.text-purple-light {
    color: #d8b4fe !important;
    transition: var(--transition);
}
.text-purple-light:hover {
    color: var(--gold-400) !important;
}

/* Staff Login & Admin Buttons in Footer */
.footer-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: #ffffff !important;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.footer-login-btn:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(126, 34, 206, 0.6));
    border-color: var(--gold-400);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(126, 34, 206, 0.35);
}
.footer-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5 !important;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
}
.footer-logout-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ffffff !important;
    transform: translateY(-2px);
}

.footer-bottom {
    background: rgba(8, 1, 15, 0.7);
    border-top: 1px solid rgba(192, 132, 252, 0.12);
    padding: 14px 0;
    font-size: 0.80rem;
    color: #c084fc;
}

/* Floating Back To Top Button */
.btn-back-to-top {
    position: fixed !important;
    bottom: 28px !important;
    right: 28px !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #6b21a8, #2e0854) !important;
    color: #ffffff !important;
    border: 2px solid #fbbf24 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.4rem !important;
    z-index: 1050 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(18px) !important;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease !important;
    text-decoration: none !important;
    cursor: pointer !important;
}
.btn-back-to-top.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}
.btn-back-to-top:hover {
    background: linear-gradient(135deg, #9333ea, #fbbf24) !important;
    color: #170428 !important;
    transform: translateY(-4px) scale(1.1) !important;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.45) !important;
}

/* ==========================================================================
   COMPREHENSIVE RESPONSIVENESS & SMARTPHONE OPTIMIZATION (UI/UX)
   ========================================================================== */

/* Tablets and below (< 1200px) */
@media (max-width: 1199.98px) {
    .botany-hero-modern {
        min-height: auto;
        padding: 30px 0 50px;
    }
    .hero-card-modern {
        border-radius: 28px;
        padding: clamp(1.5rem, 3.5vw, 2.5rem);
    }
    .botany-navbar-modern .navbar-collapse {
        background: rgba(23, 4, 40, 0.98);
        border: 1px solid rgba(192, 132, 252, 0.25);
        border-radius: 20px;
        padding: 18px;
        margin-top: 12px;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(24px);
    }
    .botany-navbar-modern .navbar-nav {
        gap: 6px;
        margin-bottom: 14px;
    }
    .botany-navbar-modern .nav-link {
        width: 100%;
        padding: 10px 16px !important;
        border-radius: 12px;
    }
    .nav-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px !important;
    }
    .nav-search-modern {
        width: 100%;
    }
    .nav-search-modern input {
        width: 100% !important;
    }
}

/* Medium Tablets & Large Phones (< 992px) */
@media (max-width: 991.98px) {
    .floating-botanical {
        opacity: 0.45;
    }
    .leaf-monstera-left {
        width: 100px;
        top: 2%;
        left: -15px;
    }
    .leaf-palm-right {
        width: 110px;
        bottom: 2%;
        right: -15px;
    }
    .leaf-fern-top {
        display: none;
    }
    .hero-title-modern {
        font-size: clamp(1.85rem, 5.5vw, 2.8rem);
    }
    .section-title {
        font-size: 1.8rem;
    }
}

/* Standard Smartphones (< 768px) */
@media (max-width: 767.98px) {
    body {
        font-size: 0.95rem;
    }
    
    /* Topbar hidden on mobile for clean viewport */
    .botany-topbar {
        display: none !important;
    }

    /* Navbar brand on smartphone */
    .botany-navbar-modern {
        padding: 8px 0;
    }
    .brand-logo-wrap {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }
    .brand-logo {
        width: 28px;
        height: 28px;
    }
    .brand-title {
        font-size: 0.90rem;
    }
    .brand-school-name {
        max-width: 175px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.64rem;
    }
    .modern-toggler {
        width: 38px;
        height: 38px;
        padding: 6px;
    }

    /* Hero section on smartphone */
    .botany-hero-modern {
        padding: 18px 0 36px;
    }
    .hero-card-modern {
        border-radius: 20px;
        padding: 1.4rem 1.15rem;
    }
    .hero-badge-modern {
        font-size: 0.78rem;
        padding: 5px 12px;
    }
    .hero-school-name {
        font-size: 0.90rem;
        margin: 0.6rem 0 0.5rem;
    }
    .hero-title-modern {
        font-size: 1.7rem;
        margin-bottom: 0.75rem;
        line-height: 1.2;
    }
    .hero-subtitle-modern {
        font-size: 0.88rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    .hero-search-modern {
        padding: 4px 4px 4px 12px;
        border-radius: 14px;
        margin-bottom: 0.85rem;
    }
    .hero-search-modern input {
        font-size: 0.85rem;
        padding: 8px 6px;
    }
    .hero-search-modern button {
        padding: 8px 14px;
        font-size: 0.82rem;
        border-radius: 10px;
    }
    .hero-actions-modern {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    .hero-actions-modern .btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 0.90rem;
    }

    /* Quick stats bar on smartphone (2x2 Grid) */
    .stats-section {
        padding: 16px 0;
    }
    .stats-section .stat-item {
        padding: 8px 2px;
    }
    .stats-section .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
        border-radius: 12px;
        margin-bottom: 6px;
    }
    .stats-section .stat-number {
        font-size: 1.55rem !important;
        margin-bottom: 2px;
    }
    .stats-section .stat-label {
        font-size: 0.74rem !important;
        line-height: 1.3;
    }

    /* Royal Tribute Card on smartphone */
    .royal-tribute-section {
        padding: 36px 0;
    }
    .royal-tribute-card {
        padding: 1.5rem 1.15rem;
        border-radius: 20px;
    }
    .royal-portrait-wrap {
        width: 110px;
        height: 110px;
        margin-bottom: 1rem;
    }
    .royal-quote {
        font-size: 0.92rem;
        line-height: 1.65;
        padding: 0 10px;
    }
    .royal-quote::before,
    .royal-quote::after {
        font-size: 2.5rem;
    }

    /* 5 Elements & 3 Strands on smartphone */
    .section-header {
        margin-bottom: 1.8rem;
    }
    .section-title {
        font-size: 1.55rem;
    }
    .section-subtitle {
        font-size: 0.88rem;
    }
    .element-card {
        padding: 20px 16px !important;
        border-radius: 18px !important;
    }
    .element-icon-wrap {
        width: 48px;
        height: 48px;
        font-size: 1.35rem;
        border-radius: 14px;
    }
    .element-title {
        font-size: 1.05rem;
    }
    .element-desc {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    .strand-card {
        padding: 18px 14px;
        border-radius: 16px;
    }

    /* Plant and News cards on smartphone */
    .plant-img-box {
        height: 185px;
    }
    .plant-title {
        font-size: 1.1rem;
    }
    .plant-card .card-body {
        padding: 1.2rem !important;
    }
    .news-card .card-body {
        padding: 1.2rem !important;
    }

    /* Footer on smartphone */
    .footer-main {
        padding: 2.2rem 0 1.5rem;
    }
    .footer-heading {
        font-size: 0.98rem;
    }
    .footer-desc {
        font-size: 0.84rem;
    }
    .footer-title {
        font-size: 0.90rem;
        margin-top: 0.5rem;
        margin-bottom: 0.85rem;
    }
    .footer-links a {
        font-size: 0.84rem;
        padding: 5px 0;
    }
    .footer-bottom {
        padding: 12px 0;
        font-size: 0.74rem;
    }

    /* Back To Top button on smartphone */
    .btn-back-to-top {
        bottom: 20px !important;
        right: 20px !important;
        width: 42px !important;
        height: 42px !important;
        font-size: 1.2rem !important;
    }
}

/* Extra Small Smartphones (< 380px) */
@media (max-width: 379.98px) {
    .brand-school-name {
        display: none !important;
    }
    .hero-title-modern {
        font-size: 1.45rem;
    }
    .stats-section .stat-number {
        font-size: 1.35rem !important;
    }
}

/* ==========================================================================
   WORK SUBMISSION SYSTEM (SUBMIT-WORK REDESIGN)
   ========================================================================== */
.submit-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-700), var(--purple-900));
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(126, 34, 206, 0.25);
}

.submit-section-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e9d5ff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(59, 7, 100, 0.03);
    transition: all 0.25s ease;
}

.submit-section-card:hover {
    border-color: #c084fc;
    box-shadow: 0 8px 25px rgba(126, 34, 206, 0.08);
}

.criteria-path-display {
    background: #ffffff;
    border: 1.5px dashed #c084fc;
    border-radius: 14px;
    padding: 0.95rem 1.25rem;
    color: #581c87;
    font-size: 0.92rem;
    box-shadow: 0 2px 10px rgba(126, 34, 206, 0.04);
    transition: all 0.25s ease;
}

.criteria-path-display:hover {
    border-color: #9333ea;
    background: #faf5ff;
}

.criteria-breadcrumb-text {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.45;
}

.criteria-breadcrumb-item {
    color: #475569;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.criteria-target-title {
    color: #6b21a8;
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.5;
    word-break: break-word;
}

/* Drag and Drop Zone */
.file-upload-dropzone {
    border: 2px dashed #c084fc;
    background: #faf5ff;
    border-radius: 18px;
    padding: 2.25rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.file-upload-dropzone:hover,
.file-upload-dropzone.dragover {
    background: #f3e8ff;
    border-color: #7e22ce;
    transform: scale(1.005);
}

.file-preview-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #d8b4fe;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(126, 34, 206, 0.06);
}

/* Matrix Table Sticky Column */
.matrix-table-sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: #ffffff !important;
}

thead .matrix-table-sticky-col {
    z-index: 3;
    background-color: #f8fafc !important;
}

tfoot .matrix-table-sticky-col {
    z-index: 3;
    background-color: #3b0764 !important;
    color: #ffffff !important;
}

.matrix-input {
    min-width: 48px;
    max-width: 65px;
    margin: 0 auto;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 0.25rem 0.25rem;
}

.matrix-input:focus {
    border-color: #7e22ce;
    background-color: #faf5ff;
    box-shadow: 0 0 0 2px rgba(126, 34, 206, 0.2);
}

.matrix-row-highlight {
    background-color: #f3e8ff !important;
    border-left: 4px solid #7e22ce !important;
}



