/* =====================================================================
   SMART-IRWA - Tema Biru, Hijau, Putih
   ===================================================================== */

:root {
    --smart-irwa-blue: #0d6efd;
    --smart-irwa-blue-dark: #084298;
    --smart-irwa-green: #198754;
    --smart-irwa-green-dark: #13603c;
    --smart-irwa-white: #ffffff;
    --smart-irwa-bg: #f4f8f9;
}

body {
    font-family: 'Outfit', 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--smart-irwa-bg);
}

.bg-orange { background-color: #fd7e14 !important; }

/* ---------------------------------------------------------------
   Halaman Login
   --------------------------------------------------------------- */
.login-page {
    background: url('../img/pemandangan_irigasi.png') center/cover no-repeat;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: url('../img/pemandangan_irigasi.png') center/cover no-repeat;
    filter: blur(5px);
    z-index: -2;
}

.login-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: -1;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.login-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 40px 35px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 2;
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-brand i {
    font-size: 32px;
    color: var(--smart-irwa-blue);
    vertical-align: middle;
}

.login-brand h4 {
    font-weight: 700;
    color: var(--smart-irwa-blue-dark);
    margin: 8px 0 4px;
}

.login-brand p {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
}

.login-card .input-group-text {
    background-color: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--smart-irwa-blue);
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.login-card .form-control {
    border-color: rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.6);
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    font-weight: 500;
    padding: 10px 12px;
}

.login-card .form-control:focus {
    background-color: #fff;
    border-color: var(--smart-irwa-blue);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.login-card .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #444;
}

.btn-login {
    background: linear-gradient(135deg, var(--smart-irwa-blue) 0%, var(--smart-irwa-green) 100%);
    color: #fff;
    border: none;
    font-weight: 700;
    padding: 12px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.25);
    transition: all 0.3s ease;
    font-size: 0.95rem;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.35);
    opacity: 0.95;
    color: #fff;
}

.login-card a.text-muted:hover {
    color: var(--smart-irwa-blue) !important;
    text-decoration: none;
}

/* ---------------------------------------------------------------
   Landing Page Publik
   --------------------------------------------------------------- */
.public-page { padding-top: 70px; }

.custom-navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 14px 0;
    transition: all 0.3s ease;
}

.brand-logo {
    font-size: 1.45rem;
    letter-spacing: 0.5px;
}

.brand-logo i {
    font-size: 1.6rem;
    vertical-align: middle;
}

.nav-link-custom {
    color: #3f444a !important;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 6px 15px !important;
    position: relative;
    transition: color 0.25s ease;
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2.5px;
    bottom: 0;
    left: 50%;
    background: linear-gradient(135deg, var(--smart-irwa-blue) 0%, var(--smart-irwa-green) 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link-custom:hover::after {
    width: 50%;
}

.nav-link-custom:hover {
    color: var(--smart-irwa-blue-dark) !important;
}

.btn-nav-login {
    background: linear-gradient(135deg, var(--smart-irwa-blue) 0%, var(--smart-irwa-green) 100%) !important;
    color: #fff !important;
    border: none;
    font-weight: 600;
    border-radius: 30px;
    padding: 8px 24px !important;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.22);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-nav-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(13, 110, 253, 0.32);
    opacity: 0.95;
}

@media (max-width: 991.98px) {
    .navbar-nav {
        padding: 15px 0;
    }
    .nav-link-custom {
        padding: 10px 0 !important;
        text-align: center;
        width: 100%;
    }
    .nav-link-custom::after {
        display: none;
    }
    .btn-nav-login {
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }
}


.hero-section {
    min-height: 85vh;
    position: relative;
    z-index: 1;
    padding-top: 110px;
    padding-bottom: 110px;
    overflow: hidden;
}

/* Background image with light and smooth blur */
.hero-section::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: url('../img/pemandangan_irigasi.png') center/cover;
    filter: blur(0.5px); /* Extremely subtle softening */
    z-index: -2;
}

/* Subtle dark overlay for premium text contrast and readability */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.42); /* Dark transparency */
    z-index: -1;
}


.stat-card-overlap {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card-overlap:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12) !important;
}


.hero-glass-box {
    background: rgba(20, 30, 50, 0.6); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 20px 25px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.stat-glass-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
}

.stat-glass-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.2);
}

.hero-section h1, .hero-section p {
    /* Style dasar */
}

.section-title {
    font-weight: 700;
    color: var(--smart-irwa-blue-dark);
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--smart-irwa-green);
    margin-top: 8px;
    border-radius: 2px;
}

section#statistik .section-title::after,
section#galeri .section-title::after,
section#berita .section-title::after,
section#faq .section-title::after {
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background: var(--smart-irwa-white);
    border-radius: 14px;
    padding: 28px 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: transform 0.2s ease;
}

.stat-card:hover { transform: translateY(-4px); }

.stat-card i { font-size: 32px; color: var(--smart-irwa-blue); }
.stat-card h3 { font-weight: 700; margin: 10px 0 0; color: var(--smart-irwa-green-dark); }
.stat-card p { color: #6c757d; margin: 0; }

.gallery-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.gallery-thumb:hover { transform: scale(1.03); }

.footer-public {
    background: var(--smart-irwa-blue-dark);
    color: #e9ecef;
}

/* ---------------------------------------------------------------
   Dashboard Internal (AdminLTE overrides)
   --------------------------------------------------------------- */
.main-sidebar { background: linear-gradient(180deg, var(--smart-irwa-blue-dark), var(--smart-irwa-green-dark)) !important; }
.brand-link { border-bottom: 1px solid rgba(255,255,255,0.15) !important; }

.small-box { border-radius: 12px; overflow: hidden; }
.card { border-radius: 12px; }
.card-outline.card-primary { border-top: 3px solid var(--smart-irwa-blue); }
.card-outline.card-success { border-top: 3px solid var(--smart-irwa-green); }

@media (max-width: 576px) {
    .hero-section h1 { font-size: 1.6rem; }
}

/* ---------------------------------------------------------------
   Dark Mode
   --------------------------------------------------------------- */
body.dark-mode { background-color: #1a1d21; color: #e9ecef; }
body.dark-mode .content-wrapper { background-color: #1a1d21; }
body.dark-mode .card { background-color: #24272b; color: #e9ecef; }
body.dark-mode .card-header { background-color: #2c2f33; border-color: #383b3f; }
body.dark-mode .table { color: #e9ecef; }
body.dark-mode .table thead { background-color: #2c2f33; }
body.dark-mode .form-control, body.dark-mode .form-select { background-color: #2c2f33; color: #e9ecef; border-color: #444; }
body.dark-mode .modal-content { background-color: #24272b; color: #e9ecef; }
body.dark-mode .main-footer { background-color: #24272b; color: #adb5bd; border-color: #383b3f; }

/* ---------------------------------------------------------------
   Interactive Map Sidebar (Premium Design)
   --------------------------------------------------------------- */
.map-wrapper {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--smart-irwa-bg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    height: 650px;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.map-sidebar {
    position: absolute;
    top: 15px;
    left: 15px;
    bottom: 15px;
    width: 380px;
    min-width: 380px;
    background-color: #ffffff;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.map-content-area {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#petaInteraktif {
    height: 100%;
    width: 100%;
}

/* Sidebar Tab Nav */
.sidebar-tab-nav {
    display: flex;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0;
    margin: 0;
    list-style: none;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.sidebar-tab-nav li {
    flex: 1;
    text-align: center;
}

.sidebar-tab-nav button {
    width: 100%;
    background: none;
    border: none;
    padding: 14px 10px;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.sidebar-tab-nav button i {
    font-size: 1.1rem;
    margin-right: 4px;
    vertical-align: middle;
}

.sidebar-tab-nav button:hover {
    color: var(--smart-irwa-blue-dark);
    background-color: rgba(0, 0, 0, 0.02);
}

.sidebar-tab-nav button.active {
    color: var(--smart-irwa-blue-dark);
    border-bottom-color: var(--smart-irwa-blue-dark);
    background-color: #ffffff;
}

/* Sidebar Tab Contents */
.sidebar-tab-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.sidebar-pane {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.sidebar-pane.active {
    display: flex;
}

/* Tab 1: Layer UI elements */
.sidebar-filter-wrapper {
    padding: 16px;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    gap: 12px;
    display: flex;
    flex-direction: column;
}

.sidebar-filter-wrapper .search-group {
    position: relative;
}

.sidebar-filter-wrapper .search-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.sidebar-filter-wrapper .search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.sidebar-filter-wrapper .search-input:focus {
    border-color: var(--smart-irwa-blue);
    outline: none;
}

.sidebar-filter-wrapper .filter-row {
    display: flex;
    gap: 8px;
}

.sidebar-filter-wrapper .filter-select {
    flex: 1;
    padding: 6px 10px;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

.sidebar-filter-wrapper .filter-select:focus {
    border-color: var(--smart-irwa-blue);
}

/* Scrollable card container */
.sidebar-list-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px;
    gap: 12px;
    display: flex;
    flex-direction: column;
    background-color: #f8fafc;
}

/* Scrollbar Customization */
.sidebar-list-container::-webkit-scrollbar,
.legend-pane::-webkit-scrollbar {
    width: 6px;
}
.sidebar-list-container::-webkit-scrollbar-track,
.legend-pane::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.sidebar-list-container::-webkit-scrollbar-thumb,
.legend-pane::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.sidebar-list-container::-webkit-scrollbar-thumb:hover,
.legend-pane::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* DI Cards Styling */
.dir-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.dir-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
}

.dir-card.active {
    border-color: var(--smart-irwa-green);
    background-color: rgba(25, 135, 84, 0.05);
    box-shadow: 0 0 0 1px var(--smart-irwa-green);
}

.dir-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.dir-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.dir-card-meta .badge-cond {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.dir-card-meta .badge-cond.baik { background-color: rgba(25, 135, 84, 0.15); color: #198754; }
.dir-card-meta .badge-cond.sedang { background-color: rgba(253, 126, 20, 0.15); color: #fd7e14; }
.dir-card-meta .badge-cond.rusak { background-color: rgba(220, 53, 69, 0.15); color: #dc3545; }

.dir-card-meta .badge-status {
    background-color: rgba(25, 135, 84, 0.10);
    color: #198754;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.dir-card-meta .area-text {
    color: #64748b;
    margin-left: auto;
    font-weight: 600;
}

.dir-card-loc {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.8rem;
    color: #64748b;
}

.dir-card-loc i {
    color: #ef4444; /* red pin */
    margin-top: 2px;
}

/* Legend Tab */
.legend-pane {
    padding: 20px;
    overflow-y: auto;
    height: 100%;
    background-color: #ffffff;
}

.legend-section-title {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--smart-irwa-blue-dark);
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 6px;
    text-align: left;
}

.legend-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    text-align: left;
    color: #334155;
}

.legend-color-box {
    width: 24px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Stat Tab */
.stats-pane {
    padding: 20px;
    overflow-y: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: #f8fafc;
}

.stat-box {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.stat-box h4 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--smart-irwa-blue-dark);
    margin: 0 0 4px;
}

.stat-box p {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Responsiveness */
@media (max-width: 991px) {
    .map-wrapper {
        flex-direction: column;
        height: auto;
    }
    .map-sidebar {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        min-width: 100%;
        height: 380px;
        border-radius: 0;
        box-shadow: none;
        border: none;
        border-bottom: 1px solid #e2e8f0;
    }
    .map-content-area {
        position: relative;
        height: 450px;
        width: 100%;
    }
}

/* SMART-IRWA Custom Logo Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
    100% {
        transform: translateY(0px);
    }
}

.logo-float {
    animation: float 4s ease-in-out infinite;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-float:hover {
    transform: scale(1.08) rotate(2deg);
    cursor: pointer;
}

.logo-pill-container {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.logo-pill-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.25) !important;
}

.logo-pill-img {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-pill-img:hover {
    transform: scale(1.1);
    cursor: pointer;
}

/* Elegant Text Reveal Animations for Hero Section */
@keyframes fadeInUpElegant {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-text-reveal {
    opacity: 0;
    animation: fadeInUpElegant 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }
.delay-5 { animation-delay: 0.75s; }

/* Typewriter Cursor animation */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background-color: #e0f2fe;
    margin-left: 3px;
    vertical-align: middle;
    animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Custom Hero Buttons Styling and Animations */
.btn-hero-primary {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: hidden;
    animation: pulseGlow 2s infinite, buttonFloat 4s ease-in-out infinite;
}

.btn-hero-primary:hover {
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 15px 30px rgba(13, 110, 253, 0.45) !important;
    background-color: #f8f9fa !important;
    animation: none !important;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4), 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(255, 255, 255, 0), 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0), 0 4px 6px rgba(0, 0, 0, 0.1);
    }
}

@keyframes buttonFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.btn-hero-secondary {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    animation: buttonFloat 4s ease-in-out infinite 0.8s;
}

.btn-hero-secondary:hover {
    transform: translateY(-5px) scale(1.05) !important;
    background-color: #ffffff !important;
    color: #0d6efd !important;
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.25) !important;
    animation: none !important;
}

.btn-hero-primary i, .btn-hero-secondary i {
    transition: transform 0.3s ease;
    display: inline-block;
}

.btn-hero-primary:hover i {
    transform: scale(1.2) rotate(-10deg);
}

.btn-hero-secondary:hover i {
    transform: translateY(-2px);
}

