/* ================= VARIABLES ================= */
:root {
  --font-main: "Poppins", sans-serif;

  --color-text: #000000;
  --color-gray-light: #f8f8f8;
  --white: #fff;

  --color-primary: #454e3b;
  --color-primary-light: #636750;
  --color-primary-dark: #1f2b1a;

  --black: #000000;

  --overlay-dark: rgba(0, 0, 0, 0.25);

  --radius-sm: 0.625em;
  --radius-md: 1.25em;
  --radius-lg: 1.875em;
}

/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-main);
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  color: var(--color-text);
  overflow-x: hidden;
}

/* ================= SCROLLBAR ================= */
html::-webkit-scrollbar {
  width: thin;
  height: 0.3125em;
}

html::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb {
  background: rgba(97, 127, 65, 0.5);
  border-radius: var(--radius-sm);
}

html::-webkit-scrollbar-thumb:hover {
  background: rgba(97, 127, 65, 0.8);
}

/* Firefox */
html,
body,
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(97, 127, 65, 0.5) transparent;
}

/* ================= GENERAL ================= */
a:hover {
  opacity: 0.5;
}

ul {
  padding-left: 1.25em;
}

.page-title {
  background: url("../img/page-title-bg.jpeg") center / cover no-repeat;
}

.btn-dark {
  padding: 0.75em 1.875em;
  border-radius: var(--radius-lg);
  border: none;
  background: var(--color-primary);
  color: var(--white);
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
}

.btn-light {
  padding: 0.75em 1.875em;
  border-radius: var(--radius-lg);
  border: none;
  background: var(--white);
  color: var(--color-primary-light);
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
}

.page-title {
  height: 18.75em;
  padding: 1.875em 1.875em 3.75em 1.875em;
  display: flex;
  align-items: flex-end;
  color: white;
  clip-path: polygon(0 0, 100% 0, 100% 80%, 0% 100%);
}

.main-content {
  padding-top: 5em;
  padding-bottom: 3.125em;
}

.cta-container {
  padding: 3.125em 1.875em;
  margin: 3.125em 1.25em;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.9375em;
  background: color-mix(in srgb, var(--color-primary-dark) 75%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 1.125em 2.5em rgba(0, 0, 0, 0.25);
}

.whatsapp-float {
  position: fixed;
  width: 3.75em;
  height: 3.75em;
  bottom: 1.875em;
  right: 1.25em;
  z-index: 100;
  cursor: pointer;
  border-radius: 50%;
  background-color: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0.125em 0.125em 0.625em rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, opacity 0.5s;
  opacity: 0;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float img {
  width: 2.1875em;
  height: 2.1875em;
}

/* ================= SLIDER ================= */

.swiper-pagination {
  position: relative;
  margin-top: 1.25em;
}

.slider-btn,
.swiper-button-next,
.swiper-button-prev {
  position: absolute;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  border: none;
  color: white;

  width: 3em;
  height: 3em;
  border-radius: 50%;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 10;
  flex-shrink: 0;
}

.slider-btn {
  --swiper-navigation-top-offset: 50%;
}

.swiper-button-next,
.swiper-button-prev {
  --swiper-navigation-top-offset: 55%;
}

.slider-btn:hover,
.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: rgba(255, 255, 255, 0.35);
}

.slider-btn svg.swiper-navigation-icon,
.swiper-button-next .swiper-navigation-icon,
.swiper-button-prev .swiper-navigation-icon {
  width: 6px;
  height: 0.625em;
}

/* ================= NAVBAR ================= */
.navbar {
  position: fixed;
  top: 0.625em;
  left: 0.625em;
  width: calc(100% - 1.25em);
  padding: 0.9375em 1.25em;
  background: var(--color-primary-dark);
  color: var(--white);
  border-radius: var(--radius-md);
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-desktop {
  display: flex;
}

.navbar .logo {
  width: 12.5em;
  height: 1.875em;
  background-image: url("/img/metamorfosi-logo.png");
  background-size: contain;
  background-repeat: no-repeat;
}

.navbar nav a {
  margin-left: 1.25em;
  color: var(--white);
  text-decoration: none;
  font-size: 0.875em;
  font-weight: 400;
}

/* ================= FOOTER ================= */
footer {
  background: var(--color-primary-dark);
  color: var(--white);
  padding: 2.5em;
  gap: 1.875em;

  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

footer .footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.625em;
}

footer .footer-col p {
  font-size: 0.75em;
  gap: 0.5em;
  display: flex;
  align-items: center;
}

footer .footer-col p a {
  text-decoration: none;
  color: var(--white);
}

footer .footer-col p i {
  width: 20px;
  height: 20px;
  font-size: 10px;
  border-radius: 50%;
  background: var(--white);
  color: var(--color-primary);

  display: flex;
  justify-content: center;
  align-items: center;
}

footer .footer-col p i::before {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Social */
.social-col .social-icons {
  margin-top: 0.5em;
  gap: 0.9375em;

  display: flex;
}

.social-icons a i {
  font-size: 25px;
  color: var(--white);
  transition: 0.3s;
}

/* ================= CARDS ANIMATION ================= */
.card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* classe attiva quando la card entra nella viewport */
.card.active {
  opacity: 1;
  transform: translateY(0);
}

/* optional: delay per ogni card */
.card:nth-child(1).active {
  transition-delay: 0.1s;
}
.card:nth-child(2).active {
  transition-delay: 0.3s;
}
.card:nth-child(3).active {
  transition-delay: 0.5s;
}

/* ================= HAMBURGER ================= */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 1.875em;
  height: 17px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 11; /* <- sopra l'overlay */
  position: relative;
}

.hamburger span {
  display: block;
  height: 0.1875em;
  width: 100%;
  background: var(--white);
  border-radius: 0.1875em;
  transition: 0.3s;
}

/* Overlay Menu */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.875em;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: 10;
}

.overlay a {
  color: var(--white);
  font-size: 1.5em;
  text-decoration: none;
}

/* Show overlay when active */
.overlay.active {
  transform: translateY(0);
}

/* Hamburger animation when active */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
  .intro-title {
    font-size: 46px;
  }

  .section-title {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.9375em 1.25em;
  }

  .navbar .logo {
    width: 2.5em;
    height: 2.5em;
    background-image: url("/img/favicon.png");
  }

  .nav-desktop {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: 3em;
    letter-spacing: 0.125em;
  }

  .hero-subtitle {
    font-size: 0.875em;
  }

  .intro {
    padding: 5em 1.25em;
  }

  .intro-title {
    font-size: 36px;
  }

  .section-title {
    font-size: 1.875em;
  }

  .cards {
    flex-direction: column;
    align-items: center;
  }

  footer {
    flex-direction: column;
  }

  footer .footer-col {
    text-align: center;
    align-items: center;
  }

  .social-col .social-icons {
    justify-content: center;
    margin-top: 0.9375em;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 38px;
  }

  .intro-title {
    font-size: 1.875em;
  }
}

/* --- COOKIEBOT --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  color: white;
  z-index: 10000;
  padding: 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.cookie-banner-text h4 {
  margin-bottom: 8px;
  color: var(--primary-color);
  font-size: 1.1em;
}

.cookie-banner-text p {
  margin: 0;
  font-size: 0.9em;
  line-height: 1.4;
  max-width: 600px;
  color: white;
}

.cookie-banner-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.cookie-accept {
  background: var(--primary-color);
  color: white;
}

.cookie-accept:hover {
  background: #5a95a1;
  transform: translateY(-1px);
}

.cookie-decline {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-decline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.cookie-settings {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.cookie-settings:hover {
  background: var(--primary-color);
  color: white;
}

/* Cookie Modal */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cookie-modal-content {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cookie-modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-modal-header h3 {
  margin: 0;
  color: var(--text-primary);
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.cookie-modal-close:hover {
  background: var(--background-secondary);
}

.cookie-modal-body {
  padding: 24px;
}

.cookie-modal-body > p {
  margin-bottom: 24px;
  color: var(--text-secondary);
}

.cookie-category {
  margin-bottom: 24px;
  padding: 20px;
  background: var(--background-secondary);
  border-radius: 8px;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cookie-category h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1em;
}

.cookie-category p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9em;
  line-height: 1.4;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .cookie-slider {
  background-color: var(--primary-color);
}

input:focus + .cookie-slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .cookie-slider:before {
  transform: translateX(26px);
}

input:disabled + .cookie-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-modal-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border-light);
  text-align: right;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .cookie-banner-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .cookie-btn {
    padding: 8px 12px;
    font-size: 0.8em;
  }

  .cookie-modal-content {
    margin: 0 10px;
  }

  .cookie-category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .cookie-banner {
    padding: 16px;
  }

  .cookie-banner-actions {
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
    min-width: 0;
  }
}
