:root {
    --primary: #1e5631;
    --secondary: #c9a227;
    --accent: #0f3d20;
    --font: 'Poppins', sans-serif;
    --footer-bg: #111827;
    --page-bg: #f8f9fa;
    --radius: .75rem;
    --hero-overlay: .85;
    --primary-soft: color-mix(in srgb, var(--primary) 8%, #fff);
    --primary-soft-2: color-mix(in srgb, var(--primary) 16%, #fff);
}

body {
    font-family: var(--font);
    background-color: var(--page-bg);
    font-size: 1.05rem;
    line-height: 1.75;
    color: #2d3748;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h4 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); }

.navbar { background: rgba(255,255,255,0.98) !important; }
.navbar-brand img { object-fit: contain; }

.nav-link { font-weight: 500; color: #333 !important; }
.nav-link.active, .nav-link:hover { color: var(--primary) !important; }

.btn-primary { background-color: var(--primary); border-color: var(--primary); }
.btn-primary:hover, .btn-primary:focus { background-color: var(--accent); border-color: var(--accent); }

.text-primary { color: var(--primary) !important; }

.hero {
    position: relative;
    min-height: 75vh;
    background: var(--accent) var(--hero-img, none) center/cover no-repeat;
    display: flex;
    align-items: center;
    color: #fff;
}

.hero .lead { font-weight: 300; }

.hero-slider {
    position: relative;
    color: #fff;
}
.hero-slider .carousel-item {
    min-height: 75vh;
    display: flex;
    align-items: center;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: var(--accent);
    background-image: var(--hero-img, none);
    position: relative;
}
/* Lapisan gelap di atas gambar hero, tingkat gelapnya diatur dari admin */
.hero::before, .hero-slider .carousel-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    opacity: var(--hero-overlay);
}
.hero > .container, .hero-slider .carousel-item > .container { position: relative; z-index: 1; }
.hero-slider .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
}
.hero-slider .carousel-indicators .active { background-color: var(--secondary); }
.hero-slider .btn-hero-primary { background: var(--secondary); color: var(--primary); border: none; }
.hero-slider .btn-hero-primary:hover { opacity: .9; }
.hero-slider .btn-hero-secondary { background: rgba(255,255,255,0.18); color: #fff; border: 1px solid rgba(255,255,255,0.5); backdrop-filter: blur(4px); }
.hero-slider .btn-hero-secondary:hover { background: rgba(255,255,255,0.3); color: #fff; }

.section-title {
    position: relative;
    padding-bottom: .75rem;
    margin-bottom: 1.5rem;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
}
.section-title.text-center::after { left: 50%; transform: translateX(-50%); }

.card-prodi {
    border: none;
    border-top: 4px solid var(--primary);
    transition: transform .3s ease, box-shadow .3s ease;
}
.card-prodi:hover { transform: translateY(-6px); box-shadow: 0 1rem 2rem rgba(0,0,0,0.1); }

.leader-card { border: none; border-bottom: 4px solid var(--secondary); }

/* ===== Sambutan Dekan (halaman Tentang) ===== */
.sambutan-section { background: color-mix(in srgb, var(--primary) 4%, var(--page-bg)); }
.dekan-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1rem 2.5rem color-mix(in srgb, var(--accent) 14%, transparent);
    position: sticky;
    top: 100px;
}
.dekan-photo {
    position: relative;
    aspect-ratio: 4 / 5;
    background: var(--primary);
}
.dekan-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.dekan-photo::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 6px;
    background: var(--secondary);
}
.dekan-info { padding: 1.25rem 1.5rem 1.5rem; text-align: center; }
.dekan-jabatan {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-soft);
    padding: .3rem .8rem;
    border-radius: 999px;
    margin-bottom: .6rem;
}
.dekan-nama { font-size: 1.15rem; font-weight: 700; color: #1f2937; margin-bottom: .25rem; line-height: 1.4; }
.dekan-instansi { font-size: .85rem; color: #6b7280; }

.sambutan-eyebrow {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: .35rem;
}
.sambutan-body {
    position: relative;
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem 2rem 1.5rem;
    border-left: 4px solid var(--primary);
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, 0.05);
    line-height: 1.85;
    color: #374151;
    text-align: justify;
}
.sambutan-body .lead { font-weight: 600; color: var(--primary); font-size: 1.1rem; text-align: left; }
.sambutan-body > div, .sambutan-body p:last-child { margin-bottom: 0; }
.sambutan-quote {
    position: absolute;
    top: -18px;
    right: 24px;
    font-size: 2.2rem;
    color: var(--secondary);
    background: color-mix(in srgb, var(--primary) 4%, var(--page-bg));
    padding: 0 .4rem;
}
.sambutan-ttd {
    margin-top: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--secondary);
    display: flex;
    flex-direction: column;
}
.sambutan-ttd-nama { font-weight: 700; color: #1f2937; }
.sambutan-ttd-jabatan { font-size: .9rem; color: #6b7280; }

.sejarah-body { line-height: 1.85; color: #374151; }

@media (max-width: 991.98px) {
    .dekan-card { position: static; max-width: 340px; margin: 0 auto; }
}
@media (max-width: 575.98px) {
    .sambutan-body { padding: 1.5rem 1.25rem 1.25rem; text-align: left; }
}

.site-footer, footer { background: var(--footer-bg) !important; }
footer a { color: rgba(255,255,255,.7); text-decoration: none; transition: color .2s; }
footer a:hover { color: #fff; }

.table-dosen thead { background: var(--primary); color: #fff; }

.breadcrumb-section { background: var(--primary); color: #fff; padding: 2rem 0; }

.btn-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: background .3s;
}
.btn-to-top:hover { background: var(--accent); }

.gallery-item img:hover { transform: scale(1.08); }

.lead { font-size: clamp(1.1rem, 2.5vw, 1.35rem); font-weight: 300; line-height: 1.85; }

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.card-title { font-size: clamp(1.05rem, 2vw, 1.25rem); font-weight: 600; }

.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 700; }
.hero .lead { font-size: clamp(1.1rem, 3vw, 1.5rem); }

.breadcrumb-section h1 { font-size: clamp(1.8rem, 5vw, 2.7rem); font-weight: 700; }
.breadcrumb-section p { font-size: clamp(1rem, 2.5vw, 1.15rem); }

.content-berita { font-size: 1.08rem; line-height: 1.9; }

.leader-card h5 { font-size: clamp(1.05rem, 2.2vw, 1.25rem); }

.btn-hero-primary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: var(--accent);
    font-weight: 600;
}
.btn-hero-primary:hover, .btn-hero-primary:focus {
    background-color: color-mix(in srgb, var(--secondary) 85%, #000);
    border-color: color-mix(in srgb, var(--secondary) 85%, #000);
    color: var(--accent);
}

.btn-hero-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid #FFFFFF;
    color: #FFFFFF;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    font-weight: 500;
}
.btn-hero-secondary:hover, .btn-hero-secondary:focus {
    background-color: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

.dropdown-menu {
    position: absolute !important;
    z-index: 1050;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    padding: .75rem;
    min-width: 230px;
    margin-top: .5rem;
}

.dropdown-item {
    color: #374151;
    border-radius: 8px;
    padding: .6rem .8rem;
    font-weight: 500;
    border-left: 4px solid transparent;
    transition: all .2s ease;
}

.dropdown-item:hover, .dropdown-item:focus, .dropdown-item.active {
    color: var(--primary);
    background-color: var(--primary-soft);
    border-left-color: var(--primary);
    font-weight: 600;
}

.dropdown-toggle::after {
    transition: transform .3s ease;
    border-top: .3em solid currentColor;
    border-right: .3em solid transparent;
    border-left: .3em solid transparent;
}

.dropdown.show .dropdown-toggle::after,
.nav-item.dropdown:hover .dropdown-toggle::after,
.nav-item.dropdown:focus-within .dropdown-toggle::after {
    transform: rotate(180deg);
}

.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: 12px;
    background: var(--primary-soft);
    border-radius: 8px;
    color: #94a3b8;
    transition: all .2s ease;
    vertical-align: middle;
}

.dropdown-item:hover .icon-box,
.dropdown-item:focus .icon-box,
.dropdown-item.active .icon-box {
    color: var(--primary);
    background: var(--primary-soft-2);
}

.lucide-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

#mainNav .dropdown-menu {
    margin-top: .45rem;
    z-index: 1050;
}

#mainNav .nav-item.dropdown {
    position: relative;
}

#mainNav .dropdown-menu-end {
    right: 0;
    left: auto;
}



/* ===== Tema: sudut & komponen umum ===== */
.card, .btn, .form-control, .form-select, .alert { border-radius: var(--radius); }
.card-img-top { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.brand-logo { height: 55px; width: auto; }
.brand-name { font-size: 1rem; }
.brand-sub { font-size: .7rem; }
.sambutan-logo { max-height: 420px; object-fit: contain; display: block; margin: 0 auto; }
.footer-sosmed { display: flex; gap: .5rem; flex-wrap: wrap; }
.footer-sosmed a {
    width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.08); color: #fff;
}
.footer-sosmed a:hover { background: var(--secondary); color: var(--accent); }
.site-footer a { word-break: break-word; }

/* ===== Navbar mobile ===== */
@media (max-width: 991.98px) {
    #mainNav .navbar-collapse {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        padding: .5rem 0 1rem;
    }
    #mainNav .navbar-nav { align-items: stretch !important; }
    #mainNav .nav-link { padding: .7rem .25rem; border-bottom: 1px solid #f1f5f9; }
    #mainNav .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        border: 0;
        background: var(--primary-soft);
        margin: .25rem 0 .5rem;
        padding: .4rem;
        min-width: 0;
    }
    #mainNav .dropdown-item { white-space: normal; }
}

/* ===== Tablet & HP ===== */
@media (max-width: 767.98px) {
    body { font-size: 1rem; line-height: 1.7; }
    section.py-5 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
    /* gutter g-5 (3rem) lebih lebar dari padding container -> scroll horizontal */
    .row.g-5 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 2rem; }
    .section-title { margin-bottom: 1.25rem; }
    .breadcrumb-section { padding: 1.5rem 0; }
    .hero, .hero-slider .carousel-item { min-height: 70vh; padding: 3rem 0; }
    .hero h1, .hero-slider h1 { font-size: clamp(1.7rem, 7.5vw, 2.2rem) !important; }
    .hero .lead, .hero-slider .lead { font-size: 1rem; }
    .hero .btn-lg, .hero-slider .btn-lg { font-size: 1rem; padding: .6rem 1.1rem; margin-bottom: .5rem; }
    .sambutan-logo { max-width: 200px; }
    .card-prodi { padding: 1.5rem !important; }
    .leader-card { padding: 1.5rem !important; }
    .dekan-card { max-width: 300px; }
    .table { font-size: .9rem; }
}
@media (max-width: 575.98px) {
    .brand-logo { height: 42px; }
    .brand-name { font-size: .92rem; }
    .brand-sub { font-size: .62rem; }
    .container { padding-left: 1rem; padding-right: 1rem; }
    .sambutan-body { line-height: 1.75; font-size: .97rem; }
    .sambutan-quote { font-size: 1.8rem; top: -14px; }
    .btn-to-top { width: 40px; height: 40px; bottom: 1rem; right: 1rem; }
}
