/* =======================================================
   EcoViva.pt Global CSS — Geometric Structured Style
   Brand colors: #235D3A (Primary), #5CA187 (Secondary), #F5F8F3 (Accent)
   Fonts: Montserrat (display/heading), Open Sans (body)
   ======================================================= */
/* ==================== CSS Reset & Normalize ==================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  min-height: 100vh;
  font-family: 'Open Sans', Arial, sans-serif;
  background: #F5F8F3;
  color: #1D2A23;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; border: 0; }
ul, ol { padding-left: 24px; }
b, strong { font-weight: bold; }
a { color: #235D3A; text-decoration: none; transition: color .2s cubic-bezier(.4,.0,.2,1); }
a:hover, a:focus { color: #5CA187; outline: none; }
button { font-family: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font-family: inherit; font-size: 100%; }

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: .02em;
  color: #235D3A;
  margin-bottom: 16px;
}
h1 {
  font-size: 2.5rem;
  line-height: 1.1;
  margin-bottom: 20px;
}
h2 {
  font-size: 2rem;
  line-height: 1.15;
  margin-bottom: 18px;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: .01em;
}
h4, h5, h6 { font-size: 1rem; font-weight: 600; }
p, ul, ol {
  font-size: 1rem;
  margin-bottom: 16px;
  color: #25382C;
}

/* ==================== Buttons ==================== */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 28px;
  background: #235D3A;
  color: #fff;
  border: 2px solid #235D3A;
  transition: background .2s, color .2s, border .2s, transform .15s cubic-bezier(.42,0,.58,1);
  box-shadow: 0 2px 10px rgba(35,93,58,0.07);
  text-transform: uppercase;
  letter-spacing: .08em;
  cursor: pointer;
}
.cta-btn.secondary {
  background: #5CA187;
  border-color: #5CA187;
  color: #fff;
}
.cta-btn:hover, .cta-btn:focus {
  background: #fff;
  color: #235D3A;
  border-color: #235D3A;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 5px 28px rgba(35,93,58,0.15);
}
.cta-btn.secondary:hover, .cta-btn.secondary:focus {
  background: #fff;
  color: #5CA187;
  border-color: #5CA187;
}

/* ==================== Layout & Containers ==================== */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 4px 36px rgba(35,93,58,0.05);
}
.hero {
  min-height: 370px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #E7EEE8;
  border-radius: 0 0 48px 48px;
  margin-bottom: 60px;
}
.hero .container { justify-content: center; }
.hero .content-wrapper { align-items: flex-start; max-width: 700px; }

.cta-banner {
  background: #235D3A;
  border-radius: 24px;
  color: #fff;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 36px rgba(35,93,58,0.11);
  gap: 20px;
  margin: 32px 0 0 0;
}
.cta-banner h2,
.cta-banner p {
  color: #fff;
}


/* ==================== Navigation & Header ==================== */
header {
  background: #fff;
  box-shadow: 0 2px 16px rgba(35, 93, 58, 0.06);
  position: sticky;
  top: 0; left: 0; width: 100%;
  z-index: 99;
}
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 16px 0;
  gap: 12px;
}
.logo img {
  height: 44px;
  width: auto;
  display: block;
}
nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  list-style: none;
  align-items: center;
}
nav ul li a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 7px 14px;
  border-radius: 10px;
  color: #235D3A;
  transition: background .15s, color .15s;
}
nav ul li a:hover, nav ul li a:focus {
  background: #E7EEE8;
  color: #5CA187;
}
nav .cta-btn {
  margin-left: 18px;
}

/* ==================== Footer ==================== */
footer {
  background: #235D3A;
  color: #fff;
  padding: 36px 0 24px 0;
  margin-top: 40px;
}
footer .container {
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.footer-logo img {
  height: 48px;
  margin-bottom: 12px;
}
footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin-bottom: 15px;
  justify-content: center;
}
footer ul li a {
  color: #FFF;
  font-weight: 500;
  border-radius: 10px;
  padding: 6px 12px;
  transition: background .16s, color .16s;
}
footer ul li a:hover { background: #5CA187; color: #fff; }
footer p {
  color: #E8F3EA;
  font-size: 0.95rem;
  text-align: center;
}

/* =========================================================
   FLEXBOX PATTERNS & KEY LAYOUT CLASSES  — NEVER GRID
   ========================================================= */
.features-grid, .categories-row, .tips-grid, .team-bios, .core-value-icons-row, .testimonials-row, .posts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
}
.features-grid > div,
.categories-row > div,
.tips-grid > div,
.team-bios > div,
.core-value-icons-row > div,
.posts-list > article {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 1px 8px rgba(35,93,58,0.06);
  padding: 26px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 220px; max-width: 330px;
  min-height: 150px;
  gap: 10px;
  border: 2px solid #E7EEE8;
  margin-bottom: 20px;
  transition: box-shadow .2s, border-color .15s, transform .2s;
}
.features-grid > div:hover, .categories-row > div:hover, .tips-grid > div:hover, .team-bios > div:hover, .posts-list > article:hover {
  border-color: #5CA187;
  box-shadow: 0 8px 32px rgba(92,161,135,0.15);
  transform: translateY(-2px) scale(1.01);
}
.categories-row > div, .features-grid > div { align-items: center; text-align: center; }
.core-value-icons-row > div {
  align-items: center;
  gap: 10px;
  background: #F5F8F3;
  border: none;
  box-shadow: none;
}
.core-value-icons-row img { height: 44px; margin-bottom: 10px; }

.testimonials-row {
  gap: 24px;
  justify-content: flex-start;
  margin-top: 16px;
  margin-bottom: 20px;
}
.testimonial-card {
  background: #F6FAF8;
  color: #235D3A;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(35,93,58,0.10);
  padding: 20px 24px;
  min-width: 240px; max-width: 340px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  font-style: italic;
  border-left: 6px solid #5CA187;
}
.testimonial-card span { color: #25382C; font-weight: 600; font-style: normal; }

.team-bios { gap: 24px; }
.team-bios > div {
  background: #E7EEE8;
  border: 1.5px solid #5CA187;
  min-width: 220px;
  max-width: 330px;
  text-align: left;
}

.values-showcase ul {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
  margin-bottom: 0;
  align-items: center;
  justify-content: flex-start;
}

.posts-list { gap: 24px; margin-bottom: 24px; }
.posts-list > article {
  flex: 1 1 260px;
  min-width: 220px;
  max-width: 340px;
  border-left: 4px solid #E7EEE8;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 8px rgba(35,93,58,0.06);
}
.posts-list > article:hover { border-left: 4px solid #235D3A; }

.featured-post {
  margin-top: 16px; 
  padding: 24px 18px;
  background: #5CA187;
  color: #fff;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 2px 16px rgba(35,93,58,0.14);
}
.featured-post h3, .featured-post p { color: #fff; }

.privacy-note {
  display: flex; align-items: center; gap: 8px;
  background: #E7EEE8; padding: 12px 18px; border-radius: 8px;
  font-size: .95rem;
  color: #235D3A;
}
.privacy-note img { height: 19px; width: 19px; }

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card { margin-bottom: 20px; position: relative; }
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.contact-details ul {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 12px;
}
.contact-details li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1rem;
  color: #235D3A;
}
.contact-details img { height: 21px; width: 21px; }

.map-embed {
  margin-top: 20px;
  background: #E7EEE8;
  padding: 16px 22px;
  border-radius: 11px;
  color: #235D3A;
}

.legal-text {
  background: #F9FCFA;
  border-radius: 10px;
  padding: 22px 18px;
  border: 1px solid #E7EEE8;
  color: #25382C;
  margin-bottom: 14px;
}
.legal-text h3 { margin-top: 18px; }

/* ==================== Utility & State Classes ==================== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.flex-align-center { display: flex; align-items: center; }
.rounded { border-radius: 999px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-32 { margin-bottom: 32px !important; }
.mt-32 { margin-top: 32px !important; }

/* ==================== Responsive Media Queries ==================== */
@media (max-width: 1024px) {
  .container { padding: 0 16px; }
  nav ul { gap: 14px; }
  .features-grid > div, .categories-row > div,
  .team-bios > div, .tips-grid > div, .posts-list > article {
    min-width: 180px;
    max-width: 100%;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .section,
  .hero {
    padding: 28px 8px;
    margin-bottom: 34px;
    border-radius: 18px;
  }
  nav ul, footer ul { gap: 10px; font-size: .96rem; }
  .content-wrapper {
    padding: 0;
  }
  .features-grid, .categories-row, .tips-grid, .testimonials-row, .team-bios, .core-value-icons-row, .posts-list, .values-showcase ul {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }
  .content-grid, .card-container, .text-image-section {
    flex-direction: column;
    gap: 18px;
  }
  .hero .container, .cta-banner {
    padding-left: 8px; padding-right: 8px;
  }
}
@media (max-width: 550px) {
  html { font-size: 15px; }
  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.05rem; }
  .container { padding: 0 4px; }
  .section, .hero { border-radius: 9px; padding: 15px 0 12px 0; }
  .footer-logo img, .logo img { height: 32px; }
}

/* ==================== Mobile Burger Menu ==================== */
.mobile-menu-toggle {
  display: none;
  background: #E7EEE8;
  color: #235D3A;
  border: none;
  font-size: 2rem;
  border-radius: 10px;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  margin-left: 8px;
  position: relative;
  z-index: 103;
  transition: background .16s;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover { background: #5CA187; color: #fff; outline: none; }
@media (max-width: 1024px) {
  .mobile-menu-toggle { display: flex; }
  nav ul, nav .cta-btn { display: none !important; }
}

.mobile-menu {
  position: fixed;
  top: 0; right: 0;
  width: 100vw; height: 100vh;
  background: rgba(35,93,58, 0.97);
  color: #fff;
  z-index: 102;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.66,0,.33,1);
  pointer-events: none;
  opacity: 0;
}
.mobile-menu.open {
  transform: translateX(0);
  pointer-events: auto;
  opacity: 1;
}
.mobile-menu-close {
  font-size: 2rem;
  color: #fff;
  background: #5CA187;
  border-radius: 40px;
  width: 46px;
  height: 46px;
  margin: 18px 30px 18px 0;
  align-self: flex-end;
  box-shadow: 0 2px 12px rgba(35,93,58,.08);
  border: 2px solid #E7EEE8;
  transition: background .15s, color .15s;
  display: flex; align-items: center; justify-content: center;
}
.mobile-menu-close:focus, .mobile-menu-close:hover {
  background: #235D3A;
  color: #E7EEE8;
  outline: none;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 1.12rem;
  width: 100%;
  align-items: flex-start;
  margin-top: 36px;
  padding-left: 42px;
}
.mobile-nav a {
  color: #fff;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  padding: 12px 0;
  border-radius: 9px;
  transition: background .18s, color .15s, transform .13s;
  display: inline-block;
  min-width: 120px;
}
.mobile-nav a:focus, .mobile-nav a:hover {
  background: #5CA187;
  color: #fff;
  transform: translateX(5px) scale(1.03);
}
@media (min-width: 1025px) {
 .mobile-menu, .mobile-menu-toggle { display: none !important; }
}

/* ==================== Cookie Consent Banner ==================== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  background: #fff;
  color: #25382C;
  box-shadow: 0 -2px 24px rgba(35,93,58,.11);
  padding: 22px 20px;
  z-index: 1200;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-radius: 20px 20px 0 0;
  transition: transform .3s cubic-bezier(.72,0,.28,1), opacity .2s;
  font-size: 1rem;
}
.cookie-banner.hide {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}
.cookie-banner .cookie-banner-text {
  flex: 1 1 280px;
  color: #235D3A;
}
.cookie-banner .cookie-banner-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
}
.cookie-banner button,
.cookie-banner .cookie-btn {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 9px;
  font-size: 1rem;
  border: 2px solid #5CA187;
  background: #5CA187;
  color: #fff;
  transition: background .15s, color .16s, border .15s;
  cursor: pointer;
}
.cookie-banner .cookie-btn.reject {
  background: #E7EEE8;
  color: #235D3A;
  border-color: #5CA187;
}
.cookie-banner .cookie-btn.reject:hover, .cookie-banner .cookie-btn.reject:focus {
  background: #235D3A;
  color: #fff;
}
.cookie-banner .cookie-btn.settings {
  background: #fff;
  color: #5CA187;
  border-color: #5CA187;
}
.cookie-banner .cookie-btn.settings:hover, .cookie-banner .cookie-btn.settings:focus {
  background: #E7EEE8;
  color: #235D3A;
}
@media (max-width: 700px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 8px;
    font-size: .96rem;
    gap: 16px;
  }
  .cookie-banner .cookie-banner-actions { justify-content: flex-end; gap: 10px; }
}

/* Cookie settings modal */
.cookie-modal-backdrop {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(27, 64, 44, 0.45);
  z-index: 1210;
  opacity: 0; transition: opacity .2s;
  pointer-events: none;
}
.cookie-modal-backdrop.open {
  opacity: 1; pointer-events: auto;
}
.cookie-modal {
  position: fixed;
  left: 50%; top: 48%;
  transform: translate(-50%, -50%) scale(1);
  background: #fff;
  color: #235D3A;
  border-radius: 28px;
  box-shadow: 0 11px 62px rgba(35,93,58,.18);
  z-index: 1220;
  max-width: 390px;
  width: 96vw;
  padding: 28px 24px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s, transform .34s;
}
.cookie-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1.05); }
.cookie-modal h2 {
  color: #235D3A; font-size: 1.2rem; margin-bottom: 2px; font-weight: 700; text-align: left;
}
.cookie-category {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  font-size: 1rem;
  padding: 12px 0;
}
.cookie-category input[type="checkbox"] {
  accent-color: #235D3A;
  width: 22px; height: 22px;
}
.cookie-category .label-main {
  flex: 1 1 auto;
  font-weight: 600;
  color: #25382C;
}
.cookie-category .label-note {
  color: #5CA187;
  font-size: 0.93em;
}
.cookie-category input[disabled] { opacity:.4; cursor: not-allowed; }
.cookie-modal .modal-actions {
  display: flex; flex-direction: row; gap: 14px; margin-top: 8px;
  justify-content: flex-end;
}
.cookie-modal .modal-actions button {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  border-radius: 9px;
  font-size: 1rem;
  border: 2px solid #5CA187;
  background: #5CA187;
  color: #fff;
  padding: 9px 19px;
  transition: background .15s, color .12s, border .12s;
  cursor: pointer;
}
.cookie-modal .modal-actions .cancel {
  background: #fff;
  color: #235D3A;
  border-color: #5CA187;
}
.cookie-modal .modal-actions .cancel:hover {
  background: #E7EEE8;
  color: #5CA187;
}
.cookie-modal .modal-actions .save {
  background: #235D3A;
  border-color: #235D3A;
  color: #fff;
}
.cookie-modal .modal-actions .save:hover {
  background: #5CA187; border-color: #5CA187; }

@media (max-width: 500px) {
  .cookie-modal { max-width: 98vw; padding: 17px 5vw 15px 5vw; }
}

/* ==================== Animations & Effects ==================== */
.cta-btn, .card, .features-grid > div, .categories-row > div, .tips-grid > div, .posts-list > article, .testimonial-card,
.cookie-banner, .cookie-modal, .mobile-menu, .mobile-menu-toggle {
  transition: box-shadow .22s cubic-bezier(.38, .25, .64, 1),
    border-color .18s, background .18s, color .18s, opacity .16s, transform .16s;
}

/* ==================== Geometric Structured Motifs ==================== */
.hero, .cta-banner, .section, .testimonial-card, .card, .features-grid > div, .categories-row > div,
.tips-grid > div, .team-bios > div, .values-showcase ul, .cookie-modal, .footer-logo img, .map-embed {
  /* Geometric corners */
  border-radius: 20px;
}
.cta-btn, .mobile-menu-toggle, .cookie-banner, .cookie-modal, .cookie-btn,
footer ul li a {
  border-radius: 999px; /* Geometric/circular buttons */
}
.hero {
  /* Add diagonal borders with a CSS polygon if wanted - not required */
  position: relative;
}
.hero::before {
  content: '';
  display: block;
  position: absolute;
  bottom: -38px; left: 0;
  width: 100%; height: 38px;
  clip-path: polygon(0 0, 100% 65%, 100% 100%, 0% 100%);
  background: #fff;
}
.testimonials-row, .features-grid, .categories-row, .tips-grid { margin-top: 10px; }

/* ==================== Accessibility/Contrast in Testimonials ==================== */
.testimonial-card {
  color: #235D3A;
  background-color: #F6FAF8; /* Highest contrast on light bg */
  border-left: 6px solid #5CA187;
}
.testimonial-card p {
  color: #235D3A;
  margin-bottom: 0;
}
.testimonial-card span {
  color: #25382C;
}

/* ==================== END ==================== */
