/* Reset dan font */
body,
h1,
h2,
h3,
p,
ul,
li {
    margin: 0;
    padding: 0;
    list-style: none;
}
body {
    font-family: "Poppins", sans-serif;
    color: #00072d;
    line-height: 1.5;
    position: relative;
    z-index: 0;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("/img/background-page.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    z-index: -1;
}

a {
    color: #003a80;
    text-decoration: none;
}

@font-face {
    font-family: "Moontime";
    src: url("/fonts/moontime/MoonTime-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "BrittanySignature";
    src: url("/fonts/brittany_signature/BrittanySignature.ttf")
        format("truetype");
    font-weight: normal;
    font-style: normal;
}

main {
    padding-top: 50px; /* untuk menghindari konten tertutup header */
}

/* NAVBAR KHUSUS HOME */
/* Saat posisi paling atas (transparan) */
.navbar-flag::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("/img/flag-navbar.png");
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: -1;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.5s ease;
}

/* Saat scroll (pakai background gambar seperti biasa) */
.navbar-flag.navbar-solid::before {
    opacity: 1;
    transform: translateY(0);
}

.navbar-flag {
    position: relative;
    z-index: 9999;
    height: 86px;
    background-image: none !important; /* prevent double bg */
    background-color: transparent !important;
    transition: none; /* tidak perlu transisi di sini */
}

/*--- INI ADALAH START DARI SECTION HEADER BANNER */

.header-content {
    background-image: url("/img/flag_background.png");
    background-position: center top; /* geser ke bawah agar melanjutkan dari navbar */
    background-size: cover;
    background-repeat: no-repeat;
    padding: 40px 1rem;
    padding-top: 100px; /* hindari ketumpuk navbar */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6rem;
    color: white;
    flex-wrap: nowrap;
    min-height: 750px;
}

.header-text h1 {
    font-size: 6rem;
    line-height: 1.1;
    margin: 0;
    text-align: center;
    color: #fcd34d;
}

.header-text span {
    display: inline !important;
    margin: 0 10px;
    font-weight: normal;
    margin-bottom: 1.5rem;
}

.header-text .sultan {
    font-family: "BrittanySignature", cursive !important;
    /* display: block; */
}

.header-text .bachtiar {
    font-family: "Moontime", cursive !important;
    /* display: block; */
    /* margin-left: 35px; */
}

.header-text .najamudin {
    font-family: "Moontime", cursive !important;
    /* display: block; */
}

.photo-circle {
    width: 380px;
    height: 380px;
    padding: 8px;
    background-clip: content-box;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 70px;
}

.photo-circle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Apply animation to specific elements */
.header-text .sultan {
    animation: slideInLeft 1.2s ease-out 0.2s forwards;
    opacity: 0;
}

.header-text .bachtiar {
    animation: slideInRight 1.2s ease-out 0.4s forwards;
    opacity: 0;
}

.header-text .najamudin {
    animation: slideInLeft 1.2s ease-out 0.6s forwards;
    opacity: 0;
}

.photo-circle {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
  }

  .header-text {
    width: 100%;
    text-align: center;
  }

  .header-text h1 {
    font-size: 3rem;
    white-space: normal; /* agar tetap rapi */
  }
}


/*--- INI ADALAH END DARI SECTION HEADER BANNER */

/* Main Content Layout */
.main-content {
    padding: 2rem 5%;
}

/* START DARI BERITA DAN VIDEO TERBARU */

.hover-latest-news-video {
    transition: transform 0.2s;
}
.hover-latest-news-video:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(13, 58, 145, 0.15);
}

/* Memastikan tinggi card sama untuk kolom kiri dan kanan */
#latest-news-video .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.carousel-item {
    cursor: pointer;
}

/* Tombol carousel default (disembunyikan dan posisi center) */
#beritaCarousel .carousel-control-prev,
#beritaCarousel .carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 5;
}

/* Munculkan tombol saat hover carousel */
#beritaCarousel:hover .carousel-control-prev,
#beritaCarousel:hover .carousel-control-next {
    opacity: 1;
    pointer-events: auto;
}

/* Scaling efek saat hover langsung pada tombol */
#beritaCarousel .carousel-control-prev:hover,
#beritaCarousel .carousel-control-next:hover {
    transform: translateY(-50%) scale(1.6);
}

/* Ikon tombol */
#beritaCarousel .carousel-control-prev-icon,
#beritaCarousel .carousel-control-next-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

/* SHADOW panjang sisi kiri & kanan muncul saat hover carousel */
#beritaCarousel::before,
#beritaCarousel::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#beritaCarousel::before {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.15), transparent);
}

#beritaCarousel::after {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.15), transparent);
}

#beritaCarousel:hover::before,
#beritaCarousel:hover::after {
    opacity: 1;
}

/* --- PROFILE SECTION (baru) ---------------------------------- */

.profile-ketua {
    margin-block: 60px;
}

.profile-ketua-content {
    display: flex;
    align-items: flex-start; /* foto & teks rata-atas */
    gap: 3rem;
    flex-wrap: wrap;
}

/* FOTO “cut-out” */
.profile-ketua-image img {
    width: 360px;
    height: auto;
    border-radius: 20px;
    object-fit: cover;
}

/* WRAPPER TEKS */
.profile-ketua-text {
    flex: 1 1 500px; /* grow & shrink, min-width 500px */
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

/* JUDUL BESAR */
.profile-title {
    font-size: 2.6rem;
    font-weight: 800;
    margin: 0;
    font-family: "Poppins", sans-serif;
    text-align: left;
    color: #000;
}

/* CARD PARAGRAF */
.profile-card {
    background: #f0ecec; /* abu muda */
    border-radius: 24px;
    padding: 2rem 2.2rem;
    font-size: 1.15rem;
    line-height: 1.7;
    color: #09306d;
    font-weight: 200;
}

/* Button Profile (Animated) */
.btn-profile-animated,
.btn-profile-animated *,
.btn-profile-animated:after,
.btn-profile-animated:before {
    box-sizing: border-box;
    border: 0;
}

.btn-profile-animated {
    width: fit-content;
    padding: 0.8rem 3rem;
    border: 2px solid #427057;
    border-radius: 10px;
    background-color: transparent;
    color: #003a80;
    font-weight: 700;
    font-family: "Poppins", sans-serif;
    font-size: 0.95rem;
    text-transform: uppercase;
    cursor: pointer;
    display: block;
    overflow: hidden;
    position: relative;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
}

.btn-profile-animated:hover {
    background-color: white;
    color: #427057;
}

.btn-profile-animated .original {
    position: absolute;
    inset: 0;
    background: #427057;
    color: white;
    display: grid;
    place-content: center;
    transition: transform 0.3s cubic-bezier(0.87, 0, 0.13, 1);
}

.btn-profile-animated:hover .original {
    transform: translateY(100%);
}

.btn-profile-animated .letters {
    display: inline-flex;
    z-index: 1;
    position: relative;
}

.btn-profile-animated span {
    opacity: 0;
    transform: translateY(-15px);
    transition: transform 0.3s cubic-bezier(0.87, 0, 0.13, 1), opacity 0.3s;
}

.btn-profile-animated span:nth-child(2n) {
    transform: translateY(15px);
}

.btn-profile-animated:hover span {
    opacity: 1;
    transform: translateY(0);
}

.btn-profile-animated:hover span:nth-child(2) {
    transition-delay: 0.05s;
}
.btn-profile-animated:hover span:nth-child(3) {
    transition-delay: 0.1s;
}
.btn-profile-animated:hover span:nth-child(4) {
    transition-delay: 0.15s;
}
.btn-profile-animated:hover span:nth-child(5) {
    transition-delay: 0.2s;
}
.btn-profile-animated:hover span:nth-child(6) {
    transition-delay: 0.25s;
}
.btn-profile-animated:hover span:nth-child(7) {
    transition-delay: 0.3s;
}
.btn-profile-animated:hover span:nth-child(8) {
    transition-delay: 0.35s;
}
.btn-profile-animated:hover span:nth-child(9) {
    transition-delay: 0.4s;
}
.btn-profile-animated:hover span:nth-child(10) {
    transition-delay: 0.45s;
}
.btn-profile-animated:hover span:nth-child(11) {
    transition-delay: 0.5s;
}
.btn-profile-animated:hover span:nth-child(12) {
    transition-delay: 0.55s;
}

/* -------------------------------------------------------------- */

/* RESPONSIVE – jika layar < 992px jadikan kolom */
@media (max-width: 991.98px) {
    .profile-ketua-content {
        flex-direction: column;
        align-items: center;
    }

    .profile-ketua-image img {
        width: 300px;
    }

    .profile-title {
        font-size: 2.2rem;
    }

    .profile-card {
        font-size: 1rem;
    }
}

@media (max-width: 767.98px) {
    .header-content .header-text h1 {
        font-size: 3.5rem;
        line-height: 1.2;
        word-break: break-word;
    }
}

/*--- INI ADALAH END DARI SECTION PROFILE SINGKAT */

/* News, Program, Agenda Sections */
.news-section,
.program-section,
.activity-section {
    background-color: #f0ecec;
    border-radius: 10px;
    /* min-height: 600px;
  max-height: 800px; */
    text-align: justify;

    display: flex;
    flex-direction: column;
    height: 100%;
}

.program-section p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 100%;
    word-break: break-word;
}

.title-section {
    color: #427057;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.news-section time,
.program-section time {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    display: block;
}

.news-img,
.program-img {
    width: 40%;
    height: 85px;
    border-radius: 10px;
    object-fit: cover;
}

.hover-news-program-activity {
    transition: transform 0.2s;
}
.hover-news-program-activity:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(13, 58, 145, 0.15);
}

/* Button (Detail & Selengkapnya) dari Berita Terbaru dan Program */

/*.btn-detail,
.btn-selengkapnya {
  background-color: #003a80 !important;
  color: white !important;
  padding: 0.5rem 1rem !important;
  border-radius: 12px !important;
  display: inline-block !important;
  margin-top: 0.6rem !important;
}*/
.btn-animated {
    width: fit-content;
    padding: 0.6rem 1.2rem;
    border: 2px solid #427057;
    border-radius: 10px;
    background-color: transparent;
    font-weight: 700;
    font-family: "Poppins", sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-block;
    overflow: hidden;
    position: relative;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
}

.btn-animated:hover {
    background-color: white;
    color: #427057;
}

.btn-animated .original {
    position: absolute;
    inset: 0;
    background: #427057;
    color: white;
    display: grid;
    place-content: center;
    transition: transform 0.3s cubic-bezier(0.87, 0, 0.13, 1);
}

.btn-animated:hover .original {
    transform: translateY(100%);
}

.btn-animated .letters {
    display: inline-flex;
    z-index: 1;
    position: relative;
}

.btn-animated span {
    opacity: 0;
    transform: translateY(-15px);
    transition: transform 0.3s cubic-bezier(0.87, 0, 0.13, 1), opacity 0.3s;
}

.btn-animated span:nth-child(2n) {
    transform: translateY(15px);
}

.btn-animated:hover span {
    opacity: 1;
    transform: translateY(0);
}

.btn-animated:hover span:nth-child(2) {
    transition-delay: 0.05s;
}
.btn-animated:hover span:nth-child(3) {
    transition-delay: 0.1s;
}
.btn-animated:hover span:nth-child(4) {
    transition-delay: 0.15s;
}
.btn-animated:hover span:nth-child(5) {
    transition-delay: 0.2s;
}
.btn-animated:hover span:nth-child(6) {
    transition-delay: 0.25s;
}
.btn-animated:hover span:nth-child(7) {
    transition-delay: 0.3s;
}
.btn-animated:hover span:nth-child(8) {
    transition-delay: 0.35s;
}
.btn-animated:hover span:nth-child(9) {
    transition-delay: 0.4s;
}
.btn-animated:hover span:nth-child(10) {
    transition-delay: 0.45s;
}
.btn-animated:hover span:nth-child(11) {
    transition-delay: 0.5s;
}
.btn-animated:hover span:nth-child(12) {
    transition-delay: 0.55s;
}

/* Timeline wrapper */
.timeline {
    position: relative;
    padding-left: 6px;
    z-index: 0; /* Posisi garis di belakang icon */
}

/* Vertical line */
.timeline::before {
    content: "";
    position: absolute;
    top: 24px;
    bottom: 24px;
    left: 20px;
    width: 4px;
    background: #427057;
    border-radius: 4px;
}

.event {
    margin-bottom: 1.5em;
}

/* Calendar row */
.calendar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

/* Text + arrow row */
.text-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Icon bulat */
.icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 6px rgba(12, 58, 118, 0.8);
    font-size: 16px;
    flex-shrink: 0;
    z-index: 1; /* Posisi icon di depan garis */
}

/* Teks konten */
.content-container {
    flex: 1;
}

.agenda-title {
    font-weight: bold;
    color: #427057;
    font-size: 1rem;
    margin-bottom: 4px;
}

.agenda-content {
    font-size: 0.95rem;
    color: #444;
}

.date {
    font-weight: 600;
    font-size: 0.95rem;
    color: #555;
}

/* Title styling */
.description {
    font-weight: 700;
    color: #0c3a76;
    font-size: 16px;
    line-height: 1.3;
}

/* Work Program Section */
.work-program {
    display: flex;
    align-items: center;
    margin-bottom: 5rem;
    gap: 2rem;
}
.work-map {
    flex: 1;
    color: #cccccc;
    text-align: center;
    font-style: italic;
}
.work-desc {
    flex: 1;
}
.work-desc h2 {
    text-transform: uppercase;
    border-left: 3px solid #003a80;
    padding-left: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.work-desc strong {
    font-weight: 700;
}
.work-desc ul {
    margin-top: 1rem;
    padding-left: 1rem;
}
.work-desc ul li {
    margin-bottom: 0.8rem;
    position: relative;
    font-weight: 700;
}
.work-desc ul li::before {
    content: "✔";
    color: #003a80;
    position: absolute;
    left: -1.2rem;
}
