/* --- style.css --- */

:root {
  --primary-green: #4a7c44;
  --dark-green: #3a6635;
  --light-green: #a8d5a2;
  --accent-yellow: #ffe45c;
  --accent-blue: #5bc0de;
  --text-dark: #333;
  --white: #ffffff;
  --bg-gray: #f4f6f8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--bg-gray);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
}

/* --- HEADER (Shared) --- */

.header-nav-wrapper {
  background-color: rgb(148, 179, 142);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* Container for the Logo + Text */
.header-logo-container {
  display: flex;
  align-items: center;
  gap: 15px; /* Space between logo and text */
  text-decoration: none;
  color: white;
  padding: 5px 0;
}

/* The Image */
.brand-logo {
  height: 65px; /* Adjust this to make logo bigger/smaller */
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* The Text Group */
.brand-text {
  display: flex;
  flex-direction: column; /* Stacks text vertically */
  justify-content: center;
  line-height: 1.1;
}

/* "DISDUK CAPIL" Text */
.brand-name {
  font-family: "Poppins", sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* "SERGAI" Text */
.brand-sub {
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.9;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-size: 0.9rem;
  transition: opacity 0.3s;
}

.nav-links a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.nav-links a.active {
  text-decoration: underline;
  font-weight: bold;
}

/* The Dropdown Content (Hidden by default) */
/* The Dropdown Container */
.dropdown {
  position: relative;
  display: inline-block;
}

/* The Dropdown Button */
.dropdown .dropbtn {
  color: white;
  padding: 10px;
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.dropdown .dropbtn:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* The Dropdown Content (Hidden by default) */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  border-radius: 8px;
  top: 100%;
  left: 0;
  overflow: hidden;
}

/* Dropdown Links */
.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
  text-align: left;
  transition: background 0.2s;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
  color: var(--primary-green);
}

/* Show the dropdown on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* --- FOOTER (Shared) --- */
footer {
  background-color: rgb(148, 179, 142);
  padding: 30px 0;
  border-top: 1px solid #ddd;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.footer-col h4 {
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: #333;
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 5px;
}

/* =========================================
   HOME PAGE SPECIFIC STYLES
   ========================================= */
/* --- Main Layout --- */
.main-content {
  padding: 20px 0;
}

.announcement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.info-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.info-box.blue {
  background-color: #7ec8e3;
  color: black;
}
.info-box.yellow {
  background-color: var(--accent-yellow);
  color: black;
}
.info-box.green {
  background-color: var(--primary-green);
  color: white;
}

.info-box h3 {
  font-size: 1rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.info-box ul {
  list-style: none;
  padding-left: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}
.info-box ul li::before {
  content: "• ";
  color: #333;
}

.yellow-box {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}
.yellow-box .icon {
  font-size: 2rem;
  background: #e6c83a;
  padding: 10px;
  border-radius: 50%;
}
.yellow-box .text p {
  font-size: 0.8rem;
  margin: 2px 0;
}
/* --- Carousel Styles --- */
.carousel-wrapper {
  grid-column: span 2; /* Spans across 2 columns in your grid */
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  background: #000;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 650px; /* Adjust height as needed */
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  visibility: hidden;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay text styling */
.carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.4); /* Dark overlay to make text pop */
  color: #fff;
}

.carousel-overlay h3 {
  font-size: 1.8rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Navigation Arrows */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 2;
  font-size: 1.2rem;
  border-radius: 4px;
  transition: background 0.3s;
}

.carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.prev-btn {
  left: 10px;
}
.next-btn {
  right: 10px;
}

/* Navigation Dots */
.carousel-dots {
  text-align: center;
  position: absolute;
  bottom: 15px;
  width: 100%;
  z-index: 2;
}

.dot {
  cursor: pointer;
  height: 12px;
  width: 12px;
  margin: 0 5px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.dot.active,
.dot:hover {
  background-color: #fff;
}

/* Mobile Responsiveness for Carousel */

/* --- 3 Stat Cards --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  background: white;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.stat-card .icon-circle {
  background: #e6f0e6;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 10px;
  color: var(--primary-green);
  font-size: 1.5rem;
}
.stat-card .number {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--dark-green);
}

/* --- Green Button Strip --- */
.service-strip {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 30px;
}
.service-btn {
  background-color: var(--primary-green);
  color: white;
  padding: 35px;
  text-align: center;
  border-radius: 5px;
  font-weight: bold;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.service-btn:hover {
  background-color: var(--dark-green);
}
.service-btn a {
  text-decoration: none;
  color: white;
}
.service-btn i {
  font-size: 1.2rem;
}

/* --- Statistics & Berita Layout --- */
/* --- SOCIAL LINKS SECTION --- */
.section-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--dark-green);
  margin: 40px 0 20px 0;
  text-align: center;
}
.section-title i {
  color: var(--accent-yellow);
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.social-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 items per row */
  gap: 20px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Individual Social Card */
.social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 10px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #eee;
  text-decoration: none;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  color: #555;
  gap: 10px;
}

.social-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: #ccc;
}

/* The Icon */
.social-item .social-icon {
  font-size: 2.5rem;
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}

/* The Text Label */
.social-item span {
  font-size: 0.9rem;
  font-weight: 500;
  color: #777;
  transition: color 0.3s ease;
}

/* --- HOVER COLORS (Brand Specific) --- */
.social-item:hover .instagram {
  color: #e1306c;
}
.social-item:hover .facebook {
  color: #1877f2;
}
.social-item:hover .threads {
  color: #000000;
}
.social-item:hover .tiktok {
  color: #000000;
}
.social-item:hover .snackvideo {
  color: #ff6f00;
}
.social-item:hover .x-twitter {
  color: #000000;
}
.social-item:hover .youtube {
  color: #ff0000;
}
.social-item:hover .whatsapp {
  color: #25d366;
}
.social-item:hover .email {
  color: #d44638;
}

.social-item:hover span {
  color: #333;
}

.visitor-stats {
  display: flex;
  justify-content: space-around;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}
.stat-item {
  text-align: center;
}
.stat-item .num {
  font-weight: bold;
  font-size: 1.2rem;
  display: block;
}
.stat-item .label {
  font-size: 0.8rem;
  color: #777;
}

/* .news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.news-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.news-img {
  height: 150px;
  background-color: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 2rem;
}
.news-content {
  padding: 15px;
}
.news-content h4 {
  font-size: 1rem;
  margin-bottom: 5px;
  color: var(--dark-green);
}
.news-date {
  font-size: 0.7rem;
  color: #999;
  margin-bottom: 10px;
  display: block;
}
.news-btn {
  background: var(--primary-green);
  color: white;
  border: none;
  padding: 5px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
} */

/* --- GALLERY SECTION --- */
.gallery-section {
  margin: 40px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.gallery-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid #eee;
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-green);
}

.gallery-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f8f9fa;
}

.gallery-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-img img {
  transform: scale(1.05);
}

.gallery-info {
  padding: 15px 20px;
  text-align: center;
}

.gallery-info h4 {
  margin: 0 0 5px 0;
  font-size: 1rem;
  color: #333;
  font-weight: 600;
}

.gallery-info .gallery-date {
  font-size: 0.8rem;
  color: #888;
}

/* --- OPTION 2: DOCUMENT STYLE OVERLAY --- */
.gallery-card.doc-style .gallery-img {
  position: relative;
  height: 220px;
}

.gallery-card.doc-style .doc-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
  text-align: center;
}

.gallery-card.doc-style .doc-overlay h4 {
  margin: 0;
  font-size: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* --- Pengumuman --- */
.pengumuman-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 30px;
}
.pengumuman-box h3 {
  color: #e74c3c;
  margin-bottom: 10px;
}

/* --- GOVERNMENT LINKS SECTION --- */
.gov-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.gov-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 25px 15px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #eee;
  text-decoration: none;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  position: relative;
  color: #333;
  gap: 12px;
}

.gov-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-green);
}

.gov-icon-wrapper {
  width: 60px;
  height: 60px;
  background: #e8f5e9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--primary-green);
  transition:
    background 0.3s,
    color 0.3s;
}

.gov-item:hover .gov-icon-wrapper {
  background: var(--primary-green);
  color: white;
}

.gov-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gov-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark-green);
}

.gov-desc {
  font-size: 0.8rem;
  color: #777;
}

.gov-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #d32f2f;
  color: white;
  font-size: 0.6rem;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(211, 47, 47, 0.3);
}

/* --- Footer --- */
footer {
  background-color: rgb(148, 179, 142);
  padding: 30px 0;
  border-top: 1px solid #ddd;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.footer-col h4 {
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: #333;
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 5px;
}
/* --- FOOTER SOCIAL MEDIA ICONS --- */
/* --- FOOTER SOCIAL MEDIA VERTICAL (SMALL ICONS + TEXT) --- */
.footer-social-vertical {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 5px;
}

.footer-social-vertical a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #555;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 4px 0;
  transition: all 0.3s ease;
}

.footer-social-vertical a i {
  font-size: 1rem;
  width: 24px;
  text-align: center;
  transition: color 0.3s ease;
}

.footer-social-vertical a:hover {
  color: #333;
  transform: translateX(3px);
}

/* Hover Colors for the Icons only */
.footer-social-vertical a[title="Instagram"]:hover i {
  color: #e1306c;
}
.footer-social-vertical a[title="Facebook"]:hover i {
  color: #1877f2;
}
.footer-social-vertical a[title="Threads"]:hover i {
  color: #000000;
}
.footer-social-vertical a[title="TikTok"]:hover i {
  color: #000000;
}
.footer-social-vertical a[title="Snack Video"]:hover i {
  color: #ff6f00;
}
.footer-social-vertical a[title="X"]:hover i {
  color: #000000;
}
.footer-social-vertical a[title="YouTube"]:hover i {
  color: #ff0000;
}

.map-wrapper {
  width: 100%;
  height: 100px; /* Slightly taller than before for better visibility */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  background: #e0e0e0;
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
/* --- Responsive --- */
@media (max-width: 992px) {
  .social-links {
    grid-template-columns: repeat(3, 1fr); /* 3 items per row on tablet */
  }
  .gov-links {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .header-title {
    text-align: center;
  }
  .carousel-wrapper {
    grid-column: span 1; /* Return to single column on mobile */
  }
  .carousel-container {
    height: 180px; /* Slightly shorter on mobile */
  }
  .carousel-overlay h3 {
    font-size: 1.2rem;
  }
  .announcement-grid {
    grid-template-columns: 1fr;
  }
  .stats-row {
    grid-template-columns: 1fr;
  }
  .visitor-stats {
    flex-direction: column;
    gap: 15px;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }

  /* Make header stack vertically on mobile but still centered */
  .header-nav-wrapper {
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 15px 0;
  }
  .nav-links {
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
  }
  .map-wrapper {
    height: 120px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
  }
  .gallery-img {
    height: 160px;
  }
}
/* =========================================
   PROFILE PAGE SPECIFIC STYLES
   ========================================= */

/* Banner Section */
.profile-banner {
  background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
  color: white;
  padding: 40px 0;
  text-align: center;
  border-radius: 0 0 20px 20px;
  margin-bottom: 30px;
}

.profile-banner h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.profile-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 20px;
}
.breadcrumbs a {
  color: var(--primary-green);
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}

/* Profile Content Grid */
.profile-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

/* Sidebar Navigation */
.profile-sidebar {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  height: fit-content;
}

.profile-sidebar h3 {
  color: var(--dark-green);
  border-bottom: 2px solid var(--light-green);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.sidebar-menu {
  list-style: none;
}
.sidebar-menu li {
  margin-bottom: 8px;
}
.sidebar-menu a {
  display: block;
  color: var(--text-dark);
  text-decoration: none;
  padding: 10px;
  border-radius: 5px;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}
.sidebar-menu a:hover,
.sidebar-menu a.active {
  background-color: var(--bg-gray);
  color: var(--dark-green);
  border-left-color: var(--primary-green);
}

/* Main Content Area */
.profile-content {
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.profile-content h2 {
  color: var(--dark-green);
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}

.profile-content p {
  line-height: 1.8;
  color: #555;
  margin-bottom: 15px;
}

.profile-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Visi Misi Section */
.visi-box,
.misi-box {
  margin-top: 30px;
}
.visi-box h3,
.misi-box h3 {
  color: var(--primary-green);
  margin-bottom: 10px;
}
.visi-box {
  background: #eef7ee;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-green);
}
.misi-box ul {
  padding-left: 20px;
  line-height: 2;
}
.kepegawaian-banner {
  background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
  color: white;
  padding: 40px 0;
  text-align: center;
  border-radius: 0 0 20px 20px;
  margin-bottom: 30px;
}
.kepegawaian-banner h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.kepegawaian-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.9rem;
  color: var(--primary-green);
  margin-bottom: 20px;
}
.breadcrumbs a {
  color: var(--primary-green);
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}

/* Layout Grid (Same structure as Profile page for consistency) */
.kepegawaian-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

/* Sidebar Menu */
.kepegawaian-sidebar {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  height: fit-content;
}
.kepegawaian-sidebar h3 {
  color: var(--dark-green);
  border-bottom: 2px solid #d1d8dd;
  padding-bottom: 10px;
  margin-bottom: 15px;
}
.sidebar-menu {
  list-style: none;
}
.sidebar-menu li {
  margin-bottom: 8px;
}
.sidebar-menu a {
  display: block;
  color: var(--primary-green);
  text-decoration: none;
  padding: 10px;
  border-radius: 5px;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}
.sidebar-menu a:hover,
.sidebar-menu a.active {
  background-color: var(--bg-gray);
  color: #2c3e50;
  border-left-color: #2c3e50;
}

/* Main Content Area */
.kepegawaian-content {
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  min-height: 400px;
}
.kepegawaian-content h2 {
  color: var(--dark-green);
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}
.kepegawaian-content p {
  line-height: 1.8;
  color: var(--primary-green);
  margin-bottom: 15px;
}

/* --- STRUCTURE SECTION --- */
.struktur-img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  border: 1px dashed #ccc;
  margin-top: 15px;
}
.struktur-img img {
  width: 100%;
}

/* --- DATA KEPEGAWAIAN SECTION --- */
.data-table-wrapper {
  overflow-x: auto; /* Allows table to scroll on mobile */
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}
.data-table th,
.data-table td {
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  text-align: left;
}
.data-table th {
  background-color: #2c3e50;
  color: white;
  font-weight: 600;
}
.data-table tr:nth-child(even) {
  background-color: #f9f9f9;
}
.data-table tr:hover {
  background-color: #f1f1f1;
}

/* --- PEGAWAI TERBAIK SECTION (CARDS) --- */
.best-employee-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-top: 20px;
}
.employee-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid #eee;
}
.employee-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.employee-img-wrapper {
  width: 100%;
  height: 280px;
  background-color: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.employee-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.employee-img-wrapper i {
  font-size: 4rem;
  color: #adb5bd;
}
.employee-info {
  padding: 15px;
}
.employee-info h4 {
  margin: 0 0 5px 0;
  color: #2c3e50;
  font-size: 1.1rem;
}
.employee-info .role {
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.employee-info .date-badge {
  display: inline-block;
  background: #ffc107;
  color: #333;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 20px;
}

/* --- Loader --- */
.loader {
  text-align: center;
  padding: 40px;
  color: var(--primary-green);
}

/* Page Banner */
.kependudukan-banner {
  background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
  color: white;
  padding: 40px 0;
  text-align: center;
  border-radius: 0 0 20px 20px;
  margin-bottom: 30px;
}
.kependudukan-banner h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.kependudukan-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Grid System for Data Cards */
.data-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 Columns by default */
  gap: 25px;
  margin-bottom: 40px;
}

.data-card {
  background: white;
  border-radius: 12px;
  padding: 30px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.data-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.data-card .icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  font-size: 2.5rem;
  color: white;
}

.data-card h3 {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 5px;
  font-weight: 600;
}

.data-card .data-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

.data-card .data-subtitle {
  font-size: 0.85rem;
  color: #888;
}

/* Icon Color Variations */
.icon-blue {
  background-color: #0275d8;
}
.icon-green {
  background-color: #4a7c44;
}
.icon-orange {
  background-color: #f0ad4e;
}
.icon-purple {
  background-color: #6f42c1;
}

/* Page Banner */
.kepuasan-banner {
  background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
  color: white;
  padding: 40px 0;
  text-align: center;
  border-radius: 0 0 20px 20px;
  margin-bottom: 30px;
}
.kepuasan-banner h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.kepuasan-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 20px;
}
.breadcrumbs a {
  color: var(--primary-green);
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}

/* Intro Text */
.kepuasan-intro {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  text-align: center;
}
.kepuasan-intro h3 {
  color: var(--dark-green);
  margin-bottom: 10px;
}
.kepuasan-intro p {
  color: var(--primary-green);
  line-height: 1.6;
}

/* Grid System for Survey Cards */
.survey-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-bottom: 40px;
}

.survey-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid #eee;
  display: flex;
  flex-direction: column;
}

.survey-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Card Image */
.survey-img-wrapper {
  width: 100%;
  height: 360px;
  background-color: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.survey-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.survey-img-wrapper .placeholder-icon {
  font-size: 4rem;
  color: #adb5bd;
}

/* Card Content */
.survey-info {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.survey-info .period {
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 5px;
}

.survey-info .year {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 15px;
}

.score-badge {
  display: inline-block;
  background: #00b894;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 50px;
  margin-bottom: 10px;
  box-shadow: 0 2px 5px rgba(0, 184, 148, 0.3);
}

.score-label {
  font-size: 0.8rem;
  color: #777;
  margin-top: 5px;
}

/* Status Color Variations */
.status-excellent {
  border-bottom: 4px solid #00b894;
}
.status-good {
  border-bottom: 4px solid #f0ad4e;
}
.status-average {
  border-bottom: 4px solid #5bc0de;
}
/* Page Banner */
.penilaian-banner {
  background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
  color: white;
  padding: 40px 0;
  text-align: center;
  border-radius: 0 0 20px 20px;
  margin-bottom: 30px;
}
.penilaian-banner h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.penilaian-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
}
/* Intro Text */
.penilaian-intro {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  text-align: center;
}
.penilaian-intro h3 {
  color: var(--dark-green);
  margin-bottom: 10px;
}
.penilaian-intro p {
  color: var(--primary-green);
  line-height: 1.6;
}

/* List Grid */
.penilaian-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.penilaian-item {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.penilaian-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: linear-gradient(
    135deg,
    var(--primary-green),
    var(--dark-green)
  );
}

/* Icon Wrapper */
.penilaian-item .icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  flex-shrink: 0;
}

/* Item Content */
.penilaian-item .item-content {
  flex-grow: 1;
}
.penilaian-item .item-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}
.penilaian-item .item-subtitle {
  font-size: 0.9rem;
  color: #888;
}

/* Action Arrow */
.penilaian-item .action-icon {
  font-size: 1.2rem;
  color: #ccc;
  transition:
    color 0.3s,
    transform 0.3s;
}
.penilaian-item:hover .action-icon {
  color: linear-gradient(135deg, var(--primary-green), var(--dark-green));
  transform: translateX(5px);
}

/* Color Variations for Institutions */
.inst-kemendagri {
  background-color: #d32f2f;
}
.inst-kemenpan {
  background-color: #0275d8;
}
.inst-ombudsman {
  background-color: #8e44ad;
}
.inst-itkab {
  background-color: #00b894;
}
.doc-view-banner {
  background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
  color: white;
  padding: 30px 0;
  text-align: center;
  border-radius: 0 0 20px 20px;
  margin-bottom: 30px;
}
.doc-view-banner h1 {
  font-size: 2rem;
  margin-bottom: 5px;
}
.doc-view-banner p {
  font-size: 1rem;
  opacity: 0.9;
}

.back-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-green);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  margin-bottom: 20px;
  transition: background 0.3s;
}
.back-btn:hover {
  background: var(--dark-green);
}

/* --- CARD GRID LAYOUT --- */
.doc-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-bottom: 40px;
}

/* --- INDIVIDUAL CARD DESIGN --- */
.image-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid #eee;
  display: flex;
  flex-direction: column;
}

.image-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.image-card .img-wrapper {
  width: 100%;
  height: 250px;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.image-card .img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Keeps full document visible */
  padding: 10px;
}

.image-card .card-footer {
  padding: 15px 20px;
  text-align: center;
  border-top: 1px solid #f1f1f1;
}
.image-card .card-footer h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #333;
}
.peraturan-banner {
  background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
  color: white;
  padding: 40px 0;
  text-align: center;
  border-radius: 0 0 20px 20px;
  margin-bottom: 30px;
}
.peraturan-banner h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.peraturan-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Grid Layout */
.peraturan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

/* Card Design */
.doc-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid #eee;
  text-decoration: none;
  color: inherit;
  display: block;
}
.doc-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.doc-card .img-wrapper {
  width: 100%;
  height: 650px;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.doc-card .img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.doc-card .img-wrapper .placeholder {
  font-size: 4rem;
  color: #adb5bd;
  text-align: center;
  padding: 20px;
}

.doc-card .card-footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid #f1f1f1;
}
.doc-card .card-footer h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
}

/* Responsive for Profile */
@media (max-width: 768px) {
  .header-nav-wrapper {
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 15px 0;
  }

  .header-logo-container {
    flex-direction: column; /* Stack logo and text vertically on mobile */
    gap: 5px;
    text-align: center;
  }

  .brand-logo {
    height: 55px;
  }
  .brand-name {
    font-size: 1.4rem;
  }
  .brand-sub {
    font-size: 0.9rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  /* Make dropdown content stack nicely on mobile */
  .dropdown {
    position: static; /* Resets positioning */
  }
  .dropdown-content {
    position: static;
    display: none; /* Keep hidden on mobile, or change to block if you want it always open */
    width: 100%;
    box-shadow: none;
    background-color: transparent;
    padding-left: 10px;
  }
  .dropdown:hover .dropdown-content {
    display: block; /* Or just display block always on mobile if desired */
  }
  .dropdown-content a {
    color: white; /* Make sub-links white on mobile dark bg */
    padding: 8px 10px;
  }
  .dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
  }

  .social-links {
    grid-template-columns: repeat(2, 1fr); /* 2 items per row on mobile */
  }
  .social-item .social-icon {
    font-size: 2rem;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-banner h1 {
    font-size: 2rem;
  }

  .kepegawaian-grid {
    grid-template-columns: 1fr;
  }
  .kepegawaian-banner h1 {
    font-size: 2rem;
  }
  .data-table th,
  .data-table td {
    padding: 8px;
    font-size: 0.9rem;
  }

  .data-grid {
    grid-template-columns: 1fr; /* 1 Column on mobile phones */
  }
  .kependudukan-banner h1 {
    font-size: 2rem;
  }
  .data-card {
    padding: 20px;
  }
  .data-card .data-number {
    font-size: 2rem;
  }
  .kepuasan-banner h1 {
    font-size: 2rem;
  }
  .survey-grid {
    grid-template-columns: 1fr 1fr;
  }
  .penilaian-banner h1 {
    font-size: 2rem;
  }
  .penilaian-item {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding: 20px;
  }
  .penilaian-item .action-icon {
    width: 100%;
    margin-top: 10px;
    text-align: center;
  }
  .penilaian-item .item-content {
    width: 100%;
  }
  .doc-view-banner h1 {
    font-size: 1.5rem;
  }
  .doc-card-grid {
    grid-template-columns: 1fr;
  }
  .image-card .img-wrapper {
    height: 200px;
  }
  .peraturan-banner h1 {
    font-size: 2rem;
  }
  .peraturan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .social-links {
    grid-template-columns: repeat(2, 1fr); /* Stays 2 on small phones */
    gap: 15px;
  }
  .social-item {
    padding: 15px 5px;
  }
  .survey-grid {
    grid-template-columns: 1fr;
  }
  .gov-links {
    grid-template-columns: 1fr;
  }
  .gov-item {
    padding: 20px 15px;
  }
}
