/* ------------------------------------------------------
   CSS RESET & NORMALIZE (Mobile-first, wide browser)
------------------------------------------------------ */
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;
}
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.6;
  background: #F8F6F0;
  color: #2C3143;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
ul, ol {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
img {
  border: none;
  max-width: 100%;
  display: block;
}
button, input, select, textarea {
  font: inherit;
  outline: none;
  background: none;
  border: none;
}
input[type="text"] {
  appearance: none;
  background: #fff;
  border: 1px solid #ADA075;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 16px;
  width: 100%;
  color: #2C3143;
}
input[disabled], button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- Root Variables --- */
:root {
  --brand-primary: #2C3143;
  --brand-secondary: #ADA075;
  --brand-accent: #F8F6F0;
  --brand-green: #597849;
  --brand-earth: #E2D4B7;
  --brand-dark: #222624;
  --brand-error: #d9534f;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --shadow-md: 0 2px 8px 0 rgba(70,60,20,0.08);
  --shadow-lg: 0 5px 20px 0 rgba(80,70,30,0.14);
  --font-display: 'Merriweather', serif;
  --font-body: 'Roboto', Arial, Helvetica, sans-serif;
}

/* ------------------------------------------------------
   Typography
------------------------------------------------------ */
h1, .hero h1 {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 16px;
  line-height: 1.2;
}
h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brand-green);
  margin-bottom: 16px;
  line-height: 1.25;
}
h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--brand-primary);
  margin-bottom: 8px;
  line-height: 1.25;
}
h4 {
  font-family: var(--font-body);
  font-size: 1.125rem;
  margin-bottom: 8px;
  color: var(--brand-green);
  font-weight: 500;
}
p {
  font-size: 1rem;
  color: var(--brand-dark);
  margin-bottom: 12px;
}
strong {
  font-weight: 600;
  color: var(--brand-green);
}
em {
  font-style: italic;
}
.subheadline {
  font-size: 1.125rem;
  color: var(--brand-secondary);
  margin-bottom: 24px;
  font-family: var(--font-body);
}

/* ------------------------------------------------------
   Layout & Spacings (Mobile-first)
------------------------------------------------------ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  gap: 20px;
}
.section, main > section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
/* Remove background, border for .hero, .cta sections */
section.hero,
section.hero-catalogo,
section.cta-catalog,
section.cta-event,
section.cta-social,
section.cta-suggestion,
section.cta-servizi,
section.custom-order-cta,
section.thank-you {
  background: none;
  box-shadow: none;
}


/* Flex containers */
.feature-grid, .services-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
}
.feature-grid > div,
.services-grid > div {
  flex: 1 1 280px;
  min-width: 220px;
  background-color: var(--brand-accent);
  border-radius: var(--radius-md);
  padding: 24px 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.2s, transform 0.18s;
}
.feature-grid > div:hover, .services-grid > div:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px) scale(1.012);
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.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;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--brand-earth);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  flex-direction: column;
  color: #23281f;
  min-width: 0;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--brand-accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 24px 18px 20px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.14s, transform 0.14s;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Utility classes */
.mb-0 { margin-bottom: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-column { flex-direction: column; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

/* Ensure container spacing not overlap */
main > section:not(:first-child) {
  margin-top: 20px;
}

/* ---------------------------------------------
   Header / Navigation
---------------------------------------------- */
header {
  background: var(--brand-accent);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 50;
  box-shadow: 0 1px 8px 0 rgba(90,70,20,0.08);
}
header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
  padding: 12px 16px;
}
.logo img {
  height: 46px;
  width: auto;
  border-radius: var(--radius-sm);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-body);
  font-size: 1rem;
}
.main-nav a {
  padding: 6px 9px;
  border-radius: var(--radius-md);
  font-weight: 500;
  color: var(--brand-primary);
  transition: background 0.14s, color 0.18s;
  position: relative;
}
.main-nav a:hover,
.main-nav a:focus {
  background: var(--brand-earth);
  color: var(--brand-green);
}

/* Hamburger Button (Mobile only below 1024px) */
.mobile-menu-toggle {
  background: var(--brand-green);
  color: #fff;
  font-size: 2rem;
  border-radius: var(--radius-md);
  padding: 6px 14px;
  border: none;
  cursor: pointer;
  display: none;
  transition: background 0.12s;
  z-index: 200;
}
.mobile-menu-toggle:active,
.mobile-menu-toggle:focus {
  background: var(--brand-secondary);
}

/* ---------------------------------------------
   MOBILE MENU Overlay
---------------------------------------------- */
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(44,49,67,0.97);
  z-index: 250;
  transform: translateX(-100%);
  transition: transform 0.36s cubic-bezier(.4,.66,.3,1);
  display: flex;
  flex-direction: column;
  padding: 0;
}
.mobile-menu.open {
  transform: translateX(0%);
}
.mobile-menu-close {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  font-size: 2rem;
  border: none;
  align-self: flex-end;
  margin: 22px 22px 0 0;
  padding: 5px 17px;
  border-radius: var(--radius-md);
  cursor: pointer;
  z-index: 300;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 52px;
  padding: 0 36px;
}
.mobile-nav a {
  color: #fff;
  font-size: 1.3rem;
  padding: 12px;
  border-radius: var(--radius-md);
  background: none;
  transition: background 0.14s, color 0.12s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--brand-green);
  color: #F8F6F0;
}

@media (max-width: 1023px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}
@media (min-width: 1024px) {
  .mobile-menu {
    display: none !important;
  }
}

/* ---------------------------------------------
   Hero (Nature-Inspired Accents)
---------------------------------------------- */
.hero, .hero-catalogo {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #F8F6F0 64%, #E2D4B7 100%);
  border-radius: var(--radius-lg);
  padding-bottom: 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 44px;
  flex-direction: column;
}
.hero .content-wrapper,
.hero-catalogo .content-wrapper {
  align-items: flex-start;
  padding: 10px 0 0 0;
}

/* ---------------------------------------------
   Book/Highlights/Events/Team Cards
---------------------------------------------- */
.featured-books, .team-list, .event-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
}
.featured-books > div, .event-card, .staff-bio {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 22px 18px;
  min-width: 210px;
  flex: 1 1 260px;
  transition: box-shadow 0.18s, transform 0.16s;
}
.event-card:hover, .featured-books > div:hover, .staff-bio:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}
.team-list {
  gap: 24px;
  flex-wrap: wrap;
}
.staff-bio {
  margin-bottom: 20px;
}

/* ---------------------------------------------
   CTA Sections
---------------------------------------------- */
.cta-catalog .btn,
.cta-event .btn,
.cta-suggestion .btn,
.cta-servizi .btn,
.cta-social .btn,
.custom-order-cta .btn,
.thank-you .btn {
  margin: 18px 0 0 0;
  font-size: 1.10rem;
  font-weight: 600;
}

.reading-tips-preview {
  background: var(--brand-earth);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.reading-tips-preview .btn {
  margin-top: 0;
}

.event-list-preview, .book-review-list, .staff-recommendations, .book-recommendation-list, .benefit-list {
  margin: 0 0 20px 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.event-list-preview li, .book-review-list li, .staff-recommendations li, .book-recommendation-list li, .benefit-list li {
  font-size: 1rem;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 12px;
}
.event-list-preview strong {
  color: var(--brand-secondary);
  font-weight: 700;
}

/* ---------------------------------------------
   Buttons
---------------------------------------------- */
.btn, button.btn, input[type="submit"].btn {
  display: inline-block;
  background: var(--brand-green);
  color: #fff;
  padding: 12px 26px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(40,40,20,0.08);
  border: none;
  transition: background 0.16s, box-shadow 0.16s, color 0.14s, transform 0.13s;
  margin-right: 12px;
  margin-bottom: 10px;
  outline: none;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--brand-primary);
  color: #fff;
}
.btn:hover, .btn:focus {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  box-shadow: 0 2px 16px rgba(80,70,30,0.18);
  transform: translateY(-1px) scale(1.04);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--brand-green);
  color: #fff;
}

/* ---------------------------------------------
   Footer
---------------------------------------------- */
footer {
  background: var(--brand-primary);
  color: #F8F6F0;
  padding: 40px 0 20px 0;
  position: relative;
  box-shadow: 0 -2px 14px 0 rgba(39,47,38,0.07);
}
footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-logo img {
  height: 44px;
  width: auto;
  border-radius: var(--radius-md);
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-nav a {
  color: #F8F6F0;
  font-size: 1rem;
  padding: 2px 0;
  transition: opacity 0.16s;
}
.footer-nav a:hover {
  opacity: 0.65;
}
.footer-contact p {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  margin-bottom: 6px;
  color: #F8F6F0;
  opacity: 0.82;
}
.footer-contact img {
  width: 20px; height: 20px;
}

/* ---------------------------------------------
   Contact & Social (Contatti)
---------------------------------------------- */
.contact-info ul {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}
.contact-info li, .contact-info a {
  color: var(--brand-dark);
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.map-placeholder {
  margin-top: 16px;
  padding: 16px 12px;
  background: var(--brand-accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.social-icons {
  display: flex;
  gap: 16px;
  margin: 14px 0 10px 0;
  align-items: center;
  justify-content: flex-start;
}
.social-icons img {
  width: 38px;
  height: 38px;
  border-radius: 100px;
  background: var(--brand-earth);
  padding: 4px;
  box-shadow: 0 1px 4px rgba(110,90,30,0.11);
}

/* ---------------------------------------------
   Cards/Lists + Misc
---------------------------------------------- */
.categories ul,
.services-grid,
.benefit-list {
  margin: 14px 0 0 0;
}

.featured-collections ul,
.custom-order-cta ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.featured-collections h3 {
  color: var(--brand-green);
  margin-bottom: 8px;
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px 0 24px 0;
}
.search-bar label {
  color: var(--brand-green);
  font-weight: 600;
}


/* ------------------------------
   Table/Miscellaneous
------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
th, td {
  padding: 14px 18px;
  font-size: 1rem;
}
th {
  background: var(--brand-earth);
  color: var(--brand-primary);
  font-weight: 600;
}
td {
  color: var(--brand-dark);
}

/* ---------------------------------------------
   TESTIMONIALS
---------------------------------------------- */
.testimonials .testimonial-card {
  margin-top: 18px;
  margin-bottom: 24px;
  font-size: 1.06rem;
  line-height: 1.55;
  font-family: var(--font-body);
  background: var(--brand-earth);
  color: #23281f;
  box-shadow: var(--shadow-md);
}
.testimonial-card span {
  font-size: 0.97rem;
  color: var(--brand-green);
  font-weight: 500;
  margin-left: 0;
  margin-top: 7px;
}

/* ---------------------------------------------
   Cookie Consent Banner
---------------------------------------------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  background: var(--brand-earth);
  color: var(--brand-dark);
  box-shadow: 0 -4px 18px 0 rgba(60,47,19,0.13);
  z-index: 400;
  padding: 18px 26px 18px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 1rem;
  transition: transform 0.32s;
  transform: translateY(0);
}
.cookie-banner.hide {
  transform: translateY(170%);
  pointer-events: none;
}
.cookie-banner .cookie-banner-msg {
  flex: 1 1 250px;
  color: var(--brand-dark);
}
.cookie-banner .btn {
  font-size: 0.97rem;
  padding: 9px 19px;
  border-radius: var(--radius-sm);
  margin: 0 6px 0 0;
}
.cookie-banner .btn-reject {
  background: none;
  color: var(--brand-green);
  border: 1px solid var(--brand-green);
}
.cookie-banner .btn-reject:hover {
  background: var(--brand-green);
  color: #fff;
}
.cookie-banner .btn-settings {
  background: var(--brand-secondary);
  color: var(--brand-primary);
}
.cookie-banner .btn-settings:hover {
  background: var(--brand-green);
  color: #fff;
}

/* Cookie Modal */
.cookie-modal-backdrop {
  background: rgba(44,49,67,0.6);
  position: fixed;
  z-index: 450;
  top: 0; left: 0; width: 100vw; height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.15s;
}
.cookie-modal {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 380px;
  width: 92vw;
  padding: 36px 28px 26px 28px;
  position: relative;
  animation: cookieModalFadeIn 0.27s cubic-bezier(.5,0,0,1) both;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@keyframes cookieModalFadeIn {
  0% { transform: scale(0.92) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.cookie-modal h3 {
  font-size: 1.28rem;
  color: var(--brand-green);
  margin-bottom: 8px;
  font-family: var(--font-display);
}
.cookie-modal label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  margin-bottom: 5px;
}
.cookie-modal input[type='checkbox'] {
  accent-color: var(--brand-green);
  width: 20px;
  height: 20px;
}
.cookie-modal .btn {
  font-size: 1rem;
  margin-top: 16px;
}
.cookie-modal .cookie-modal-close {
  position: absolute;
  top: 13px;
  right: 19px;
  background: var(--brand-secondary);
  color: var(--brand-primary);
  border-radius: var(--radius-sm);
  padding: 2px 10px;
  font-size: 1.35rem;
  border: none;
  cursor: pointer;
}

/* ---------------------------------------------
   Responsive Styles
---------------------------------------------- */
@media (max-width: 1023px) {
  .container {
    padding: 0 12px;
  }
  footer .container {
    flex-direction: column;
    gap: 26px;
    align-items: flex-start;
  }
}
@media (max-width: 900px) {
  .feature-grid, .team-list, .services-grid, .featured-books {
    gap: 14px;
  }
  .feature-grid > div, .team-list > div,
  .services-grid > div, .featured-books > div {
    min-width: 180px;
    padding: 18px 12px;
  }
}
@media (max-width: 768px) {
  h1, .hero h1, .hero-catalogo h1 {
    font-size: 1.53rem;
  }
  h2 {
    font-size: 1.14rem;
  }
  .container {
    padding: 0 6px;
  }
  section, main > section, .section {
    padding: 24px 7px;
  }
  .content-wrapper {
    padding: 0;
    gap: 15px;
  }
  .feature-grid, .team-list, .services-grid, .featured-books {
    flex-direction: column;
    gap: 14px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
  .content-grid {
    flex-direction: column;
    gap: 14px;
  }
  .card-container {
    flex-direction: column;
    gap: 14px;
  }
  .mobile-nav {
    padding: 0 14px;
    gap: 14px;
    margin-top: 34px;
  }
  .featured-books > div, .event-card, .staff-bio {
    font-size: 0.97rem;
    min-width: 0;
    padding: 14px 8px;
  }
  .testimonial-card {
    padding: 14px 7px;
    font-size: 0.998rem;
  }
  .cookie-modal {
    padding: 26px 7px 18px 7px;
    max-width: 98vw;
  }
  .footer-logo img {
    height: 38px;
  }
}
@media (max-width: 510px) {
  .footer-contact p {
    font-size: 0.85rem;
  }
  .cookie-banner {
    font-size: 0.89rem;
    padding: 10px 6px;
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------------------------------------------
   Organic/Nature Visual Accents
---------------------------------------------- */
.card, .feature-grid > div, .services-grid > div, .featured-books > div, .event-card, .staff-bio, .reading-tips-preview, .testimonial-card, .map-placeholder {
  border-radius: 32% 26% 17% 22% / 28% 33% 23% 35%;
}
.section, .content-wrapper, .cookie-modal {
  border-radius: 34% 16% 24% 20% / 35% 25% 26% 37%;
}

/**** Micro-Interactions & Animations ****/
.btn, .feature-grid > div, .event-card, .card {
  transition: background 0.18s, color 0.13s, box-shadow 0.16s, transform 0.13s;
}
.feature-grid > div:active, .services-grid > div:active, .card:active {
  transform: scale(0.985);
}
@media (hover: hover) {
  .btn:hover, .feature-grid > div:hover, .card:hover, .event-card:hover {
    box-shadow: var(--shadow-lg);
    filter: brightness(1.04);
  }
}

/* ----- Disabled Button Fix ----- */
button[disabled], .btn[disabled] {
  background: #A3AC8C !important;
  color: #ededed !important;
  opacity: 0.7;
  cursor: not-allowed;
}

/* ---------------------------------------------
   Accessibility: focus
---------------------------------------------- */
a:focus, button:focus, .btn:focus, input:focus {
  outline: 2px solid var(--brand-green);
  outline-offset: 1.5px;
}

/* ---------------------------------------------
   Form/Disabled notices
---------------------------------------------- */
.text-section em {
  color: var(--brand-error);
  font-size: 0.97rem;
  margin-top: 7px;
}

/**** END ****/
