/* ==========================================================================
   Pathway IT — case-studies.css
   Styles for case-studies.html: curved dark banner hero, filter bar,
   card grid, pagination and the case study detail overlay.
   ========================================================================== */

.cs-section { padding-block: clamp(2.5rem, 5vw, 3.5rem) clamp(3.5rem, 7vw, 5rem); background: var(--paper); }
.cs-cta-wrap { padding-block: 0 clamp(3.5rem, 7vw, 5.5rem); background: var(--paper); }

/* Icon slots without a dedicated wrapper class. */
span[data-icon]:not([class]) { display: inline-flex; flex: none; vertical-align: middle; }
span[data-icon]:not([class]) svg { width: 1em; height: 1em; }

/* -------------------------------------------------------------------------- */
/* Hero banner                                                                */
/* -------------------------------------------------------------------------- */
/* Rounding the bottom corners of the dark block leaves its centre proud, which
   reads as the convex sweep in the design. The clip has to sit on the outer
   element so the corners fall away to the page, not to another dark layer. */
.cs-hero {
  background: #060B1E; padding-top: var(--header-h); overflow: hidden;
  border-bottom-left-radius: 50% 46px; border-bottom-right-radius: 50% 46px;
}
.cs-hero-media { position: relative; max-width: 1600px; margin-inline: auto; }
.cs-banner { display: block; width: 100%; height: auto; }

@media (max-width: 760px) {
  .cs-hero { border-bottom-left-radius: 50% 22px; border-bottom-right-radius: 50% 22px; }
}

/* -------------------------------------------------------------------------- */
/* Filter bar                                                                 */
/* -------------------------------------------------------------------------- */
.cs-filters {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.cs-search { position: relative; flex: 0 1 320px; min-width: 220px; }
.cs-search-ico {
  position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; color: var(--slate-400, #94A0BD); pointer-events: none;
}
.cs-search-ico svg { width: 15px; height: 15px; }
.cs-search input {
  width: 100%; background: var(--paper); border: 1px solid #E1E6F3; border-radius: 10px;
  padding: .72rem .9rem .72rem 2.4rem; font-size: .84rem; color: var(--slate-900);
}
.cs-search input::placeholder { color: var(--slate-400, #94A0BD); }
.cs-search input:focus-visible { outline: 2px solid var(--indigo); outline-offset: 1px; border-color: transparent; }

.cs-selects { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.cs-selects select {
  appearance: none; cursor: pointer;
  background: var(--paper); border: 1px solid #E1E6F3; border-radius: 10px;
  padding: .72rem 2.1rem .72rem .9rem; font-size: .82rem; color: var(--slate-900);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7694' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 13px;
  transition: border-color var(--t) var(--ease);
}
.cs-selects select:hover { border-color: #C6CFEA; }
.cs-selects select:focus-visible { outline: 2px solid var(--indigo); outline-offset: 1px; }
.cs-clear {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  background: transparent; border: 0; padding: .5rem .3rem;
  font-size: .82rem; font-weight: 500; color: var(--indigo);
}
.cs-clear svg { width: 14px; height: 14px; }
.cs-clear:hover { text-decoration: underline; }

.cs-count {
  margin-top: 1.2rem; font-family: var(--font-mono);
  font-size: .68rem; letter-spacing: .04em; color: var(--slate-400, #94A0BD);
}

@media (max-width: 860px) {
  .cs-filters { flex-direction: column; align-items: stretch; }
  .cs-search { flex: 1 1 auto; }
  .cs-selects select { flex: 1 1 140px; }
}

/* -------------------------------------------------------------------------- */
/* Card grid                                                                  */
/* -------------------------------------------------------------------------- */
.cs-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem;
  margin-top: 1.4rem;
}
.cs-card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid #E7EAF4; border-radius: 14px; overflow: hidden;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.cs-card:hover { transform: translateY(-5px); box-shadow: 0 20px 46px rgba(20, 22, 70, .12); border-color: #CFD5F5; }
/* The card is one link through to case-<slug>.html. */
.cs-card-link { display: flex; flex-direction: column; flex: 1; color: inherit; }
.cs-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #EEF0F8; }
.cs-card-media img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.cs-card:hover .cs-card-media img { transform: scale(1.05); }
.cs-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.2rem 1.25rem 1.35rem; }

.cs-tag {
  align-self: flex-start; border-radius: var(--r-pill);
  background: var(--indigo-50); color: var(--indigo);
  padding: .26rem .65rem; font-size: .68rem; font-weight: 600;
}
.cs-card h3 {
  margin-top: .8rem; font-size: .98rem; line-height: 1.4;
  letter-spacing: -.01em; color: var(--slate-900);
}
.cs-card p { margin-top: .6rem; font-size: .8rem; line-height: 1.65; color: var(--slate-500); }

.cs-chips { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin-top: 1rem; list-style: none; }
.cs-chips li { display: flex; align-items: center; gap: .35rem; font-size: .72rem; color: var(--slate-500); }
.cs-chip-logo { display: grid; place-items: center; width: 18px; height: 18px; flex: none; }
.cs-chip-logo svg { width: 100%; height: 100%; }

.cs-read {
  display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start;
  margin-top: auto; padding: 1rem 0 0;
  font-size: .8rem; font-weight: 600; color: var(--indigo);
}
.cs-read svg { width: 14px; height: 14px; transition: transform var(--t) var(--ease); }
.cs-card:hover .cs-read svg { transform: translateX(3px); }

@media (max-width: 1000px) { .cs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cs-grid { grid-template-columns: 1fr; } }

.cs-empty {
  margin-top: 2.5rem; text-align: center;
  font-size: .86rem; line-height: 1.7; color: var(--slate-500);
}
.cs-inline-btn {
  background: transparent; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--indigo); text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/* Pagination                                                                 */
/* -------------------------------------------------------------------------- */
.cs-pager { display: flex; justify-content: center; gap: .45rem; margin-top: clamp(2rem, 4vw, 3rem); }
.cs-page {
  display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 .5rem;
  border-radius: 9px; cursor: pointer;
  background: var(--paper); border: 1px solid #E1E6F3;
  font-size: .82rem; font-weight: 500; color: var(--slate-700, #46506E);
  transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.cs-page:hover:not(:disabled):not(.is-current) { border-color: var(--indigo); color: var(--indigo); }
.cs-page.is-current { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.cs-page:disabled { opacity: .4; cursor: default; }
.cs-page--arrow svg { width: 15px; height: 15px; }
.cs-pager .cs-page--arrow:first-child svg { transform: rotate(180deg); }

/* -------------------------------------------------------------------------- */
/* Closing CTA                                                                */
/* -------------------------------------------------------------------------- */
.cs-cta {
  display: flex; align-items: center; justify-content: space-between; gap: clamp(1.6rem, 4vw, 3rem);
  background: #0A0F26; border-radius: 18px;
  padding: clamp(1.8rem, 3.6vw, 2.6rem) clamp(1.6rem, 3.6vw, 2.8rem);
  background-image: radial-gradient(110% 150% at 15% 0%, rgba(79, 70, 229, .2) 0%, transparent 60%);
}
.cs-cta-copy h2 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.35; color: #fff; letter-spacing: -.01em; }
.cs-cta-copy p { margin-top: .6rem; max-width: 54ch; font-size: .86rem; line-height: 1.6; color: #98A2C0; }
.cs-cta-action { flex: none; }
.cs-cta-form { display: flex; gap: .7rem; }
.cs-cta-form input {
  width: clamp(200px, 22vw, 260px);
  background: #131A36; border: 1px solid #262F55; color: #fff;
  border-radius: 10px; padding: .8rem 1rem; font-size: .88rem;
}
.cs-cta-form input::placeholder { color: #6E779B; }
.cs-cta-form input:focus-visible { outline: 2px solid #8B5CF6; outline-offset: 1px; }
.cs-cta-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--indigo); color: #fff; border: 0; border-radius: 10px;
  padding: .8rem 1.3rem; font-size: .88rem; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.cs-cta-btn:hover { background: #4338CA; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(79, 70, 229, .38); }
.cs-cta-points { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1rem; }
.cs-cta-points li { display: flex; align-items: center; gap: .4rem; font-size: .76rem; color: #98A2C0; }
.cs-cta-points svg { width: 13px; height: 13px; color: #A78BFA; flex: none; }

@media (max-width: 940px) {
  .cs-cta { flex-direction: column; align-items: flex-start; }
  .cs-cta-action { width: 100%; }
  .cs-cta-form input { width: 100%; flex: 1; }
}
@media (max-width: 520px) {
  .cs-cta-form { flex-direction: column; }
  .cs-cta-btn { justify-content: center; }
}
