/*
Theme Name: DINARA-WELWET (Astra Child)
Theme URI: https://dinarawelwet.net
Description: Child theme of Astra for the DINARA-WELWET Erasmus+ project. Adds the mandatory EU funding footer, project branding and eco styling.
Author: DINARA-WELWET Project
Template: astra
Version: 1.0.0
Text Domain: astra-child
*/

/* ============================================================
   DINARA-WELWET — Eco colour palette
   Greens + natural earthy tones (per project leaflet)
   ============================================================ */
:root {
  --dw-green-dark:  #1f5132;  /* deep forest green */
  --dw-green:       #2e7d4f;  /* primary green */
  --dw-green-light: #5fae7a;  /* light green */
  --dw-teal:        #1f6f6b;  /* One Health teal accent */
  --dw-earth:       #8a6d3b;  /* earthy brown */
  --dw-sand:        #f2efe6;  /* sand / background */
  --dw-orange:      #e8862e;  /* VR / objectives accent */
  --dw-ink:         #1d2a22;  /* text */
}

/* ============================================================
   EU mandatory funding footer
   ============================================================ */
.dw-eu-bar {
  background: var(--dw-green-dark);
  color: #eef3ee;
  padding: 30px 20px;
  font-size: 14px;
  line-height: 1.6;
}
.dw-eu-bar__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.dw-eu-bar__logo img {
  max-height: 70px;
  width: auto;
  display: block;
}
.dw-eu-bar__text {
  flex: 1 1 480px;
  min-width: 280px;
}
.dw-eu-bar__text p { margin: 0 0 8px; color: #eef3ee; }
.dw-eu-bar__meta {
  font-weight: 600;
  color: #cfe6d6;
}
.dw-eu-bar__meta span { margin-right: 18px; white-space: nowrap; }

@media (max-width: 768px) {
  .dw-eu-bar__inner { flex-direction: column; text-align: center; }
  /* In a column flex container flex-basis maps to HEIGHT — reset it so the
     text block hugs its content instead of stretching to 480px. */
  .dw-eu-bar__text { flex: 0 1 auto; min-width: 0; }
  .dw-eu-bar__meta span { display: block; margin: 4px 0; }
}

/* ============================================================
   Generic eco helpers used by page content
   ============================================================ */
.dw-section { padding: 60px 0; }
.dw-lead { font-size: 1.15rem; line-height: 1.7; }

/* ===== Block buttons — readable text in all states ===== */
.wp-block-button:not(.is-style-outline) > .wp-block-button__link {
  color: #ffffff !important;
}
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:focus {
  background-color: var(--dw-green-dark) !important;
  color: #ffffff !important;
}
/* Outline button (hero "Meet the Partners") — fill on hover, dark text */
.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus {
  background-color: #ffffff !important;
  color: var(--dw-green-dark) !important;
  border-color: #ffffff !important;
}

/* ===== Active menu item highlight (so visitors know where they are) ===== */
.main-header-menu .current-menu-item > .menu-link,
.main-header-menu .current_page_item > .menu-link,
.main-header-menu .current-menu-ancestor > .menu-link,
.main-header-menu .current_page_parent > .menu-link,
.ast-builder-menu .current-menu-item > .menu-link,
.ast-builder-menu .current_page_item > .menu-link,
#ast-mobile-header .current-menu-item > .menu-link,
#ast-mobile-header .current_page_item > .menu-link,
#ast-mobile-header .current_page_parent > .menu-link {
  color: var(--dw-green) !important;
  font-weight: 700 !important;
}
/* Desktop: underline indicator under the active item */
.ast-primary-header-bar .main-header-menu > .current-menu-item > .menu-link,
.ast-primary-header-bar .main-header-menu > .current_page_item > .menu-link,
.ast-primary-header-bar .main-header-menu > .current_page_parent > .menu-link,
.ast-primary-header-bar .main-header-menu > .current-menu-ancestor > .menu-link {
  box-shadow: inset 0 -3px 0 0 var(--dw-green);
}

/* Partner / resource cards */
.dw-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.dw-card {
  background: #fff;
  border: 1px solid #e3e8e1;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 4px 18px rgba(31,81,50,0.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.dw-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(31,81,50,0.12); }
.dw-card h3 { margin-top: 0; color: var(--dw-green-dark); }

/* General Objectives — numbered list */
.dw-objectives { display: grid; gap: 18px; margin-top: 28px; }
.dw-obj {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e6ebe3;
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 4px 18px rgba(31,81,50,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.dw-obj:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(31,81,50,.12); }
.dw-obj__num {
  flex: 0 0 auto;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--dw-green), var(--dw-green-dark));
  color: #fff;
  font-weight: 800;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dw-obj__content { flex: 1; }
.dw-obj__content h3 { margin: 2px 0 6px; color: var(--dw-green-dark); font-size: 1.2rem; }
.dw-obj__content p { margin: 0; line-height: 1.65; color: #3a4a40; }
@media (max-width: 560px) {
  .dw-obj { padding: 20px; gap: 16px; }
  .dw-obj__num { width: 42px; height: 42px; font-size: 1.1rem; }
}

/* Phase timeline */
.dw-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  counter-reset: phase;
}
.dw-phase {
  background: linear-gradient(160deg, var(--dw-green) 0%, var(--dw-green-dark) 100%);
  color: #fff;
  border-radius: 16px;
  padding: 26px 24px;
}
.dw-phase h3 { color: #fff; margin: 0 0 6px; }
.dw-phase .dw-phase__months { color: #cfe6d6; font-weight: 600; margin-bottom: 10px; display:block; }

/* Latest news cards (shortcode) */
.dw-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
  margin: 36px 0 40px;
}
.dw-news-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(31,81,50,.08);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.dw-news-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(31,81,50,.16); }
.dw-news-card__img {
  display: block;
  width: 100%;
  height: 190px;
  background-size: cover;
  background-position: center;
  background-color: var(--dw-green-light);
}
.dw-news-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.dw-news-card__date { font-size: .8rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--dw-earth); margin-bottom: 8px; }
.dw-news-card__title { font-size: 1.12rem; font-weight: 700; line-height: 1.35; color: var(--dw-green-dark); margin-bottom: 10px; }
.dw-news-card__excerpt { font-size: .95rem; line-height: 1.6; color: #44544a; margin-bottom: 16px; }
.dw-news-card__more { margin-top: auto; font-weight: 700; color: var(--dw-green); }

/* WPForms — match eco theme */
.wpforms-container .wpforms-submit {
  background-color: var(--dw-green) !important;
  border-color: var(--dw-green) !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 13px 30px !important;
  font-weight: 700 !important;
  transition: background-color .2s ease;
}
.wpforms-container .wpforms-submit:hover {
  background-color: var(--dw-green-dark) !important;
  border-color: var(--dw-green-dark) !important;
}
.wpforms-container input[type=text],
.wpforms-container input[type=email],
.wpforms-container textarea {
  border-radius: 8px !important;
  border: 1px solid #cfd8cd !important;
}
.wpforms-container input[type=text]:focus,
.wpforms-container input[type=email]:focus,
.wpforms-container textarea:focus {
  border-color: var(--dw-green) !important;
  box-shadow: 0 0 0 2px rgba(46,125,79,.15) !important;
}

/* ===== Blog / News archive as a card grid ===== */
.blog .ast-row,
.archive .ast-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 30px;
  margin: 0 !important;
}
.blog .ast-row > article,
.archive .ast-row > article {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}
.blog .ast-article-inner,
.archive .ast-article-inner {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(31,81,50,.08);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.blog .ast-article-inner:hover,
.archive .ast-article-inner:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(31,81,50,.16); }
.blog .ast-article-inner .post-content,
.archive .ast-article-inner .post-content { display: flex; flex-direction: column; flex: 1; padding: 0; }
.blog .ast-blog-featured-section,
.archive .ast-blog-featured-section { margin: 0 0 16px !important; }
.blog .post-thumb-img-content img,
.archive .post-thumb-img-content img { width: 100%; height: 200px; object-fit: cover; display: block; }
.blog .ast-article-inner .entry-title,
.blog .ast-article-inner .entry-header,
.blog .ast-article-inner .ast-excerpt-container,
.blog .ast-article-inner .read-more,
.archive .ast-article-inner .entry-title,
.archive .ast-article-inner .entry-header,
.archive .ast-article-inner .ast-excerpt-container,
.archive .ast-article-inner .read-more { padding-left: 24px; padding-right: 24px; }
.blog .ast-article-inner .entry-title,
.archive .ast-article-inner .entry-title { font-size: 1.18rem; line-height: 1.35; margin-bottom: 6px; }
.blog .ast-article-inner .read-more,
.archive .ast-article-inner .read-more { margin-top: auto; padding-bottom: 24px; }

/* Footer link readability on dark green background */
.site-footer .dw-eu-bar a,
footer.site-footer a { color: #d6e9da; }
footer.site-footer a:hover { color: #ffffff; }
footer.site-footer .ast-builder-html-element h6 { color: #ffffff; }

/* Work-package table */
.dw-wp-table { width: 100%; border-collapse: collapse; }
.dw-wp-table th, .dw-wp-table td { padding: 14px 16px; border-bottom: 1px solid #e3e8e1; text-align: left; vertical-align: top; }
.dw-wp-table th { background: var(--dw-green); color: #fff; }
.dw-wp-table tr:nth-child(even) td { background: #f7faf6; }
