/* 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, menu, 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, 
main, nav, output, ruby, section, summary, 
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  vertical-align: baseline;
  box-sizing: border-box;
}
article, aside, details, figcaption, figure, 
footer, header, hgroup, main, nav, section {
  display: block;
}
body {
  line-height: 1.6;
}
ol, ul {
  list-style: none;
}
a {
  background-color: transparent;
  text-decoration: none;
  color: inherit;
}
img {
  border-style: none;
  display: block;
  max-width: 100%;
  height: auto;
}
button {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

/* VINTAGE RETRO BRAND COLORS & FONTS (FALLBACKS) */
:root {
  --color-primary: #282C40;
  --color-secondary: #E2C044;
  --color-accent: #F8F8F4;
  --color-retro-red: #B05D3B;
  --color-retro-mint: #9FD8CB;
  --color-retro-blue: #5476A1;
  --color-retro-background: #F8F8F4;
  --color-card-bg: #FFF5E8;
  --color-card-border: #C1B497;
  --color-shadow: rgba(40,44,64,0.07);
  --color-grey: #888;
  --color-link: #347193;
  --color-link-hover: #B05D3B;

  --font-display: 'Montserrat', 'Bebas Neue', 'Oswald', Arial, sans-serif;
  --font-body: 'Open Sans', 'Roboto', 'Arial', sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--color-retro-background);
  color: var(--color-primary);
  min-height: 100vh;
  font-size: 16px;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: 1120px;
  padding: 0 20px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/***********************************/
/*       TYPOGRAPHY               */
/***********************************/
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-primary);
  line-height: 1.1;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 #fff, 0 2px 8px var(--color-shadow);
}
h1 {
  font-size: 2.75rem;
  margin-bottom: 16px;
}
h2 {
  font-size: 2rem;
  margin-bottom: 14px;
}
h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}
p, li, address {
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--color-primary);
  margin-bottom: 12px;
}
.subheadline {
  font-size: 1.15rem;
  color: var(--color-retro-red);
  font-style: italic;
  margin-bottom: 20px;
  font-family: var(--font-display);
}
strong {
  font-weight: 700;
  color: var(--color-retro-blue);
}

ul {
  padding-left: 16px;
  margin-bottom: 14px;
  list-style-position: inside;
}
ul li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 28px;
  color: var(--color-primary);
  font-size: 1rem;
}
ul li img {
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  filter: grayscale(45%) sepia(0.3) brightness(1.25);
}

/***********************************/
/*        HEADER & MAIN NAV        */
/***********************************/
header {
  background: var(--color-primary);
  padding: 0;
  box-shadow: 0 4px 24px var(--color-shadow);
  border-bottom: 4px solid var(--color-secondary);
  position: relative;
  z-index: 100;
}
header .container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 16px;
}
header img[alt="Rilam Metà Logo"] {
  height: 46px;
  width: auto;
  margin-right: 16px;
  filter: drop-shadow(1px 2px 0 #C1B497);
}
nav {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: center;
}
header nav a {
  font-family: var(--font-display);
  font-size: 1.01rem;
  color: var(--color-secondary);
  text-transform: uppercase;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
header nav a:hover,
header nav a:focus {
  color: var(--color-retro-red);
  background: var(--color-accent);
  box-shadow: 0 2px 14px var(--color-shadow);
  outline: none;
}
.cta-primary {
  background: var(--color-secondary);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  border-radius: 30px;
  padding: 12px 32px;
  border: none;
  letter-spacing: 0.06em;
  box-shadow: 0 2px 8px var(--color-shadow);
  margin-left: 16px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  position: relative;
}
.cta-primary:hover, .cta-primary:focus {
  background: var(--color-retro-red);
  color: var(--color-accent);
  box-shadow: 0 4px 20px var(--color-retro-blue);
}
.cta-secondary {
  background: var(--color-card-bg);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  border: 2px solid var(--color-secondary);
  border-radius: 30px;
  padding: 11px 30px;
  margin-top: 10px;
  box-shadow: 0 2px 8px var(--color-shadow);
  transition: background 0.15s, color 0.15s, border 0.15s;
}
.cta-secondary:hover, .cta-secondary:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
  border: 2px solid var(--color-retro-red);
  outline: none;
}

/***********************************/
/*        BURGER MOBILE MENU       */
/***********************************/
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-size: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  box-shadow: 0 2px 8px var(--color-shadow);
  transition: background 0.2s, color 0.2s;
  margin-left: 18px;
  z-index: 501;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--color-retro-blue);
  color: var(--color-accent);
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--color-retro-blue);
  color: var(--color-accent);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  transform: translateX(-105vw);
  transition: transform 0.35s cubic-bezier(.53,.08,.27,.97);
  box-shadow: 4px 0 24px var(--color-shadow);
}
.mobile-menu.active {
  transform: translateX(0);
}
.mobile-menu-close {
  font-size: 2rem;
  color: var(--color-secondary);
  background: transparent;
  margin: 24px 28px 4px 0;
  border: none;
  transition: color 0.2s;
  width: 44px; height: 44px;
  border-radius: 50%;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: var(--color-retro-red);
  background: rgba(226, 192, 68, 0.08);
  outline: none;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 40px 38px 8px 28px;
  gap: 24px;
}
.mobile-nav a {
  width: 100%;
  font-family: var(--font-display);
  color: var(--color-accent);
  font-size: 1.3rem;
  letter-spacing: 0.09em;
  padding: 15px 0 6px 0;
  border-bottom: 1px dotted rgba(248,248,244,0.21);
  transition: color 0.2s, background 0.19s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--color-secondary);
  background: rgba(220,187,55,0.12);
  outline: none;
}
@media (min-width: 992px) {
  .mobile-menu, .mobile-menu-toggle { display: none !important; }
}
@media (max-width: 991px) {
  header .container nav { display: none; }
  .cta-primary { display: none; }
  .mobile-menu-toggle { display: flex; }
}
/***********************************/
/*           MAIN HERO             */
/***********************************/
.hero {
  background: repeating-linear-gradient(135deg, #FAE5C2, #FFF6E4 24px, #FAE5C2 48px, #F8E0B8 56px);
  border-bottom: 3px solid var(--color-retro-mint);
  margin-bottom: 60px;
  min-height: 320px;
  box-shadow: 0 2px 12px var(--color-shadow);
}
.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 12px 34px 12px;
}
.hero .content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
}

/***********************************/
/*   SECTION SPACING & LAYOUTS     */
/***********************************/
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: transparent;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
.text-section {
  max-width: 700px;
  margin: 0 auto;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 18px;
}
.card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 14px;
  box-shadow: 0 2px 10px var(--color-shadow);
  margin-bottom: 20px;
  position: relative;
  padding: 30px;
  min-width: 240px;
  flex: 1 1 280px;
  transition: box-shadow 0.17s, transform 0.16s;
}
.card:hover, .card:focus-within {
  box-shadow: 0 6px 28px var(--color-retro-mint);
  transform: translateY(-4px) scale(1.012);
  border-color: var(--color-secondary);
}
.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;
}
/***********************************/
/*         TESTIMONIALS            */
/***********************************/
.testimonial-card {
  background: #fff;
  border: 2px solid var(--color-secondary);
  color: var(--color-primary);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px 28px 18px 28px;
  margin-bottom: 20px;
  box-shadow: 0 2px 16px var(--color-shadow);
  position: relative;
  transition: box-shadow 0.16s, border 0.15s;
}
.testimonial-card strong {
  color: var(--color-retro-mint);
  font-family: var(--font-display);
}
.testimonial-card p {
  margin: 0;
  color: var(--color-primary);
  font-size: 1.1rem;
}
.testimonial-card:before {
  content: '“';
  font-size: 2.5rem;
  color: var(--color-retro-red);
  position: absolute;
  top: 13px; left: 17px;
  font-family: var(--font-display);
  opacity: 0.25;
}
.testimonial-card:after {
  content: '”';
  font-size: 2.5rem;
  color: var(--color-retro-red);
  position: absolute;
  bottom: 6px; right: 17px;
  font-family: var(--font-display);
  opacity: 0.18;
}
/***********************************/
/*           FEATURES              */
/***********************************/
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 12px;
}
/***********************************/
/*           FOOTER                */
/***********************************/
footer {
  background: var(--color-primary);
  border-top: 4px solid var(--color-secondary);
  box-shadow: 0 -2px 20px var(--color-shadow);
  padding: 36px 0 30px 0;
  font-family: var(--font-display);
  color: var(--color-accent);
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}
footer nav {
  display: flex;
  flex-direction: row;
  gap: 24px;
}
footer nav a {
  color: var(--color-secondary);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.07em;
  padding: 8px 5px;
  transition: color 0.17s, border-bottom 0.17s;
  border-bottom: 1px solid transparent;
}
footer nav a:hover, footer nav a:focus {
  color: var(--color-retro-mint);
  border-bottom: 1px solid var(--color-retro-mint);
  outline: none;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.97rem;
  color: var(--color-accent);
}
.footer-contact address,
.footer-contact div {
  display: flex;
  align-items: center;
  gap: 7px;
}
.footer-contact a {
  color: var(--color-retro-mint);
  text-decoration: underline dotted;
  transition: color 0.16s;
}
.footer-contact a:hover, .footer-contact a:focus {
  color: var(--color-secondary);
}
.footer-contact img {
  width: 18px;
  height: 18px;
  opacity: 0.88;
  margin-right: 5px;
}

/***********************************/
/*           LISTS                 */
/***********************************/
.content-wrapper ul, .text-section ul {
  margin-bottom: 18px;
}
ul li {
  font-family: var(--font-body);
}

/***********************************/
/*           CONTACTS              */
/***********************************/
.contact-details p {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}
.contact-details a {
  color: var(--color-link);
  text-decoration: underline dashed;
  transition: color 0.17s;
}
.contact-details a:hover {
  color: var(--color-link-hover);
}
.contact-details img {
  width: 20px;
  height: 20px;
  opacity: 0.94;
}

/***********************************/
/*           MODALS                */
/***********************************/
.cookie-banner {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 1200;
  background: var(--color-card-bg);
  color: var(--color-primary);
  border-top: 2px solid var(--color-secondary);
  box-shadow: 0 -4px 18px var(--color-shadow);
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding: 26px 14px 18px 14px;
  width: 100%;
  font-family: var(--font-body);
  animation: banner-fade-in 0.38s cubic-bezier(.44,1.49,.54,.87);
  font-size: 1.05rem;
}
@keyframes banner-fade-in { from { opacity:0; transform: translateY(40px);} to { opacity:1; transform: translateY(0);} }
.cookie-banner .cookie-label {
  font-size: 1rem;
  margin-right: 10px;
}
.cookie-banner .cookie-btn {
  background: var(--color-secondary);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 600;
  padding: 11px 24px;
  border-radius: 22px;
  margin: 0 6px;
  border: 2px solid var(--color-secondary);
  transition: background 0.17s,color 0.17s;
  box-shadow: 0 2px 8px var(--color-shadow);
}
.cookie-banner .cookie-btn.cookie-reject {
  background: #fff;
  color: var(--color-primary);
  border: 2px solid var(--color-retro-red);
}
.cookie-banner .cookie-btn.cookie-settings {
  background: #fff;
  color: var(--color-primary);
  border: 2px solid var(--color-retro-blue);
}
.cookie-banner .cookie-btn:hover, .cookie-banner .cookie-btn:focus {
  background: var(--color-retro-blue);
  color: var(--color-accent);
  border: 2px solid var(--color-primary);
  outline: none;
}
.cookie-modal-backdrop {
  position: fixed;
  top:0; left:0;
  width: 100vw;
  height: 100vh;
  background: rgba(30,30,50,0.56);
  z-index: 1310;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.cookie-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}
.cookie-modal {
  background: var(--color-card-bg);
  color: var(--color-primary);
  border: 2.5px solid var(--color-secondary);
  border-radius: 18px;
  max-width: 90vw;
  width: 420px;
  box-shadow: 0 6px 48px var(--color-shadow);
  padding: 32px 28px 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: var(--font-body);
  z-index: 1550;
  animation: modal-in 0.36s cubic-bezier(.47,1.43,.72,.91);
}
@keyframes modal-in { from{opacity:0; transform: scale(0.93) translateY(50px);} to { opacity:1; transform: scale(1) translateY(0);} }
.cookie-modal h2 {
  font-size: 1.25rem;
  color: var(--color-retro-red);
  margin-bottom: 12px;
}
.cookie-modal .cookie-modal-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.cookie-modal .category-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.cookie-modal label {
  font-family: var(--font-display);
  font-size: 1.01rem;
  color: var(--color-primary);
}
.cookie-modal .switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}
.cookie-modal .switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cookie-modal .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--color-grey);
  border-radius: 20px;
  transition: background 0.23s;
}
.cookie-modal .switch input:checked + .slider {
  background: var(--color-retro-mint);
}
.cookie-modal .slider:before {
  content: '';
  position: absolute;
  left: 4px; top: 3px;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.21s;
}
.cookie-modal .switch input:checked + .slider:before {
  transform: translateX(20px);
}
.cookie-modal .save-btn {
  margin-top: 14px;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 700;
  padding: 12px 32px;
  border: none;
  border-radius: 18px;
  font-size: 1.08rem;
  transition: background 0.18s, color 0.18s, box-shadow 0.19s;
  box-shadow: 0 1.5px 6px var(--color-shadow);
}
.cookie-modal .save-btn:hover,.cookie-modal .save-btn:focus {
  background: var(--color-retro-blue);
  color: var(--color-accent);
  outline: none;
}
.cookie-modal .close-btn {
  background: none;
  color: var(--color-retro-red);
  border: none;
  font-size: 1.8rem;
  position: absolute;
  top: 13px; right: 20px;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}
.cookie-modal .close-btn:hover,.cookie-modal .close-btn:focus {
  color: var(--color-secondary);
  outline: none;
}
/***********************************/
/*    Responsive Layout (Mobile)    */
/***********************************/
@media (max-width: 991px) {
  .container,
  header .container,
  main .container,
  footer .container {
    padding-left: 12px; padding-right: 12px; max-width: 100%;
  }
  .content-wrapper, .text-section {
    align-items: stretch;
    gap: 18px;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.38rem; }
  h3 { font-size: 1.04rem; }
  .hero .container { padding: 38px 2px 22px 2px; }
  .hero {
    min-height: 240px;
    background-size: 112px 50px;
  }
  .section,
  .content-wrapper,
  .text-section {
    padding: 32px 8px;
    gap: 13px;
  }
  .card-container,
  .content-grid {
    flex-direction: column;
    gap: 16px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
    text-align: left;
  }
  footer .container, footer nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .footer-contact { font-size: 0.96rem; }
}
@media (max-width: 540px) {
  .hero .container { padding-top: 16px; padding-bottom: 14px; }
  .section { padding: 20px 3px; margin-bottom: 36px; }
  .card {
    padding: 20px 10px;
  }
  .testimonial-card {
    padding: 13px 8px;
  }
  .cookie-modal {
    padding: 16px 7px 16px 7px;
    font-size: 0.97rem;
    max-width: 98vw;
  }
  .cookie-banner {
    flex-direction: column;
    gap: 14px;
    font-size: 0.98rem;
    padding: 20px 2px 10px 2px;
    align-items: stretch;
  }
}
/***********************************/
/*           UTILITIES             */
/***********************************/
.mt-2 { margin-top: 16px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mb-3 { margin-bottom: 24px !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.flex-row { display: flex; flex-direction: row; gap: 12px; }
.flex-col { display: flex; flex-direction: column; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-20 { gap: 20px; }
.gap-32 { gap: 32px; }

/***********************************/
/*         MICRO-INTERACTIONS      */
/***********************************/
a, button, .cta-primary, .cta-secondary, .cookie-btn, .cookie-modal .save-btn, .mobile-menu-toggle, .mobile-menu-close {
  transition: background 0.18s, color 0.18s, box-shadow 0.14s, border 0.16s, outline-color 0.15s;
}
.card, .testimonial-card {
  transition: box-shadow 0.19s, transform 0.18s, border 0.18s;
}
.card:hover, .testimonial-card:hover {
  box-shadow: 0 8px 38px var(--color-retro-mint);
  border-color: var(--color-retro-blue);
  transform: scale(1.01) translateY(-3px);
}
.mobile-menu,
.cookie-modal-backdrop {
  transition: transform 0.35s, opacity 0.25s;
}

/***********************************/
/*         VINTAGE DETAILS         */
/***********************************/
h1, h2, h3 {
  text-transform: uppercase;
  letter-spacing: 0.11em;
  text-shadow: 0 2px 0 #fff1c1, 1px 3px 4px rgba(40,44,64,.06);
}
.section,
.hero {
  background-repeat: repeat;
}
/* Retro border pattern for sections */
.section:after {
  content: '';
  display: block;
  width: 90px;
  height: 6px;
  border-radius: 8px;
  margin: 32px auto 0 auto;
  background: repeating-linear-gradient(90deg, var(--color-secondary), var(--color-secondary) 15px, #fff5d9 15px, #fff5d9 30px);
  opacity: 0.25;
}
@media(max-width:540px){ .section:after{margin:16px auto 0 auto; width:62px;}}

/***********************************/
/*      ACCESSIBILITY & FOCUS      */
/***********************************/
a:focus, button:focus, .cta-primary:focus, .cta-secondary:focus,
.cookie-btn:focus, .cookie-modal .save-btn:focus {
  outline: 2px dashed var(--color-secondary);
  outline-offset: 3px;
}

/***********************************/
/*    OVERRIDES FOR COOKIE BANNER  */
/***********************************/
.cookie-banner[hidden] { display: none !important; }

/***********************************/
/*  ENSURE ADEQUATE SPACING        */
/***********************************/
.section, .content-wrapper, .testimonial-card, .card {
  margin-bottom: 20px;
}

/***********************************/
/*         FINAL SAFETY            */
/***********************************/
/* NO display: grid, columns, or clamp used! */
