/* COMMON */
.home-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-section h2 {
  font-family: 'font-sans-serif', serif;
  font-size: 32px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 3rem;
}

/* CAROUSEL */

/* Inaltimea caruselului: cel putin 3:1 (si 440px), dar pe ecranele mai inalte
   (ex. laptopuri 3:2) creste pana umple fereastra, lasand jos loc pentru
   "Deruleaza in jos". Nu trece de 2.5:1, ca sa nu taie prea mult din poza. */
:root {
  --carousel-h: min(max(100vw / 3, 440px, 100vh - 80px - 8rem), 100vw / 2.5);
}

.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  left: 50%;
  transform: translateX(-50%);
}

/* Slide-urile stau deasupra zonelor de click, dar lasa click-urile sa treaca
   prin ele; doar butonul din caption le primeste. */
.carousel-track {
  position: relative;
  z-index: 3;
  pointer-events: none;
  display: flex;
  transition: transform 0.4s ease;
  width: 100%;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  position: relative;
}

/* Inaltimea vine din --carousel-h; cand e mai mare decat 3:1 se taie
   marginile din stanga/dreapta (pe telefon 16:9). Imaginile noi: 1920x640,
   cu subiectul in mijloc. Vezi /scripts/carousel-data.js */
.carousel-slide img {
  width: 100%;
  height: var(--carousel-h);
  object-fit: cover;
  display: block;
}

.carousel-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 40%, transparent 70%);
  pointer-events: none;
}

.carousel-caption {
  position: absolute;
  bottom: 5rem;
  left: 6rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 560px;
}

.carousel-caption-label {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.75);
}

.carousel-caption-title {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.2;
  /* plasa de siguranta; carousel.js micsoreaza fontul ca sa incapa in 2 randuri */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.carousel-caption-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.75rem;
  background: #fff;
  color: #28166f;
  text-decoration: none;
  font-family: 'font-sans-serif', sans-serif;
  font-size: 15px;
  font-weight: 500;
  border-radius: 4px;
  width: fit-content;
  transition: background 0.2s, color 0.2s;
}

.carousel-caption-btn:hover {
  background: #28166f;
  color: #fff;
}

.carousel-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
  cursor: pointer;
  z-index: 2;
}

.carousel-zone.prev { left: 0; }
.carousel-zone.next { right: 0; }

.carousel-zone.center {
  left: 30%;
  width: 40%;
  cursor: default;
}

.carousel-zone.center.has-link {
  cursor: pointer;
}

.carousel-dots {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  z-index: 4;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  border: none;
  padding: 0;
  flex-shrink: 0;
}

.carousel-dot.active {
  background: #fff;
}

/* DE CE NOI */
.de-ce-noi {
  padding: 5rem 2rem;
  display: flex;
  justify-content: center;
  background-color: #f8f8f8;
}

/* SCROLL HINT */

html {
  scroll-behavior: smooth;
}

#de-ce-noi {
  scroll-margin-top: 80px;
}

.scroll-hint {
  /* Visible gap between the bottom of the carousel and the bottom of the viewport */
  --scroll-hint-space: calc(100vh - 80px - var(--carousel-h));
  position: absolute;
  top: max(3rem, var(--scroll-hint-space) / 2);
  left: 50%;
  transform: translate(-50%, calc(-50% - 10px));
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #28166f;
  /* Textul si sageata au fiecare propriul panou alb (.fade-panel), mic si rotunjit */
  --fade-panel-blur: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.scroll-hint.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.scroll-hint-text {
  --fade-panel-pad: 0.35rem 1rem;
  border-radius: 999px;
  font-family: 'font-sans-serif', sans-serif;
  font-size: 18px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #555;
  transition: color 0.2s;
}

.scroll-hint:hover .scroll-hint-text {
  color: #28166f;
}

.scroll-hint-arrow {
  --fade-panel-pad: 0.3rem;
  border-radius: 50%;
  font-size: 40px;
  animation: scroll-hint-bounce 1.8s ease-in-out infinite;
}

@keyframes scroll-hint-bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%      { transform: translateY(8px); opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint {
    transition: none;
  }

  .scroll-hint-arrow {
    animation: none;
  }
}

.de-ce-noi-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 6rem;
  width: 100%;
  max-width: 1100px;
  align-items: center;
}

.de-ce-noi-header {
  opacity: 0;
}

.de-ce-noi-header.visible {
  transform: translateX(0);
  opacity: 1;
}

.de-ce-noi-header h2 {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: 
#1a1a1a;
  margin-bottom: 1rem;
}

.de-ce-noi-header p {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 16px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.de-ce-noi-link {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 15px;
  color: #28166f;
  text-decoration: none;
  font-weight: 500;
}

.de-ce-noi-link:hover {
  text-decoration: underline;
}

.de-ce-noi-list {
  opacity: 0;
}

.de-ce-noi-list.visible {
  transform: translateX(0);
  opacity: 1;
}

.de-ce-noi-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid #e8e8e8;
  transition: padding-left 0.2s;
}

.de-ce-noi-item:first-child {
  padding-top: 0;
}

.de-ce-noi-item:last-child {
  border-bottom: none;
}

.de-ce-noi-item:hover {
  padding-left: 0.5rem;
}

.de-ce-noi-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f0eef8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.de-ce-noi-icon i {
  font-size: 24px;
  color: #28166f;
  transition: color 0.2s;
}

.de-ce-noi-item:hover .de-ce-noi-icon {
  background: #28166f;
}

.de-ce-noi-item:hover .de-ce-noi-icon i {
  color: #fff;
}

.de-ce-noi-text h3 {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.3rem;
}

.de-ce-noi-text p {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 15px;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

/* CATEGORII PRODUSE */
/* Fontul cardurilor din Produsele noastre (DM Sans, licenta OFL) */
@font-face {
  font-family: 'DM Sans';
  src: url('/DMSans.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

.produse-categorii {
  padding: 5rem 2rem;
  background: #fff;
}

.categorii-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  max-width: 1100px;
  margin-bottom: 2.5rem;
}

.categorii-eyebrow {
  display: block;
  margin-bottom: 0.6rem;
  font-family: 'font-sans-serif', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #28166f;
}

.produse-categorii .categorii-head h2 {
  margin: 0 0 0.75rem;
}

.categorii-head p {
  max-width: 520px;
  margin: 0;
  font-family: 'font-sans-serif', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #555;
}

.categorii-toate {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  background: #28166f;
  color: #fff;
  text-decoration: none;
  font-family: 'font-sans-serif', sans-serif;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s, gap 0.2s;
}

.categorii-toate:hover {
  background: #3a2a8f;
  gap: 0.75rem;
}

.categorii-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 1100px;
}

.categorie-card {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 18px;
  background: #eee;
  text-decoration: none;
  isolation: isolate;
}

.categorie-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.5s ease;
}

.categorie-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(20, 11, 60, 0.85) 0%, rgba(20, 11, 60, 0.35) 40%, rgba(20, 11, 60, 0) 65%);
  transition: background 0.3s ease;
}

.categorie-card:hover img {
  transform: scale(1.06);
}

.categorie-text {
  position: absolute;
  left: 1.25rem;
  right: 3.75rem;
  bottom: 1.1rem;
  color: #fff;
}

.categorie-text h3 {
  margin: 0 0 0.25rem;
  font-family: 'DM Sans', 'font-sans-serif', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.categorie-text p {
  margin: 0;
  font-family: 'DM Sans', 'font-sans-serif', sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.8);
}

.categorie-sageata {
  position: absolute;
  right: 1rem;
  bottom: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 18px;
  backdrop-filter: blur(4px);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.categorie-card:hover .categorie-sageata {
  background: #fff;
  color: #28166f;
  transform: rotate(45deg);
}

.categorie-card:focus-visible {
  outline: 3px solid #28166f;
  outline-offset: 3px;
}

/* DECONTARE */
.decontare {
  background: #28166f;
  padding: 5rem 2rem;
}

.decontare-inner {
  max-width: 1100px;
  width: 100%;
  display: flex;
  gap: 4rem;
  align-items: center;
}

.decontare-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.decontare-label {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
}

.decontare-text h2 {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

.decontare-text p {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  margin: 0;
}

.decontare-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.decontare-steps li {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: 'font-sans-serif', sans-serif;
  font-size: 16px;
  color: #fff;
}

.decontare-steps li i {
  font-size: 24px;
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
}

.decontare-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.9rem 2rem;
  background: #fff;
  color: #28166f;
  text-decoration: none;
  font-family: 'font-sans-serif', sans-serif;
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
  width: fit-content;
  transition: background 0.2s, color 0.2s;
}

.decontare-btn:hover {
  background: rgba(255,255,255,0.85);
}

.decontare-badge {
  flex-shrink: 0;
  width: 240px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  backdrop-filter: blur(4px);
}

.decontare-badge i {
  font-size: 48px;
  color: #fff;
  margin-bottom: 0.5rem;
}

.decontare-badge span {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
}

.decontare-badge strong {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: #fff;
}

.decontare-badge p {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  margin: 0;
}

/* studii-de-caz */
.studii-de-caz {
  padding: 5rem 0rem;
  background: #f8f8f8;
  overflow: hidden;
}

.studii-de-caz h2 {
  margin-bottom: 4rem;
}

/* Banda se misca singura si poate fi trasa cu mouse-ul sau cu degetul
   (recenzii.js muta grupurile prin --banda-x). */
.studii-de-caz-carousel {
  width: 100%;
  display: flex;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.studii-de-caz-carousel.trage {
  cursor: grabbing;
}

/* Spatiul de dupa ultimul card face parte din grup, ca bucla sa nu sara */
.studii-de-caz-group {
  display: flex;
  align-items: stretch;
  gap: 1em;
  padding-right: 1em;
  flex-shrink: 0;
  transform: translateX(var(--banda-x, 0));
}

.studii-de-caz-card a,
.studii-de-caz-card img {
  -webkit-user-drag: none;
}

.studii-de-caz-card {
  min-height: 12rem;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 360px;
  flex-shrink: 0;
}

/* Recenziile lungi sunt scurtate la 6 randuri */
.studii-de-caz-card p {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 15px;
  color: #444;
  line-height: 1.7;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  overflow: hidden;
}

/* Inaltime fixa, ca textul sa inceapa la fel si pe cardurile fara buton */
.recenzie-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 32px;
}

.recenzie-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.4rem 0.8rem;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  font-family: 'font-sans-serif', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #28166f;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.recenzie-link:hover {
  background: #28166f;
  border-color: #28166f;
  color: #fff;
}

.recenzie-stele {
  display: flex;
  gap: 2px;
  font-size: 18px;
  color: #f5b301;
}



.studii-de-caz-autor {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
}

.studii-de-caz-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #28166f;
  color: #fff;
  font-family: 'font-sans-serif', sans-serif;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.studii-de-caz-autor strong {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 15px;
  color: #1a1a1a;
  display: block;
}

.studii-de-caz-autor span {
  font-family: 'font-sans-serif', sans-serif;
  font-size: 13px;
  color: #999;
}

.studii-de-caz-btn {
  margin-top: 3rem;
  display: inline-flex;
  align-items: center;
  padding: 0.9rem 2rem;
  background: #28166f;
  color: #fff;
  text-decoration: none;
  font-family: 'font-sans-serif', sans-serif;
  font-size: 15px;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.2s;
}

.studii-de-caz-btn:hover {
  background: #1e1157;
}

/* ===== ECRANE MEDII (ferestre injumatatite, tablete pe orizontala) ===== */
@media (max-width: 1200px) and (min-width: 769px) {
  .carousel-caption {
    left: 3rem;
    bottom: 4rem;
    max-width: 460px;
  }

  .carousel-caption-title {
    font-size: 32px;
  }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .scroll-hint {
    display: none;
  }

  .home-section {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .home-section h2 {
    font-size: 26px;
    margin-bottom: 2rem;
    text-align: center;
  }

  /* carousel: pe telefon textul sta sub imagine, nu peste ea */
  .carousel {
    /* glisarea stanga/dreapta schimba slide-ul (carousel.js), nu pagina */
    touch-action: pan-y;
  }

  .carousel-slide {
    display: flex;
    flex-direction: column;
  }

  .carousel-slide img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .carousel-slide::after {
    display: none;
  }

  .carousel-caption {
    position: static;
    flex: 1;
    gap: 0.6rem;
    max-width: none;
    padding: 1.1rem 1.25rem 1.4rem;
    background: #28166f;
  }

  .carousel-caption-title {
    font-size: 21px;
    line-height: 1.25;
  }

  .carousel-caption-label {
    font-size: 11px;
  }

  .carousel-caption-btn {
    padding: 0.6rem 1.2rem;
    font-size: 13px;
  }

  /* punctele raman pe imagine, langa marginea ei de jos */
  .carousel-dots {
    bottom: auto;
    top: calc(100vw * 9 / 16 - 2.1rem);
  }

  /* de ce noi */
  .de-ce-noi {
    padding: 3.5rem 1.25rem;
  }

  .de-ce-noi-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .de-ce-noi-header,
  .de-ce-noi-list {
    opacity: 1 !important;
    transform: none !important;
    padding: 1.75rem;
  }

  .de-ce-noi-header h2 {
    font-size: 26px;
  }

  .de-ce-noi-item {
    gap: 1rem;
    padding: 1.25rem 0;
  }

  .de-ce-noi-icon {
    width: 44px;
    height: 44px;
  }

  .de-ce-noi-icon i {
    font-size: 20px;
  }

  .de-ce-noi-text h3 {
    font-size: 16px;
  }

  .de-ce-noi-text p {
    font-size: 14px;
  }

  /* categorii produse */
  .produse-categorii {
    padding: 3.5rem 1.25rem;
  }

  .categorii-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .categorii-head p {
    font-size: 15px;
  }

  .categorii-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .categorie-text {
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.8rem;
  }

  .categorie-text h3 {
    font-size: 15px;
  }

  .categorie-text p,
  .categorie-sageata {
    display: none;
  }

  /* decontare */
  .decontare {
    padding: 3.5rem 1.25rem;
  }

  .decontare-inner {
    flex-direction: column;
    gap: 2.5rem;
  }

  .decontare-text h2 {
    font-size: 24px;
  }

  .decontare-badge {
    display: none;
  }

  /* studii de caz */
  .studii-de-caz {
    padding: 3.5rem 0;
  }

  .studii-de-caz-card {
    width: 280px;
    height: auto;
    min-height: 10rem;
    padding: 1.5rem;
  }
}
