/* ==========================================================================
   STYLE.CSS - ICCRI NET Publikasi Page Stylesheet
   Theme: Premium Agriculture (Forest Green, Cocoa, Gold Accent)
   Standards: WCAG 2.1 Level AA Compliant
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* --- Custom Properties / Design Tokens --- */
:root {
  --color-primary: #123524;         /* Deep Forest Green (Main Brand) */
  --color-primary-light: #1f5038;   /* Forest Green Medium */
  --color-secondary: #5c3e35;       /* Cocoa Brown */
  --color-accent: #d49a17;         /* Gold Accent */
  --color-accent-hover: #b8820e;   /* Darker Gold */
  
  /* Neutrals */
  --color-bg-light: #fafaf7;       /* Soft Warm White */
  --color-bg-card: #ffffff;        /* Pure White for cards */
  --color-bg-alt: #f1f3f0;         /* Light Gray-Green tint */
  --color-text-dark: #1f2937;      /* Dark Charcoal */
  --color-text-muted: #4b5563;     /* Muted Gray */
  --color-text-light: #ffffff;     /* White */
  --color-border: #dcdfdc;         /* Soft Border */
  
  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Layout */
  --container-max-width: 1200px;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --shadow-sm: 0 2px 4px rgba(18, 53, 36, 0.05);
  --shadow-md: 0 10px 20px rgba(18, 53, 36, 0.08);
  --shadow-lg: 0 20px 40px rgba(18, 53, 36, 0.12);
}

/* --- Base & Reset Rules --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
  font-family: var(--font-body);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* --- Accessibility Focus Indicator (WCAG 2.4.7) --- */
*:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

/* Skip-to-content Link (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--color-accent);
  color: var(--color-primary);
  padding: 12px 24px;
  z-index: 9999;
  font-weight: 700;
  border-radius: var(--border-radius-sm);
  transition: top 0.2s ease;
  text-decoration: none;
}

.skip-link:focus {
  top: 20px;
}

/* --- Global Layout & Helper Classes --- */
.el-section {
  padding: 80px 0;
  position: relative;
}

.el-section.bg-alt {
  background-color: var(--color-bg-alt);
}

.el-container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--border-radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  min-height: 48px; /* Touch target (WCAG) */
  text-align: center;
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

.btn-accent:hover {
  background-color: var(--color-accent-hover);
  color: var(--color-primary);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 154, 23, 0.3);
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-light);
}

.btn-primary:hover {
  background-color: var(--color-primary-light);
  color: var(--color-text-light);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 0.5em;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; }
h3 { font-size: clamp(1.4rem, 3vw, 1.8rem); }

p {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.text-center { text-align: center; }

/* --- Header / Navigation Styling --- */
.site-header {
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.top-bar {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  padding: 8px 0;
  font-size: 0.85rem;
  font-weight: 500;
}

.top-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-info {
  display: flex;
  gap: 20px;
}

.top-bar-info span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-bar-info a {
  color: var(--color-text-light);
}

.top-bar-info a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.logo-bar {
  background-color: #ffffff;
  padding: 15px 0;
}

.logo-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: clamp(40px, 5.5vw, 60px);
  width: auto;
  max-width: 100%;
  display: block;
}

.navigation-bar {
  background-color: #ffffff;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

.navigation-bar-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.site-navigation {
  width: 100%;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 8px;
  width: 100%;
  justify-content: flex-start;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 12px 18px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary);
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.nav-link:hover, .nav-item:focus-within > .nav-link {
  color: var(--color-accent-hover);
  background-color: var(--color-bg-light);
  text-decoration: none;
}

.nav-item.current-menu-item > .nav-link {
  color: var(--color-accent-hover);
  background-color: rgba(212, 154, 23, 0.06);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
  min-width: 240px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-smooth);
}

.dropdown-link {
  display: block;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-dark);
}

.dropdown-link:hover {
  background-color: var(--color-bg-light);
  color: var(--color-primary);
  text-decoration: none;
}

.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Responsive Header Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-primary);
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 991px) {
  .top-bar { display: none; }
  .navigation-bar { display: none; }
  .menu-toggle { display: block; }
  
  .site-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 3px solid var(--color-primary);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    padding: 10px 0;
  }
  
  .site-navigation.is-active {
    display: block;
  }
  
  .logo-bar {
    position: relative;
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: 0;
  }
  
  .nav-link {
    padding: 14px 24px;
    border-bottom: 1px solid var(--color-border);
  }
  
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--color-accent);
    background-color: #fafaf9;
    display: none;
    padding-left: 10px;
  }
  
  .nav-item.dropdown-active .dropdown-menu {
    display: block;
  }
}

/* --- Page Title Box --- */
.page-title-section {
  color: var(--color-text-light);
  padding: 50px 0;
  position: relative;
}

.page-title-section h1 {
  color: var(--color-text-light);
  margin-bottom: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.breadcrumbs {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.breadcrumbs a {
  color: var(--color-text-light);
}

.breadcrumbs a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.breadcrumbs i {
  font-size: 0.75rem;
}

/* --- Interactive Tabs Component --- */
.tabs-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Tab list navigation */
.tab-list-wrapper {
  border-bottom: 2px solid var(--color-border);
  width: 100%;
}

.tab-list {
  display: flex;
  list-style: none;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}

.tab-list::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}

.tab-btn {
  background: none;
  border: none;
  padding: 15px 25px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-muted);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
  min-height: 48px;
  white-space: nowrap;
}

.tab-btn i {
  font-size: 1.15rem;
  color: var(--color-primary-light);
  opacity: 0.8;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: var(--color-primary);
  background-color: rgba(18, 53, 36, 0.03);
}

.tab-btn.active {
  color: var(--color-primary);
}

.tab-btn.active i {
  color: var(--color-accent);
  opacity: 1;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tab-btn.active::after {
  transform: scaleX(1);
}

/* Tab Panels */
.tab-panels {
  min-height: 350px;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.4s ease forwards;
  outline: none;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Panel Card style (for single journal/video info) */
.panel-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 45px;
  box-shadow: var(--shadow-sm);
}

.panel-content-flex {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.panel-icon-badge {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background-color: rgba(18, 53, 36, 0.04);
  color: var(--color-primary);
  border: 2px solid rgba(18, 53, 36, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
}

.panel-desc-area h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--color-primary);
}

.panel-desc-area p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: 15px;
}

.journal-meta {
  font-size: 0.95rem;
  color: var(--color-secondary) !important;
  margin-bottom: 25px !important;
}

@media (max-width: 767px) {
  .panel-card { padding: 25px; }
  .panel-content-flex { flex-direction: column; gap: 20px; }
  .panel-icon-badge { width: 70px; height: 70px; font-size: 2rem; }
}

/* --- Publication Table Styling (Buku Tab) --- */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  background-color: var(--color-bg-card);
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
}

.publication-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.publication-table th {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 20px;
  border-bottom: 3px solid var(--color-accent);
}

.publication-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-dark);
  line-height: 1.5;
  vertical-align: middle;
}

.publication-table tr:last-child td {
  border-bottom: none;
}

.publication-table tbody tr {
  transition: var(--transition-smooth);
}

.publication-table tbody tr:nth-child(even) {
  background-color: var(--color-bg-light);
}

.publication-table tbody tr:hover {
  background-color: rgba(18, 53, 36, 0.03);
}

.isbn-col {
  font-family: monospace;
  font-weight: 600;
  color: var(--color-secondary);
  text-align: center;
}

.year-col {
  text-align: center;
  font-weight: 600;
  color: var(--color-primary-light);
}

@media (max-width: 767px) {
  .publication-table { font-size: 0.85rem; }
  .publication-table th, .publication-table td { padding: 12px 14px; }
  .isbn-col, .year-col { text-align: left; }
}

/* --- Downloads Grid Styling (Katalog & Template Tabs) --- */
.downloads-wrapper h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.downloads-wrapper p {
  margin-bottom: 30px;
  font-size: 1.05rem;
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 25px;
}

.download-card {
  display: flex;
  align-items: center;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 20px;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.download-card:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.download-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-right: 18px;
  flex-shrink: 0;
}

/* Different color themes for file extensions */
.download-icon.pdf {
  background-color: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.15);
}

.download-icon.doc {
  background-color: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.download-icon.ppt {
  background-color: rgba(234, 88, 12, 0.08);
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.15);
}

.download-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 15px;
}

.download-info h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0;
  line-height: 1.4;
}

.file-type {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.download-arrow {
  font-size: 1.3rem;
  color: var(--color-accent);
  transition: var(--transition-smooth);
}

.download-card:hover .download-arrow {
  color: var(--color-primary);
  transform: translateY(2px);
}

@media (max-width: 575px) {
  .downloads-grid { grid-template-columns: 1fr; }
  .download-card { padding: 15px; }
  .download-icon { width: 46px; height: 46px; font-size: 1.3rem; margin-right: 12px; }
}

/* --- Site Footer Styling --- */
.site-footer {
  background-color: var(--color-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 70px 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  border-top: 3px solid var(--color-accent);
  margin-top: auto; /* Push footer down */
}

.site-footer h4 {
  font-family: var(--font-heading);
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.site-footer h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 3px;
  background-color: var(--color-accent);
}

.footer-widgets {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 991px) {
  .footer-widgets {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 575px) {
  .footer-widgets {
    grid-template-columns: 1fr;
  }
}

.footer-widget ul {
  list-style: none;
}

.footer-widget ul li {
  margin-bottom: 12px;
}

.footer-widget ul li a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition-smooth);
}

.footer-widget ul li a:hover {
  color: var(--color-accent);
  text-decoration: none;
  padding-left: 4px;
}

.footer-info-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-info-logo img {
  height: 48px;
  width: auto;
  max-width: 100%;
}

.footer-info-text {
  font-size: 0.85rem;
  opacity: 0.85;
}

.footer-recent-news li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.footer-recent-news li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.footer-recent-news a {
  display: block;
  color: #ffffff !important;
  font-weight: 500;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 4px;
}

.footer-recent-news a:hover {
  color: var(--color-accent) !important;
  text-decoration: none;
}

.footer-recent-news span {
  font-size: 0.75rem;
  opacity: 0.6;
  display: block;
}

.footer-contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
  align-items: flex-start;
}

.footer-contact-item i {
  color: var(--color-accent);
  margin-top: 4px;
  font-size: 1rem;
}

.footer-contact-item span {
  flex: 1;
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 0;
  font-size: 0.8rem;
  opacity: 0.8;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom-links a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

@media (max-width: 767px) {
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}
