/* ====================================================
   FKDC NGO Website — style.css
   Main Custom Stylesheet (Bootstrap 5 Override)
   Font: Inter (Google Fonts)
   Primary: #1e40af (Royal Blue)  Accent: #fbbf24 (Yellow)
   ==================================================== */

/* -------------------------------------------------------
   CSS Custom Properties / Design Tokens
   ------------------------------------------------------- */
:root {
    --primary: #1e40af;
    /* Royal Blue */
    --primary-dark: #1e3a8a;
    /* Blue Dark */
    --primary-light: #eef2ff;
    /* Blue Tint */
    --accent: #fbbf24;
    /* Bright Yellow */
    --accent-dark: #f59e0b;
    /* Yellow Dark */
    --accent-text: #000000;
    /* Text color on Yellow */
    --dark: #0f172a;
    /* Dark Navy */
    --dark-2: #1e293b;
    /* Slate */
    --gray: #64748b;
    --light-bg: #f0f4ff;
    /* Blue-White tint */
    --light-yellow: #FEFCE8;
    /* Yellow Tint */
    --white: #ffffff;
    --border: #e2e8f0;

    --font-main: 'Inter', sans-serif;
    --font-display: 'Playfair Display', serif;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --shadow: 0 4px 24px rgba(0, 0, 0, .08);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, .12);

    --transition: .25s ease;
}

/* -------------------------------------------------------
   Base Reset
   ------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Global Content Responsiveness */
.news-body-html,
.prose,
.dok-detail__full-desc,
.news-detail-content {
    overflow-wrap: break-word;
}

.news-body-html img,
.prose img,
.dok-detail__full-desc img,
.news-detail-content img {
    max-width: 100% !important;
    height: auto !important;
}

.news-body-html table,
.prose table,
.dok-detail__full-desc table,
.news-detail-content table {
    width: 100% !important;
    display: block;
    overflow-x: auto;
}

/* Button Overrides */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    font-weight: 700;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: var(--white) !important;
}

body {
    font-family: var(--font-main);
    font-size: 1rem;
    color: #2d2d2d;
    background: var(--white);
    line-height: 1.7;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

.py-6 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.about-text {
    text-align: center;
    max-width: 900px;
    line-height: 1.8;
    color: #444;
    font-size: 1.05rem;
}

/* -------------------------------------------------------
   Typography
   ------------------------------------------------------- */
.section-label {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: .5rem;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
}

.section-header {
    margin-bottom: 3rem;
}

/* -------------------------------------------------------
   Navbar
   ------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background var(--transition), box-shadow var(--transition);
    background: var(--white);
    box-shadow: var(--shadow);
}

/* Logo image switching based on navbar state */
.site-header .navbar-brand .logo-for-dark {
    display: none;
}

.site-header .navbar-brand .logo-for-light {
    display: block;
    transition: filter var(--transition);
}

/* Hero mode (dark bg): show original logo, hide light version */
.site-header.hero-mode .navbar-brand .logo-for-light {
    display: none;
}

.site-header.hero-mode .navbar-brand .logo-for-dark {
    display: block;
}

/* Dark mode: only on homepage hero at scroll top */
.site-header.hero-mode {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    box-shadow: none;
}

.site-header.scrolled {
    background: var(--white);
    box-shadow: var(--shadow);
    backdrop-filter: none;
}

.site-header.scrolled .navbar .nav-link {
    color: var(--white) !important;
}

.site-header.scrolled .navbar .nav-link:hover {
    color: var(--accent) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.site-header.scrolled .navbar .nav-link.active {
    color: var(--accent) !important;
    background: transparent;
    border-bottom: 3px solid var(--accent) !important;
    border-radius: 0;
}

.site-header.scrolled .brand-text {
    color: var(--primary);
}

.site-header.scrolled .btn-accessibility {
    color: var(--dark);
    border-color: var(--border);
}

.site-header.scrolled .btn-accessibility:hover,
.site-header.scrolled .btn-accessibility[aria-pressed="true"] {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.site-header.scrolled .search-form .form-control {
    background: #f1f5f3 !important;
    color: var(--dark) !important;
}

.site-header.scrolled .search-form .btn {
    background: #f1f5f3 !important;
    color: var(--dark);
}

.site-header.scrolled .lang-btn {
    border-color: var(--border);
    color: var(--dark);
}

.site-header.scrolled .lang-btn:hover {
    background: var(--light-bg);
}

/* Row 1: Top Bar */
.header-top {
    border-bottom: 0.5px solid var(--border);
    background-color: var(--white) !important;
}

/* Batik Decorative Styles */
.batik-header {
    position: absolute;
    top: 0;
    height: 100%;
    width: auto;
    pointer-events: none;
    opacity: 0.2;
    z-index: 0;
    filter: sepia(100%) saturate(2000%) hue-rotate(15deg) brightness(110%);
    /* Yellow/Gold tint */
}

.batik-left {
    left: 0;
}

.batik-right {
    right: 0;
    transform: scaleX(-1);
}

.site-header.hero-mode .header-top {
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
    background-color: var(--white) !important;
}

.search-form .form-control {
    background: var(--light-bg) !important;
    color: var(--dark) !important;
    border-radius: 20px 0 0 20px;
}

.search-form .btn {
    background: var(--light-bg) !important;
    color: var(--dark);
    border-radius: 0 20px 20px 0;
}

/* In hero-mode: white translucent search */
.site-header.hero-mode .search-form .form-control {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--white) !important;
}

.site-header.hero-mode .search-form .btn {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--white);
}

/* Row 2: Navbar Baris Bawah */
.site-header .navbar {
    padding: 0;
    background-color: var(--primary) !important;
}

.navbar .nav-link {
    font-weight: 700;
    color: var(--white) !important;
    padding: 0.5rem .75rem !important;
    transition: all var(--transition);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.navbar .nav-link:hover {
    color: var(--accent) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.navbar .nav-link.active {
    color: var(--accent) !important;
    background: transparent !important;
    border-bottom: 3px solid var(--accent) !important;
    border-radius: 0;
}

/* In hero-mode, bottom navbar remains primary */
.site-header.hero-mode .navbar {
    background-color: var(--primary) !important;
}

.site-header.hero-mode .navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar .dropdown-menu {
    background: var(--dark);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    transition: all var(--transition);
}

.navbar .dropdown-item:hover {
    background: var(--primary);
    color: var(--white);
}

.brand-text {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
}

.site-header.hero-mode .brand-text {
    color: var(--primary);
}

.btn-accessibility {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--dark);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background var(--transition);
}

.btn-accessibility:hover,
.btn-accessibility[aria-pressed="true"] {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.lang-btn {
    font-size: .8rem;
    font-weight: 600;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--dark);
}

.lang-btn:hover {
    background: var(--light-bg);
    color: var(--primary);
}

/* -------------------------------------------------------
   Hero Section
   ------------------------------------------------------- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--white);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-bg__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-top: 100px;
    padding-bottom: 80px;
}

.hero-title {
    font-family: var(--font-main);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.35rem;
    font-weight: 500;
    opacity: .95;
    max-width: 800px;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-stat__num {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
}

/* -------------------------------------------------------
   About Section
   ------------------------------------------------------- */
.about-badge {
    position: absolute;
    bottom: -1.25rem;
    right: -1.25rem;
    background: var(--accent);
    color: var(--accent-text);
    padding: .75rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    box-shadow: var(--shadow);
}

.about-content .lead {
    font-size: 1.15rem;
    color: var(--primary);
    font-weight: 500;
}

/* -------------------------------------------------------
   News Cards
   ------------------------------------------------------- */
.tab-btn {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--gray);
    padding: .45rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    transition: all var(--transition);
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* News Card Base */
.news-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(30, 64, 175, 0.07);
    transition: transform .3s ease, box-shadow .3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(30, 64, 175, 0.08);
    position: relative;
}

.news-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width .4s ease;
    border-radius: 0 0 0 var(--radius-md);
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(30, 64, 175, 0.14);
}

.news-card:hover::after {
    width: 100%;
}

/* Image Wrap */
.news-card__img-wrap {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: var(--dark-2);
    flex-shrink: 0;
}

.news-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
    display: block;
}

.news-card:hover .news-card__img {
    transform: scale(1.06);
}

/* Category Badge */
.news-card__badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
    background: var(--primary);
    color: var(--white);
    font-size: .7rem;
    font-weight: 700;
    padding: .28rem .75rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: .06em;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* Card Body */
.news-card__body {
    padding: 1.4rem 1.5rem 1.6rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Date */
.news-card__date {
    font-size: .78rem;
    color: var(--gray);
    margin-bottom: .7rem;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.news-card__date i {
    color: var(--accent-dark);
}

/* Title */
.news-card__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: .7rem;
    flex-grow: 0;
}

.news-card__title a {
    color: var(--dark);
    transition: color var(--transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__title a:hover {
    color: var(--primary);
}

/* Excerpt */
.news-card__excerpt {
    font-size: .875rem;
    color: var(--gray);
    line-height: 1.65;
    flex-grow: 1;
    margin-bottom: 1.1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read More Link */
.news-card__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--primary);
    color: var(--white) !important;
    padding: 0.45rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: .82rem;
    text-decoration: none;
    transition: all .25s ease;
    width: fit-content;
    margin-top: auto;
    letter-spacing: 0.02em;
}

.news-card__link i {
    transition: transform .25s ease;
    font-size: .8rem;
}

.news-card__link:hover {
    background: var(--primary-dark);
    color: var(--white) !important;
    transform: none;
    box-shadow: 0 4px 16px rgba(30, 64, 175, 0.25);
}

.news-card__link:hover i {
    transform: translateX(4px);
}

/* -------------------------------------------------------
   Dokumen Cards
   ------------------------------------------------------- */
.dok-card__type {
    position: absolute;
    top: .75rem;
    right: .75rem;
    background: var(--accent);
    color: var(--accent-text);
    font-size: .7rem;
    font-weight: 800;
    padding: .2rem .6rem;
    border-radius: 4px;
}

.dok-card__kat {
    font-size: .75rem;
    color: var(--primary);
    font-weight: 700;
}

/* -------------------------------------------------------
   Partners Section
   ------------------------------------------------------- */
.section-partners {
    background: var(--light-bg);
}

/* -------------------------------------------------------
   Footer
   ------------------------------------------------------- */
.site-footer {
    position: relative;
    background: linear-gradient(160deg, #0f172a 0%, #1a2d6e 35%, #1e40af 70%, #2d5dc8 100%);
    color: rgba(255, 255, 255, .85);
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.footer-links a::before {
    content: '›';
    color: var(--accent);
}

.footer-social a:hover {
    background: var(--accent);
    color: var(--accent-text);
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(251, 191, 36, .4);
}

.footer-newsletter .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, .2);
}

/* -------------------------------------------------------
   Gallery Slide Items
   ------------------------------------------------------- */
.gallery-slide-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.gallery-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

.swiper-pagination-bullet-active {
    background: var(--accent) !important;
}

/* -------------------------------------------------------
   Job Cards (Kumparan Plus Style)
   ------------------------------------------------------- */
.job-card-kumparan {
    position: relative;
    height: 400px;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: block;
    transition: transform 0.3s ease;
}

.job-card-kumparan:hover {
    transform: translateY(-5px);
}

.job-card-kumparan__img-wrap {
    height: 100%;
}

.job-card-kumparan__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
}

.job-card-kumparan__content {
    position: absolute;
    bottom: 0;
    width: 100%;
    z-index: 2;
}

/* -------------------------------------------------------
   Premium View All Button System
   ------------------------------------------------------- */
.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--primary);
    color: #fff !important;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(30, 64, 175, 0.2);
}

.btn-view-all__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.btn-view-all--sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.btn-view-all--yellow {
    background: var(--accent);
    color: var(--accent-text) !important;
}

.btn-view-all--yellow .btn-view-all__icon {
    background: rgba(0, 0, 0, 0.1);
}

.btn-view-all--yellow:hover {
    background: var(--accent-dark);
}

.section-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 576px) {
    .section-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* -------------------------------------------------------
   Mobile Navbar Toggler
   ------------------------------------------------------- */
.navbar-toggler.mobile-toggle-dark {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
    transition: all var(--transition);
}

.navbar-toggler.mobile-toggle-dark:hover {
    background-color: var(--primary-dark) !important;
}

.navbar-toggler.mobile-toggle-dark:focus {
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.3);
    outline: none;
}

.navbar-toggler.mobile-toggle-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}