:root {
  --primary-color: #0d944c; /* Green color for Madrasah */
  --secondary-color: #f7a900; /* Yellow accent */
  --dark-color: #1a1a1a;
  --light-color: #ffffff;
  --gray-bg: #f8f9fa;
  --gray-text: #6c757d;
  --font-heading: "Outfit", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--dark-color);
  background-color: var(--light-color);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-padding {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.section-title p {
  color: var(--gray-text);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--secondary-color);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* Base Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--light-color);
  box-shadow: 0 4px 15px rgba(13, 148, 76, 0.3);
}

.btn-primary:hover {
  background-color: #08753a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 76, 0.4);
  color: white;
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--dark-color);
  box-shadow: 0 4px 15px rgba(247, 169, 0, 0.3);
}

.btn-secondary:hover {
  background-color: #e09900;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 169, 0, 0.4);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--light-color);
}

/* Header & Navbar */
.topbar {
  background-color: var(--dark-color);
  color: var(--light-color);
  padding: 8px 0;
  font-size: 0.9rem;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-right {
  display: flex;
  gap: 20px;
}

.topbar-item i {
  color: var(--secondary-color);
  margin-right: 5px;
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icons a {
  color: var(--light-color);
}

.social-icons a:hover {
  color: var(--secondary-color);
}

.header {
  background-color: var(--light-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header.scrolled .container {
  padding: 8px 20px;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  transition: padding 0.3s ease;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.logo-text h1 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 2px;
}

.logo-text p {
  font-size: 0.8rem;
  color: var(--gray-text);
  font-weight: 500;
}

.navbar-nav {
  display: flex;
  gap: 25px;
  align-items: center;
}

.nav-item {
  position: relative;
  padding: 10px 0;
}

.nav-link {
  font-weight: 600;
  color: var(--dark-color);
  font-size: 0.95rem;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link:hover::after,
.nav-item.active .nav-link::after {
  width: 100%;
}

.nav-item.active .nav-link {
  color: var(--primary-color);
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--light-color);
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: var(--transition);
  z-index: 100;
  padding: 10px 0;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 10px 20px;
  color: var(--dark-color);
  font-weight: 500;
  transition: var(--transition);
}

.dropdown-item:hover {
  background-color: rgba(13, 148, 76, 0.05);
  color: var(--primary-color);
  padding-left: 25px;
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("https://images.unsplash.com/photo-1577896851231-70ef18881754?q=80&w=1200&auto=format,compress&fm=webp&fit=crop")
      center/cover no-repeat;
  color: var(--light-color);
}

.hero-content {
  max-width: 800px;
  text-align: center;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background-color: rgba(247, 169, 0, 0.2);
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
  padding: 6px 16px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero h1 span {
  color: var(--secondary-color);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* Stats Section */
.stats {
  background-color: var(--light-color);
  padding: 40px 0;
  margin-top: -60px;
  position: relative;
  z-index: 10;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  background: var(--light-color);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 30px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  border-right: 1px solid #eee;
}

.stat-item:last-child {
  border-right: none;
}

.stat-icon {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-number span {
  color: var(--secondary-color);
}

.stat-text {
  font-size: 1rem;
  color: var(--gray-text);
  font-weight: 500;
}

/* Features/Programs Section */
.programs {
  background-color: var(--gray-bg);
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.program-card {
  background: var(--light-color);
  border-radius: var(--radius-md);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border-bottom: 4px solid transparent;
}

.program-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--primary-color);
}

.program-icon {
  width: 80px;
  height: 80px;
  background-color: rgba(13, 148, 76, 0.1);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
  transition: var(--transition);
}

.program-card:hover .program-icon {
  background-color: var(--primary-color);
  color: var(--light-color);
}

.program-card h3 {
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.program-card p {
  color: var(--gray-text);
  margin-bottom: 20px;
}

.program-link {
  color: var(--primary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.program-link:hover {
  gap: 10px;
}

/* DUDI / Mitra Section */
.mitra {
  background-color: var(--light-color);
}

.mitra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 30px;
  align-items: center;
}

.mitra-item {
  padding: 20px;
  background: var(--light-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  text-align: center;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: var(--transition);
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mitra-item:hover {
  filter: grayscale(0%);
  opacity: 1;
  box-shadow: var(--shadow-md);
  transform: scale(1.05);
}

.mitra-img {
  max-height: 80px;
  max-width: 100px;
}

/* PPDB Banner Section */
.ppdb-banner {
  background: linear-gradient(135deg, var(--primary-color) 0%, #064a25 100%);
  color: var(--light-color);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.ppdb-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" stroke="rgba(255,255,255,0.05)" stroke-width="2" fill="none"/></svg>')
    repeat;
  opacity: 0.5;
}

.ppdb-content {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.ppdb-text h2 {
  font-size: 2.8rem;
  margin-bottom: 15px;
}

.ppdb-text h2 span {
  color: var(--secondary-color);
}

.ppdb-text p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  opacity: 0.9;
  max-width: 500px;
}

/* News Section */
.news {
  background-color: var(--gray-bg);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.news-card {
  background: var(--light-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.news-img {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.news-card:hover .news-img img {
  transform: scale(1.1);
}

.news-date {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--secondary-color);
  color: var(--dark-color);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.news-content {
  padding: 25px;
}

.news-meta {
  display: flex;
  gap: 15px;
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.news-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.news-title {
  font-size: 1.25rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.news-title a {
  color: var(--dark-color);
}

.news-title a:hover {
  color: var(--primary-color);
}

.news-desc {
  color: var(--gray-text);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.read-more {
  font-weight: 600;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.read-more:hover {
  color: var(--secondary-color);
  gap: 10px;
}

/* Footer Section */
.footer {
  background-color: #0b1c12;
  color: var(--light-color);
  padding: 80px 0 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-widget h4 {
  color: var(--secondary-color);
  font-size: 1.2rem;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.footer-widget h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.footer-logo img {
  height: 60px;
}

.footer-widget p {
  color: #a0a0a0;
  margin-bottom: 20px;
}

.footer-contact li {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  color: #a0a0a0;
}

.footer-contact i {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-top: 3px;
}

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

.footer-links a {
  color: #a0a0a0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links a::before {
  content: "\f105";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--primary-color);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
}

.map-container {
  height: 200px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.footer-bottom {
  background-color: #05140b;
  padding: 20px 0;
  text-align: center;
  color: #888;
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--light-color);
}

.footer-bottom a:hover {
  color: var(--primary-color);
}

/* Page Banner */
.page-banner {
  background:
    linear-gradient(rgba(13, 148, 76, 0.8), rgba(6, 74, 37, 0.9)),
    url("https://images.unsplash.com/photo-1577896851231-70ef18881754?q=80&w=1200&auto=format,compress&fm=webp&fit=crop")
      center/cover;
  padding: 100px 0 60px;
  text-align: center;
  color: var(--light-color);
}

.page-title {
  font-size: 3rem;
  margin-bottom: 15px;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
}

.breadcrumb a {
  color: var(--secondary-color);
}

.breadcrumb a:hover {
  color: var(--light-color);
}

/* News Detail Page & Article Layout */
.article-layout {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 40px;
}

.article-main {
  background: var(--light-color);
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.article-hero {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 30px;
}

.article-hero img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: var(--transition);
}

.article-hero:hover img {
  transform: scale(1.05);
}

.article-header {
  margin-bottom: 30px;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}

.article-title {
  font-size: 2.5rem;
  color: var(--dark-color);
  margin-bottom: 15px;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  gap: 20px;
  color: var(--gray-text);
  font-size: 0.95rem;
  align-items: center;
  flex-wrap: wrap;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-meta i {
  color: var(--primary-color);
}

.article-meta .category-badge {
  background: rgba(13, 148, 76, 0.1);
  color: var(--primary-color);
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #444;
}

.article-content p {
  margin-bottom: 25px;
  text-align: justify;
}

.article-content img {
  border-radius: var(--radius-sm);
  margin: 30px 0;
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #eee;
  flex-wrap: wrap;
  gap: 20px;
}

.social-share {
  display: flex;
  gap: 10px;
  align-items: center;
}

.social-share span {
  font-weight: 600;
  color: var(--dark-color);
  margin-right: 10px;
}

.btn-share {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition);
}

.btn-share.fb {
  background: #3b5998;
}
.btn-share.tw {
  background: #1da1f2;
}
.btn-share.wa {
  background: #25d366;
}

.btn-share:hover {
  transform: translateY(-5px);
  opacity: 0.9;
  color: white;
}

/* Sidebar Styles */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sidebar-widget {
  background: var(--light-color);
  padding: 30px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--primary-color);
}

.widget-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--dark-color);
  position: relative;
  padding-bottom: 10px;
}

.widget-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: 2px;
}

.recent-post {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.recent-post:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.recent-post img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.recent-info h4 {
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 5px;
}

.recent-info h4 a {
  color: var(--dark-color);
  transition: color 0.3s;
}

.recent-info h4 a:hover {
  color: var(--primary-color);
}

.recent-date {
  font-size: 0.85rem;
  color: var(--gray-text);
}
.recent-date i {
  color: var(--secondary-color);
}

/* Enhancements for Animations */
.nav-item,
.app-card,
.mitra-box-page {
  transition: all 0.4s ease;
}

/* Base fade config fixes for specific layouts */
[data-aos] {
  pointer-events: auto !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 3rem;
  }
  .footer-top {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-title {
    font-size: 2rem;
  }
  .article-main {
    padding: 25px;
  }

  .topbar {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }

  .navbar-nav {
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--light-color);
    box-shadow: var(--shadow-lg);
    padding: 20px 0;
    gap: 0;
    display: none;
  }

  .navbar-nav.active {
    display: flex;
  }

  .nav-item {
    width: 100%;
    padding: 0;
  }

  .nav-link {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: var(--gray-bg);
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    width: 100%;
  }

  .dropdown.active .dropdown-menu {
    display: block;
  }

  .stats {
    margin-top: 0;
    padding: 40px 0;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .stat-item {
    border-right: none;
    border-bottom: 1px solid #eee;
  }
  .stat-item:nth-last-child(-n + 2) {
    border-bottom: none;
  }

  .ppdb-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero-buttons {
    flex-direction: column;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .stat-item {
    border-bottom: 1px solid #eee;
  }
  .stat-item:last-child {
    border-bottom: none;
  }
  .section-title h2 {
    font-size: 2rem;
  }
}
