/* ==========================================================================
   STYLE.CSS - ICCRI NET Singlepost (Article 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: 60px 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;
}

/* 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(1.8rem, 4.5vw, 2.7rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.0rem); font-weight: 800; }
h3 { font-size: clamp(1.2rem, 3vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.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-top: 10px;
  margin-bottom: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  line-height: 1.35;
  max-width: 900px;
}

.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;
}

/* --- Layout Grid (2 Columns) --- */
.main-layout-grid {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 40px;
}

@media (max-width: 991px) {
  .main-layout-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }
}

/* --- Left Column: Article Content --- */
.article-content {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 575px) {
  .article-content {
    padding: 25px;
  }
}

.post-meta-details {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 20px;
  margin-bottom: 25px;
}

.post-meta-details ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.post-meta-details ul li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-meta-details ul li i {
  color: var(--color-accent);
}

.post-meta-details ul li span {
  color: var(--color-primary-light);
}

.post-featured-image {
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.post-body-text {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--color-text-dark);
}

.post-body-text p {
  margin-bottom: 1.75rem;
}

.post-body-text strong {
  color: var(--color-primary);
}

/* --- Right Column: Sidebar Widgets --- */
.sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sidebar-widget {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 45px;
  height: 2px;
  background-color: var(--color-accent);
}

/* Search Widget */
.search-form {
  position: relative;
  width: 100%;
}

.search-form input[type="search"] {
  width: 100%;
  padding: 12px 50px 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background-color: var(--color-bg-light);
  outline: none;
  transition: var(--transition-smooth);
}

.search-form input[type="search"]:focus {
  border-color: var(--color-primary-light);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(18, 53, 36, 0.08);
}

.search-form button {
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: var(--color-primary);
  font-size: 1rem;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-form button:hover {
  color: var(--color-accent);
}

/* Recent Posts widget items */
.widget-recent-posts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.widget-recent-posts li {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 15px;
}

.widget-recent-posts li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.widget-recent-posts li a {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--color-primary);
  margin-bottom: 5px;
}

.widget-recent-posts li a:hover {
  color: var(--color-accent-hover);
  text-decoration: none;
}

.post-date {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Categories widget items */
.widget-categories {
  list-style: none;
}

.widget-categories li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  padding: 10px 0;
}

.widget-categories li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.widget-categories li a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.widget-categories li a:hover {
  color: var(--color-primary-light);
  text-decoration: none;
  padding-left: 4px;
}

.cat-count {
  font-size: 0.75rem;
  font-weight: 700;
  background-color: rgba(18, 53, 36, 0.05);
  color: var(--color-primary-light);
  padding: 2px 8px;
  border-radius: 12px;
  min-width: 32px;
  text-align: center;
}

/* Archives widget items */
.widget-archives {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.widget-archives li {
  position: relative;
  padding-left: 15px;
}

.widget-archives li::before {
  content: '\f105';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-accent);
  font-size: 0.8rem;
}

.widget-archives li a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.widget-archives li a:hover {
  color: var(--color-primary-light);
  text-decoration: none;
  padding-left: 4px;
}

/* --- 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;
  }
}
