/* 
  Opini Demokrasi & Politik - Style System
  Theme: Dark Obsidian with Glowing Emerald Green Gradients
*/

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

:root {
  /* Color Tokens */
  --bg-primary: #040705;
  --bg-secondary: #0a120c;
  --bg-card: rgba(14, 26, 19, 0.65);
  --bg-card-hover: rgba(20, 38, 28, 0.85);

  --emerald-primary: #10b981;
  --emerald-light: #34d399;
  --emerald-dark: #047857;
  --emerald-glow: rgba(16, 185, 129, 0.35);
  --emerald-subtle: rgba(16, 185, 129, 0.12);

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-emerald: #6ee7b7;

  --border-color: rgba(16, 185, 129, 0.18);
  --border-highlight: rgba(52, 211, 153, 0.4);

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.18);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 10% 40%, rgba(5, 150, 105, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(2, 44, 34, 0.2) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

a {
  color: var(--emerald-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #a7f3d0;
}

p {
  margin-bottom: 1rem;
}

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

/* Layout Utility */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 2.5rem 0;
}

.section + .section {
  padding-top: 0.75rem;
}

/* Gradient Text Effect */
.gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, var(--emerald-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-green {
  background: linear-gradient(135deg, var(--emerald-light) 0%, var(--emerald-primary) 50%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-smooth);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald-primary) 0%, var(--emerald-dark) 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--emerald-light) 0%, var(--emerald-primary) 100%);
  color: #040705;
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  background: rgba(10, 18, 12, 0.5);
  border-color: var(--border-color);
  color: var(--text-main);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  border-color: var(--emerald-light);
  background: var(--emerald-subtle);
  color: var(--emerald-light);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(4, 7, 5, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-smooth);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald-primary) 0%, #022c22 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.2rem;
  border: 1px solid var(--border-highlight);
  box-shadow: var(--shadow-glow);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--emerald-light), var(--emerald-primary));
  border-radius: 2px;
  box-shadow: 0 0 10px var(--emerald-primary);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 3.5rem 0 2rem;
  text-align: center;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  background: var(--emerald-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--emerald-light);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 900px;
  margin: 0 auto 1.5rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

/* Article Cards Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}

.article-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  height: 210px;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .card-image {
  transform: scale(1.06);
}

.category-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.3rem 0.8rem;
  background: rgba(4, 7, 5, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--emerald-light);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
  transition: color var(--transition-fast);
}

.article-card:hover .card-title {
  color: var(--emerald-light);
}

.card-summary {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  font-weight: 500;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--emerald-dark);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Featured Article Big Card */
.featured-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 380px;
  margin-bottom: 1rem;
}

.featured-card .card-image-wrap {
  height: 100%;
}

.featured-card .card-body {
  padding: 2.5rem;
}

.featured-card .card-title {
  font-size: 1.8rem;
}

/* Reader View (Detail Artikel) */
.reader-container {
  max-width: 820px;
  margin: 0 auto;
}

.reader-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.reader-category {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: var(--emerald-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--emerald-light);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.reader-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.reader-meta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.reader-cover {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 3rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.reader-content {
  font-size: 1.125rem;
  line-height: 1.85;
  color: #e5e7eb;
}

.reader-content p {
  margin-bottom: 1.8rem;
}

.reader-content h2,
.reader-content h3 {
  margin: 2.5rem 0 1rem;
  color: #ffffff;
}

.reader-content blockquote {
  border-left: 4px solid var(--emerald-primary);
  padding: 1.2rem 1.8rem;
  background: rgba(16, 185, 129, 0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-emerald);
}

.share-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin: 3rem 0;
}

.share-buttons {
  display: flex;
  gap: 0.75rem;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.share-btn:hover {
  background: var(--emerald-primary);
  color: #ffffff;
  border-color: var(--emerald-primary);
}

/* Comments Section */
.comments-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-color);
}

.comment-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.comment-author {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.comment-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Forms (Search, Contact, Comment, Admin) */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.2rem;
  background: rgba(10, 18, 12, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--emerald-light);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  background: rgba(10, 18, 12, 0.95);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Admin Dashboard Table */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(12px);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  padding: 1rem;
  background: rgba(4, 7, 5, 0.6);
  color: var(--emerald-light);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 1.1rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 0.95rem;
  vertical-align: middle;
}

.custom-table tr:hover td {
  background: rgba(16, 185, 129, 0.05);
}

/* Footer */
.footer {
  margin-top: auto;
  background: #020403;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 1rem;
  max-width: 400px;
}

.footer-title {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  color: #ffffff;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--emerald-light);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .featured-card {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(4, 7, 5, 0.96);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    padding: 3rem 2rem;
    transition: left var(--transition-smooth);
  }

  .nav-menu.active {
    left: 0;
  }

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

/* Mode Terang */
body.light-mode {
  background-color: #ffffff;
  color: #1f2937;
}

body.light-mode .admin-card,
body.light-mode .article-card {
  background-color: #f3f4f6;
  color: #1f2937;
}

body.light-mode .card-title a {
  color: #111827;
}