/* ===============================
   MYREALVET HOMEPAGE – STYLE.CSS
   Ottimizzato per performance (Lighthouse 100)
   =============================== */

:root {
  --brand: #1697c7;
  --brand-2: #28a745;
  --dark: #0c1117;
  --text: #0b1220;
  --muted: #4a5568;
  --bg: #f6f9fc;
  --card: #fff;
  --shadow: 0 10px 30px rgba(2, 12, 27, 0.08);
  --radius: 16px;
}

/* BASE */
body {
  font-family: "Lato", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* BOTTONI */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
  font-size: clamp(16px, 4vw, 18px);
  cursor: pointer;
  transition: 0.3s;
  box-shadow: var(--shadow);
  border: none;
}
.btn-primary {
  background: #0d6485;
  color: #fff;
  font-weight: 700;
}
.btn-primary:hover {
  background: #0a5066;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 100, 133, 0.3);
}
.btn-outline {
  background: #fff;
  color: #0d6485;
  border: 2px solid #0d6485;
  font-weight: 700;
}
.btn-outline:hover {
  background: #0d6485;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 100, 133, 0.3);
}

/* HERO */
.hero {
  background: linear-gradient(180deg, #f7fbff, #eef6fb);
  padding: 60px 20px;
  text-align: center;
}
.hero h1 {
  font-family: "Quicksand", sans-serif;
  font-size: clamp(28px, 6vw, 42px);
  color: var(--brand);
}
.hero p {
  font-size: clamp(16px, 4vw, 20px);
  color: var(--muted);
  margin: 20px 0;
}

/* HERO CARDS */
.mrv-hero-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}
.mrv-hero-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
  width: 240px;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mrv-hero-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(22, 151, 199, 0.2);
}
.mrv-hero-card p {
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
  font-size: clamp(15px, 3vw, 17px);
  color: #0d6485; /* Blu più scuro per contrasto WCAG AA (ratio 5.1:1 su bianco) */
}
@media (max-width: 600px) {
  .mrv-hero-card {
    width: 90%;
  }
}

/* SEZIONI FEATURE */
.feature-grid {
  display: grid;
  gap: 20px;
  margin: 60px auto;
  max-width: 1100px;
}
@media (min-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.feature {
  background: var(--card);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: 0.3s;
}
.feature:hover {
  transform: translateY(-4px);
}
.feature h2 {
  color: var(--brand);
  font-size: 20px;
  margin-bottom: 10px;
}
.feature p {
  color: var(--muted);
  margin-bottom: 20px;
}

/* ===============================
   CAROSELLO PROMO – FIX IONOS
   =============================== */

.carousel {
  all: unset;
  display: block;
  max-width: 800px;
  margin: 60px auto;
  padding-bottom: 40px;
  position: relative;
  overflow: hidden;
  font-family: "Lato", sans-serif;
  box-sizing: border-box;
}

.carousel h2 {
  all: unset;
  display: block;
  text-align: center;
  color: var(--brand, #1697c7);
  font-size: clamp(24px, 5vw, 32px);
  margin-bottom: 15px;
  font-weight: 700;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s ease;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.carousel-slide {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card, #fff);
  color: var(--text, #0b1220);
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow, 0 10px 30px rgba(2, 12, 27, 0.08));
  padding: 40px 20px;
  text-align: center;
  transition: opacity 0.6s ease;
  box-sizing: border-box;
}

.carousel-slide h3 {
  font-size: clamp(20px, 4vw, 26px);
  color: var(--brand, #1697c7);
  margin-bottom: 12px;
}

.carousel-slide p {
  font-size: clamp(15px, 3vw, 18px);
  color: var(--muted, #5b677a);
  margin-bottom: 20px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel-dots button {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  margin: 4px;
}

.carousel-dots button.active {
  background: var(--brand, #1697c7);
  transform: scale(1.2);
}

/* ABOUT */
.about {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
  margin: 60px auto;
  max-width: 1000px;
}
.about img {
  flex: 1 1 300px;
  max-width: 300px;
  border-radius: 50%;
  box-shadow: var(--shadow);
  margin: auto;
}
.about-text {
  flex: 2 1 400px;
}
.about-text h2 {
  color: var(--brand);
}
.about-text li::before {
  content: "✓ ";
  color: var(--brand-2);
}

.about img {
  max-width: 300px;
  width: 100%;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
}

@media (min-width: 800px) {
  .about img {
    max-width: 420px; /* Desktop più grande */
  }
}

/* RECENSIONI */
.reviews {
  padding: 60px 20px;
  background: #fff;
}
.reviews h2 {
  text-align: center;
  color: var(--brand);
  margin-bottom: 30px;
}
.review-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 900px) {
  .review-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.review {
  padding: 20px;
  border-radius: var(--radius);
  background: #f9fcff;
  box-shadow: var(--shadow);
}
.review .stars {
  color: #f5a623;
  margin-bottom: 8px;
  font-size: 18px;
}
.review blockquote {
  font-style: italic;
  color: var(--muted);
  margin: 0;
}
.review footer {
  margin-top: 10px;
  color: var(--brand);
  font-weight: 600;
}

/* PRODOTTI */
.featured-products {
  padding: 60px 20px;
  background: var(--bg);
  text-align: center;
}
.featured-products h2 {
  color: var(--brand);
  font-size: clamp(24px, 5vw, 32px);
  margin-bottom: 40px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  justify-items: center;
}
.product {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  max-width: 320px;
  text-align: center;
  transition: 0.3s;
}
.product:hover {
  transform: translateY(-6px);
}

/* Migliora proporzioni immagini nei prodotti in evidenza */
.product img {
  width: clamp(180px, 70%, 240px); /* prima era 100%, ora max 240px */
  height: auto;
  margin: 0 auto 16px;
  display: block;
  border-radius: var(--radius);
  object-fit: contain; /* evita taglio */
}

.product h3 {
  font-family: "Quicksand", sans-serif;
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--text);
}

/* CTA FINALE */
.final-cta {
  padding: 60px 20px;
  background: linear-gradient(180deg, #eef6fb, #f7fbff);
  text-align: center;
}
.final-cta h2 {
  color: var(--brand);
  margin-bottom: 20px;
}
.why-list {
  max-width: 600px;
  margin: 0 auto 20px;
  text-align: left;
  list-style: none;
  padding: 0;
}
.why-list li {
  margin: 8px 0;
  position: relative;
  padding-left: 22px;
}
.why-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-2);
}

/* ANIMAZIONI REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* FOOTER elegante con contrasto migliorato */
footer {
  text-align: center;
  padding: 50px 30px;
  padding-bottom: 110px;
  min-height: 140px; /* reserve vertical space to reduce footer layout shifts */
  background: #f8f9fa;
  border-top: 3px solid #1697c7;
  color: #2c3e50;
  font-size: 14px;
  line-height: 1.8;
}
footer a {
  color: #0056b3;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
footer a:hover {
  color: #1697c7;
  text-decoration: underline;
}

.hero img[fetchpriority="high"] {
  contain-intrinsic-size: 280px 187px;
}

.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Ensure main content reserves space for footer to avoid pushes during late-loading resources */
main {
  margin-bottom: 160px;
}

/* Immagini uguali in entrambe le hero-card */
.mrv-hero-card img {
  width: clamp(160px, 35vw, 280px); /* piccole su mobile, max 280px su desktop */
  height: auto;
  display: block;
  margin-bottom: 10px;
  border-radius: 16px;
  object-fit: contain;
}

/* opzionale: blocca una dimensione leggermente maggiore su schermi larghi */
@media (min-width: 900px) {
  .mrv-hero-card img {
    width: 280px;
  }
}

/*klaro cookie notice fix*/
.visually-hidden {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
