/* ================================================
   KB Estate Management — Reusable Content Blocks
   Shared components used across multiple pages
   (.overview, .features, .gallery, .lightbox,
    .testimonials, .values, .stats, .where-we-operate)
   ================================================= */

/* --------------------------------------------------
   OVERVIEW — Image + text side-by-side block
   Used on index, rtm, case-studies, switch-to-us,
   sustainability pages
   -------------------------------------------------- */
.overview {
  padding: 4rem 1rem;
  background: var(--text-light);
}

.overview__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.overview__img {
  width: 100%;
  height: 220px;
  border-radius: var(--radius);
  background: url("../images/overview-personal-touch.webp") center / cover no-repeat;
}

.overview--reverse .overview__img {
  background: url("../images/overview-management.webp") center / cover no-repeat;
}

.overview__title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.overview__title-accent {
  color: var(--stunning-pink);
}

.overview__desc {
  font-size: 0.95rem;
  color: var(--text-dark);
  opacity: 0.8;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.overview__list {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.overview__list li {
  font-size: 0.95rem;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-dark);
  opacity: 0.85;
}

.overview__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--stunning-pink);
}

@media (min-width: 768px) {
  .overview {
    padding: 5rem 1rem;
  }

  .overview__inner {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .overview__img {
    height: 400px;
  }

  .overview__title {
    font-size: 2.25rem;
  }
}

/* Reverse layout — image on right */
@media (min-width: 768px) {
  .overview--reverse .overview__visual {
    order: 1;
  }
}

/* --------------------------------------------------
   FEATURES GRID — Card grid with accent hover line
   Used on index, rtm, switch-to-us, sustainability,
   make-payment pages
   -------------------------------------------------- */
.features {
  padding: 4rem 1rem;
  background: var(--light-neutral);
}

.features__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.features__grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
  }
}

.feature-card {
  background: var(--text-light);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--crimson-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card__icon {
  color: var(--stunning-pink);
  margin-bottom: 1rem;
}

.feature-card--alt .feature-card__icon {
  color: var(--secondary-blue);
}

.feature-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.feature-card__desc {
  font-size: 0.9rem;
  color: var(--text-dark);
  opacity: 0.8;
  line-height: 1.6;
}

/* --------------------------------------------------
   GALLERY — Image grid with hover overlay effect
   Used on index and about pages
   -------------------------------------------------- */
.gallery {
  padding: 4rem 1rem;
  background: var(--text-light);
}

.gallery__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.gallery__grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .gallery__grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 180px;
  }

  .gallery__item--tall {
    grid-row: span 2;
  }

  .gallery__item--wide {
    grid-column: span 2;
  }
}

.gallery__item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: var(--transition-fast);
}

.gallery__item:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.02);
}

.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.15), rgba(230, 57, 70, 0.1));
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.gallery__item:hover::after {
  opacity: 1;
}

.gallery__img {
  width: 100%;
  height: 200px;
  transition: transform 0.4s ease;
}

.gallery__item:hover .gallery__img {
  transform: scale(1.05);
}

@media (min-width: 900px) {
  .gallery__img {
    height: 100%;
  }
}

/* --------------------------------------------------
   GALLERY LIGHTBOX — Full-screen image viewer
   Paired with the gallery grid above
   -------------------------------------------------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.74);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox--open {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
  cursor: default;
  animation: lightboxFadeIn 0.25s ease;
}

@keyframes lightboxFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s;
  line-height: 1;
  z-index: 1;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem 0.75rem;
  line-height: 1;
  border-radius: 6px;
  transition: background 0.3s;
  z-index: 1;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox__btn--prev {
  left: 1rem;
}

.lightbox__btn--next {
  right: 1rem;
}

.lightbox__caption {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.95rem;
  opacity: 0.8;
  text-align: center;
  max-width: 80%;
  margin: 0;
  pointer-events: none;
}

/* --------------------------------------------------
   TESTIMONIALS — Carousel with arrow controls
   Used on index and services pages
   -------------------------------------------------- */
.testimonials {
  padding: 4rem 1rem;
  background: var(--light-neutral);
}

.testimonials__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.testimonials__grid {
  display: flex;
  transition: transform 0.4s ease;
  margin: 0 -0.75rem;
}

.testimonials__grid > .testimonial-card {
  width: 100%;
  flex-shrink: 0;
  padding: 0 0.75rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .testimonials__grid > .testimonial-card {
    width: calc(100% / 3);
  }
}

.testimonial-card {
  background: var(--text-light);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.testimonial-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.testimonial-card__stars {
  display: flex;
  gap: 2px;
  margin-bottom: 1rem;
}

.testimonial-card__quote {
  font-size: 0.95rem;
  color: var(--text-dark);
  opacity: 0.85;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1.5rem;
  padding-inline:4px;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--light-neutral);
}

.testimonial-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.testimonial-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.testimonial-card__name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-blue);
}

.testimonial-card__role {
  font-size: 0.8rem;
  color: var(--text-dark);
  opacity: 0.6;
}

.testimonials__carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonials__track {
  overflow: hidden;
  flex: 1;
}

.testimonials__arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #E63946;
  background: var(--text-light);
  color: #E63946;
  font-size: 1.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  line-height: 1;
}

.testimonials__arrow:hover:not(:disabled) {
  background: #E63946;
  color: var(--text-light);
}

.testimonials__arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

/* --------------------------------------------------
   VALUES — Company value cards grid
   Used on index and about pages
   -------------------------------------------------- */
.values {
  padding: 4rem 1rem;
  background: var(--light-neutral);
}

.values__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.values__grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .values__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .values__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.value-card {
  background: var(--text-light);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
  transition: var(--transition);
}

.value-card:hover {
  border-color: var(--stunning-pink);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.value-card__icon {
  color: var(--stunning-pink);
  margin-bottom: 1rem;
}

.value-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.value-card__desc {
  font-size: 0.9rem;
  color: var(--text-dark);
  opacity: 0.8;
}

/* --------------------------------------------------
   STATS — Number-highlight counters
   Used on about and why-us pages
   -------------------------------------------------- */
.stats {
  padding: 3rem 1rem;
  background: var(--primary-blue);
  color: var(--text-light);
}

.stats__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .stats__inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .stats__inner {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat__number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--stunning-pink);
}

.stat__label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.25rem;
}

/* --------------------------------------------------
   WHERE WE OPERATE — Location tag cloud
   Used on the about page
   -------------------------------------------------- */
.where-we-operate {
  padding: 4rem 1rem;
  background: var(--text-light);
}

.where-we-operate__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.where-we-operate__desc {
  font-size: 0.95rem;
  color: var(--text-dark);
  opacity: 0.8;
  max-width: 36rem;
  margin: -1rem auto 2.5rem;
}

.where-we-operate__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.where-we-operate__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--light-neutral);
  border-radius: 50px;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-blue);
  transition: var(--transition);
}

.where-we-operate__item:hover {
  background: var(--primary-blue);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.where-we-operate__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--stunning-pink);
  flex-shrink: 0;
}

.where-we-operate__item:hover .where-we-operate__dot {
  background: var(--stunning-pink);
}
