/* =====================================
 THEME VARIABLES
 ===================================== */
:root {
  /* Brand Colors */
  --color-primary: #006332;
  --color-primary-rgb: 0, 99, 50;
  --color-secondary: #317E20;
  --color-secondary-rgb: 49, 126, 32;
  --color-tertiary: #ACD4A0;
  --color-tertiary-rgb: 172, 212, 160;
  --color-accent: #E7C019;
  --color-accent-rgb: 231, 192, 25;
  --color-muted: #D0D0D0;
  --color-muted-rgb: 208, 208, 208;
  --color-gray: #373737;
  --color-gray-rgb: 55, 55, 55;


  --avatar-size: 30px;

  /* Hovers */
  --color-hover-light: rgba(255, 255, 255, 0.1);
  --color-hover-dark: rgba(0, 0, 0, 0.1);
  --bg-hover-light: rgba(255, 255, 255, 0.1);
  --bg-hover-dark: rgba(0, 0, 0, 0.05);

  /* Backgrounds */
  --bg-body: #fff;
  --bg-surface: #f8f9fa;

  /* Text Colors (umum) */
  --text-body: #000;
  --text-strong: #222;
  --text-light: #f8f9fa;

  /* Link (khusus main content) */
  --link-color: inherit;
  --link-hover: var(--color-secondary);
  --link-active: var(--color-secondary);
  --link-decoration: none;
  --link-decoration-hover: none;

  /* HEADER THEME */
  --header-theme-bg: #ffffff;
  --header-theme-text: black;
  --header-theme-text-light: #ffffff;
  --header-theme-accent: var(--color-secondary);
  --header-theme-accent-alt: var(--color-primary);
  --header-theme-hover-bg: var(--color-tertiary);
  --header-theme-border: var(--color-tertiary);
  /* 
  --header-transparent-text-light: #ffffff;
  --header-transparent-text-light-hover: var(--color-tertiary);
  --header-transparent-text-dark: var(--color-primary);
  --header-transparent-text-dark-hover: var(--color-tertiary); */


  /* 4. FOOTER THEME */
  --footer-bg-color: #1d4910;
  --footer-bg: linear-gradient(180deg, #006332 44.81%, #00C966 147.24%);
  --footer-text-color: #ffffff;
  --footer-heading-color: inherit;
  --footer-link-color: inherit;
  --footer-link-hover-color: var(--color-tertiary);

  /* 5. Typography Colors */
  --text-heading-color: var(--text-strong);
  --text-paragraph-color: var(--text-body);

  /* Typography */
  --font-body: "Poppins", sans-serif;
  --font-heading: "Poppins", sans-serif;
  --font-size-base: 1rem;

  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;

  --gallery-card-color: rgba(255, 255, 255, 0.5);
  --gallery-card-hover-color: rgba(255, 255, 255, 0.925);

  --video-card-color: black;
  --video-card-hover-color: var(--color-secondary);
}

/* =====================================
   BASE OVERRIDES
   ===================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--text-paragraph-color);
  background-color: var(--bg-body);
  line-height: 1.6;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  margin: 0;
}

.postcontent img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text-heading-color);
  margin-bottom: var(--spacing-md);
}

main a {
  color: var(--link-color);
  transition: color 0.2s ease-in-out;
}

main a:hover {
  color: var(--link-hover);
}

main a:focus-visible,
main a:active {
  color: var(--link-active);
}

section {
  padding: var(--spacing-lg) 0;
}

/* =====================================
   HELPER CLASSES
   ===================================== */
.bg-lighten,
.bg-darken {
  position: relative;
  isolation: isolate;
  display: block;
}

.bg-lighten::after,
.bg-darken::after {
  content: "";
  line-height: 0;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  border-radius: inherit;
}

.bg-lighten::after {
  background: rgba(255, 255, 255, 0.2);
}

.bg-darken::after {
  background: rgba(0, 0, 0, 0.2);
}

.bg-lighten-hover,
.bg-darken-hover {
  position: relative;
  isolation: isolate;
  display: block;
}

.bg-lighten-hover:hover::after,
.bg-darken-hover:hover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  border-radius: inherit;
}

.bg-lighten-hover:hover::after {
  background: rgba(255, 255, 255, 0.2);
}

.bg-darken-hover:hover::after {
  background: rgba(0, 0, 0, 0.2);
}

.icon-color-mute {
  font-size: 2.5rem;
  color: #adb5bd;
  text-decoration: none;
}

.title-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

[class*="text-truncate-"] {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-truncate-1 {
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.text-truncate-2 {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.text-truncate-3 {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.text-truncate-4 {
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.fade-in,
.fade-out {
  transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

.fade-in {
  opacity: 1;
  visibility: visible;
}

.fade-out {
  opacity: 0;
  visibility: hidden;
}

.text-align-justify {
  text-align: justify;
}

.cursor-pointer {
  cursor: pointer !important;
}

/* Primary */
.bg-theme {
  background-color: var(--color-primary) !important;
}

.bg-theme-hover:hover {
  background-color: var(--color-primary) !important;
}

.text-theme {
  color: var(--color-primary) !important;
}

.text-theme-hover:hover {
  color: var(--color-primary) !important;
}

/* Secondary */
.bg-theme-secondary {
  background-color: var(--color-secondary) !important;
}

.bg-theme-secondary-hover:hover {
  background-color: var(--color-secondary) !important;
}

.text-theme-secondary {
  color: var(--color-secondary) !important;
}

.text-theme-secondary-hover:hover {
  color: var(--color-secondary) !important;
}

/* Tertiary */
.bg-theme-tertiary {
  background-color: var(--color-tertiary) !important;
}

.bg-theme-tertiary-hover:hover {
  background-color: var(--color-tertiary) !important;
}

.text-theme-tertiary {
  color: var(--color-tertiary) !important;
}

.text-theme-tertiary-hover:hover {
  color: var(--color-tertiary) !important;
}

/* =====================================
   GENERAL LAYOUT
   ===================================== */
main {
  flex-grow: 1;
  background-color: var(--bg-body);
}

/* ============================================
HEADER STYLES
============================================ */
.logo-brand {
  max-height: 50px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 576px) {
  .logo-brand {
    max-height: 50px;
    max-width: 150px;
  }
}

.page-header .brand-wrapper {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.page-header .logo-img {
  height: 50px;
  max-width: 175px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
}

.page-header .brand-text-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  margin-left: 10px;
  padding-right: 10px;
}

.page-header .text-title {
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-header .text-subtitle {
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #6c757d;
}

/* Responsif untuk layar Desktop (768px ke atas) */
@media (min-width: 768px) {
  .page-header .logo-img {
    height: 50px;
  }

  .page-header .text-title {
    font-size: 0.95rem;
  }

  .page-header .text-subtitle {
    font-size: 0.85rem;
  }
}

/* Responsif untuk layar HP Sempit (di bawah 400px) */
@media (max-width: 450px) {
  .page-header .brand-text-container {
    display: none;
    /* Sembunyikan teks instansi di HP kecil agar logo e-magang tetap muat */
  }
}


/* ============================================
FOOTER STYLES
============================================ */
.site-footer {
  background-color: var(--footer-bg-color);
  background: var(--footer-bg);
  color: var(--footer-text-color);
}

.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer h5,
.site-footer h6 {
  color: var(--footer-heading-color);
}

.site-footer a {
  color: var(--footer-link-color);
}

.site-footer a {
  text-decoration: none;
  transition: color 0.3s;
}

.site-footer a:hover {
  color: var(--footer-link-hover-color) !important;
}

/* FOR ICONS */
.site-footer .list-inline-item i {
  display: inline-block;
  transition: transform 0.4s;
}

.site-footer .list-inline-item a:hover i {
  transform: scale(1.25);
}

.site-footer .footer-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.site-footer .footer-brand-text {
    font-size: 1.5rem;
}

.site-footer .hover-text-white:hover {
    color: #fff !important;
}

.site-footer .social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.site-footer .social-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Mobile optimization */
@media (max-width: 575.98px) {
    .site-footer {
        padding-top: 2rem !important;
    }

    .site-footer .footer-logo {
        width: 70px !important;
        height: 70px !important;
    }

    .site-footer .footer-brand-text {
        font-size: 1.1rem !important;
    }
}

/* Tablet optimization */
@media (max-width: 991.98px) {
    .site-footer .footer-logo {
        width: 100px !important;
        height: 100px !important;
    }

    .site-footer .footer-brand-text {
        font-size: 1.2rem !important;
    }
}

/* WYSIWYG */
.postcontent {
  font-family: var(--font-body) !important;
}

.postcontent,
.postcontent * {
  font-family: inherit !important;
}

.postcontent p,
.postcontent h1,
.postcontent h2,
.postcontent h3,
.postcontent h4,
.postcontent h5,
.postcontent h6,
.postcontent span,
.postcontent strong,
.postcontent em,
.postcontent b,
.postcontent i,
.postcontent u,
.postcontent a,
.postcontent li,
.postcontent ul,
.postcontent ol,
.postcontent blockquote,
.postcontent pre,
.postcontent code,
.postcontent div {
  font-family: inherit !important;
}

/* COMPONENT */
.user-avatar {
  position: relative;
  /* 1. Penting untuk tumpang tindih */
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--color-primary);
  flex-shrink: 0;

  /* 2. Hapus semua properti flex, kita tidak pakai lagi */
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
}

/* 3. Buat gambar dan inisial mengisi seluruh container */
.user-avatar img,
.user-avatar .avatar-initials {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.user-avatar img {
  object-fit: cover;
  display: block;
  z-index: 1;
}

.user-avatar img[src=""] {
  display: none;
}

.user-avatar .avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  font-size: clamp(12px, calc(var(--avatar-size) * 0.4), 48px);
  line-height: 1;
}