/* ==========================================================================
   Switas custom styles
   0. Palette overrides
   1. Full-width mega dropdown navigation (desktop)
   2. Article detail layout
   ========================================================================== */

/* 0. Hero / soft section background: neutral grey instead of soft red -------- */
:root {
  --bs-soft-primary: #f5f7f9;
}

/* 1. Full-width navigation dropdowns --------------------------------------- */
@media (min-width: 992px) {

  /* Anchor the dropdown panels to the navbar instead of the container/li,
     so they can span the whole viewport width. */
  .navbar {
    position: relative;
  }

  .navbar>.container {
    position: static;
  }

  .navbar .navbar-collapse .navbar-nav>.nav-item.dropdown-mega {
    position: static !important;
  }

  .navbar .navbar-collapse .navbar-nav>.nav-item.dropdown-mega>.dropdown-menu {
    position: absolute;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 2.25rem 0 2rem !important;
    background-color: #fff;
    border: 0;
    border-top: 1px solid rgba(164, 174, 198, .2);
    border-radius: 0 !important;
    box-shadow: 0 1.25rem 2rem rgba(30, 34, 40, .07);
  }

  .navbar .navbar-collapse .navbar-nav>.nav-item.dropdown-mega>.dropdown-menu.show {
    top: 100%;
    visibility: visible;
    opacity: 1;
    pointer-events: all;
  }

  /* Inner content keeps the site container alignment */
  .navbar .navbar-collapse .dropdown-menu>.container {
    width: 100%;
  }

  .navbar .navbar-collapse .dropdown-menu.dropdown-lg {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .navbar .navbar-collapse .dropdown-lg-content {
    gap: 3rem;
    align-items: flex-start;
  }

  .navbar .navbar-collapse .dropdown-lg-content>div {
    flex: 1 1 0;
    min-width: 0;
  }

  .navbar .navbar-collapse .dropdown-lg-content>div+div {
    border-left: 0;
  }

  .navbar .navbar-collapse .dropdown-lg-content>.dropdown-lg-promo {
    flex: 0 0 auto;
    max-width: 220px;
    margin-left: auto;
  }

  .navbar .navbar-collapse .dropdown-menu.dropdown-lg .dropdown-header,
  .navbar .navbar-collapse .dropdown-menu.dropdown-lg .dropdown-item {
    padding-left: 0;
    padding-right: 0;
    white-space: normal;
  }

  .navbar .navbar-collapse .dropdown-menu.dropdown-lg .dropdown-header {
    margin-bottom: .5rem;
  }

  .navbar .navbar-collapse .dropdown-menu.dropdown-lg .dropdown-item {
    padding-top: .35rem;
    padding-bottom: .35rem;
  }

  /* A group whose links are laid out in two inner columns */
  .navbar .navbar-collapse .dropdown-lg-content>.dropdown-lg-group {
    flex: 2 1 0;
  }

  .navbar .navbar-collapse .dropdown-lg-cols-2 {
    column-count: 2;
    column-gap: 3rem;
  }

  .navbar .navbar-collapse .dropdown-lg-cols-2>li {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* Nested containers must not indent the mobile off-canvas menu */
@media (max-width: 991.98px) {

  .navbar .navbar-collapse .dropdown-menu>.container {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }
}

/* 2. Article detail -------------------------------------------------------- */
.article-hero .post-title {
  letter-spacing: -.03rem;
}

.article-hero .article-lead {
  font-size: 1rem;
  line-height: 1.7;
  color: #60697b;
  max-width: 46rem;
}

.article-hero .breadcrumb-line {
  font-size: .75rem;
  margin-bottom: 1rem;
}

.article-hero .breadcrumb-line .breadcrumb {
  justify-content: flex-start;
  font-size: .75rem;
  margin-bottom: 0;
}

.article-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  font-size: .8rem;
  color: #60697b;
}

.article-meta-row .article-meta-avatar {
  width: 44px;
  height: 44px;
  object-fit: cover;
}

.article-meta-row .article-meta-avatar-fallback {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: var(--bs-primary);
  background-color: rgba(var(--bs-primary-rgb), .1);
}

.article-meta-row .article-meta-name {
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.3;
}

.article-hero-figure {
  margin-top: -2.5rem;
  margin-bottom: 2.5rem;
}

.article-hero-figure img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: .4rem;
  box-shadow: 0 1.5rem 3rem rgba(30, 34, 40, .08);
}

@media (min-width: 768px) {
  .article-hero-figure {
    margin-top: -4rem;
    margin-bottom: 3.5rem;
  }
}

/* Table of contents */
.article-toc {
  font-size: .7rem;
}

.article-toc .article-toc-title {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #959ca9;
  margin-bottom: .65rem;
}

.article-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid rgba(164, 174, 198, .3);
}

.article-toc li a {
  display: block;
  padding: .3rem 0 .3rem 1rem;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: #60697b;
  line-height: 1.4;
}

.article-toc li a:hover {
  color: var(--bs-primary);
}

.article-toc li.active>a {
  color: var(--bs-primary);
  font-weight: 700;
  border-left-color: var(--bs-primary);
}

.article-toc li.toc-level-3 a {
  padding-left: 1.75rem;
  font-size: .65rem;
}

@media (min-width: 992px) {
  .article-toc-sticky {
    position: sticky;
    top: 5.5rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
  }
}

/* Content spacing */
.article-body .post-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  scroll-margin-top: 6rem;
}

.article-body .post-content h3 {
  margin-top: 2rem;
  margin-bottom: .75rem;
  scroll-margin-top: 6rem;
}

.article-body .post-content>*:first-child {
  margin-top: 0;
}

/* Author box */
.author-box .card-body {
  padding: 1.25rem 1.5rem;
}

.author-box-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  line-height: 1.2;
  margin-bottom: .15rem;
}

.author-box h4 {
  font-size: 1.05rem;
  line-height: 1.3;
}

.author-box-bio {
  font-size: .85rem;
  line-height: 1.5;
}

.author-box-bio p {
  margin-bottom: .35rem;
}

.author-box-bio p:last-child {
  margin-bottom: 0;
}

.author-box-link {
  font-size: .85rem;
}

.section-divider {
  margin: 2rem 0;
}

/* 4. Home testimonial slider ----------------------------------------------- */
.tst-frame {
  background-color: #fff;
  border: 1px solid rgba(164, 174, 198, .28);
  border-radius: 1rem;
  padding: 1.75rem 1.5rem 1.25rem;
}

@media (min-width: 992px) {
  .tst-frame {
    padding: 2.5rem 2.5rem 1.75rem;
  }
}

.tst-slider .swiper-slide {
  height: auto;
}

.tst-slide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px dashed rgba(164, 174, 198, .45);
}

.tst-brand {
  order: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
}

.tst-stat {
  display: inline-block;
  padding: .85rem 1rem;
  border-radius: .75rem;
  background-color: #f5f7f9;
}

.tst-stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
  color: #343f52;
}

.tst-stat-value i {
  font-size: 1.1rem;
  vertical-align: .1rem;
}

.tst-stat-label {
  display: block;
  margin-top: .2rem;
  font-size: .75rem;
  line-height: 1.35;
  color: #60697b;
}

.tst-brand img {
  max-height: 34px;
  max-width: 150px;
  object-fit: contain;
}

.tst-media {
  order: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* .swiper-container .swiper img wins on specificity, so qualify with .tst-slider */
.tst-slider .tst-media img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: .5rem;
  filter: grayscale(1);
}

/* image_big: full-body cut-out, sits on the baseline instead of being cropped */
.tst-slider .tst-media.is-big img {
  width: auto;
  max-width: 100%;
  height: 240px;
  object-fit: contain;
  object-position: bottom;
  border-radius: 0;
}

.tst-body {
  order: 2;
}

.tst-quote {
  border-left: 0;
  padding-left: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: #343f52;
  margin-bottom: 1rem;
}

.tst-link {
  display: inline-block;
  font-size: .85rem;
  color: var(--bs-primary);
  margin-bottom: 1.25rem;
}

.tst-name {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #343f52;
}

.tst-role {
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #959ca9;
}

/* Controls: dots bottom-left, arrows bottom-right */
.tst-slider .swiper-controls {
  position: static !important;
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  pointer-events: all;
}

.tst-slider .swiper-controls .swiper-pagination {
  position: static !important;
  bottom: auto;
  order: 1;
  width: auto;
  margin: 0;
  text-align: left;
}

.tst-slider .swiper-controls .swiper-navigation {
  order: 2;
  display: flex;
  gap: .75rem;
  position: static;
  transform: none;
}

.tst-slider .swiper-controls .swiper-navigation .swiper-button {
  position: static;
  transform: none;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  border-radius: 50%;
  background: var(--bs-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: background-color .2s ease;
}

.tst-slider .swiper-controls .swiper-navigation .swiper-button:hover {
  background: #343f52;
}

.tst-slider .swiper-controls .swiper-navigation .swiper-button:after {
  color: #fff;
  font-size: 1.1rem;
}

.tst-slider .swiper-controls .swiper-navigation .swiper-button.swiper-button-disabled {
  opacity: .35;
}

@media (min-width: 992px) {
  .tst-slide {
    grid-template-columns: 170px 320px 1fr;
    align-items: end;
    gap: 2.5rem;
    min-height: 320px;
  }

  .tst-brand {
    order: 1;
    align-self: stretch;
    justify-content: flex-start;
    padding-top: .5rem;
  }

  /* stat kutusu olsun olmasın logo tabana yaslı kalır */
  .tst-brand img {
    margin-top: auto;
  }

  .tst-media {
    order: 2;
    justify-content: flex-start;
  }

  .tst-slider .tst-media img {
    width: 100%;
    height: 320px;
    border-radius: .5rem .5rem 0 0;
  }

  .tst-slider .tst-media.is-big img {
    width: 100%;
    height: 360px;
    object-fit: contain;
    object-position: bottom;
    border-radius: 0;
  }

  .tst-body {
    order: 3;
    align-self: center;
  }

  .tst-quote {
    font-size: 1.05rem;
  }
}

/* 3. Home case study strip ------------------------------------------------- */
.cs-strip {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.cs-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 1rem;
  color: #fff;
  text-decoration: none;
}

.cs-item:hover {
  color: #fff;
}

.cs-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: filter .5s ease, transform .6s ease;
}

.cs-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 22, 28, .45) 0%, rgba(18, 22, 28, .2) 35%, rgba(18, 22, 28, .85) 100%);
  z-index: 1;
}

.cs-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  height: 100%;
  min-height: 280px;
  padding: 1.5rem;
}

.cs-logo img {
  height: 26px;
  max-width: 160px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.cs-brand {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
}

.cs-bottom {
  display: block;
}

.cs-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  margin-bottom: .9rem;
}

.cs-stat {
  display: inline-block;
  max-width: 100%;
  padding: .6rem .85rem;
  border-radius: .65rem;
  background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cs-stat-value {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.25;
}

/* primary_rate / secondary_rate: the number carries the message, so it goes larger */
.cs-stat.is-metric .cs-stat-value {
  font-size: 1.5rem;
  line-height: 1.15;
}

/* primary + secondary yan yana */
.cs-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: .5rem;
}

.cs-stat.is-metric.cs-stat-secondary .cs-stat-value {
  font-size: 1.35rem;
}

.cs-stat-label {
  display: block;
  font-size: .7rem;
  opacity: .8;
}

.cs-link {
  display: inline-block;
  margin-top: .9rem;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cs-reveal {
  display: block;
}

@media (min-width: 992px) {
  .cs-strip {
    flex-direction: row;
    height: 460px;
  }

  .cs-item {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    transition: flex-grow .5s cubic-bezier(.22, .61, .36, 1);
  }

  .cs-media {
    filter: grayscale(1) brightness(.55);
  }

  .cs-reveal {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(.5rem);
    transition: opacity .35s ease, transform .35s ease, max-height .5s ease;
  }

  /* Default: the first card is the open one */
  .cs-item.is-active {
    flex-grow: 3;
  }

  .cs-item.is-active .cs-media {
    filter: none;
  }

  .cs-item.is-active .cs-reveal {
    max-height: 14rem;
    opacity: 1;
    transform: none;
  }

  /* Hover takes over from the default open card */
  .cs-strip:hover .cs-item.is-active:not(:hover) {
    flex-grow: 1;
  }

  .cs-strip:hover .cs-item.is-active:not(:hover) .cs-media {
    filter: grayscale(1) brightness(.55);
  }

  .cs-strip:hover .cs-item.is-active:not(:hover) .cs-reveal {
    max-height: 0;
    opacity: 0;
    transform: translateY(.5rem);
  }

  .cs-strip .cs-item:hover {
    flex-grow: 3;
  }

  .cs-strip .cs-item:hover .cs-media {
    filter: none;
    transform: scale(1.03);
  }

  .cs-strip .cs-item:hover .cs-reveal {
    max-height: 14rem;
    opacity: 1;
    transform: none;
  }

  /* İkinci metrik yalnızca açık kartta; dar kartta yatayda katlanır */
  /* Katlanmış (0 genişlikli) ikinci rozet alt satıra sarmasın:
     sarma, row-gap kadar boşluk ekleyip kartın hizasını bozuyordu */
  .cs-stats {
    flex-wrap: nowrap;
  }

  /* Kapalı kartta hem yatayda hem dikeyde tamamen katlanır ki
     birincil rozetin hizasını yukarı kaydırmasın */
  .cs-stat-secondary {
    max-width: 0;
    max-height: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width .5s cubic-bezier(.22, .61, .36, 1), max-height .5s cubic-bezier(.22, .61, .36, 1), opacity .35s ease, padding .35s ease;
  }

  .cs-item.is-active .cs-stat-secondary {
    max-width: 16rem;
    max-height: 12rem;
    padding: .6rem .85rem;
    opacity: 1;
    white-space: normal;
  }

  .cs-strip:hover .cs-item.is-active:not(:hover) .cs-stat-secondary {
    max-width: 0;
    max-height: 0;
    padding: 0;
    opacity: 0;
  }

  .cs-strip .cs-item:hover .cs-stat-secondary {
    max-width: 16rem;
    max-height: 12rem;
    padding: .6rem .85rem;
    opacity: 1;
    white-space: normal;
  }
}

/* 5. Case study list thumbnails: white brand logo over the cover ------------ */
.cs-thumb>a {
  position: relative;
  display: block;
  border-radius: inherit;
  overflow: hidden;
}

/* Beyaz logonun açık fotoğraflarda da okunması için üstte hafif bir perde */
.cs-thumb>a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 22, 28, .5) 0%, rgba(18, 22, 28, .12) 35%, rgba(18, 22, 28, 0) 60%);
  pointer-events: none;
  z-index: 1;
}

.cs-thumb-logo {
  position: absolute;
  top: 1.15rem;
  left: 1.25rem;
  z-index: 2;
  line-height: 0;
}

.cs-thumb .cs-thumb-logo img {
  width: auto;
  height: 26px;
  max-width: 130px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* Tek testimonial varsa ok ve nokta kontrollerine gerek yok */
.tst-slider.has-one .swiper-controls {
  display: none;
}
