/* Google Fonts: Outfit untuk judul, Inter untuk teks body */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --color-dark-brown: #6A453B;
  --color-gold: #CEAA7A;
  --color-cream: #E9E2CE;
  --color-light-blue: #7399BD;
  --color-dark-blue: #1C477F;
  
  /* Additional neutral colors */
  --color-white: #FFFFFF;
  --color-light-gray: #f5f5f5;
  --color-text-main: #333333;
  --color-text-muted: #666666;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;

  /* Box Shadows for premium feel */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--color-cream);
  color: var(--color-text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Utility Classes */
.text-center { text-align: center; }
.section-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-dark-blue);
}
.section-subtitle {
  color: var(--color-dark-brown);
  font-size: 1.1rem;
  margin-bottom: var(--spacing-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.section-padding { padding: var(--spacing-xl) 0; }
.bg-white { background-color: var(--color-white); }
.bg-blue { background-color: var(--color-dark-blue); color: var(--color-white); }
.bg-blue h2 { color: var(--color-white); }
.bg-blue .section-subtitle { color: var(--color-light-blue); }

/* Button */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-family: var(--font-heading);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--color-gold);
  color: var(--color-dark-brown);
}
.btn-primary:hover {
  background-color: var(--color-dark-brown);
  color: var(--color-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--color-gold);
  color: var(--color-gold);
}
.btn-secondary:hover {
  background-color: var(--color-gold);
  color: var(--color-dark-brown);
}

/* Top Bar */
.top-bar {
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  padding: 0.5rem 0;
  position: relative;
}
.top-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-text span {
  font-size: 0.7rem;
  color: var(--color-dark-blue);
  letter-spacing: 1px;
}
.logo-text strong {
  font-size: 1.1rem;
  color: var(--color-dark-blue);
  font-family: var(--font-heading);
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-main);
  position: relative;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--color-dark-blue);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-gold);
}
.text-xs {
  font-size: 0.7rem;
  margin-left: 2px;
}

.social-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
  border-left: 1px solid #ddd;
  padding-left: 1.5rem;
}
.social-icons a, .theme-toggle, .search-icon {
  color: var(--color-text-main);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.3s ease;
}
.social-icons a:hover, .theme-toggle:hover, .search-icon:hover {
  color: var(--color-dark-blue);
}

.theme-toggle {
  background: #f0f0f0;
  padding: 5px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  color: var(--color-dark-blue);
  cursor: pointer;
}
.logo-img {
  height: 100px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
}

/* Hero Slider Section */
.hero-slider-section {
  padding: var(--spacing-lg) 0 0 0;
  background-color: var(--color-light-gray);
}
.slider-container {
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.main-slide {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  background-color: var(--color-dark-brown);
}
.main-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}
.slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 3rem 2rem 2rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
  color: var(--color-white);
}
.slide-badge {
  display: inline-block;
  background-color: #00A651; /* A distinctive green or use gold */
  color: white;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.slide-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-white);
  line-height: 1.3;
  max-width: 75%;
}
.slide-meta {
  font-size: 0.8rem;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.slide-meta span {
  color: var(--color-white);
  font-weight: 600;
}

.slider-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
}
.slider-arrow {
  background: rgba(0,0,0,0.7);
  color: white;
  border: none;
  padding: 15px;
  cursor: pointer;
  transition: background 0.3s;
}
.slider-arrow:hover {
  background: var(--color-gold);
}

.thumbnails-row {
  display: flex;
  width: 100%;
  overflow-x: auto;
  background: #1a1a1a;
}
.thumbnail {
  flex: 1;
  min-width: 150px;
  height: 100px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s;
  border-right: 1px solid #333;
}
.thumbnail:last-child {
  border-right: none;
}
.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumbnail:hover, .thumbnail.active {
  opacity: 1;
}


/* News Ticker / Running Text */
.news-ticker-wrapper {
  display: flex;
  background-color: var(--color-dark-blue);
  color: white;
  margin-bottom: 2rem;
  overflow: hidden;
  align-items: stretch; /* So label and content stretch to same height */
}
.ticker-label {
  background-color: var(--color-gold);
  color: var(--color-dark-blue);
  padding: 10px 30px 10px 15px;
  font-weight: bold;
  white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%);
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
}
.ticker-content {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.ticker-content marquee {
  display: flex;
  align-items: center;
}
.ticker-item {
  font-size: 0.95rem;
  padding: 0 15px;
}
.ticker-divider {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}

/* Magazine Layout / News Section */
#berita {
  padding-top: var(--spacing-md);
}
.magazine-layout {
  display: flex;
  gap: 2rem;
}
.main-content {
  flex: 7;
}
.sidebar {
  flex: 3;
  position: sticky;
  top: 100px;
  height: fit-content;
  align-self: flex-start;
}

.section-header-simple {
  border-bottom: 2px solid var(--color-light-gray);
  margin-bottom: 1.5rem;
}
.section-header-simple h3 {
  display: inline-block;
  font-size: 1.2rem;
  border-bottom: 2px solid var(--color-dark-blue);
  padding-bottom: 0.5rem;
  margin-bottom: -2px;
}

/* Featured Post */
.featured-post {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.featured-img-wrap {
  flex: 1;
  position: relative;
  min-height: 250px;
}
.featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}
.cat-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background-color: #00A651;
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 4px 8px;
  text-transform: uppercase;
}
.featured-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-content .post-title {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.featured-content .post-title a:hover {
  color: var(--color-gold);
}
.post-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.post-excerpt {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}
.btn-read-more {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-main);
  border: 1px solid #ddd;
  padding: 8px 15px;
  text-transform: uppercase;
  align-self: flex-start;
}
.btn-read-more:hover {
  background-color: var(--color-dark-blue);
  color: white;
  border-color: var(--color-dark-blue);
}

/* Grid Posts */
.grid-posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}
.grid-post {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.grid-post-img {
  width: 100%;
  height: 200px;
  position: relative;
}
.grid-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}
.grid-post-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
}
.grid-post-title a {
  color: var(--color-dark);
}
.grid-post-title a:hover {
  color: var(--color-primary);
}

/* Vertical Post List */
.vertical-post-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.vertical-post {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}
.vertical-post:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.v-post-img {
  flex: 0 0 250px;
  height: 160px;
  position: relative;
}
.v-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}
.v-post-content {
  flex: 1;
}
.v-post-title {
  font-size: 1.3rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.v-post-title a:hover {
  color: var(--color-gold);
}
.v-post-excerpt {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.btn-page {
  background: transparent;
  border: 1px solid #ddd;
  color: var(--color-text-muted);
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-page:hover {
  border-color: var(--color-dark-blue);
  color: var(--color-dark-blue);
}

/* Sidebar */
.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 1.5rem;
}
.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 0;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text-muted);
  cursor: pointer;
}
.tab-btn.active {
  color: var(--color-dark-blue);
  border-bottom-color: var(--color-dark-blue);
}
.tab-btn:hover {
  color: var(--color-dark-blue);
}

.list-post {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid #eee;
}
.list-post img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}
.list-post-info {
  flex: 1;
}

/* Footer */
.footer {
  background-color: var(--color-dark-blue);
  color: var(--color-cream);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-logo {
  font-size: 1.5rem;
  color: var(--color-white);
  margin-bottom: 1rem;
}
.footer-logo span { color: var(--color-gold); }
.footer-desc {
  color: var(--color-light-blue);
  margin-bottom: 1.5rem;
  max-width: 400px;
}
.footer-heading {
  font-size: 1.2rem;
  color: var(--color-white);
  margin-bottom: 1.5rem;
}
.footer-links li {
  margin-bottom: 0.8rem;
}
.footer-links a {
  color: var(--color-light-blue);
}
.footer-links a:hover {
  color: var(--color-gold);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  text-align: center;
  color: var(--color-light-blue);
  font-size: 0.9rem;
}

/* Gallery & Video Sections */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.gallery-item {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.gallery-item:hover img {
  transform: scale(1.05);
}
.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: #27ae60;
  font-weight: 600;
  text-align: center;
  font-size: 0.9rem;
  letter-spacing: 2px;
}
.gal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(39, 174, 96, 0.8);
  color: white;
  border: none;
  width: 30px;
  height: 40px;
  cursor: pointer;
  z-index: 2;
}
.left-nav { left: 0; }
.right-nav { right: 0; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.video-item {
  position: relative;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  height: 180px;
}
.video-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.video-item:hover img {
  opacity: 0.5;
}
.yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ff0000;
  font-size: 3.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.video-title {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  color: white;
  font-size: 0.9rem;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* Sidebar Popular List */
.popular-item a {
  color: var(--color-text-main);
}
.popular-item a:hover {
  color: var(--color-gold);
}
.popular-item .post-meta-small {
  color: #999;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--color-white);
    flex-direction: column;
    padding: 0 2rem;
    box-shadow: var(--shadow-md);
    z-index: 9999;
    
    /* Animation setup */
    display: flex;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
  }
  .nav-links.active {
    max-height: 500px;
    opacity: 1;
    padding: 2rem;
  }
  .social-icons {
    display: none;
  }
  .logo-text strong {
    font-size: 0.9rem;
  }
  .logo-img {
    height: 55px;
    width: auto;
    max-width: 160px;
  }
  .mobile-menu-btn {
    display: block;
    font-size: 1.5rem;
  }
  
  /* Hero Slider adjustments for mobile */
  .slider-container {
    height: auto;
    border-radius: 8px;
  }
  .main-slide {
    height: 300px;
  }
  .slide-overlay {
    padding: 20px;
  }
  .slide-title {
    font-size: 1.2rem;
    margin-bottom: 5px;
  }
  .slide-meta {
    font-size: 0.8rem;
  }
  .thumbnails-row {
    padding: 10px;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none; /* Hide scrollbar for cleaner look */
  }
  .thumbnails-row::-webkit-scrollbar {
    display: none;
  }
  .thumbnail {
    flex: 0 0 28%;
    height: 60px;
  }
  .thumbnail img {
    height: 60px;
  }
  
  /* Layout adjustments */
  .magazine-layout {
    flex-direction: column;
    gap: 2rem;
  }
  .main-content, .sidebar {
    width: 100%;
  }
  .featured-post {
    flex-direction: row;
    gap: 1rem;
    align-items: center;
  }
  .featured-img-wrap {
    flex: 0 0 40%;
    height: 120px;
    min-height: unset;
  }
  .featured-img-wrap .cat-badge {
    font-size: 0.6rem;
    padding: 3px 6px;
    bottom: 5px;
    left: 5px;
  }
  .featured-content .post-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }
  .featured-content .post-meta {
    font-size: 0.75rem;
    color: #777;
  }
  .mobile-hidden-excerpt, 
  .featured-content .btn-read-more {
    display: none;
  }
  
  .vertical-post {
    flex-direction: column;
    gap: 1rem;
  }
  .v-post-img {
    flex: auto;
    width: 100%;
    height: 220px;
    position: relative; /* For badge overlay if added later */
  }
  .v-post-title {
    font-size: 1.3rem;
  }
  .v-post-excerpt {
    display: none;
  }
  
  .list-post {
    flex-direction: row;
    align-items: center;
  }
  .list-post img {
    width: 100px;
    height: 75px;
  }
  
  .grid-posts,
  .gallery-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .main-slide {
    height: 250px;
  }
  .slide-title {
    font-size: 1rem;
  }
  .news-ticker-wrapper {
    flex-direction: row;
    border-radius: 4px;
    overflow: hidden;
  }
  .ticker-label {
    font-size: 0.75rem;
    padding: 8px 24px 8px 10px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .ticker-content {
    font-size: 0.8rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
}

/* ===================== DARK MODE ===================== */
body.dark-mode {
  background-color: #0f1117;
  color: #e0e0e0;
}
body.dark-mode .top-bar {
  background: #1a1d27;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
body.dark-mode .nav-links a {
  color: #ccc;
}
body.dark-mode .nav-links a:hover,
body.dark-mode .nav-links a.active {
  color: var(--color-gold);
}
body.dark-mode .nav-links {
  background: #1a1d27;
}
body.dark-mode .theme-toggle {
  background: #2a2d3a;
  color: #f0c040;
}
body.dark-mode .theme-toggle i {
  color: #f0c040;
}
body.dark-mode .hero-slider-section,
body.dark-mode .section-padding {
  background-color: #0f1117;
}
body.dark-mode .bg-white {
  background-color: #0f1117 !important;
}
body.dark-mode .slider-container,
body.dark-mode .card {
  background: #1a1d27;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
body.dark-mode .card-header {
  background: #12151f;
  border-bottom-color: #2d3048;
  color: #e0e0e0;
}
body.dark-mode .card-header h3 {
  color: #e0e0e0;
}
body.dark-mode .news-ticker-wrapper {
  background-color: #12151f;
}
body.dark-mode .section-header-simple h3 {
  color: #e0e0e0;
}
body.dark-mode .section-header-simple {
  border-bottom-color: #2d3048;
}
body.dark-mode .featured-post,
body.dark-mode .grid-post,
body.dark-mode .vertical-post,
body.dark-mode .list-post {
  background: #1a1d27;
  border-color: #2d3048;
}
body.dark-mode .post-title a,
body.dark-mode .grid-post-title a,
body.dark-mode .v-post-title a,
body.dark-mode .post-title-small a {
  color: #e0e0e0;
}
body.dark-mode .post-title a:hover,
body.dark-mode .grid-post-title a:hover,
body.dark-mode .v-post-title a:hover {
  color: var(--color-gold);
}
body.dark-mode .post-meta,
body.dark-mode .post-meta-small,
body.dark-mode .post-excerpt,
body.dark-mode .v-post-excerpt {
  color: #888;
}
body.dark-mode .sidebar-tabs {
  border-bottom-color: #2d3048;
}
body.dark-mode .tab-btn {
  color: #aaa;
}
body.dark-mode .tab-btn.active {
  color: var(--color-gold);
  border-bottom-color: var(--color-gold);
}
body.dark-mode .popular-item {
  border-top-color: #2d3048;
}
body.dark-mode .footer {
  background: #12151f;
}
body.dark-mode .footer-logo span {
  color: var(--color-gold);
}
body.dark-mode .footer-desc,
body.dark-mode .footer-links li,
body.dark-mode .footer-links a {
  color: #888;
}
body.dark-mode .footer-bottom {
  border-top-color: #2d3048;
  color: #555;
}
body.dark-mode .pagination .btn-page {
  background: #1a1d27;
  color: #aaa;
  border-color: #2d3048;
}
body.dark-mode .gallery-item,
body.dark-mode .video-item {
  background: #1a1d27;
}
body.dark-mode .sidebar-content {
  background: #1a1d27;
}
body.dark-mode .admin-table th {
  background: #12151f;
  color: #ccc;
  border-color: #2d3048;
}
body.dark-mode .admin-table td {
  border-color: #2d3048;
  color: #ccc;
}
body.dark-mode .admin-table tr:hover {
  background: #22253a;
}

