/* ------------------------------------------------------
   CSS RESET & NORMALIZATION
--------------------------------------------------------- */
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 {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: #fff;
  color: #222;
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: 0.02em;
}

*, *::before, *::after {
  box-sizing: inherit;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
a:focus {
  outline: 2px solid #DA9955;
  outline-offset: 2px;
}
input, button, textarea, select {
  font: inherit;
}
button {
  border: none;
  background: none;
  cursor: pointer;
}

/* ------------------------------------------------------
   VARIABLES & TYPOGRAPHY
--------------------------------------------------------- */
:root {
  --color-primary: #2F3D4C;
  --color-secondary: #DA9955;
  --color-accent: #F7F2ED;
  --color-electric-1: #FF007A;
  --color-electric-2: #19D4D9;
  --color-electric-3: #F5C32C;
  --color-bg: #fff;
  --color-dark: #10121C;
  --color-muted: #717B8A;
  --color-cardbg: #FFF9E6;
  --color-shadow: rgba(32,47,76, 0.09);
  --color-shadow-bold: rgba(42,110,169,0.16);
  --font-display: 'Montserrat', 'Arial Black', Arial, Helvetica, sans-serif;
  --font-body: 'Lato', Arial, Helvetica, sans-serif;
  --radius: 18px;
  --radius-sm: 10px;
  --transition: all 0.22s cubic-bezier(.55,0,.23,1);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
  color: var(--color-primary);
}
h1 {
  font-size: 2.4rem;
  margin-bottom: 20px;
  line-height: 1.12;
  text-shadow: 0 4px 24px var(--color-electric-3, #f5c32c19);
}
h2 {
  font-size: 1.65rem;
  margin-bottom: 18px;
  line-height: 1.15;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  line-height: 1.15;
}
h4 {
  font-size: 1.1rem;
}
p, ul, ol {
  color: var(--color-dark);
  margin-bottom: 14px;
}
strong {
  color: var(--color-electric-1); /* for high energy accents */
}

/* ------------------------------------------------------
   CONTAINER & LAYOUT FLEX UTILITIES
--------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 18px;
}

.content-wrapper {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

section, .section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: transparent;
  box-sizing: border-box;
}

/* High-energy section accents */
section:nth-child(even) {
  background: var(--color-accent);
}

.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: stretch;
  margin-top: 10px;
  margin-bottom: 0;
}

.features-grid > div {
  background: var(--color-cardbg);
  border-radius: var(--radius);
  box-shadow: 0 4px 28px var(--color-shadow-bold);
  padding: 28px 18px 22px 18px;
  flex: 1 1 260px;
  min-width: 220px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  transition: transform 0.18s, box-shadow 0.18s;
  border-bottom: 5px solid var(--color-electric-1);
}
.features-grid > div:hover {
  transform: translateY(-7px) scale(1.03) rotate(-1deg);
  box-shadow: 0 12px 32px rgba(41, 212, 217, 0.16);
  border-color: var(--color-electric-2);
}
.features-grid img {
  width: 44px;
  margin-bottom: 9px;
}

.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;
  width: 100%;
}

.text-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-accent);
  margin-bottom: 20px;
  position: relative;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px var(--color-shadow);
  padding: 22px 18px;
  flex: 1 1 260px;
  min-width: 220px;
  max-width: 335px;
  transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover {
  box-shadow: 0 18px 32px var(--color-shadow-bold);
  transform: translateY(-5px) scale(1.025);
}

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

.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 24px var(--color-shadow);
  margin-bottom: 24px;
  max-width: 460px;
  min-width: 0;
  color: var(--color-dark);
  border-left: 8px solid var(--color-secondary);
  transition: box-shadow 0.19s, transform 0.19s;
}
.testimonial-card:hover {
  box-shadow: 0 10px 36px var(--color-electric-2);
  transform: scale(1.03);
}
.testimonial-card p {
  color: #252525;
  font-size: 1.13rem;
  font-weight: 500;
  margin-bottom: 0;
}
.testimonial-card span {
  color: var(--color-primary);
  font-size: 1rem;
  margin-top: 4px;
}

ul, ol {
  margin-bottom: 18px;
  margin-left: 26px;
  color: var(--color-dark);
}
ul li {
  margin-bottom: 8px;
  list-style: disc inside;
}
ol li {
  margin-bottom: 8px;
  list-style: decimal inside;
}

/* ------------------------------------------------------
   HEADER & NAVBAR
--------------------------------------------------------- */
header {
  background: var(--color-bg);
  z-index: 30;
  box-shadow: 0 2px 18px var(--color-shadow);
  position: relative;
}
header .container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 26px;
  justify-content: space-between;
  padding: 20px 18px;
  min-height: 70px;
}
header img[alt="Mellow Post"] {
  height: 48px;
  min-width: 98px;
  margin-right: 10px;
}
nav {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: center;
}
nav a {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1rem;
  opacity: 0.98;
  letter-spacing: 0.01em;
  padding: 7px 6px 7px 6px;
  border-radius: 5px;
  transition: background 0.16s, color 0.17s;
}
nav a:focus {
  outline: 2px solid var(--color-secondary);
}
nav a:hover, nav a.active {
  color: var(--color-electric-1);
  background: var(--color-accent);
}

.cta-primary {
  display: inline-block;
  background: linear-gradient(90deg, var(--color-electric-1) 40%, var(--color-secondary) 98%);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.07rem;
  letter-spacing: 0.03em;
  padding: 13px 30px 13px 30px;
  margin-left: 14px;
  border-radius: var(--radius-sm);
  box-shadow: 0 7px 28px var(--color-electric-1, #FF007A33);
  border: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition), box-shadow 0.19s;
}
.cta-primary:hover, .cta-primary:focus {
  background: linear-gradient(90deg, var(--color-electric-2) 25%, var(--color-electric-1) 100%);
  color: #fff;
  box-shadow: 0 12px 32px var(--color-electric-2, #19D4D944);
}

/* ------------------------------------------------------
   FOOTER
--------------------------------------------------------- */
footer {
  background: var(--color-bg);
  box-shadow: 0 -3px 16px var(--color-shadow);
  padding: 0 0 24px 0;
}
footer .container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 29px;
  align-items: flex-start;
  padding: 30px 18px 0 18px;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
footer nav a {
  color: var(--color-primary);
  font-size: 1rem;
  margin-bottom: 5px;
  transition: color 0.13s;
  font-weight: 700;
}
footer nav a:hover {
  color: var(--color-electric-1);
}
footer address {
  font-style: normal;
  color: var(--color-muted);
  font-size: 0.98rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
footer img[alt*="Indirizzo"],
footer img[alt*="Telefono"],
footer img[alt*="Email"] {
  width: 20px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}
footer > div:last-of-type {
  color: var(--color-muted);
  font-size: 0.87rem;
  margin-top: 14px;
  font-weight: 400;
}

/* ------------------------------------------------------
   MOBILE NAVIGATION (HAMBURGER MENU)
--------------------------------------------------------- */
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--color-electric-1);
  color: #fff;
  font-size: 2.2rem;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  margin-left: 12px;
  z-index: 401;
  border: none;
  outline: 0;
  box-shadow: 0 4px 18px var(--color-electric-2, #19D4D988);
  transition: background 0.18s, transform 0.17s;
  display: none;
}
.mobile-menu-toggle:active {
  transform: scale(0.98) rotate(8deg);
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  max-width: 100vw;
  background: rgba(47,61,76,0.93);
  color: #fff;
  transform: translateX(100%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.30s cubic-bezier(0.67,0,0.18,1), opacity 0.2s;
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  box-shadow: -12px 0 32px #19181a33;
}
.mobile-menu-close {
  position: absolute;
  top: 23px;
  right: 26px;
  font-size: 2.1rem;
  color: #fff;
  background: transparent;
  border-radius: 50%;
  box-shadow: 0 3px 14px #09113727;
  padding: 4px 8px;
  transition: background 0.14s;
  z-index: 510;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
  background: var(--color-electric-1);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
  justify-content: center;
  align-items: center;
  margin-top: 85px;
}
.mobile-nav a {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.38rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 0 12px 0;
  border-radius: 7px;
  width: 95vw;
  text-align: center;
  transition: color 0.16s, background 0.15s, font-size 0.19s;
}
.mobile-nav a:active,
.mobile-nav a:hover {
  background: var(--color-electric-2);
  color: var(--color-primary);
}

@media (max-width: 1000px) {
  header .container {
    gap: 8px;
  }

  nav {
    gap: 12px;
  }
}
@media (max-width: 900px) {
  .container {
    max-width: 98vw;
    padding: 0 12px;
  }
}
@media (max-width: 820px) {
  .content-wrapper, .container {
    padding-left: 0;
    padding-right: 0;
  }
  .features-grid > div {
    max-width: 380px;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.29rem; }

  header .container, footer .container {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 17px 10px 0 10px;
  }
  nav {
    display: none;
  }
  .cta-primary {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
    text-align: center;
    font-size: 1rem;
    padding: 13px 7px;
  }
  .mobile-menu-toggle {
    display: flex;
    position: fixed;
    top: 18px;
    right: 16px;
    z-index: 401;
  }
  .mobile-menu {
    display: flex;
  }
  .content-wrapper {
    gap: 14px;
    padding: 0;
  }
  .features-grid {
    gap: 16px;
    flex-direction: column;
  }
  .card-container {
    gap: 16px;
    flex-direction: column;
  }
  .content-grid {
    flex-direction: column;
    gap: 14px;
  }
  .text-image-section {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .testimonial-card {
    max-width: 98vw;
    width: 100%;
    margin-bottom: 18px;
    padding: 13px;
  }
  footer .container {
    gap: 16px;
    padding: 18px 8px 0 8px;
  }
  footer nav {
    gap: 7px;
  }
  footer address {
    font-size: 0.95rem;
  }
}
@media (max-width: 540px) {
  .container {
    padding: 0 3vw;
    max-width: 100vw;
  }
  h1 {
    font-size: 1.19rem;
  }
  h2 {
    font-size: 1.03rem;

  }
  section, .section {
    padding: 22px 2vw;
  }
  .features-grid > div, .card {
    max-width: 99vw;
    padding: 14px 8px 12px 8px;
  }
}

/* ------------------------------------------------------
   BUTTONS & INTERACTION
--------------------------------------------------------- */
button, .cta-primary {
  transition: var(--transition);
}
.cta-primary:active {
  transform: scale(0.98) rotate(-2deg);
}

/* ------------------------------------------------------
   MICRO-INTERACTIONS & ANIMATIONS
--------------------------------------------------------- */
.card, .testimonial-card, .features-grid > div, .cta-primary {
  transition: box-shadow .19s, transform .16s, background .15s, color .13s;
}

a, button, .cta-primary {
  transition: box-shadow 0.18s, background 0.15s, color 0.15s, transform 0.13s;
}

/* Subtle floating effect on cards */
.card:hover, .features-grid > div:hover, .testimonial-card:hover {
  box-shadow: 0 16px 34px var(--color-electric-2, #19D4D988), 0 2px 14px var(--color-electric-3, #f5c32c44);
  z-index: 11;
}

/* ------------------------------------------------------
   COOKIE CONSENT BANNER + PREFERENCES MODAL
--------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100vw;
  z-index: 1200;
  background: #fff6ed;
  box-shadow: 0 -2px 20px var(--color-secondary, #DA995555);
  border-top: 5px solid var(--color-secondary);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 3vw 18px 3vw;
  font-size: 1rem;  
  font-family: var(--font-body);
  animation: fadeInUp 0.54s cubic-bezier(.29,.65,.74,1);
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(48px); }
  to { opacity: 1; transform: translateY(0); }
}
.cookie-banner p {
  color: var(--color-dark);
  margin: 0;
  font-size: 1rem;
  max-width: 410px;
  flex: 1 1 260px;
}
.cookie-banner .cookie-actions {
  display: flex;
  flex-direction: row;
  gap: 14px;
}
.cookie-action-btn {
  padding: 9px 19px;
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: 7px;
  color: #fff;
  border: none;
  box-shadow: 0 2px 9px var(--color-shadow);
  cursor: pointer;
  font-size: 1rem;
  background: var(--color-secondary);
  transition: var(--transition);
}
.cookie-action-btn.accept {
  background: linear-gradient(90deg, var(--color-electric-1) 20%, var(--color-electric-2) 100%);
}
.cookie-action-btn.reject {
  background: #2F3D4C;
}
.cookie-action-btn.settings {
  background: #fff;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}
.cookie-action-btn:hover, .cookie-action-btn:focus {
  filter: brightness(1.11) saturate(1.2);
  transform: scale(1.045) rotate(-1deg);
  outline: none;
}

/* COOKIE CONSENT MODAL STYLES */
.cookie-modal-overlay {
  position: fixed;
  z-index: 1300;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(40, 52, 67, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInCookieOverlay 0.3s cubic-bezier(.55,0,.23,1);
}
@keyframes fadeInCookieOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 26px 22px 26px;
  min-width: 320px;
  max-width: 99vw;
  min-height: 160px;
  box-shadow: 0 16px 40px #19181a33;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  animation: popup 0.2s cubic-bezier(.56,0,.23,1);
}
@keyframes popup {
  from { transform: scale(0.89) translateY(35px); opacity: 0.5; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.cookie-modal h3 {
  color: var(--color-primary);
  font-size: 1.18rem;
  font-family: var(--font-display);
  margin-bottom: 6px;
}
.cookie-modal .cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cookie-modal .cookie-category {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 13px;
  font-size: 1rem;
  font-family: var(--font-body);
}
.cookie-modal .cookie-category label {
  font-weight: bold;
  color: var(--color-secondary);
}
.cookie-modal .toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  display: inline-block;
}
.cookie-modal .toggle-switch input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}
.cookie-modal .toggle-slider {
  position: absolute;
  cursor: pointer;
  background: #C8E6E6;
  border-radius: 16px;
  top: 0; left: 0;
  right: 0; bottom: 0;
  transition: .3s;
  height: 22px;
  width: 40px;
}
.cookie-modal .toggle-slider:before {
  content: "";
  position: absolute;
  left: 2.5px;
  top: 2.5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--color-electric-2);
  transition: 0.28s;
}

.cookie-modal .toggle-switch input:checked + .toggle-slider {
  background: var(--color-electric-1);
}
.cookie-modal .toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(17px);
  background: var(--color-electric-1);
}
.cookie-modal .essential {
  color: var(--color-muted);
  font-size: 0.97em;
}
.cookie-modal .cookie-action-btn {
  width: 120px;
  margin-bottom: 0;
  margin-top: 0;
}
.cookie-modal .modal-close {
  position: absolute;
  top: 13px;
  right: 13px;
  color: var(--color-electric-1);
  font-size: 1.5rem;
  border-radius: 50%;
  background: #fff0e5;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: background 0.12s;
}
.cookie-modal .modal-close:hover {
  background: var(--color-electric-2);
  color: #fff;
}

@media (max-width:600px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 11px 9px 11px;
    gap: 12px;
  }
  .cookie-banner p {
    font-size: 0.97em;
    max-width: 99vw;
  }
  .cookie-modal {
    padding: 18px 6vw 14px 6vw;
    min-width: 0;
  }
}

/* ------------------------------------------------------
   MISC UTILITIES & OVERRIDES
--------------------------------------------------------- */
::-webkit-input-placeholder { color: #92979A; }
::-moz-placeholder { color: #92979A; }
:-ms-input-placeholder { color: #92979A; }
::placeholder { color: #92979A; }

[hidden] { display: none!important; }

hr {
  border: none;
  border-bottom: 1px solid var(--color-accent, #F7F2ED);
  margin: 22px 0;
}

code, pre {
  background: var(--color-accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88rem;
}

.table {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

@media (hover: hover) and (pointer: fine) {
  a:hover, .cta-primary:hover { text-decoration: none; }
}

/* ------------------------------------------------------
   HIGH-ENERGY DESIGN ACCENTS
--------------------------------------------------------- */
/* Top bar underline accent for headings */
h1, h2, h3 {
  position: relative;
}
h1::after, h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 5px;
  background: linear-gradient(90deg, var(--color-electric-2), var(--color-electric-1));
  border-radius: 3px;
  position: absolute;
  left: 0;
  bottom: -10px;
}
h1::after {
  width: 66px;
  height: 6px;
}
h2::after { width: 40px; height: 4px; }

.features-grid > div:hover::before {
  content: '';
  z-index: 1;
  position: absolute;
  right: 18px;
  top: 13px;
  width: 26px;
  height: 26px;
  background: var(--color-electric-2);
  border-radius: 50%;
  opacity: 0.16;
}

/* ------------------------------------------------------
   PRINT MEDIA (for clean printout)
--------------------------------------------------------- */
@media print {
  header, footer, .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal-overlay { display: none !important; }
  body { background: #fff; color: #000; }
}
