/*
 Theme Name:   Vitanova Child Theme
 Theme URI:    https://vitanova.ca
 Description:  Vitanova Foundation Child Theme for Divi
 Author:       Vitanova Foundation
 Author URI:   https://vitanova.ca
 Template:     Divi
 Version:      1.1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  vitanova-child
*/

/* ============================================================
   VITANOVA FOUNDATION — GLOBAL CUSTOM CSS
   Brand System: Avocado Green Palette + Source Sans 3
   ============================================================ */

/* ---------- BRAND COLOUR TOKENS ---------- */
:root {
  --vn-primary:     #5C7D2C; /* Avocado — headlines, links, primary fills */
  --vn-primary-dk:  #38491F; /* Avocado Skin — footers, dark bands */
  --vn-ink:         #232A18; /* Pit Ink — body text, warm green-black */
  --vn-mid:         #7A9A45; /* Ripe — secondary fills, hover states */
  --vn-tint:        #AFC178; /* Flesh — light fills, decorative */
  --vn-soft:        #DDE6C6; /* Pale Flesh — table headers, quiet panels */
  --vn-accent:      #8A5A2B; /* Seed Bronze — warm emphasis, sparingly */
  --vn-honour:      #C98A2E; /* Ripening Honey — milestones, recognition */
  --vn-white:       #ffffff;
  --vn-light:       #f5f7f0; /* off-white with green tint */
  --vn-border:      #d4ddb8;
  --vn-shadow:      0 4px 20px rgba(35,42,24,0.10);
  --vn-shadow-lg:   0 8px 40px rgba(35,42,24,0.15);
  --vn-radius:      6px;
  /* Legacy aliases so old code still works */
  --vn-teal:        #5C7D2C;
  --vn-teal-dark:   #38491F;
  --vn-teal-light:  #DDE6C6;
  --vn-orange:      #C98A2E;
  --vn-orange-dark: #8A5A2B;
  --vn-gold:        #C98A2E;
  --vn-navy:        #232A18;
  --vn-font-head:   'Source Sans 3', sans-serif;
  --vn-font-body:   'Source Sans 3', sans-serif;
}

/* ---------- FONT IMPORT ---------- */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');

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

body,
.et_pb_text,
.et_pb_blurb_description,
.et_pb_module p,
p {
  font-family: 'Source Sans 3', sans-serif !important;
  color: var(--vn-ink);
}

h1, h2, h3, h4, h5, h6,
.et_pb_module h1,
.et_pb_module h2,
.et_pb_module h3,
.et_pb_module h4,
.et_pb_module h5,
.et_pb_module h6,
.et_pb_blurb_title,
.et_pb_slide_title,
.et-pb-contact-message,
.et_pb_text h1,
.et_pb_text h2,
.et_pb_text h3 {
  font-family: 'Source Sans 3', sans-serif !important;
  color: var(--vn-ink);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#main-header,
.et_pb_section_0 #main-header {
  background: var(--vn-white) !important;
}

#et-top-navigation a,
.et_mobile_menu a {
  font-family: 'Source Sans 3', sans-serif !important;
  color: var(--vn-ink) !important;
}

#et-top-navigation a:hover,
.et_mobile_menu a:hover {
  color: var(--vn-primary) !important;
}

/* Top bar */
#top-header,
#top-header a {
  background-color: var(--vn-primary-dk) !important;
  font-family: 'Source Sans 3', sans-serif !important;
}

/* Active nav */
#et-top-navigation .current-menu-item > a,
#et-top-navigation .current-menu-ancestor > a {
  color: var(--vn-primary) !important;
}

/* Dropdown menus */
.nav ul li ul {
  background-color: var(--vn-white) !important;
  border-top: 2px solid var(--vn-primary) !important;
}

.nav ul li ul a {
  color: var(--vn-ink) !important;
}

.nav ul li ul li:hover > a,
.nav ul ul li:hover > a {
  background-color: var(--vn-soft) !important;
  color: var(--vn-primary) !important;
}

/* ============================================================
   LINKS
   ============================================================ */
.et-l--body a,
.et_pb_module a {
  color: var(--vn-primary);
}

.et-l--body a:hover,
.et_pb_module a:hover {
  color: var(--vn-primary-dk);
}

/* ============================================================
   BUTTONS — PRIMARY
   ============================================================ */
.et_pb_button,
.et_pb_button:visited,
a.et_pb_button,
.et_pb_module .et_pb_button {
  font-family: 'Source Sans 3', sans-serif !important;
  background: var(--vn-primary) !important;
  border-color: var(--vn-primary) !important;
  color: var(--vn-white) !important;
  border-radius: var(--vn-radius) !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600 !important;
  transition: background 0.25s, border-color 0.25s;
}

.et_pb_button:hover,
a.et_pb_button:hover,
.et_pb_module .et_pb_button:hover {
  background: var(--vn-primary-dk) !important;
  border-color: var(--vn-primary-dk) !important;
  color: var(--vn-white) !important;
}

/* Donate / CTA button */
.et_pb_button.donate-button,
#top-header .et_pb_button {
  background: var(--vn-honour) !important;
  border-color: var(--vn-honour) !important;
}

.et_pb_button.donate-button:hover,
#top-header .et_pb_button:hover {
  background: var(--vn-accent) !important;
  border-color: var(--vn-accent) !important;
}

/* ============================================================
   HERO / SLIDER SECTIONS
   ============================================================ */
.et_pb_slider,
.et_pb_fullwidth_slider {
  font-family: 'Source Sans 3', sans-serif !important;
}

.et_pb_slide_title {
  font-family: 'Source Sans 3', sans-serif !important;
  font-weight: 800;
}

.et_pb_slide_description {
  font-family: 'Source Sans 3', sans-serif !important;
}

/* ============================================================
   SECTION BACKGROUNDS
   ============================================================ */
/* Sections that used old teal bg => switch to primary green */
.et_pb_section[style*="background-color: #1a7a6e"],
.et_pb_section[style*="background-color:#1a7a6e"],
.et_pb_section[style*="background: #1a7a6e"] {
  background-color: var(--vn-primary) !important;
}

/* Dark hero sections */
.et_pb_section.et_pb_section_0 {
  background-color: var(--vn-primary-dk) !important;
}

/* ============================================================
   HERO OVERLAY TEXT
   ============================================================ */
.et_pb_slide h2,
.et_pb_slide .et_pb_slide_title {
  font-family: 'Source Sans 3', sans-serif !important;
  font-weight: 800;
}

/* ============================================================
   CTA / READY TO HELP SECTION
   ============================================================ */
/* The teal CTA section */
.et_pb_section.et_section_regular:last-of-type,
.et_pb_bg_layout_dark.et_pb_section {
  background-color: var(--vn-primary) !important;
}

/* Override any inline teal on sections */
.et_pb_section[style*="#1a7a6e"] {
  background-color: var(--vn-primary) !important;
}

/* ============================================================
   PROGRAMME / SERVICE CARDS
   ============================================================ */
.et_pb_blurb_content .et_pb_main_blurb_image,
.et_pb_blurb .et_pb_blurb_container {
  font-family: 'Source Sans 3', sans-serif !important;
}

.et_pb_blurb_title {
  font-family: 'Source Sans 3', sans-serif !important;
  color: var(--vn-primary) !important;
  font-weight: 700;
}

/* ============================================================
   STATISTICS / COUNTER MODULES
   ============================================================ */
.et_pb_number_counter .percent,
.et_pb_counter_amount,
.et-pb-counter-amount {
  font-family: 'Source Sans 3', sans-serif !important;
  color: var(--vn-primary) !important;
}

/* ============================================================
   TABS & TOGGLES
   ============================================================ */
.et_pb_tab_active,
.et_pb_toggle_title {
  color: var(--vn-primary) !important;
  font-family: 'Source Sans 3', sans-serif !important;
}

.et_pb_tabs .et_pb_tab_active a {
  color: var(--vn-primary) !important;
  border-bottom-color: var(--vn-primary) !important;
}

/* ============================================================
   FOOTER
   ============================================================ */
#main-footer {
  background-color: var(--vn-primary-dk) !important;
  font-family: 'Source Sans 3', sans-serif !important;
}

#main-footer .et_pb_column a,
#main-footer .et_pb_widget a,
#main-footer a {
  color: var(--vn-soft) !important;
}

#main-footer .et_pb_column a:hover,
#main-footer a:hover {
  color: var(--vn-tint) !important;
}

#main-footer .footer-widget h3,
#main-footer .widget-title,
#main-footer h4 {
  color: var(--vn-tint) !important;
  font-family: 'Source Sans 3', sans-serif !important;
  font-weight: 700;
}

#footer-bottom {
  background-color: var(--vn-ink) !important;
}

#footer-bottom,
#footer-bottom a {
  color: var(--vn-tint) !important;
  font-family: 'Source Sans 3', sans-serif !important;
}

/* ============================================================
   FORMS
   ============================================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea,
select {
  font-family: 'Source Sans 3', sans-serif !important;
  border-color: var(--vn-border) !important;
  color: var(--vn-ink) !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--vn-primary) !important;
  outline-color: var(--vn-primary) !important;
}

input[type="submit"],
button[type="submit"] {
  font-family: 'Source Sans 3', sans-serif !important;
  background: var(--vn-primary) !important;
  color: var(--vn-white) !important;
  border-color: var(--vn-primary) !important;
}

/* ============================================================
   HISTORY TIMELINE SECTION (About Us page)
   ============================================================ */
.vn-history-outer-row {
  display: flex !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 1100px !important;
}

/* Override old teal colours in the timeline */
.vn-history-section {
  background: var(--vn-soft) !important;
}

.vn-history-nav-btn {
  background: var(--vn-primary) !important;
  border-color: var(--vn-primary) !important;
}

.vn-history-nav-btn:hover {
  background: var(--vn-primary-dk) !important;
}

.vn-history-line {
  background: var(--vn-primary) !important;
}

.vn-history-icon.active {
  background: var(--vn-primary) !important;
  border-color: var(--vn-primary) !important;
}

.vn-history-icon {
  border-color: var(--vn-primary) !important;
  color: var(--vn-primary) !important;
}

.vn-history-dot.active {
  background: var(--vn-primary) !important;
}

.vn-history-dot {
  border-color: var(--vn-primary) !important;
}

/* Timeline milestone label colours — mapped to new palette */
.vn-history-label[style*="#e8622a"],
.vn-history-label[style*="background:#e8622a"],
.vn-history-label.orange {
  background: var(--vn-honour) !important; /* Ripening Honey */
}

.vn-history-label[style*="#6b4c8a"],
.vn-history-label.purple {
  background: var(--vn-accent) !important; /* Seed Bronze */
}

.vn-history-label[style*="#c62828"],
.vn-history-label.red {
  background: var(--vn-primary-dk) !important; /* Avocado Skin */
}

.vn-history-label[style*="#1a7a6e"],
.vn-history-label.teal {
  background: var(--vn-primary) !important; /* Avocado */
}

.vn-history-label[style*="#1b2a3b"],
.vn-history-label.navy {
  background: var(--vn-ink) !important; /* Pit Ink */
}

.vn-history-label[style*="#2e7d32"],
.vn-history-label.green {
  background: var(--vn-mid) !important; /* Ripe */
}

/* Year marker colours */
.vn-history-year {
  color: var(--vn-primary) !important;
  font-family: 'Source Sans 3', sans-serif !important;
}

.vn-history-desc {
  font-family: 'Source Sans 3', sans-serif !important;
  color: var(--vn-ink) !important;
}

/* History heading */
.vn-history-heading h2 {
  color: var(--vn-ink) !important;
  font-family: 'Source Sans 3', sans-serif !important;
}

.vn-history-heading p {
  color: var(--vn-mid) !important;
  font-family: 'Source Sans 3', sans-serif !important;
}

/* Year dropdown */
.vn-year-select {
  font-family: 'Source Sans 3', sans-serif !important;
  border-color: var(--vn-primary) !important;
  color: var(--vn-primary) !important;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.bg-primary   { background-color: var(--vn-primary) !important; }
.bg-dark      { background-color: var(--vn-primary-dk) !important; }
.bg-soft      { background-color: var(--vn-soft) !important; }
.text-primary { color: var(--vn-primary) !important; }
.text-ink     { color: var(--vn-ink) !important; }

/* ============================================================
   INLINE-STYLE COLOUR OVERRIDES (Divi hardcoded colours)
   Replace old teal #1a7a6e references with Avocado #5C7D2C
   ============================================================ */

/* Any module with inline teal background */
[style*="background-color:#1a7a6e"],
[style*="background-color: #1a7a6e"],
[style*="background:#1a7a6e"] {
  background-color: var(--vn-primary) !important;
}

/* Any text coloured in old teal */
[style*="color:#1a7a6e"],
[style*="color: #1a7a6e"] {
  color: var(--vn-primary) !important;
}

/* Old orange -> honour gold */
[style*="background-color:#e8622a"],
[style*="background-color: #e8622a"] {
  background-color: var(--vn-honour) !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .vn-history-outer-row {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 767px) {
  #et-top-navigation {
    background: var(--vn-white);
  }
  .mobile_menu_bar:before {
    color: var(--vn-primary) !important;
  }
}
