/* ============================================================
 * FIRST GREEN - Main Stylesheet
 * Ported from Divi child theme "FIRST GREEN" (Divi Children Engine 1.0.4)
 * Brand colors:
 *   Primary green:   #044704
 *   Primary orange:  #F58220
 *   Secondary green: #8CC63E
 *   Dark gray:       #575279
 *   Light gray:      #797593
 * ============================================================ */

/* -----------------------------------------------
   CSS Custom Properties (Design Tokens)
   ----------------------------------------------- */
:root {
  /* Brand Colors */
  --color-primary: #044704;
  --color-primary-dark: #033603;
  --color-primary-light: #066606;
  --color-accent: #F58220;
  --color-accent-dark: #d96e0e;
  --color-accent-light: #ff9a4a;
  --color-secondary: #8CC63E;
  --color-secondary-dark: #6da82a;
  --color-text: #575279;
  --color-text-light: #797593;
  --color-text-on-dark: #FFFFFF;
  --color-bg: #FFFFFF;
  --color-bg-alt: #fafaff;
  --color-bg-dark: #044704;
  --color-border: #e0e0e0;

  /* Typography */
  --font-primary: 'Open Sans', Arial, Helvetica, sans-serif;
  --font-heading: 'Open Sans', Arial, Helvetica, sans-serif;
  --font-size-base: 16px;
  --font-size-small: 14px;
  --font-size-h1: 2.5rem;
  --font-size-h2: 2rem;
  --font-size-h3: 1.5rem;
  --font-size-h4: 1.25rem;
  --line-height-base: 1.7;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 5rem;

  /* Layout */
  --container-max-width: 1080px;
  --container-padding: 20px;
  --header-height: 66px;
  --header-top-height: 36px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;

  /* Border Radius */
  --radius-sm: 3px;
  --radius-md: 5px;
  --radius-lg: 10px;
}

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

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover,
a:focus {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

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

/* -----------------------------------------------
   Typography
   ----------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-primary);
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }

p {
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

/* -----------------------------------------------
   Layout
   ----------------------------------------------- */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  width: 100%;
}

.page-wrapper {
  overflow: hidden;
}

.main-content {
  min-height: 400px;
  padding: 0;
}



/* -----------------------------------------------
   Shared Utilities
   ----------------------------------------------- */

/* Dark overlay pseudo-element for hero banners */
.overlay-dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

/* -----------------------------------------------
   YouTube Embed with Play Overlay
   ----------------------------------------------- */
.video-embed {
  position: relative;
  cursor: pointer;
}

.video-embed__poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  z-index: 1;
  cursor: pointer;
}

.video-embed__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 14px;
  z-index: 2;
  transition: background 0.2s ease;
  pointer-events: none;
}

.video-embed__play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
}

.video-embed:hover .video-embed__play {
  background: rgba(255, 0, 0, 0.9);
}

.video-embed iframe {
  position: relative;
  z-index: 0;
}

/* State: video has been activated — hide poster and play button */
.video-embed.is-playing .video-embed__poster,
.video-embed.is-playing .video-embed__play {
  display: none;
}

/* -----------------------------------------------
   Block Title
   ----------------------------------------------- */
.block-title {
  font-size: var(--font-size-h3);
  margin-bottom: var(--spacing-md);
}

/* -----------------------------------------------
   WordPress / Drupal Core Overrides
   ----------------------------------------------- */
.block-system-breadcrumb-block ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.block-system-breadcrumb-block ol li {
  display: inline;
}

.block-system-breadcrumb-block ol li::after {
  content: ' / ';
  margin-left: 0.5rem;
}

.block-system-breadcrumb-block ol li:last-child::after {
  content: '';
}

.messages {
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  border-radius: var(--radius-md);
}

.messages--status {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.messages--error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.messages--warning {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
}

/* -----------------------------------------------
   Responsive
   ----------------------------------------------- */
@media (max-width: 980px) {
  :root {
    --font-size-h1: 2rem;
    --font-size-h2: 1.75rem;
    --font-size-h3: 1.35rem;
  }

}

@media (max-width: 767px) {
  :root {
    --font-size-h1: 1.75rem;
    --font-size-h2: 1.5rem;
    --font-size-h3: 1.2rem;
    --container-padding: 15px;
  }
}

@media (max-width: 479px) {
  :root {
    --font-size-h1: 1.5rem;
    --font-size-h2: 1.35rem;
  }
}
