/* RESET & BASE STYLES (Normalize + Reset) */
html { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; margin: 0; padding: 0; }
body, html {
  height: 100%;
  font-family: 'Lato', Arial, sans-serif;
  background-color: #F4F1EE;
  color: #2C3A47;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: #2C3A47; text-decoration: none; transition: color 0.18s; }
a:hover, a:focus { color: #436941; text-decoration: underline; }
ul, ol { margin-left: 1.5em; margin-bottom: 1em; }
li { margin-bottom: 0.6em; }
/* Brand Fonts */
h1, h2, h3, h4, h5, h6, .btn-primary, .btn-secondary {
  font-family: 'Merriweather', serif;
}
h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 16px; }
h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 8px; }
p, .subtitle { font-size: 1rem; line-height: 1.65; margin-bottom: 1em; }
.subtitle { color: #436941; margin-bottom: 1.8em; font-family: 'Lato', Arial, sans-serif; font-size: 1.12em; letter-spacing: 0.02em; }
strong { font-weight: 700; }
em { font-style: italic; }
/* Color Palette & Variables (with fallbacks) */
:root {
  --color-primary: #2C3A47;
  --color-secondary: #A67C52;
  --color-accent: #F4F1EE;
  --color-green: #436941;
  --color-eartchtone: #B3A580;
  --color-bg-light: #FAF8F4;
  --color-bg-dark: #2C3A47;
  --color-card: #FFF;
  --shadow-soft: 0 2px 12px rgba(67, 105, 65, 0.06);
  --radius-full: 24px;
  --radius-soft: 12px;
  --border-light: 1.5px solid #ECE3CE;
}

/* CONTAINERS & STRUCTURE */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.section,
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
}
@media (max-width: 768px) {
  .section, section { padding: 26px 7px; margin-bottom: 34px; }
  .container { padding: 0 7px; }
}

/* FLEXBOX PATTERNS & SPACING */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-card, #FFF);
  border: var(--border-light);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius-soft);
  padding: 24px 20px;
  margin-bottom: 20px;
  position: relative;
  flex: 1 1 260px;
  min-width: 240px;
}
.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;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: #FFF;
  border-radius: var(--radius-soft);
  box-shadow: 0 4px 24px rgba(67, 105, 65, 0.11);
  margin-bottom: 20px;
  min-width: 220px;
  border-left: 5px solid var(--color-green);
  color: #2C3A47;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
@media (max-width: 768px) {
  .text-image-section, .content-grid {
    flex-direction: column;
    gap: 18px;
  }
}

/* HEADER */
header {
  width: 100%;
  background: var(--color-accent, #F4F1EE);
  box-shadow: 0 2px 8px rgba(67, 105, 65, 0.035);
  z-index: 30;
  position: relative;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  min-height: 72px;
  gap: 18px;
}
header img { height: 46px; border-radius: 8px; background: transparent; }

/* MAIN NAV */
.main-nav {
  display: flex;
  flex-direction: row;
  gap: 24px;
}
.main-nav a {
  font-family: 'Merriweather', serif;
  font-size: 1rem;
  padding: 10px 0;
  border-radius: 3px;
  color: var(--color-primary);
  background: none;
  position: relative;
  transition: color 0.18s, background 0.22s;
}
.main-nav a:hover,
.main-nav a:focus {
  color: var(--color-green);
  background: rgba(166, 124, 82, 0.06);
}

/* PRIMARY BUTTON */
.btn-primary {
  background: var(--color-green, #436941);
  color: #FFF;
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-family: 'Merriweather', serif;
  font-weight: 600;
  transition: background 0.22s, transform 0.18s, box-shadow 0.22s;
  box-shadow: 0 4px 16px rgba(67, 105, 65, 0.10);
  cursor: pointer;
  display: inline-block;
  margin-left: 18px;
  letter-spacing: 0.025em;
}
.btn-primary:hover,
.btn-primary:focus {
  background: #2C3A47;
  color: #FFF;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 28px rgba(67, 105, 65, 0.18);
}

/* HAMBURGER BUTTON */
.mobile-menu-toggle {
  display: none;
  background: var(--color-green, #436941);
  color: #F4F1EE;
  border: none;
  font-size: 2.1rem;
  border-radius: 14px;
  padding: 2px 12px 1px 12px;
  margin-left: 10px;
  cursor: pointer;
  transition: background 0.20s, color 0.15s, box-shadow 0.17s;
  box-shadow: 0 2px 12px rgba(44, 58, 71, 0.09);
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  background: #2C3A47;
  color: #fff;
  outline: none;
  box-shadow: 0 6px 18px rgba(67, 105, 65, 0.22);
}

/* MOBILE MENU OVERLAY */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(244,241,238,0.98);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.77,0,0.175,1);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0;
  visibility: hidden;
}
.mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
}
.mobile-menu-close {
  background: var(--color-green, #436941);
  color: #fff;
  border: none;
  font-size: 2.1rem;
  border-radius: 14px;
  width: 44px; height: 44px;
  margin: 24px 32px 0 0;
  align-self: flex-end;
  cursor: pointer;
  transition: background 0.18s, color 0.12s, box-shadow 0.18s;
}
.mobile-menu-close:focus, .mobile-menu-close:hover {
  background: #2C3A47;
  color: #fff;
}
.mobile-nav {
  margin: 34px auto 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
  width: 90vw;
}
.mobile-nav a {
  font-family: 'Merriweather', serif;
  font-size: 1.18rem;
  color: #2C3A47;
  background: none;
  border-radius: 7px;
  width: 100%;
  padding: 13px 0 13px 8px;
  transition: background 0.18s, color 0.13s;
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  background: #eaf5e2;
  color: #436941;
}

/* Hide main nav, show mobile menu button */
@media (max-width: 1023px) {
  .main-nav { display: none !important; }
  .btn-primary { margin-left: 0; }
  .mobile-menu-toggle { display: block; z-index: 1100; }
}
@media (max-width: 680px) {
  header .container { min-height: 60px; }
  header img { height: 38px; }
}
@media (min-width: 1024px) {
  .mobile-menu { display: none !important; }
  .mobile-menu-toggle { display: none !important; }
}

/* HERO SECTIONS */
.hero, .catalogo-hero, .eventi-hero, .servizi-hero, .blog-hero, .contact-hero, .thank-you-section {
  background: linear-gradient(110deg, #eaf5e2 0%, #F4F1EE 60%, #f6ede4 100%);
  border-radius: var(--radius-soft);
  margin-bottom: 48px;
  box-shadow: 0 2px 16px rgba(166, 124, 82, 0.08);
}
.hero .content-wrapper, .catalogo-hero .content-wrapper,
.eventi-hero .content-wrapper, .servizi-hero .content-wrapper,
.blog-hero .content-wrapper, .contact-hero .content-wrapper,
.thank-you-section .content-wrapper {
  align-items: flex-start;
  padding: 26px 0 24px 0;
  gap: 20px;
}
@media (max-width: 768px) {
  .hero, .catalogo-hero, .eventi-hero, .servizi-hero, .blog-hero, .contact-hero, .thank-you-section {
    margin-bottom: 28px;
  }
  .hero .content-wrapper, .catalogo-hero .content-wrapper, .eventi-hero .content-wrapper, .servizi-hero .content-wrapper, .blog-hero .content-wrapper, .contact-hero .content-wrapper, .thank-you-section .content-wrapper {
    padding: 16px 0;
  }
}

/* FEATURE GRIDS */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  list-style: none;
  margin: 0;
  margin-top: 16px;
}
.feature-grid li {
  background: #fff;
  border: var(--border-light);
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);
  padding: 22px 18px;
  flex: 1 1 222px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 180px;
  transition: box-shadow 0.18s, border 0.18s, transform 0.15s;
}
.feature-grid li:hover {
  box-shadow: 0 8px 24px rgba(166, 124, 82, 0.13);
  border-color: #B3A580;
  transform: translateY(-2px) scale(1.02);
}
.feature-grid img {
  width: 38px; height: 38px; margin-bottom: 8px;
  filter: drop-shadow(0px 2px 8px #eaf5e2);
}

/* CARD-LIKE SECTIONS AND CATEGORIES */
.categories ul {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style-type: disc;
  padding-left: 24px;
  font-size: 1.09em;
  color: #436941;
}
.categories li { min-width: 150px; }
.cta-secondary, .cta-catalogo, .cta-eventi, .cta-newsletter {
  background: #eaf5e2;
  border-radius: var(--radius-full);
  box-shadow: 0 1.5px 8px rgba(67, 105, 65, 0.055);
  margin-bottom: 50px;
  display: flex;
}
.cta-secondary .content-wrapper, .cta-catalogo .content-wrapper, .cta-eventi .content-wrapper, .cta-newsletter .content-wrapper {
  align-items: center;
}
.cta-secondary h2, .cta-catalogo a, .cta-eventi h2, .cta-newsletter h2 {
  color: #2C3A47;
}
.cta-secondary .btn-primary, .cta-catalogo .btn-primary, .cta-eventi .btn-primary, .cta-newsletter .btn-primary {
  margin-top: 10px;
}

/* TESTIMONIALS */
.testimonials .testimonial-card {
  margin-top: 18px;
  border-left: 6px solid var(--color-secondary);
  background: #fff;
  color: #223029;
  box-shadow: 0 4px 24px rgba(44,58,71,0.14);
  transition: box-shadow 0.15s, border 0.15s, transform 0.13s;
}
.testimonial-card:hover {
  box-shadow: 0 10px 32px rgba(44,58,71,0.18);
  border-left: 6px solid var(--color-green);
  transform: translateY(-2px) scale(1.012);
}
.testimonial-card p {
  font-size: 1.13rem;
  line-height: 1.6;
  color: #223029;
}
.testimonial-card span {
  color: #436941;
  font-size: 0.98rem;
  font-family: 'Lato', sans-serif;
  font-style: italic;
}

/* FORMS & SEARCH BARS */
.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 12px 0;
}
.search-bar input[type="text"] {
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid #B3A580;
  font-size: 1rem;
  font-family: 'Lato', sans-serif;
  background: #FFFEFA;
  flex: 1 1 210px;
  outline: none;
  transition: border 0.17s;
}
.search-bar input[type="text"]:focus { border-color: #436941; }
.category-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 1rem; color: #2C3A47;
}
.category-filters span { font-weight: 700; margin-right: 7px; }
.category-filters a {
  color: #436941;
  background: #eaf5e2;
  border-radius: 7px;
  font-size: 0.97em;
  padding: 5px 13px;
  margin-right: 3px;
  transition: background 0.16s, color 0.13s;
}
.category-filters a:hover,
.category-filters a:focus {
  background: #B3A580;
  color: #fff;
}

/* SOCIAL */
.social-links {
  display: flex;
  flex-direction: row;
  gap: 14px;
  margin-top: 12px;
}
.social-links a { display: flex; align-items: center; }
.social-links img {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: #eaf5e2;
  padding: 3px;
  transition: background 0.16s;
}
.social-links a:hover img { background: #B3A580; }

/* FOOTER */
footer {
  background: #2C3A47;
  color: #FFF;
  padding: 36px 0 14px 0;
  margin-top: 56px;
}
footer .container {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}
.footer-logo img {
  width: 56px; height: 56px;
  filter: drop-shadow(0px 2px 14px #eaf5e2);
  border-radius: 6px;
  background: #fff;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.footer-nav a {
  color: #A67C52;
  font-size: 1rem;
  letter-spacing: 0.01em;
  transition: color 0.17s;
}
.footer-nav a:hover,
.footer-nav a:focus { color: #eaf5e2; }
.footer-info p {
  color: #F4F1EE;
  font-size: 0.99em;
  font-family: 'Lato', sans-serif;
  margin-bottom: 0;
}
.footer-info a { color: #A67C52; text-decoration: underline; }
.footer-info a:hover { color: #eaf5e2; }
/* Responsive Footer */
@media (max-width: 900px) {
  footer .container { flex-direction: column; gap: 20px; align-items: flex-start; }
}

/* TYPOGRAPHY SCALE */
h1 { font-size: 2.25rem; line-height: 1.13; }
h2 { font-size: 1.5rem; line-height: 1.2; }
h3 { font-size: 1.125rem; line-height: 1.28; }
p, li { font-size: 1rem; }
@media (max-width:500px) {
  h1 { font-size: 1.45rem; }
  h2 { font-size: 1.09rem; }
  h3 { font-size: 1rem; }
}

/* PRIVACY / POLICY / LEGAL */
.privacy-policy, .gdpr-section, .cookie-policy, .terms-section {
  background: #fff7ef;
  border-radius: 15px;
  box-shadow: 0 4px 36px rgba(166,124,82,0.03);
  padding: 36px 0;
}
.text-section {
  margin-top: 8px;
  margin-bottom: 22px;
  font-size: 1.01em;
  color: #2C3A47;
  line-height: 1.7;
}
.text-section h2 {
  color: #436941;
  font-size: 1.1em;
  margin-bottom: 10px;
}

/* ICON ALIGNMENT (for services or features lists with img) */
.services-list ul,
.contact-info ul,
.event-list ul,
.latest-posts ul {
  list-style: none;
  padding-left: 0;
}
.services-list ul li, .contact-info ul li, .event-list ul li, .latest-posts ul li  {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  background: #FFF;
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 10px 14px;
  box-shadow: 0 1.5px 9px rgba(44,58,71,0.05);
}
.services-list ul li img, .contact-info ul li img { min-width: 26px; max-width: 28px; margin-top: 2px; }

/* THANK YOU SECTION */
.thank-you-section {
  text-align: center;
  min-height: 320px;
}
.thank-you-section .content-wrapper { align-items: center; }
.thank-you-section h1 { color: #436941; margin-top: 16px; }
.thank-you-section a.btn-primary { margin-top: 22px; }

/* FLUID RESPONSIVE for major paddings and elements */
@media (max-width:650px) {
  .feature-grid { gap: 12px; }
  .feature-grid li { padding: 16px 11px; min-width:115px; }
  .testimonial-card { padding: 15px; gap: 10px; }
  .card { padding: 14px 10px; }
  .categories ul { gap: 5px; }
  .search-bar { gap:7px; }
  .cta-secondary,.cta-catalogo,.cta-eventi,.cta-newsletter { border-radius: 10px; }
}

/* ANIMATIONS & MICRO-INTERACTIONS */
.btn-primary, .mobile-menu-toggle, .mobile-menu-close {
  transition: background 0.18s, color 0.16s, box-shadow 0.22s, transform 0.15s;
}
section, .card, .testimonial-card, .feature-grid li, .cta-secondary, .cta-catalogo, .cta-eventi, .cta-newsletter {
  transition: box-shadow 0.16s, transform 0.13s;
}
.card:hover, .feature-grid li:focus-within, .feature-grid li:focus {
  transform: translateY(-2px) scale(1.018);
  box-shadow: 0 8px 28px rgba(166,124,82,0.13);
}

/* NATURE ORGANIC VISUALS: SHAPES & TEXTURES */
.hero, .cta-secondary, .cta-catalogo, .cta-eventi, .cta-newsletter {
  background: linear-gradient(117deg, #eaf5e2 2%, #F4F1EE 58%, #EFEFE8 98%);
  border-radius: 40px 100px 30px 70px/80px 40px 55px 28px;
}
.card, .testimonial-card, .feature-grid li {
  border-radius: 18px 50px 20px 30px/40px 18px 50px 20px;
}
.services-list ul li, .contact-info ul li {
  border-radius: 16px 40px 16px 24px/24px 16px 40px 16px;
}

/* COOKIE CONSENT BANNER */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1500;
  background: #fff7ef;
  color: #2C3A47;
  width: 100vw;
  box-shadow: 0 -4px 16px rgba(44,58,71,0.10);
  padding: 28px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: center;
  font-size: 1.05em;
  border-top: 3px solid #B3A580;
  transition: transform 0.34s cubic-bezier(0.77,0,0.175,1);
}
.cookie-banner.hide { transform: translateY(110%); }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .btn-cookie {
  font-family: 'Merriweather', serif;
  border-radius: 16px;
  border: none;
  font-size: 1rem;
  padding: 11px 23px;
  margin: 0 4px;
  cursor: pointer;
  transition: background 0.17s, color 0.21s, box-shadow 0.16s;
}
.btn-cookie-accept {
  background: #436941;
  color: #FFF;
  font-weight: bold;
}
.btn-cookie-accept:hover, .btn-cookie-accept:focus {
  background: #2C3A47;
}
.btn-cookie-reject {
  background: #B3A580;
  color: #2c3a47;
}
.btn-cookie-reject:hover, .btn-cookie-reject:focus {
  background: #A67C52;
  color: #fff;
}
.btn-cookie-settings {
  background: #F4F1EE;
  color: #2C3A47;
  border: 1px solid #B3A580;
}
.btn-cookie-settings:hover, .btn-cookie-settings:focus {
  background: #ede9e0;
  color: #436941;
}
/* COOKIE MODAL */
.cookie-modal-overlay {
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  width: 100vw; height: 100vh;
  background: rgba(44,58,71,0.63);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.21s;
  opacity: 0;
  pointer-events: none;
}
.cookie-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.cookie-modal {
  background: #fff7ef;
  color: #2C3A47;
  border-radius: 26px;
  box-shadow: 0 10px 60px rgba(44,58,71,0.18);
  padding: 36px 24px 28px 24px;
  min-width: 285px;
  max-width: 95vw;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cookie-modal h3 {
  color: #436941;
  font-size: 1.18em;
  margin-bottom: 8px;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 14px 0;
  padding: 8px 0;
  border-bottom: 1px solid #ECE3CE;
}
.cookie-modal .cookie-category:last-child { border-bottom: none; }
.cookie-modal label { font-size:1em; }
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px; height: 26px;
}
.toggle-switch input {
  opacity: 0; width: 0; height: 0;
}
.toggle-slider {
  position: absolute; cursor: pointer; top: 0; left: 0;
  right: 0; bottom: 0; background: #eaf5e2;
  transition: background 0.2s;
  border-radius: 16px;
}
.toggle-switch input:checked + .toggle-slider {
  background: #436941;
}
.toggle-slider:before {
  position: absolute; content: '';
  height: 19px; width: 19px; left: 4px; bottom: 3.5px;
  background: #fff; border-radius: 50%; transition: .18s;
  box-shadow: 0 2px 5px rgba(44,58,71,0.14);
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(16px);
}
.cookie-modal .modal-actions {
  display: flex; flex-direction: row; gap: 12px; margin-top: 20px;
  justify-content: flex-end;
}
.cookie-modal .btn-cookie { min-width: 105px; }

@media (max-width: 540px) {
  .cookie-modal { padding: 18px 5px 12px 5px; min-width: 120px; }
  .cookie-modal h3 { font-size: 1rem; }
}

/* ACCESSIBILITY & FOCUS */
a, button, .btn-primary, .cookie-banner button, .cookie-modal button {
  outline: none;
}
a:focus, button:focus, .btn-primary:focus, .cookie-banner button:focus, .cookie-modal button:focus {
  box-shadow: 0 0 0 3px #eaf5e2, 0 0 2px 3px #A67C52;
}

/* SCROLL & SELECT */
::-webkit-scrollbar { width: 8px; background: #F4F1EE; }
::-webkit-scrollbar-thumb { background: #B3A580; border-radius: 8px; }

::selection { background: #eaf5e2; color: #2C3A47; }

/* Hide Cookie Banner on Print */
@media print {
  .cookie-banner, .cookie-modal-overlay { display: none !important; }
}
