/* 
   Portal Data BP Tapera - Official Style
   Primary Green: #5BB24A | Accent Gold: #DF9B27
*/

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

/* === DESIGN TOKENS === */
:root {
    --green-primary: #5BB24A;
    --gold-accent:   #DF9B27;
    --text-dark:     #34395e;
    --text-medium:   #6c757d;
    --text-soft:     #adb5bd;
    --bg-white:      #ffffff;
}

/* 1. Global Typography */
body {
    background-color: var(--bg-white);
    font-family: 'Nunito', sans-serif;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

/* 2. Navbar */
.navbar.fixed-top {
    background-color: #ffffff !important;
    backdrop-filter: none;
    box-shadow: none !important;
    height: 75px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #edf2f7;
}

.navbar-brand {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 900 !important;        /* Maximum Bold */
    font-size: 26px !important;
    letter-spacing: -1px !important;
    line-height: 1;
}

.navbar .nav-link {
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 14px;
    padding: 0 18px !important;
    transition: color 0.2s;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--green-primary) !important;
}

/* 2b. Responsive nav toggle (mobile/tablet dropdown) */
.navbar-toggler {
    border: none;
    padding: 4px 8px;
}
.navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(91, 178, 74, 0.25);
}

@media (max-width: 991.98px) {
    .navbar.fixed-top {
        height: auto;
        min-height: 75px;
    }
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 12px 24px 20px;
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
        border-bottom: 1px solid #edf2f7;
        max-height: calc(100vh - 75px);
        overflow-y: auto;
    }
    .navbar .nav-link {
        padding: 10px 0 !important;
    }
}

/* 3. Hero Section */
.hero-portal {
    background: linear-gradient(180deg, #f3faf1 0%, var(--bg-white) 65%) !important;
    background-image: linear-gradient(180deg, #f3faf1 0%, var(--bg-white) 65%), url('/img/hero-housing-bg.svg') !important;
    background-repeat: no-repeat, no-repeat !important;
    background-position: top, bottom center !important;
    background-size: 100% 100%, 100% 90px !important;
    /* Kept tight: a 170px bottom padding left a large, visually empty-looking gap before
       the next section (the illustration is too subtle to read as "content" at that size) —
       90px gives the strip just enough room without an awkward void. */
    padding: 110px 0 90px 0 !important;
    text-align: center;
    position: relative;
    overflow: hidden;
}
@media (max-width: 768px) {
    .hero-portal { background-size: 100% 100%, 100% 60px !important; padding-bottom: 60px !important; }
}

.hero-portal .container {
    position: relative;
    z-index: 10;
    max-width: 1000px;                 /* Wide enough, no early wrapping */
}

/* Headline — slightly reduced, more breathing room */
.headline-portal {
    font-size: 52px !important;        /* Elegant & Professional */
    line-height: 1.3 !important;
    color: var(--text-dark);
    margin-bottom: 40px !important;
    letter-spacing: -1px;
}

/* "Temukan Data" and "untuk Mendukung" — dark gray */
.headline-portal .weight-600 {
    font-weight: 700;           /* Upgraded: Bold */
    color: var(--text-dark);
}

/* "BP Tapera" — Primary Green, Extra Bold */
.headline-portal .weight-800 {
    font-weight: 900 !important; /* Black/Extra Bold */
    color: #5BB24A !important;
}

@media (max-width: 992px) {
    .headline-portal { font-size: 36px !important; }
}
@media (max-width: 768px) {
    .headline-portal { font-size: 26px !important; letter-spacing: 0; }
}

/* Typing Box — Refined Pill (full rounded) */
.typing-box {
    display: inline-block;
    background: linear-gradient(135deg, #DF9B27 0%, #c98c1f 100%);
    color: #ffffff !important;
    padding: 0.2em 0.7em !important;
    vertical-align: middle;
    line-height: normal;
    border-radius: 50px;               /* Full pill shape */
    box-shadow: 0 4px 15px rgba(223, 155, 39, 0.3);
    margin: 0 8px;
    font-weight: 800 !important;
}

/* Sub-headline */
.hero-portal p.lead {
    font-size: 18px !important;        /* Balanced against 64px headline */
    color: var(--text-medium) !important;
    margin-bottom: 60px !important;
    font-weight: 500;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* 4. Floating Illustrations — smaller, pushed to edges, subtle */
.float-element {
    position: absolute;
    z-index: 2;                        /* Above background, below text */
    animation: floating 8s ease-in-out infinite;
    opacity: 0.5;
    pointer-events: none;
    font-size: 1.55rem;
    /* !important: Bootstrap's .text-primary/.text-success/etc utilities also carry
       !important, so without this a stray utility class on the icon markup silently
       overrides the intended subtle uniform tint with a loud, mismatched solid color. */
    color: #5BB24A !important;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.03));
}

/* 5-8% from edges, vertically centered ~40-60% in hero */
.float-1 { top: 40%; left: 5%;    animation-delay: 0s; }
.float-2 { top: 40%; right: 5%;   animation-delay: 2s; }
.float-3 { top: 60%; left: 8%;    animation-delay: 4s; }
.float-4 { top: 60%; right: 8%;   animation-delay: 6s; }

/* Hide only on mobile, keep visible on tablet/desktop */
@media (max-width: 768px) {
    .float-element { display: none !important; }
}

@keyframes floating {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-12px); }
    100% { transform: translateY(0); }
}

/* 5. Search Bar */
.search-wrapper {
    max-width: 900px;
    margin: 50px auto 0 auto;
    width: 90%;
    position: relative;
    z-index: 10;
}

.search-bar-modern {
    background: var(--bg-white);
    border-radius: 50px;
    padding: 12px 15px 12px 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);  /* Elevated, wider shadow */
    display: flex;
    align-items: center;
    border: 1px solid #eeeeee;
}

.search-bar-modern input {
    border: none;
    outline: none;
    width: 100%;
    height: 50px;
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 500;
    background: transparent;
    font-family: 'Nunito', sans-serif;
}

/* Search icon color */
.search-bar-modern .fa-search {
    color: #6c757d !important;         /* Medium gray, not too pale */
    font-size: 1rem;
}

.search-bar-modern .btn-search {
    background: var(--green-primary); /* Brand Green Button */
    color: #ffffff;
    border-radius: 50px;
    padding: 0 45px;
    height: 50px;
    font-weight: 700 !important;   /* Strong button text */
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Nunito', sans-serif;
    transition: all 0.25s ease;
}

.search-bar-modern .btn-search:hover {
    background: #4a9c3a;
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(92, 179, 74, 0.3);
}

/* 6. Autocomplete Dropdown */
.autocomplete-dropdown {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 8px 0;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.10);
    max-height: 320px;
    overflow-y: auto;
    animation: fadeDropdown 0.15s ease;
    z-index: 100;
    position: relative;
}

.autocomplete-dropdown li a {
    display: block;
    padding: 12px 24px;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #34395e;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border-radius: 12px;
    margin: 2px 8px;
}

.autocomplete-dropdown li a:hover {
    background: #f0faf4;
    color: #5BB24A;      /* BP Tapera green on hover */
}

@keyframes fadeDropdown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 7. Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-top: 120px;                 /* Very wide breathing room */
}

.stat-item h3 {
    font-weight: 800 !important;    /* Strong, consistent */
    font-size: 2.4rem;
    color: var(--green-primary);
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.stat-label {
    text-transform: uppercase;
    font-size: 12px;                   /* Slightly larger, premium */
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 2px;               /* Dashboard-style spacing */
    display: block;
}

/* 7. Layout */
body.layout-3 .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    padding-top: 75px;
}

.main-body-container {
    padding-top: 20px;
    padding-bottom: 150px;
    background: var(--bg-white);
}

/* 8. Cards */
.card {
    border: none !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
    border-radius: 20px !important;
    transition: all 0.25s ease;
}

.card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
    transform: translateY(-2px);
}

/* Section titles */
.section-title-portal {
    font-weight: 800;
    font-size: 2rem;
    color: var(--text-dark);
    letter-spacing: -1px;
}