/* ==========================================================================
   ULIN RAJUT - Modern Purple Citizen Science Theme
   Brand Purple Identity: #570552 & #380234
   Fakultas Kehutanan Universitas Tanjungpura
   ========================================================================== */

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

:root {
    --ulin-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Brand Purple Palette */
    --ulin-purple-950: #290126;
    --ulin-purple-900: #570552; /* Exact dominant logo color */
    --ulin-purple-800: #71146c;
    --ulin-purple-700: #8c2085;
    --ulin-purple-600: #ad33a4;
    --ulin-purple-500: #cc4ec3;
    --ulin-purple-200: #f3d2f1;
    --ulin-purple-100: #fae8f8;
    --ulin-purple-50:  #fdf4fc;

    /* Accents */
    --ulin-gold: #f59e0b;
    --ulin-gold-light: #fbbf24;
    
    /* Surfaces */
    --ulin-bg-page: #fbf8fc;
    --ulin-card-border: rgba(87, 5, 82, 0.12);
}

body {
    font-family: var(--ulin-font) !important;
    background-color: var(--ulin-bg-page) !important;
    color: #334155;
}

/* --------------------------------------------------------------------------
   1. Topbar: Pure White Text & Icons on Deep Purple
   -------------------------------------------------------------------------- */
.header-top {
    background: #380234 !important;
    padding: 6px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    line-height: normal !important;
}

.header-top,
.header-top a,
.header-top i,
.header-top span,
.header-top .info li,
.header-top .info li a,
.header-top .info li i,
.header-top .info li span,
.header-top .link-info li,
.header-top .link-info li a,
.header-top .link-info li i {
    color: #ffffff !important;
    opacity: 1 !important;
    font-size: 13px !important;
}

.header-top a:hover,
.header-top .link-info li a:hover,
.header-top .link-info li a:hover i {
    color: #fbbf24 !important;
}

/* --------------------------------------------------------------------------
   2. Main Header Navbar: Slim, Pure White Background
   -------------------------------------------------------------------------- */
.header-three {
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-section {
    background: #ffffff !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important;
}

.header-wrapper {
    padding: 0 !important;
}

/* Logo Sizing & Smooth Transition */
.navbar-logo-img {
    height: 64px !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
}

.navbar-logo-img:hover {
    transform: scale(1.04) !important;
    opacity: 0.95 !important;
}

/* Navigation Links */
.main-menu > li > a {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b !important;
    padding: 8px 0;
    position: relative;
    transition: color 0.2s ease;
}

/* Only apply animated underline to text links, exclude buttons */
.main-menu > li:not(.nav-btn-item) > a:not(.btn-ulin-pill):not(.btn-ulin-purple)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2.5px;
    background: var(--ulin-purple-900);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.main-menu > li:not(.nav-btn-item):hover > a:not(.btn-ulin-pill):not(.btn-ulin-purple)::after,
.main-menu > li:not(.nav-btn-item).active > a:not(.btn-ulin-pill):not(.btn-ulin-purple)::after {
    width: 100%;
}

/* Explicitly remove underline pseudo-element from app download button */
.main-menu > li > a.btn-ulin-pill::after,
.main-menu > li:hover > a.btn-ulin-pill::after,
.main-menu > li.active > a.btn-ulin-pill::after,
.btn-ulin-pill::after,
.btn-ulin-pill:hover::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
}

.main-menu > li:hover > a:not(.btn-ulin-pill),
.main-menu > li.active > a:not(.btn-ulin-pill) {
    color: var(--ulin-purple-900) !important;
}

/* Reset any legacy menu-btn block styling from style.css */
.header-three .menu-btn a,
.header-wrapper .main-menu .menu-btn a {
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50px !important;
    background: transparent !important;
    border: none !important;
}

/* Brand Option 1: Modern Pill Button */
.btn-ulin-pill,
.btn-ulin-purple {
    display: inline-flex !important;
    align-items: center !important;
    gap: 9px !important;
    background: linear-gradient(135deg, #570552 0%, #8c2085 100%) !important;
    color: #ffffff !important;
    padding: 9px 22px !important;
    border-radius: 9999px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    box-shadow: 0 4px 15px rgba(87, 5, 82, 0.28) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    text-decoration: none !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    white-space: nowrap !important;
}

.btn-ulin-pill:hover,
.btn-ulin-purple:hover {
    transform: translateY(-2px) !important;
    background: linear-gradient(135deg, #380234 0%, #71146c 100%) !important;
    box-shadow: 0 8px 24px rgba(87, 5, 82, 0.42) !important;
    color: #ffffff !important;
}

.btn-ulin-pill i,
.btn-ulin-purple i {
    color: #fbbf24 !important; /* Gold/Amber icon */
    font-size: 14px !important;
}

.btn-ulin-pill span,
.btn-ulin-purple span {
    color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   3. Hero Section (Clean, Majestic, No Clutter)
   -------------------------------------------------------------------------- */
.hero-purple-section {
    position: relative;
    min-height: 75vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center center;
    overflow: hidden;
    padding: 85px 0 95px;
}

.hero-purple-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(41, 1, 38, 0.94) 0%, 
        rgba(87, 5, 82, 0.88) 50%, 
        rgba(113, 20, 108, 0.76) 100%
    );
    z-index: 1;
}

.hero-purple-content {
    position: relative;
    z-index: 2;
}

/* --------------------------------------------------------------------------
   4. Gallery Lightbox Modal
   -------------------------------------------------------------------------- */
.gallery-modal-content {
    border-radius: 24px;
    border: 1px solid rgba(87, 5, 82, 0.15);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(41, 1, 38, 0.35);
}

.gallery-modal-header {
    background: linear-gradient(135deg, #380234 0%, #570552 100%);
    color: #ffffff;
    padding: 20px 26px;
    border-bottom: none;
}

.gallery-modal-body {
    padding: 24px;
    background: #ffffff;
}

.gallery-preview-btn {
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   5. Interactive GIS Map Dashboard (Option A: Split Panel)
   -------------------------------------------------------------------------- */
.map-dashboard-container {
    background: #ffffff;
    border: 1px solid rgba(87, 5, 82, 0.12);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px -10px rgba(41, 1, 38, 0.12);
}

.map-dashboard-topbar {
    background: #ffffff;
    padding: 16px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(87, 5, 82, 0.1);
}

.map-sidebar-list {
    max-height: 620px;
    overflow-y: auto;
    padding-right: 6px;
}

.map-sidebar-list::-webkit-scrollbar {
    width: 6px;
}

.map-sidebar-list::-webkit-scrollbar-thumb {
    background: #e9d5ff;
    border-radius: 10px;
}

.map-sidebar-item {
    cursor: pointer;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    background: #ffffff;
    transition: all 0.25s ease;
    margin-bottom: 12px;
}

.map-sidebar-item:hover,
.map-sidebar-item.active {
    background: #faf5ff;
    border-color: #c084fc;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(87, 5, 82, 0.08);
}

.map-sidebar-thumb {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

#map {
    width: 100%;
    height: 620px !important;
    border: none;
}

.pulse-dot-purple {
    width: 11px;
    height: 11px;
    background-color: var(--ulin-purple-900);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(87, 5, 82, 0.25);
    animation: ulinPulsePurple 2s infinite;
}

@keyframes ulinPulsePurple {
    0% { box-shadow: 0 0 0 0 rgba(87, 5, 82, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(87, 5, 82, 0); }
    100% { box-shadow: 0 0 0 0 rgba(87, 5, 82, 0); }
}

/* InfoWindow Custom Purple */
.ulin-infowindow {
    font-family: var(--ulin-font);
    width: 280px;
    padding: 4px;
    color: #1e293b;
}

.ulin-infowindow img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
}

.ulin-infowindow h5 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--ulin-purple-900);
}

.ulin-infowindow .btn-detail-purple {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--ulin-purple-900);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.ulin-infowindow .btn-detail-purple:hover {
    background: var(--ulin-purple-950);
    color: #ffffff !important;
}

/* Footer Purple Theme */
.footer-purple {
    background: var(--ulin-purple-950) !important;
    color: rgba(255, 255, 255, 0.75);
    padding: 70px 0 0;
    position: relative;
    overflow: hidden;
}

.footer-purple::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ulin-gold), var(--ulin-purple-600), var(--ulin-purple-900));
}
