/* ==========================================================================
   STMIK PGRI ARUNGBINANG KEBUMEN — Design System
   Palet: Warm coffee-brown (light) / Dark coffee-brown (dark mode)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* --- LIGHT THEME: warm, clean --- */
  --bg: #FAF6F0;
  --bg-alt: #F2EAE0;
  --surface: #FFFFFF;
  --surface-raised: #FFFDFB;
  --text: #2B1F17;
  --text-soft: #6B5A4A;
  --text-muted: #9C8A78;
  --border: #E6DACB;

  --primary: #8B5E3C;
  --primary-dark: #6E4A2E;
  --primary-light: #A97C56;
  --accent: #C9A77C;
  --accent-soft: #EFE1CB;
  --success: #3F6B4F;
  --danger: #A63D3D;
  --warning: #C08A2E;

  --shadow-sm: 0 1px 3px rgba(43, 31, 23, 0.08);
  --shadow-md: 0 4px 16px rgba(43, 31, 23, 0.10);
  --shadow-lg: 0 12px 32px rgba(43, 31, 23, 0.14);

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  color-scheme: light;
}

[data-theme="dark"] {
  /* --- DARK THEME: dark brown / coffee --- */
  --bg: #1C140F;
  --bg-alt: #241A13;
  --surface: #2A1E16;
  --surface-raised: #32251B;
  --text: #F0E6D8;
  --text-soft: #C9B7A4;
  --text-muted: #93816F;
  --border: #3D2D20;

  --primary: #D9A468;
  --primary-dark: #C9915A;
  --primary-light: #E8C398;
  --accent: #D9B77E;
  --accent-soft: #3D2D1C;
  --success: #6FA583;
  --danger: #D97575;
  --warning: #E0B15C;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.font-mono { font-family: var(--font-mono); }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
[data-theme="dark"] a:hover { color: var(--primary-light); }

/* --- Signature element: woven pattern (batik-grid motif) --- */
.woven-pattern {
  background-image:
    repeating-linear-gradient(45deg, var(--accent-soft) 0, var(--accent-soft) 2px, transparent 2px, transparent 14px),
    repeating-linear-gradient(-45deg, var(--accent-soft) 0, var(--accent-soft) 2px, transparent 2px, transparent 14px);
  background-color: var(--bg-alt);
}

/* --- Navbar --- */
.navbar-stmik {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar-stmik .nav-link {
  color: var(--text-soft) !important;
  font-weight: 500;
  font-size: 0.94rem;
  padding: 0.5rem 0.9rem !important;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.navbar-stmik .nav-link:hover,
.navbar-stmik .nav-link.active {
  color: var(--primary) !important;
  background-color: var(--accent-soft);
}

.navbar-brand-stmik {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text) !important;
}

.navbar-brand-stmik img {
  height: 42px;
  width: auto;
}

.navbar-brand-stmik .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.navbar-brand-stmik .brand-text small {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* --- Theme toggle switch --- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  color: var(--text-soft);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* --- Language switcher --- */
.lang-switcher .dropdown-menu {
  background-color: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.lang-switcher .dropdown-item {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.lang-switcher .dropdown-item:hover,
.lang-switcher .dropdown-item.active {
  background-color: var(--accent-soft);
  color: var(--primary-dark);
}

/* --- Buttons --- */
.btn-primary-stmik {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #FFF8F0;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.4rem;
  transition: all 0.18s ease;
}

.btn-primary-stmik:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #FFF8F0;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-stmik {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.35rem;
  transition: all 0.18s ease;
}

.btn-outline-stmik:hover {
  background-color: var(--primary);
  color: #FFF8F0;
}

/* --- Cards --- */
.card-stmik {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: auto;
}

.card-stmik:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-stmik .card-thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background-color: var(--bg-alt);
}

.card-stmik .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card-stmik:hover .card-thumb img {
  transform: scale(1.06);
}

.card-stmik .card-body {
  padding: 1.25rem;
}

.badge-category {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background-color: var(--accent-soft);
  color: var(--primary-dark);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

/* --- Popup Brosur (beranda) --- */
.brosur-popup-dialog {
  max-width: 420px;
  width: 90vw;
}

.brosur-popup-content {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: none;
  background-color: var(--surface);
  position: relative;
}

.brosur-popup-image {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  background-color: var(--bg-alt);
  display: block;
}

.brosur-popup-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

.brosur-popup-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 5;
  background-color: rgba(255,255,255,0.85);
  border-radius: 50%;
  padding: 0.4rem;
}

@media (max-width: 480px) {
  .brosur-popup-dialog {
    width: 92vw;
  }
  .brosur-popup-image {
    max-height: 50vh;
  }
}

/* --- Hero --- */
.hero-stmik {
  position: relative;
  padding: 0rem ;
  overflow: hidden;
}

.hero-stmik::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, var(--border) 0, var(--border) 1px, transparent 1px, transparent 22px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.hero-image {
  position: relative;
  object-fit: cover;
  display: block;
  aspect-ratio: 16 /7;
  z-index: 1;
}

.hero-caption {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 2rem 1.5rem 1.5rem;
    background: var(--text);
    opacity: 0.85;
    z-index: 2;
}
.hero-caption-link {
    text-decoration: none;
}
.hero-caption-title {
    color: var(--surface);
    margin: 0;
    width: 80%;
}

/* --- Sections --- */
.section-stmik { padding: 4rem 0; }
.section-stmik.bg-alt { background-color: var(--bg-alt); }

.section-heading {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 2.2rem;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

/*--- Carousel---*/
#studyProgramCarousel .card {
    min-height: 460px;
}

#studyProgramCarousel img {
    height: 460px;
    object-fit: cover;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: var(--text);
  border-radius: 50%;
  padding: 20px;
}

.carousel-indicators {
    bottom: -45px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    opacity: 1;
    margin: 0 6px;
    background-color: var(--text-soft);
}

.carousel-indicators .active {
    background-color: var(--text);
}

/* --- Footer --- */
.footer-stmik {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  color: var(--text-soft);
}

.footer-stmik a { color: var(--text-soft); }
.footer-stmik a:hover { color: var(--primary); }

.footer-stmik h6 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 1rem;
}

/* --- Forms --- */
.form-control, .form-select {
  background-color: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background-color: var(--surface);
  color: var(--text);
}

.form-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
}

/* --- Sidebar admin --- */
.sidebar-admin {
  background-color: var(--surface);
  border-right: 1px solid var(--border);
  min-height: 100vh;
}

.sidebar-admin .nav-link {
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.sidebar-admin .nav-link.active,
.sidebar-admin .nav-link:hover {
  background-color: var(--accent-soft);
  color: var(--primary-dark);
}

.stat-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
}

.stat-card .stat-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/*--  wysiwyg  --*/
.wysiwyg-content img{
  height: 100%;
  width: 100%;
  object-fit: cover;
  aspect-ratio: 16/7;
}

/* --- Accessibility --- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media (max-width: 767px) {
  .hero-stmik { padding: 3rem 0 2.5rem; }
  .section-stmik { padding: 2.5rem 0; }
}
@media (max-width: 991.98px) {

    #studyProgramCarousel .card {
        min-height: auto;
    }

    #studyProgramCarousel img {
        height: 280px;
    }

    #studyProgramCarousel .card-body {
        padding: 2rem;
    }

}

/* ==========================================================================
   RESPONSIVE ADMIN LAYOUT
   ========================================================================== */
 
.admin-main {
  min-width: 0; /* mencegah flex child overflow di layar sempit */
  overflow-x: hidden;
}
 
.admin-main img {
  max-width: 100%;
  height: auto;
}
 
.admin-main .table-responsive {
  overflow-x: auto;
}
 
/* Sidebar admin: statis di layar besar, disembunyikan di layar kecil (diganti offcanvas) */
@media (max-width: 991.98px) {
  .sidebar-admin-desktop {
    display: none !important;
  }
}
 
@media (min-width: 992px) {
  .admin-topbar-mobile {
    display: none !important;
  }
}
 
.admin-topbar-mobile {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}
 
/* Mobile: makin ringkas */
@media (max-width: 576px) {
    .pagination .page-link {
        padding: .3rem .55rem;
        font-size: .78rem;
        min-width: 32px;
        text-align: center;
    }
}
/* --- Accessibility --- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
 
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
 
@media (max-width: 767px) {
  .hero-stmik { padding: 3rem 0 2.5rem; }
  .section-stmik { padding: 2.5rem 0; }
  .hero-image {
      aspect-ratio: 4 / 3;
  }
  .hero-caption {
      padding: 1.25rem 1rem 1rem;
  }
  .hero-caption-title {
      font-size: 1.1rem;
      width: 100%;
  }
}
