/* -----------------------------------------------------
  CSS RESET & NORMALIZATION (MOBILE FIRST)
----------------------------------------------------- */
html {
  font-size: 16px;
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
  border: 0;
}
body {
  min-height: 100vh;
  font-family: 'Roboto', Arial, sans-serif;
  background: #F5F5F5;
  color: #22313F;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}
ul, ol {
  list-style: none;
  padding-left: 0;
}
button {
  font: inherit;
  background: none;
  cursor: pointer;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  color: #22313F;
  font-weight: 700;
  margin-bottom: 16px;
}
h1 {
  font-size: 2rem;
  margin-bottom: 24px;
}
h2 {
  font-size: 1.5rem;
  margin-bottom: 18px;
}
h3 {
  font-size: 1.2rem;
  margin-bottom: 14px;
}
p {
  margin-bottom: 16px;
}
strong {
  font-weight: bold;
}

/* -----------------------------------------------------
  BRAND COLORS & TYPOGRAPHY
----------------------------------------------------- */
:root {
  --color-primary: #22313F;
  --color-secondary: #F5F5F5;
  --color-accent: #C19A6B;
  --color-bg-card: #fff;
  --color-bg-hero: #FDF8F4;
  --color-bg-footer: #EEE7DF;
  --color-border: #e7ded4;
  --color-shadow: rgba(193,154,107,0.07);
  --color-shadow-dark: rgba(34,49,63,0.15);
  --font-display: 'Montserrat', Arial, sans-serif;
  --font-body: 'Roboto', Arial, sans-serif;
}

/* -----------------------------------------------------
  LAYOUT CONTAINERS
----------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: transparent;
}

/* -----------------------------------------------------
  HEADER & NAVIGATION
----------------------------------------------------- */
header {
  width: 100%;
  background: var(--color-secondary);
  box-shadow: 0 2px 8px var(--color-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
header .container {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
  gap: 20px;
}
header img {
  height: 45px;
  margin-right: 16px;
}
.main-nav {
  display: none;
}
.main-nav a {
  font-size: 1rem;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover, .main-nav a:focus {
  background: var(--color-accent);
  color: #fff;
}
.mobile-menu-toggle {
  font-size: 2rem;
  background: var(--color-secondary);
  border: none;
  border-radius: 12px;
  padding: 5px 18px;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  transition: background 0.2s, box-shadow 0.2s;
  margin-left: auto;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  background: var(--color-accent);
  color: var(--color-secondary);
  box-shadow: 0 2px 8px var(--color-shadow);
}
/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(34,49,63,0.90);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  padding: 0 0 0 0;
}
.mobile-menu.active {
  transform: translateX(0);
}
.mobile-menu-close {
  font-size: 2.2rem;
  background: none;
  color: #fff;
  border: none;
  align-self: flex-end;
  margin: 24px 24px 0 0;
  padding: 4px 12px;
  border-radius: 10px;
  transition: background 0.2s;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 48px 0 0 32px;
}
.mobile-nav a {
  color: #fff;
  font-size: 1.22rem;
  font-family: var(--font-display);
  padding: 12px 0;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
  min-width: 210px;
  display: block;
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
}

/* Display nav for desktop */
@media (min-width: 992px) {
  .main-nav {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
  }
  .mobile-menu-toggle,
  .mobile-menu {
    display: none !important;
  }
}

/* -----------------------------------------------------
  HERO SECTION & CTA BUTTONS
----------------------------------------------------- */
.hero {
  background: var(--color-bg-hero);
  border-radius: 22px;
  box-shadow: 0 10px 28px var(--color-shadow);
  padding: 48px 24px 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: 2.25rem;
  color: var(--color-primary);
  line-height: 1.17;
}
.hero p {
  font-size: 1.17rem;
  max-width: 480px;
  color: #51402a;
  text-align: center;
  margin-bottom: 12px;
}
.cta-button {
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 14px 38px;
  box-shadow: 0 2px 12px var(--color-shadow);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
  margin-top: 10px;
  border: none;
  outline: none;
  cursor: pointer;
  display: inline-block;
  margin-bottom: 16px;
}
.cta-button:hover, .cta-button:focus {
  background: var(--color-primary);
  color: var(--color-accent);
  box-shadow: 0 8px 22px var(--color-shadow-dark);
}
.cta-button.secondary {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  transition: background 0.18s, color 0.18s;
}
.cta-button.secondary:hover, .cta-button.secondary:focus {
  background: var(--color-accent);
  color: #fff;
}

/* -----------------------------------------------------
  LISTS & FEATURES
----------------------------------------------------- */
.features-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
}
.features-list li {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 1.07rem;
  color: #51402a;
  background: #FFEEDA;
  padding: 12px 16px;
  border-radius: 16px;
  box-shadow: 0 2px 12px var(--color-shadow);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s;
}
.features-list li img {
  width: 32px;
  height: 32px;
}
.features-list li:hover, .features-list li:focus {
  box-shadow: 0 6px 18px var(--color-shadow-dark);
}

/* -----------------------------------------------------
  CARDS & CONTENT FLEX
----------------------------------------------------- */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-bg-card);
  border-radius: 22px;
  box-shadow: 0 2px 18px var(--color-shadow);
  padding: 28px 24px;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1.5px solid var(--color-border);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover, .card:focus {
  box-shadow: 0 8px 32px var(--color-shadow-dark);
  border-color: var(--color-accent);
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 28px;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    align-items: center;
  }
}

/**** Service Cards (servizi.html) ****/
.service-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.service {
  background: #FEF9F5;
  border: 1.5px solid var(--color-border);
  border-radius: 24px;
  box-shadow: 0 2px 14px var(--color-shadow);
  padding: 28px 20px 22px 20px;
  margin-bottom: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service h2 {
  font-size: 1.16rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.service h2 span {
  font-family: var(--font-body);
  background: var(--color-accent);
  color: #fff;
  border-radius: 9px;
  padding: 3px 12px;
  font-weight: 400;
  font-size: 1rem;
  margin-left: 8px;
}
.service:hover, .service:focus {
  border-color: var(--color-accent);
  box-shadow: 0 8px 28px var(--color-shadow-dark);
}

/* -----------------------------------------------------
  TESTIMONIALS
----------------------------------------------------- */
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #FFF9F4;
  border-radius: 20px;
  box-shadow: 0 4px 18px var(--color-shadow);
  margin-bottom: 20px;
  border: 1.5px solid #eed7ba;
  flex-direction: column;
  align-items: flex-start;
  max-width: 480px;
  color: #22313F;
  font-size: 1.01rem;
}
.testimonial-card span {
  color: var(--color-accent);
  font-size: 0.96rem;
  margin-top: 6px;
  font-family: var(--font-display);
}
.testimonial-card p {
  margin: 0 0 6px 0;
}
.testimonial-card strong {
  color: var(--color-primary);
}
@media (min-width: 640px) {
  .testimonial-card {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    max-width: 750px;
  }
}

/* -----------------------------------------------------
  FOOTER
----------------------------------------------------- */
footer {
  background: var(--color-bg-footer);
  padding: 40px 0 24px 0;
  border-top: 1.5px solid var(--color-border);
}
footer .container {
  flex-direction: row;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.footer-logo {
  flex: 0 0 auto;
}
.footer-logo img {
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 155px;
}
.footer-nav a {
  color: var(--color-primary);
  font-size: 0.98rem;
  font-family: var(--font-body);
  transition: color 0.18s, background 0.18s;
  border-radius: 8px;
  padding: 6px 0 6px 8px;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--color-accent);
  background: #fff3e3;
}
.footer-contact p {
  font-size: 0.93rem;
  color: #51402a;
  margin-top: 5px;
  line-height: 1.55;
}
@media (max-width: 768px) {
  footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

/* -----------------------------------------------------
  FORMS & LINKS
----------------------------------------------------- */
a {
  cursor: pointer;
  transition: color 0.17s;
}
a:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* -----------------------------------------------------
  FAQ & TEXT SECTIONS
----------------------------------------------------- */
.text-section {
  background: #fff;
  padding: 22px 18px;
  border-radius: 16px;
  box-shadow: 0 2px 12px var(--color-shadow);
  margin-bottom: 18px;
  border: 1px solid var(--color-border);
}
.text-section h2, .text-section h3 {
  margin-bottom: 8px;
}
.next-steps ul {
  margin-top: 10px;
  margin-bottom: 16px;
}
.next-steps li {
  margin-bottom: 8px;
  list-style: disc inside;
}

/* -----------------------------------------------------
  TYPOGRAPHY SCALES
----------------------------------------------------- */
@media (max-width: 600px) {
  h1 {
    font-size: 1.5rem;
  }
  h2 {
    font-size: 1.12rem;
  }
}
@media (min-width: 769px) {
  h1 {
    font-size: 2.75rem;
  }
  h2 {
    font-size: 2rem;
  }
  .hero {
    padding: 70px 65px;
  }
  .section {
    padding: 60px 32px;
  }
}

/* -----------------------------------------------------
  COOKIE CONSENT BANNER & MODAL
----------------------------------------------------- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #FFF9F4;
  border-top: 2.5px solid var(--color-accent);
  box-shadow: 0 -2px 28px var(--color-shadow-dark);
  padding: 18px 24px 14px 24px;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  animation: slidein 0.50s cubic-bezier(.4,0,.2,1);
}
.cookie-banner-message {
  color: var(--color-primary);
  font-size: 1.03rem;
  margin-right: 16px;
  max-width: 340px;
}
.cookie-banner-actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
}
.cookie-btn {
  background: var(--color-accent);
  color: #fff;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  padding: 8px 24px;
  border: none;
  box-shadow: 0 2px 8px var(--color-shadow);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.16s;
}
.cookie-btn:focus,
.cookie-btn:hover {
  background: var(--color-primary);
  color: var(--color-accent);
}
.cookie-btn.secondary {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}
.cookie-btn.secondary:hover,
.cookie-btn.secondary:focus {
  background: var(--color-accent);
  color: #fff;
}
@media (max-width: 650px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 8px 12px 8px;
  }
  .cookie-banner-message {
    margin-right: 0;
    max-width: 100%;
  }
}
@keyframes slidein {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: none; opacity: 1; }
}
/* Cookie Modal */
.cookie-modal {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(34,49,63, 0.47);
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  animation: fadein 0.27s;
}
@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal-content {
  background: #fff;
  padding: 32px 22px 28px 22px;
  border-radius: 24px;
  box-shadow: 0 6px 34px var(--color-shadow-dark);
  min-width: 310px;
  max-width: 95vw;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  animation: popup-in 0.33s cubic-bezier(.4,0,.2,1);
}
@keyframes popup-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.cookie-modal-close {
  position: absolute;
  top: 10px; right: 18px;
  background: none;
  color: var(--color-primary);
  font-size: 1.67rem;
  border: none;
  border-radius: 10px;
  padding: 4px 12px;
  transition: background 0.15s;
}
.cookie-modal-close:hover {
  background: var(--color-bg-footer);
}
.cookie-pref-category {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.cookie-pref-category label {
  font-size: 1rem;
  color: var(--color-primary);
}
.cookie-toggle {
  appearance: none;
  width: 38px;
  height: 22px;
  background: #EDD7BA;
  border-radius: 12px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
  margin-right: 7px;
}
.cookie-toggle:checked {
  background: var(--color-accent);
}
.cookie-toggle:before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.18s;
}
.cookie-toggle:checked:before {
  left: 19px;
}
.cookie-category-desc {
  font-size: 0.96rem;
  color: #7e6846;
  margin-bottom: 6px;
  margin-left: 34px;
}

/* -----------------------------------------------------
  ACCESSIBILITY FOCUS STATES
----------------------------------------------------- */
a:focus, button:focus, .cta-button:focus, .cookie-btn:focus, .mobile-menu-toggle:focus, .mobile-menu-close:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* -----------------------------------------------------
  MAP PLACEHOLDER (contatti.html)
----------------------------------------------------- */
.map-placeholder {
  background: #f3e7d9;
  color: #78664c;
  border-radius: 11px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-size: 1rem;
  margin-top: 10px;
  font-style: italic;
}

/* -----------------------------------------------------
  CATEGORY NAV (collezione.html)
----------------------------------------------------- */
.category-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}
.category-nav a {
  padding: 7px 18px;
  background: #FFF9F4;
  border-radius: 99px;
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  border: 1.5px solid var(--color-accent);
  box-shadow: 0 2px 8px var(--color-shadow);
  transition: background 0.2s, color 0.2s;
}
.category-nav a:hover, .category-nav a:focus {
  background: var(--color-accent);
  color: #fff;
}

/* -----------------------------------------------------
  FEATURED ITEMS & FLEX PATTERNS
----------------------------------------------------- */
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
}

/* -----------------------------------------------------
  GENERAL RESPONSIVE ADJUSTMENTS
----------------------------------------------------- */
@media (max-width: 900px) {
  .container {
    max-width: 100vw;
    padding: 0 10px;
  }
  .section {
    padding: 32px 5vw;
  }
}
@media (max-width: 600px) {
  .card, .hero, .text-section, .service, .testimonial-card, .card-content {
    padding-left: 10px;
    padding-right: 10px;
  }
  .section {
    padding: 26px 4vw;
  }
}

/* -----------------------------------------------------
  SPACING & GAPS FOR CONSISTENCY
----------------------------------------------------- */
section, .section {
  margin-bottom: 60px;
  padding-bottom: 0;
}
.card-container, .card-grid{
  gap: 24px;
}
.card {
  margin-bottom: 20px;
}
.content-grid{
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.text-image-section{
  gap: 30px;
  flex-wrap: wrap;
  align-items: center;
}
.testimonial-card{
  gap: 20px;
  padding: 20px;
}
.feature-item{
  gap: 15px;
  margin-bottom: 20px;
}

/* -----------------------------------------------------
  SUBTLE ANIMATIONS FOR MICRO-INTERACTIONS
----------------------------------------------------- */
.card, .cta-button, .service {
  transition: box-shadow 0.20s, border-color 0.18s, transform 0.14s;
}
.card:hover, .service:hover {
  transform: translateY(-5px);
}
.cta-button:active, .cookie-btn:active {
  transform: scale(0.98);
}

/* -----------------------------------------------------
  OVERRIDE HTML TAGS TO PREVENT OVERLAPPING
----------------------------------------------------- */
main > section, .container > section, .content-wrapper > section {
  margin-bottom: 60px;
}

/* -----------------------------------------------------
  PRINT STYLES
----------------------------------------------------- */
@media print {
  * {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
  }
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal {
    display: none !important;
  }
}

/* -----------------------------------------------------
  FONT-FACE FALLBACKS
----------------------------------------------------- */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap);
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Montserrat'), local('Montserrat-Bold'), url(https://fonts.googleapis.com/css?family=Montserrat:400,600,700&display=swap);
}
