/* ================================================================= 
   CSS RESET & NORMALIZE
================================================================= */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  line-height: 1.6;
  background: #f5f3ee;
  color: #294138;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 16px;
  min-height: 100vh;
}

img, picture {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}
ul, ol, li {
  list-style-type: none;
}
button, input, textarea, select {
  font: inherit;
  border: none;
  background: none;
  outline: none;
  color: inherit;
}

/* ================================================================= 
   VARIABLE DEFINITIONS (w/ fallbacks)
================================================================= */
:root {
  --color-primary: #33635c;
  --color-secondary: #f7c873;
  --color-accent: #f5f3ee;
  --color-text-dark: #294138;
  --color-text-light: #ffffff;
  --color-grey: #e6e3dc;
  --color-danger: #aa3636;
  --shadow-card: 0 2px 12px rgba(34, 54, 47, 0.05);
  --radius-sm: 8px;
  --radius-md: 18px;
  --transition: 0.25s cubic-bezier(.4,0,.2,1);
}

/* Fonts for geometric_structured */
@import url('https://fonts.googleapis.com/css?family=Merriweather:700,900&display=swap');
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,600,700&display=swap');

h1, h2, h3, h4, h5, h6 {
  font-family: 'Merriweather', serif;
  font-weight: 900;
  color: var(--color-primary);
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}
h1 {
  font-size: 2.2rem;
  line-height: 1.15;
  margin-bottom: 18px;
  text-transform: uppercase;
}
h2 {
  font-size: 1.65rem;
  line-height: 1.2;
  margin-bottom: 12px;
}
h3 {
  font-size: 1.2rem;
  line-height: 1.22;
}
p,
li {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--color-text-dark);
  letter-spacing: 0.02em;
}

strong {
  font-weight: bold;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 18px;
  padding-right: 18px;
}

/* ================================================================= 
   HEADER / NAVIGATION
================================================================= */
header {
  width: 100%;
  background: var(--color-accent);
  box-shadow: 0 3px 22px rgba(34, 54, 47, 0.08);
  border-bottom: 3px solid var(--color-secondary);
  position: relative;
  z-index: 20;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 74px;
}
.logo img {
  height: 44px;
  width: auto;
}
.main-nav {
  display: flex;
  gap: 26px;
  align-items: center;
}
.main-nav a {
  font-family: 'Merriweather', serif;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.main-nav a:hover,
.main-nav a:focus {
  background: var(--color-secondary);
  color: #2e312b;
}

.cta-button {
  font-family: 'Merriweather', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-light);
  background: var(--color-primary);
  padding: 10px 28px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 16px rgba(51, 99, 92, 0.07);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 12px;
  transition: background var(--transition), box-shadow var(--transition), color var(--transition);
  border: none;
  cursor: pointer;
  position: relative;
}
.cta-button.primary {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.cta-button:hover, .cta-button:focus {
  background: #bfae65;
  color: var(--color-text-light);
  box-shadow: 0 6px 24px rgba(51, 99, 92, 0.14);
}

.mobile-menu-toggle {
  display: none;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-size: 2rem;
  border-radius: var(--radius-md);
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: none;
  transition: background var(--transition), color var(--transition);
  z-index: 51;
  cursor: pointer;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
  background: var(--color-primary);
  color: var(--color-accent);
}

/* Mobile menu overlay */
.mobile-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--color-accent);
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(.54,.09,.27,1.18);
  z-index: 999;
  box-shadow: 0 0 80px 0 rgba(34,54,47,0.15);
  padding-bottom: 40px;
  will-change: transform;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  margin: 22px 22px 18px 18px;
  align-self: flex-end;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-size: 2.1rem;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--color-primary);
  color: var(--color-accent);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 32px;
  margin-top: 10px;
}
.mobile-nav a {
  font-family: 'Merriweather', serif;
  font-size: 1.3rem;
  font-weight: bold;
  padding: 14px 0 14px 12px;
  border-radius: 12px;
  border-left: 6px solid transparent;
  color: var(--color-primary);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-secondary);
  color: #2e312b;
  border-left: 6px solid var(--color-primary);
}

/* Show/hide nav for mobile */
@media (max-width: 1024px) {
  .main-nav {
    display: none;
  }
  .cta-button.primary {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}

@media (min-width: 1025px) {
  .mobile-menu {
    display: none !important;
  }
}

/* ================================================================= 
   HERO & SECTION STRUCTURE
================================================================= */
/* Section margins and paddings as per requirements */
.section, 
.hero, .features, .about, .services, .contact, .contact-details, .legal, .testimonials {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.section:last-child, .hero:last-child, .features:last-child, .about:last-child, .services:last-child, .contact:last-child, .legal:last-child, .testimonials:last-child {
  margin-bottom: 0 !important;
}
.hero {
  background: var(--color-primary);
  color: var(--color-text-light);
  border-radius: var(--radius-md);
  margin-bottom: 56px;
}
.hero h1, .hero h2, .hero h3 {
  color: var(--color-secondary);
}
.hero p {
  color: var(--color-accent);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (min-width: 768px) {
  .content-wrapper {
    gap: 26px;
  }
}

/* ================================================================= 
   GEOMETRIC STRUCTURED GRIDS & LAYOUTS (MANDATORY CLASSES)
================================================================= */
/* Structured flex layouts (No Grid!) */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  margin-bottom: 18px;
}
@media (max-width: 900px) {
  .feature-grid {
    flex-direction: column;
    gap: 20px;
  }
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--color-accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 30px 24px;
  min-width: 240px;
  flex: 1 1 320px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover, .card:focus {
  box-shadow: 0 6px 34px rgba(51,99,92,0.16);
  transform: translateY(-6px) scale(1.015) rotate(-1deg);
}

.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;
}
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
}

.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #fff;
  color: #1c2d25;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  border: 2.5px solid var(--color-secondary);
  max-width: 740px;
  min-width: 0;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.testimonial-card blockquote {
  font-size: 1.12rem;
  color: var(--color-primary);
  font-family: 'Merriweather', serif;
  font-style: italic;
  line-height: 1.48;
}
.testimonial-card p {
  margin-left: 16px;
  font-size: 1rem;
  font-weight: 600;
}
.testimonial-card:hover {
  box-shadow: 0 8px 40px rgba(51, 99, 92, 0.20);
  border-color: var(--color-primary);
}
.testimonials .content-wrapper {
  gap: 20px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  padding: 22px 16px;
  transition: box-shadow var(--transition), background var(--transition), transform var(--transition);
  min-width: 210px;
  flex: 1 1 260px;
  margin-bottom: 20px;
  border: 2px solid transparent;
}
.feature-item:hover, .feature-item:focus {
  box-shadow: 0 6px 28px rgba(51, 99, 92, 0.13);
  background: var(--color-secondary);
  transform: translateY(-3px) scale(1.01) rotate(-1.5deg);
  border: 2px solid var(--color-primary);
}
.feature-item img {
  height: 42px;
  width: 42px;
  object-fit: contain;
  align-self: flex-start;
  margin-bottom: 4px;
}
.feature-item h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}

/* List styling within services or feature lists */
.services ul,
.contact-details ul,
.about ul,
.legal ul,
.features ul {
  margin-bottom: 12px;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.services ul li,
.contact-details ul li,
.legal ul li {
  position: relative;
  padding-left: 24px;
  color: var(--color-primary);
  font-size: 1rem;
  line-height: 1.7;
  font-family: 'Open Sans', Arial, sans-serif;
}
.services ul li::before,
.contact-details ul li::before,
.legal ul li::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--color-secondary);
  margin-right: 11px;
  position: absolute;
  left: 0; top: 10px;
}

/* ================================================================= 
   ABOUT, CONTACT, & LEGAL SECTION FORMATS
================================================================= */
.text-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal h1, .legal h2, .legal h3 {
  color: var(--color-primary);
  margin-top: 10px;
  margin-bottom: 8px;
}
.legal ul {
  margin-top: 6px;
}

/* ================================================================= 
   FOOTER
================================================================= */
footer {
  background: var(--color-primary);
  color: var(--color-text-light);
  padding: 38px 0 18px 0;
  margin-top: 40px;
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}
.footer-nav {
  display: flex;
  gap: 18px;
  margin-bottom: 13px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  color: var(--color-secondary);
  background: rgba(51, 99, 92, 0.18);
  font-family: 'Merriweather', serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 7px 13px;
  border-radius: 7px;
  transition: background var(--transition), color var(--transition);
}
.footer-nav a:hover, .footer-nav a:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.footer-contact {
  text-align: center;
  font-size: 1rem;
  color: var(--color-accent);
  margin-top: 6px;
}

/* ================================================================= 
   COOKIE CONSENT BANNER & MODAL
================================================================= */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 1200;
  background: var(--color-accent);
  color: var(--color-primary);
  border-top: 3px solid var(--color-secondary);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 26px 18px 18px 18px;
  font-size: 1rem;
  animation: slideUpB 0.5s;
}
@keyframes slideUpB {
  0% { transform: translateY(100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.cookie-banner p {
  color: var(--color-primary);
  margin-bottom: 8px;
}
.cookie-banner .cookie-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.cookie-btn {
  background: var(--color-primary);
  color: var(--color-text-light);
  border-radius: 16px;
  font-family: 'Merriweather', serif;
  text-transform: uppercase;
  border: none;
  padding: 10px 23px;
  font-weight: 800;
  font-size: 1rem;
  margin-top: 4px;
  box-shadow: 0 2px 22px 0 rgba(34,54,47,0.09);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.cookie-btn.accept {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.cookie-btn.reject {
  background: var(--color-danger);
  color: #fff;
}
.cookie-btn:hover, .cookie-btn:focus {
  background: var(--color-primary);
  color: var(--color-accent);
  box-shadow: 0 6px 28px rgba(51,99,92,0.14);
}
/* Cookie modal */
.cookie-modal-overlay {
  display: flex;
  flex-direction: column;
  position: fixed;
  z-index: 1203;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(51, 99, 92, 0.22);
  animation: fadeInCM 0.34s;
  align-items: center;
  justify-content: center;
}
@keyframes fadeInCM {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
.cookie-modal {
  background: var(--color-accent);
  color: var(--color-primary);
  border-radius: var(--radius-md);
  box-shadow: 0 5px 38px 0 rgba(51, 99, 92, 0.14);
  padding: 38px 23px 28px 23px;
  max-width: 390px;
  width: 94%;
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: slideDownCM 0.47s cubic-bezier(.4,0,.2,1);
}
@keyframes slideDownCM {
  0% { transform: translateY(-80px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.cookie-modal h3 {
  font-size: 1.17rem;
  font-family: 'Merriweather', serif;
  margin-bottom: 8px;
  color: var(--color-primary);
}
.cookie-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.cookie-switch {
  width: 44px; height: 26px;
  border-radius: 13px;
  background: var(--color-grey);
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: background var(--transition);
}
.cookie-switch[aria-checked="true"],
.cookie-switch[data-checked="true"] {
  background: var(--color-primary);
}
.cookie-switch .toggle {
  content: '';
  display: block;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--color-secondary);
  position: absolute;
  left: 3.5px; top: 3.5px;
  transition: left var(--transition);
}
.cookie-switch[aria-checked="true"] .toggle, .cookie-switch[data-checked="true"] .toggle {
  left: 22px;
  background: var(--color-secondary);
}
.cookie-modal .cookie-btns {
  display: flex;
  gap: 12px;
  flex-direction: row;
  justify-content: flex-end;
}

/* ================================================================= 
   BUTTON STYLES SHARED
================================================================= */
button, .cta-button, .cookie-btn {
  outline: none;
  border: none;
}
button:focus-visible, .cta-button:focus-visible, .cookie-btn:focus-visible {
  box-shadow: 0 0 0 2.5px var(--color-secondary);
}

/* ================================================================= 
   RESPONSIVE DESIGN & FLEX WRAPPING
================================================================= */
@media (max-width: 960px) {
  .feature-grid,
  .card-container,
  .content-grid {
    flex-direction: column;
    gap: 18px;
  }
  .footer-nav {
    gap: 10px;
  }
}
@media (max-width: 768px) {
  .container {
    padding-left: 8px;
    padding-right: 8px;
  }
  header .container {
    min-height: 58px;
    padding: 0 5px;
    gap: 8px;
  }
  .section, .hero, .features, .about, .services, .contact, .contact-details, .legal, .testimonials {
    padding: 26px 3px !important;
    margin-bottom: 36px;
  }
  h1 { font-size: 1.45rem; }
  h2 { font-size: 1.15rem; }
  h3 { font-size: 1.02rem; }
  .card, .feature-item {
    min-width: unset;
    box-sizing: border-box;
    width: 100%;
    padding: 15px 8px;
  }
  .testimonial-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 7px;
    min-width: unset;
    box-sizing: border-box;
  }
}
@media (max-width: 480px) {
  .hero, .footer-contact {
    font-size: 0.97rem;
  }
  h1 {
    font-size: 1.12rem;
    margin-bottom: 9px;
    margin-top: 0px;
  }
}

/* Extra geometric flair: angular corners for blockquotes & highlight cards */
blockquote {
  background: var(--color-accent);
  border-left: 6px solid var(--color-secondary);
  padding: 10px 20px;
  border-radius: 0 16px 16px 0;
  font-style: italic;
  margin-bottom: 6px;
}

/* Micro-interactions for UI elements */
.cta-button:active, .cookie-btn:active, button:active {
  transform: scale(0.96);
}

/* Hide scroll when cookie/modal open (set via JS) */
body.menu-open, body.cookie-modal-open {
  overflow: hidden;
}

/* ================================================================= 
   ACCESSIBILITY & UTILITY CLASSES
================================================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ================================================================= 
   ENSURE NON-OVERLAPPING FLEX LAYOUTS
================================================================= */
.section > *, .features > *, .about > *, .services > *, .contact > *, .legal > * {
  margin-bottom: 20px;
}
.section > *:last-child, .features > *:last-child, .about > *:last-child, .services > *:last-child, .contact > *:last-child, .legal > *:last-child {
  margin-bottom: 0;
}

/* ================================================================= 
   PRINT (optional: tidy print-outs)
================================================================= */
@media print {
  *, *:before, *:after { background: transparent !important; color: #111 !important; box-shadow: none !important; text-shadow: none !important; }
  header, nav, .cta-button, .mobile-menu, .cookie-banner, .cookie-modal-overlay, footer { display: none !important; }
}
