/*
Theme Name: Green News
Theme URI: https://example.com/green-news
Author: DeepMind Team
Author URI: https://example.com
Description: High-performance, WCAG 2.1 AA compliant WordPress news & magazine theme with clean simple CSS and primary color #336600.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: green-news
Tags: news, magazine, responsive-layout, grid-layout, accessibility-ready, custom-menu
*/

/* ============================================================
   1. DESIGN SYSTEM & CSS VARIABLES
   ============================================================ */
:root {
  --clr-primary: #336600;
  --clr-primary-dark: #244800;
  --clr-primary-light: #448800;
  --clr-primary-deep: #1e3c00;
  --clr-bg: #ffffff;
  --clr-bg-alt: #f4f7f2;
  --clr-border: #e2e8dd;
  --clr-border-dark: #cbd5c3;
  --clr-text: #111111;
  --clr-text-muted: #333333;
  --clr-link: #336600;
  --clr-link-hover: #244800;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

/* ============================================================
   2. BASE RESETS & TYPOGRAPHY
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--clr-link);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover, a:focus {
  color: var(--clr-link-hover);
  text-decoration: underline;
}

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

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--clr-primary);
  color: #ffffff;
  padding: 12px 20px;
  z-index: 99999;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
}
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* ============================================================
   3. LAYOUT CONTAINERS & GRIDS
   ============================================================ */
.nh-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.nh-section-wrap {
  padding: 40px 0;
  border-bottom: 1px solid var(--clr-border);
}

.nh-grid-70-30 {
  display: grid;
  grid-template-columns: 70% 30%;
  gap: 32px;
}

.nh-grid-66-33 {
  display: grid;
  grid-template-columns: 66% 33%;
  gap: 24px;
}

.nh-grid-50-50 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.nh-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.nh-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.nh-grid-50-25-25 {
  display: grid;
  grid-template-columns: 50% 25% 25%;
  gap: 24px;
}

.flex-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ============================================================
   4. PRIMARY COLOR SECTION THEME (SECTIONS 2 HERO & 7 CLOUD COMPUTING)
   ============================================================ */
.nh-theme-primary-bg {
  background-color: var(--clr-primary) !important;
  color: #ffffff !important;
}
.nh-theme-primary-bg h2,
.nh-theme-primary-bg h3,
.nh-theme-primary-bg a {
  color: #ffffff !important;
}
.nh-theme-primary-bg a:hover {
  color: #e2f7c8 !important;
}
.nh-theme-primary-bg .nh-meta,
.nh-theme-primary-bg .bg-date,
.nh-theme-primary-bg .sl-date {
  color: #e2f7c8 !important;
}

.nh-card-primary-dark {
  background: rgba(255, 255, 255, 0.08);
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.pcbg-thumb img,
.penci-image-holder {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.nh-card-horizontal {
  display: flex !important;
  gap: 14px !important;
  align-items: center !important;
}
.nh-card-horizontal .pcbg-thumb {
  flex: 0 0 45% !important;
  max-height: 120px !important;
  margin-bottom: 0 !important;
}
.nh-card-horizontal .pcbg-content {
  flex: 1 !important;
}

/* ============================================================
   5. HEADINGS, DIVIDERS & BADGES
   ============================================================ */
.penci-fancy-heading {
  text-align: center;
  margin-bottom: 12px;
}
.penci-fancy-heading-inner .inner-tit {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--clr-text);
}
.penci-fancy-heading-inner .inner-tit a {
  color: var(--clr-text);
}
.penci-fancy-heading-inner .inner-tit a:hover {
  color: var(--clr-primary);
}

.elementor-divider {
  margin: 12px 0 24px 0;
  border-top: 2px solid var(--clr-primary);
}

.penci-border-arrow.style-10 {
  border-bottom: 3px solid var(--clr-primary);
  margin-bottom: 24px;
  padding-bottom: 8px;
}
.penci-border-arrow.style-10 .inner-arrow span span {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--clr-text);
}
.penci-border-arrow.style-10 .inner-arrow span span a {
  color: var(--clr-text);
}
.penci-border-arrow.style-10 .inner-arrow span span a:hover {
  color: var(--clr-primary);
}

/* Category badges removed — CSS rules cleaned up */

/* ============================================================
   6. SECTION 1 HEADER
   ============================================================ */
#nh-site-header {
  background: #ffffff;
  border-bottom: 2px solid var(--clr-primary);
}
.nh-header-main {
  padding: 20px 0;
}
.nh-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nh-header-left-space {
  flex: 0 0 20%;
  min-width: 0;
}
.nh-header-brand {
  flex: 0 0 60%;
  text-align: center;
  min-width: 0;
}
.nh-header-search {
  flex: 0 0 20%;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}
.nh-site-title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 900;
  color: var(--clr-primary) !important;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
  display: block;
}
.nh-site-title:hover {
  color: var(--clr-primary-dark) !important;
}
.nh-tagline {
  font-size: 13px;
  color: var(--clr-primary) !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.penci_bottombar {
  border-top: 1px solid var(--clr-border);
  padding: 10px 0;
  background: #ffffff;
}
.nh-nav-wrap {
  display: flex;
  justify-content: center;
}
.nh-primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.nh-primary-nav a {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--clr-text);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.nh-primary-nav a:hover {
  color: var(--clr-primary);
}

/* Search Box */
.pc-searchform-inner {
  display: flex !important;
  align-items: center !important;
  border: 1px solid var(--clr-border-dark) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  background: #ffffff !important;
  width: 100% !important;
  max-width: 220px !important;
  height: 38px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.pc-searchform-inner input[type="text"],
.pc-searchform-inner input[type="search"] {
  border: none !important;
  outline: none !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  flex: 1 !important;
  height: 100% !important;
  background: transparent !important;
  color: var(--clr-text) !important;
}
.pc-searchform-inner .searchsubmit {
  background-color: var(--clr-primary) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 0 14px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  height: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 !important;
  min-width: 44px !important;
  transition: background 0.2s ease;
}
.pc-searchform-inner .searchsubmit:hover {
  background-color: var(--clr-primary-dark) !important;
}

/* ============================================================
   7. SECTION 2 HERO RIGHT COLUMN SMALL LIST
   ============================================================ */
#nh-hero .pcsl-iteminer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 10px;
  margin-bottom: 0;
}
#nh-hero .pcsl-iteminer:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
#nh-hero .pcsl-content {
  flex: 1;
  min-width: 0;
}
#nh-hero .pcsl-thumb {
  flex: 0 0 75px;
  width: 75px;
  height: 55px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
#nh-hero .pcsl-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   8. SECTION 6 BIG GRID OVERLAY (STYLE 5)
   ============================================================ */
#nh-sec-cat46 .penci-bgrid-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  min-height: 220px;
  background: #111111;
}
#nh-sec-cat46 .penci-bgrid-item .pcbg-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin-bottom: 0;
}
#nh-sec-cat46 .penci-bgrid-item .pcbg-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.4s ease, opacity 0.4s ease;
}
#nh-sec-cat46 .penci-bgrid-item:hover .pcbg-thumb img {
  transform: scale(1.04);
  opacity: 1;
}
#nh-sec-cat46 .penci-bgrid-item .pcbg-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
  color: #ffffff;
  z-index: 2;
}
#nh-sec-cat46 .penci-bgrid-item .pcbg-title,
#nh-sec-cat46 .penci-bgrid-item .pcbg-title a {
  color: #ffffff !important;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 6px 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
#nh-sec-cat46 .penci-bgrid-item .bg-date {
  color: #e2f7c8 !important;
  font-size: 12px;
}

/* ============================================================
   9. SECTION 8 & POST LIST CARDS
   ============================================================ */
.nh-post-item-horizontal {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--clr-border);
  min-width: 0;
  overflow: hidden;
}
.nh-post-item-horizontal .nh-img-wrap {
  flex: 0 0 280px;
}
.nh-post-item-horizontal img {
  border-radius: var(--radius-sm);
  width: 100%;
  height: 185px;
  object-fit: cover;
}

.nh-allposts-left,
.nh-allposts-right,
.nh-content {
  min-width: 0 !important;
  overflow: hidden;
}

/* Excerpt Line-Clamping & Overflow Protection */
.nh-excerpt {
  font-size: 14px;
  color: var(--clr-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Meta Text High Contrast Rules (WCAG AAA >= 7:1) */
.nh-meta,
.pcbg-meta-desc,
.grid-post-box-meta,
.side-item-meta,
.pcsl-meta,
.bg-date,
.sl-date,
.side-wdate,
time.entry-date,
.entry-date {
  color: var(--clr-text-muted) !important;
  font-size: 13px;
  font-weight: 600;
}

/* Modern High-Performance Array Pagination Styling */
nav.nh-pagination,
.nh-pagination,
.nh-pagination-wrap,
.navigation.pagination,
.penci-pagination {
  margin-top: 36px !important;
  margin-bottom: 20px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  clear: both !important;
}

nav.nh-pagination a,
nav.nh-pagination span,
.nh-pagination a,
.nh-pagination span,
a.page-numbers,
span.page-numbers {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 44px !important;
  height: 44px !important;
  padding: 0 14px !important;
  background-color: #ffffff !important;
  border: 1px solid var(--clr-border-dark) !important;
  border-radius: 4px !important;
  color: var(--clr-text) !important;
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease-in-out !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

nav.nh-pagination span.current,
.nh-pagination span.current,
span.page-numbers.current {
  background-color: var(--clr-primary) !important;
  color: #ffffff !important;
  border-color: var(--clr-primary) !important;
  box-shadow: 0 2px 6px rgba(51, 102, 0, 0.3) !important;
}

nav.nh-pagination a:hover,
.nh-pagination a:hover,
a.page-numbers:hover:not(.current):not(.dots) {
  background-color: var(--clr-primary) !important;
  color: #ffffff !important;
  border-color: var(--clr-primary) !important;
  transform: translateY(-2px) !important;
}

nav.nh-pagination span.dots,
.nh-pagination span.dots,
span.page-numbers.dots {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--clr-text-muted) !important;
  font-size: 18px !important;
  letter-spacing: 2px !important;
  min-width: 32px !important;
  padding: 0 4px !important;
  cursor: default !important;
}

/* ============================================================
   10. SECTION 9 FOOTER
   ============================================================ */
#nh-footer {
  background-color: #ffffff;
  border-top: 3px solid var(--clr-primary);
  padding: 48px 0 24px 0;
  color: var(--clr-text);
}
.nh-footer-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}
.nh-footer-col h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--clr-primary);
  border-bottom: 2px solid var(--clr-primary);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.nh-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nh-footer-col li {
  margin-bottom: 10px;
}
.nh-footer-col a {
  color: var(--clr-text);
  font-weight: 600;
  font-size: 14px;
}
.nh-footer-col a:hover {
  color: var(--clr-primary);
}
.nh-footer-bottom {
  border-top: 1px solid var(--clr-border);
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--clr-text-muted);
}

/* ============================================================
   11. ARTICLE SHARE SECTION (SINGLE POST)
   ============================================================ */
.l-shared-sec-outer {
  margin: 32px 0;
  padding: 16px 20px;
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
}
.l-shared-sec {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.l-shared-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--clr-text);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.l-shared-items {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.share-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 1px solid var(--clr-border-dark) !important;
  color: var(--clr-text) !important;
  text-decoration: none !important;
  transition: all 0.25s ease !important;
}
.share-action:hover {
  background: var(--clr-primary) !important;
  color: #ffffff !important;
  border-color: var(--clr-primary) !important;
  transform: translateY(-2px);
}

/* ============================================================
   12. MOBILE RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 768px) {
  #nh-hero,
  #nh-sec-cat1,
  #nh-sec-cat2,
  #nh-sec-cat3,
  #nh-sec-cat46 {
    display: none !important;
  }

  #nh-site-header,
  #nh-sec-allposts,
  #nh-footer {
    display: block !important;
  }

  .nh-grid-70-30,
  .nh-grid-66-33,
  .nh-grid-50-50,
  .nh-grid-3col,
  .nh-grid-4col,
  .nh-grid-50-25-25,
  .nh-footer-4col {
    grid-template-columns: 1fr;
  }
}
