/* ============================================
   EMBLA FEATURES CAROUSEL - Sandbox Style
   - Embla carousel mantığı birebir uygulandı
   - Köşeli tasarım (squared)
   - Falcon renk teması: black, white, #cc0000
   ============================================ */

/* === VARIABLES === */
.embla-features {
  --slide-height: auto;
  --slide-spacing: 1rem;
  --slide-size: 100%;
  --brand-red: #cc0000;
  --text-primary: #111;
  --text-secondary: #555;
  --border-color: #e5e5e5;
  --bg-color: #fff;
  padding: 48px 0;
  background: var(--bg-color);
}

/* Tablet: 2 cards */
@media (min-width: 768px) {
  .embla-features {
    --slide-size: 50%;
    --slide-spacing: 1.25rem;
  }
}

/* Desktop: 3 cards */
@media (min-width: 992px) {
  .embla-features {
    --slide-size: 33.333%;
    --slide-spacing: 1.5rem;
  }
}

/* === HEADER === */
.embla-features__header {
  margin-bottom: 2rem;
  text-align: center;
}

.embla-features__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === VIEWPORT (overflow hidden) === */
.embla-features__viewport {
  overflow: hidden;
}

/* === CONTAINER (flex row) === */
.embla-features__container {
  display: flex;
  touch-action: pan-y pinch-zoom;
  margin-left: calc(var(--slide-spacing) * -1);
  transition: transform 0.3s ease;
}

/* === SLIDE === */
.embla-features__slide {
  transform: translate3d(0, 0, 0);
  flex: 0 0 var(--slide-size);
  min-width: 0;
  padding-left: var(--slide-spacing);
}

/* === CARD (köşeli tasarım) === */
.embla-features__card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 0;
  /* KÖŞELI */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  user-select: none;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.embla-features__card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

/* === IMAGE === */
.embla-features__image {
  position: relative;
  width: 100%;
  padding-bottom: 75%;
  /* 4:3 aspect ratio */
  overflow: hidden;
  background: #f8f8f8;
}

.embla-features__image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
  -webkit-user-drag: none;
  pointer-events: none;
}

.embla-features__card:hover .embla-features__image img {
  transform: scale(1.05);
}

/* === CONTENT === */
.embla-features__content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  background: var(--bg-color);
  border-top: 3px solid var(--brand-red);
}

.embla-features__card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.embla-features__card-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === CONTROLS (buttons left, dots right) === */
.embla-features__controls {
  display: grid;
  grid-template-columns: auto 1fr;
  justify-content: space-between;
  gap: 1.2rem;
  margin-top: 1.8rem;
}

/* === BUTTONS === */
.embla-features__buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  align-items: center;
}

.embla-features__button {
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent;
  touch-action: manipulation;
  display: inline-flex;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  padding: 0;
  margin: 0;
  box-shadow: inset 0 0 0 2px var(--border-color);
  width: 3rem;
  height: 3rem;
  z-index: 1;
  border-radius: 0;
  /* KÖŞELI */
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.embla-features__button:hover {
  background-color: var(--brand-red);
  box-shadow: inset 0 0 0 2px var(--brand-red);
  color: #fff;
}

.embla-features__button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.embla-features__button-svg {
  width: 35%;
  height: 35%;
}

/* === DOTS === */
.embla-features__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  margin-right: calc((2.6rem - 1.4rem) / 2 * -1);
}

.embla-features__dot {
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent;
  touch-action: manipulation;
  display: inline-flex;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  padding: 0;
  margin: 0;
  width: 2.6rem;
  height: 2.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  /* KÖŞELI */
}

.embla-features__dot:after {
  content: '';
  box-shadow: inset 0 0 0 2px var(--border-color);
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 0;
  /* KÖŞELI */
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.embla-features__dot--selected:after {
  box-shadow: inset 0 0 0 2px var(--brand-red);
  background-color: var(--brand-red);
}

.embla-features__dot:hover:after {
  box-shadow: inset 0 0 0 2px #999;
}

.embla-features__dot--selected:hover:after {
  box-shadow: inset 0 0 0 2px var(--brand-red);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Tablet */
@media (max-width: 991px) {
  .embla-features {
    padding: 40px 0;
  }

  .embla-features__title {
    font-size: 1.5rem;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .embla-features {
    padding: 32px 0;
    -webkit-overflow-scrolling: touch;
  }

  .embla-features__header {
    margin-bottom: 1.5rem;
  }

  .embla-features__title {
    font-size: 1.25rem;
  }

  .embla-features__viewport {
    cursor: grab;
  }

  .embla-features__viewport:active {
    cursor: grabbing;
  }

  .embla-features__card:hover {
    transform: none;
    box-shadow: none;
  }

  .embla-features__content {
    padding: 1rem;
  }

  .embla-features__card-title {
    font-size: 0.9375rem;
  }

  .embla-features__card-desc {
    font-size: 0.8125rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .embla-features__image img {
    object-fit: contain;
    background: #f8f8f8;
  }

  /* Controls - SAME ROW on mobile: buttons left, dots right */
  .embla-features__controls {
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
  }

  .embla-features__buttons {
    gap: 0.4rem;
  }

  .embla-features__dots {
    justify-content: flex-end;
    margin-right: 0;
    gap: 0;
  }

  .embla-features__button {
    width: 2rem;
    height: 2rem;
  }

  .embla-features__button-svg {
    width: 40%;
    height: 40%;
  }

  .embla-features__dot {
    width: 1.8rem;
    height: 1.8rem;
  }

  .embla-features__dot:after {
    width: 0.75rem;
    height: 0.75rem;
  }
}

/* Small mobile */
@media (max-width: 374px) {
  .embla-features__title {
    font-size: 1.125rem;
  }

  .embla-features__content {
    padding: 0.75rem;
  }

  .embla-features__card-title {
    font-size: 0.875rem;
  }

  .embla-features__card-desc {
    font-size: 0.75rem;
  }
}