/* ==========================================================================
   PORTAL DATA TERBUKA KABUPATEN TEGAL - MODERN GOVERNMENT THEME
   Author: Antigravity IDE
   Version: 2.0 (Satu Data Indonesia Standard)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

:root {
  --primary-navy: #0b1f44;
  --primary-blue: #1d4ed8;
  --primary-light: #3b82f6;
  --accent-emerald: #059669;
  --accent-cyan: #06b6d4;
  --accent-amber: #d97706;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -5px rgba(15,23,42,0.08), 0 8px 10px -6px rgba(15,23,42,0.04);
  --shadow-hover: 0 20px 25px -5px rgba(29,78,216,0.12), 0 8px 10px -6px rgba(29,78,216,0.08);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  background-color: var(--bg-main) !important;
  color: var(--text-dark) !important;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   1. TOP BAR & NAVIGATION (HEADER)
   -------------------------------------------------------------------------- */
.account-masthead {
  background: #071530 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 0;
  font-size: 0.825rem;
}

.account-masthead a {
  color: #cbd5e1 !important;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}

.account-masthead a:hover {
  color: #38bdf8 !important;
}

.account-masthead .gov-banner {
  color: #94a3b8;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-masthead .gov-banner img {
  height: 16px;
  width: auto;
}

header.masthead {
  background: #ffffff !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06) !important;
  border-bottom: 1px solid #edf2f7;
  position: sticky;
  top: 0;
  z-index: 1020;
  padding: 12px 0;
}

header.masthead .navbar {
  padding: 0;
}

header.masthead .logo img {
  max-height: 48px;
  width: auto;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none !important;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.navbar-nav .nav-link {
  font-weight: 600;
  color: #334155 !important;
  padding: 8px 16px !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-size: 0.925rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-item.active .nav-link {
  color: var(--primary-blue) !important;
  background-color: #eff6ff;
}

.site-search input {
  border-radius: 50px !important;
  border: 1px solid #cbd5e1 !important;
  padding: 8px 18px !important;
  font-size: 0.875rem;
  transition: var(--transition);
}

.site-search input:focus {
  border-color: var(--primary-blue) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* --------------------------------------------------------------------------
   2. HERO SECTION & QUICK SEARCH
   -------------------------------------------------------------------------- */
.portal-hero {
  background: linear-gradient(135deg, #071530 0%, #0f2b5c 50%, #1e3a8a 100%);
  position: relative;
  overflow: hidden;
  padding: 70px 0 60px;
  color: #ffffff;
}

.portal-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.portal-hero .hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.825rem;
  font-weight: 600;
  color: #38bdf8;
  margin-bottom: 20px;
}

.portal-hero h1.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.portal-hero h1.hero-title span {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.portal-hero p.hero-subtitle {
  font-size: 1.15rem;
  color: #cbd5e1;
  max-width: 650px;
  margin: 0 auto 36px;
  font-weight: 400;
}

.hero-search-box {
  max-width: 720px;
  margin: 0 auto 28px;
  background: #ffffff;
  padding: 6px;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
}

.hero-search-box .search-icon {
  padding: 0 16px;
  color: #94a3b8;
  font-size: 1.25rem;
}

.hero-search-box input {
  flex: 1;
  border: none !important;
  outline: none !important;
  font-size: 1.05rem;
  padding: 12px 6px;
  font-family: inherit;
  color: var(--text-dark);
}

.hero-search-box button {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  border: none !important;
  padding: 14px 28px !important;
  border-radius: var(--radius-lg) !important;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.hero-search-box button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.quick-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.quick-tags .tag-pill {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 4px 12px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.quick-tags .tag-pill:hover {
  background: #ffffff;
  color: var(--primary-navy);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   3. STATS COUNTER BAR
   -------------------------------------------------------------------------- */
.stats-container {
  margin-top: -35px;
  position: relative;
  z-index: 10;
  margin-bottom: 50px;
}

.stat-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: #bfdbfe;
}

.stat-icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.stat-icon.icon-datasets { background: #eff6ff; color: #2563eb; }
.stat-icon.icon-orgs { background: #f0fdf4; color: #16a34a; }
.stat-icon.icon-topics { background: #fef3c7; color: #d97706; }

.stat-info h3 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin: 0;
  line-height: 1.1;
}

.stat-info p {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   4. SECTOR / TOPIC EXPLORER GRID
   -------------------------------------------------------------------------- */
.section-title-wrap {
  text-align: center;
  margin-bottom: 40px;
}

.section-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-blue);
  background: #eff6ff;
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-navy);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.topic-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  text-decoration: none !important;
  color: var(--text-dark) !important;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.topic-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.topic-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  margin-bottom: 14px;
  transition: var(--transition);
}

.topic-card:hover .topic-icon-wrap {
  background: #eff6ff;
  transform: scale(1.1);
}

.topic-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--primary-navy);
}

.topic-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* --------------------------------------------------------------------------
   5. FEATURED / RECENT DATASETS SHOWCASE
   -------------------------------------------------------------------------- */
.dataset-showcase {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  margin-bottom: 60px;
}

.dataset-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.modern-dataset-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.modern-dataset-card:hover {
  border-color: #93c5fd;
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-org-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary-blue);
  margin-bottom: 10px;
}

.card-dataset-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 10px;
  line-height: 1.35;
}

.card-dataset-title a {
  color: inherit;
  text-decoration: none;
}

.card-dataset-title a:hover {
  color: var(--primary-blue);
}

.card-dataset-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.format-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-format {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #334155;
}

.badge-format.csv { background: #dcfce7; color: #15803d; }
.badge-format.xlsx, .badge-format.xls { background: #dbeafe; color: #1d4ed8; }
.badge-format.pdf { background: #fee2e2; color: #b91c1c; }
.badge-format.json, .badge-format.api { background: #fef3c7; color: #b45309; }

/* --------------------------------------------------------------------------
   6. PRINCIPLES & BENEFIT SECTION
   -------------------------------------------------------------------------- */
.principles-section {
  padding: 30px 0 60px;
}

.principle-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
}

.principle-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}

.principle-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: #eff6ff;
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 18px;
}

.principle-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 10px;
}

.principle-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   7. FOOTER
   -------------------------------------------------------------------------- */
footer.site-footer {
  background: #071530 !important;
  color: #94a3b8 !important;
  padding: 60px 0 30px !important;
  border-top: 4px solid var(--primary-blue);
}

footer.site-footer h5 {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

footer.site-footer p {
  font-size: 0.875rem;
  line-height: 1.7;
}

footer.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer.site-footer ul li {
  margin-bottom: 10px;
}

footer.site-footer ul li a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition);
}

footer.site-footer ul li a:hover {
  color: #38bdf8;
  padding-left: 4px;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.825rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 768px) {
  .portal-hero h1.hero-title {
    font-size: 2rem;
  }
  .stat-card {
    margin-bottom: 16px;
  }
  .dataset-showcase {
    padding: 20px;
  }
}
