/* ==========================================================================
   STYLE.CSS - ICCRI NET Video 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(2.2rem, 5vw, 3.2rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 4vw, 2.3rem); font-weight: 800; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.35rem); }

p {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.text-center { text-align: center; }

.section-header {
  max-width: 700px;
  margin: 0 auto 40px;
}

.decor-underline {
  width: 60px;
  height: 3px;
  background-color: var(--color-accent);
  margin: 15px auto;
  border-radius: 2px;
}

/* Screen Reader Only Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- 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;
}

/* --- Featured Video Showcase --- */
.featured-video-layout {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 40px;
  background-color: var(--color-bg-card);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

@media (max-width: 991px) {
  .featured-video-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

.iframe-ratio-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  background-color: #000000;
}

.iframe-ratio-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.featured-video-info {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 575px) {
  .featured-video-info {
    padding: 25px;
  }
}

.video-badge-category {
  display: inline-block;
  align-self: flex-start;
  background-color: rgba(212, 154, 23, 0.1);
  color: var(--color-accent-hover);
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 15px;
  letter-spacing: 0.05em;
}

.featured-video-info h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 800;
  margin-bottom: 15px;
}

.featured-video-info p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: 25px;
}

.featured-meta {
  display: flex;
  gap: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-secondary);
  border-top: 1px solid var(--color-border);
  padding-top: 15px;
}

.featured-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- Filter Bar Styling --- */
.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  background-color: var(--color-bg-card);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  padding: 10px 24px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-smooth);
  min-height: 44px; /* Accessible Touch target height */
}

.filter-btn:hover {
  background-color: var(--color-bg-light);
  border-color: var(--color-primary-light);
}

.filter-btn.active {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  border-color: var(--color-primary);
  box-shadow: 0 4px 10px rgba(18, 53, 36, 0.15);
}

/* --- Video Grid --- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

.video-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.card-thumb-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: #000;
  overflow: hidden;
}

.card-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.video-card:hover .card-thumb-wrapper img {
  transform: scale(1.05);
}

/* Play Button Hover Overlay */
.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(18, 53, 36, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
}

.play-overlay i {
  color: #ffffff;
  background-color: var(--color-accent);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transform: scale(0.8);
  transition: var(--transition-smooth);
  padding-left: 4px; /* Visual alignment for triangle play shape */
}

.video-card:hover .play-overlay {
  opacity: 1;
}

.video-card:hover .play-overlay i {
  transform: scale(1);
  background-color: var(--color-accent-hover);
}

.card-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-cat-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.card-info h3 {
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--color-primary);
}

.video-card:hover .card-info h3 {
  color: var(--color-primary-light);
}

/* Hide animation logic */
.video-card.hidden {
  display: none !important;
}

/* --- Lightbox Modal Overlay --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(18, 53, 36, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-wrapper {
  position: relative;
  width: 90%;
  max-width: 850px;
  background-color: #000000;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.active .modal-wrapper {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: -45px;
  right: 0;
  color: #ffffff;
  background: none;
  border: none;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-smooth);
}

@media (max-width: 767px) {
  .modal-close {
    top: 10px;
    right: 15px;
    background-color: rgba(0,0,0,0.6);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 11;
  }
}

.modal-close:hover {
  color: var(--color-accent);
}

.modal-body {
  width: 100%;
}

/* --- 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;
  }
}
