/*
 * Kıbrıs Psikoloji v20
 * Inner-page composition and a quieter, more useful footer system.
 */

:root {
  --kp20-ink: #163f3b;
  --kp20-deep: #082f2c;
  --kp20-forest: #0f4b46;
  --kp20-sage: #dfe9e3;
  --kp20-paper: #fcfaf6;
  --kp20-sand: #f2ece3;
  --kp20-clay: #a76552;
  --kp20-line: rgba(22, 63, 59, .13);
  --kp20-shadow: 0 30px 80px rgba(22, 63, 59, .10);
}

/* Inner pages share one calm canvas instead of competing section patterns. */
body:not(.home) main {
  background: var(--kp20-paper);
}

body:not(.home) .kp-page-hero {
  isolation: isolate;
  position: relative;
  padding-top: clamp(4.5rem, 8vw, 8rem) !important;
  padding-bottom: clamp(4rem, 7vw, 7rem) !important;
  background:
    radial-gradient(circle at 84% 18%, rgba(151, 170, 162, .26) 0 9rem, transparent 9.15rem),
    linear-gradient(135deg, #f8f4ed 0%, #fcfaf7 54%, #e7eee9 100%) !important;
  border-bottom: 1px solid var(--kp20-line);
}

body:not(.home) .kp-page-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto auto -8rem -7rem;
  width: 22rem;
  aspect-ratio: 1;
  border: 1px solid rgba(167, 101, 82, .17);
  border-radius: 50%;
  box-shadow: 0 0 0 3rem rgba(167, 101, 82, .035), 0 0 0 6rem rgba(167, 101, 82, .025);
  pointer-events: none;
}

body:not(.home) .kp-page-hero::after {
  display: none !important;
}

body:not(.home) .kp-page-hero > * {
  position: relative;
  z-index: 1;
}

body:not(.home) .kp-page-hero > .wp-block-heading {
  max-width: 13ch !important;
  line-height: .98 !important;
  text-wrap: balance;
}

body:not(.home) .kp-page-hero > p:last-child {
  max-width: 720px;
  line-height: 1.75;
}

body:not(.home) .kp-page-hero .wp-block-columns {
  align-items: center !important;
  gap: clamp(2.5rem, 6vw, 7rem) !important;
}

body:not(.home) .kp-page-hero .wp-block-column > h1 {
  max-width: 11ch;
  margin-top: .65rem;
  margin-bottom: 1.4rem;
  line-height: .98 !important;
  text-wrap: balance;
}

body:not(.home) .kp-page-hero .wp-block-column > p:not(.kp-eyebrow) {
  max-width: 620px;
  line-height: 1.7;
}

body:not(.home) .kp-page-hero .wp-block-button__link {
  box-shadow: 0 12px 30px rgba(8, 47, 44, .16);
}

body:not(.home) .kp-about-main-photo,
body:not(.home) .kp-online-photo {
  position: relative;
  margin: 0;
  padding: .65rem;
  overflow: hidden;
  border: 1px solid rgba(22, 63, 59, .12);
  border-radius: 2rem !important;
  background: rgba(255, 253, 249, .75);
  box-shadow: var(--kp20-shadow);
}

body:not(.home) .kp-about-main-photo img,
body:not(.home) .kp-online-photo img {
  display: block;
  min-height: 0;
  max-height: 660px;
  aspect-ratio: 4 / 5;
  border-radius: 1.55rem;
  object-fit: cover;
  object-position: center top;
}

/* About and online-therapy content becomes editorial, not a loose stack of blocks. */
.kp-about-hero + .has-warm-white-background-color,
.kp-page-hero:has(.kp-online-photo) + .has-sage-background-color,
.kp-page-hero:has(.kp-online-photo) ~ .has-warm-white-background-color {
  position: relative;
  border-bottom: 1px solid var(--kp20-line);
}

.kp-about-hero + .has-warm-white-background-color > .wp-block-columns {
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--kp20-line);
  border-radius: 2rem;
  background: #fffdfa;
  box-shadow: 0 22px 60px rgba(22, 63, 59, .07);
}

.kp-about-hero + .has-warm-white-background-color .kp-editorial-photo img {
  border-radius: 1.4rem;
}

.kp-about-hero ~ .has-sage-background-color {
  background: linear-gradient(135deg, #dfe9e3, #edf1e9) !important;
}

.kp-credential-list {
  display: grid;
  gap: .8rem;
}

.kp-credential-item {
  align-items: flex-start !important;
  gap: 1.1rem !important;
  padding: 1.25rem 1.35rem;
  border: 1px solid rgba(22, 63, 59, .10);
  border-radius: 1.15rem;
  background: rgba(255, 253, 249, .72);
}

.kp-credential-item .kp-feature-number {
  flex: 0 0 2.3rem;
  margin: 0;
  font-size: 1.35rem;
}

.kp-page-hero:has(.kp-online-photo) + .has-sage-background-color .wp-block-columns {
  gap: 1rem !important;
}

.kp-page-hero:has(.kp-online-photo) + .has-sage-background-color .wp-block-column {
  min-height: 230px;
  padding: 1.65rem;
  border: 1px solid rgba(22, 63, 59, .11);
  border-radius: 1.4rem;
  background: rgba(255, 253, 249, .78);
  box-shadow: 0 14px 36px rgba(22, 63, 59, .05);
}

.kp-page-hero:has(.kp-online-photo) + .has-sage-background-color .wp-block-column::before {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  margin-bottom: 2.5rem;
  border: 1px solid rgba(22, 63, 59, .16);
  border-radius: 50%;
  background: var(--kp20-deep);
  color: #fffdfa;
  font: 500 .78rem/1 var(--wp--preset--font-family--body);
}

.kp-page-hero:has(.kp-online-photo) ~ .has-warm-white-background-color .wp-block-columns {
  padding: clamp(1.75rem, 4vw, 3.5rem);
  border: 1px solid var(--kp20-line);
  border-radius: 2rem;
  background: linear-gradient(135deg, #fffdfa 0%, #f5f0e8 100%);
  box-shadow: 0 22px 55px rgba(22, 63, 59, .06);
}

/* Certificate and article index pages. */
.kp-certificates-page-hero,
.kp-articles-hero {
  text-align: center;
}

.kp-certificates-page-hero > *,
.kp-articles-hero > * {
  margin-inline: auto;
}

.kp-certificates-page-archive,
.kp-articles-page {
  background: var(--kp20-paper) !important;
}

.kp-certificates-page-archive {
  background-image: linear-gradient(180deg, rgba(223, 233, 227, .35), transparent 22rem) !important;
}

.kp-query-card--visual {
  overflow: hidden;
  border-color: var(--kp20-line) !important;
  border-radius: 1.4rem !important;
  background: #fffdfa !important;
  box-shadow: 0 15px 45px rgba(22, 63, 59, .055);
}

.kp-query-card--visual:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(22, 63, 59, .11);
}

.kp-query-card--visual .kp-query-image img {
  transition: transform .55s cubic-bezier(.22, 1, .36, 1);
}

.kp-query-card--visual:hover .kp-query-image img {
  transform: scale(1.035);
}

/* Legal pages read like a real document and remain easy to scan. */
body:not(.home) .kp-legal-hero {
  min-height: 360px;
  display: grid;
  place-content: center;
  text-align: center;
}

body:not(.home) .kp-legal-hero > * {
  margin-inline: auto !important;
  text-align: center !important;
}

body:not(.home) .kp-legal-hero > h1 {
  max-width: 17ch !important;
}

.kp-legal-page {
  padding-inline: max(1rem, calc((100vw - 960px) / 2)) !important;
  background: linear-gradient(180deg, #f4efe7 0 9rem, var(--kp20-paper) 9rem) !important;
}

.kp-legal-page > * {
  max-width: 800px !important;
  margin-inline: auto !important;
}

.kp-legal-page > p,
.kp-legal-page > ul,
.kp-legal-page > ol,
.kp-legal-page > h2,
.kp-legal-page > h3,
.kp-legal-page > .wp-block-group:not(.kp-legal-notice) {
  padding-inline: clamp(1.25rem, 4vw, 3.5rem);
}

.kp-legal-page > h2 {
  margin-top: 2.5rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--kp20-line);
}

.kp-legal-page .kp-legal-notice {
  margin-bottom: 2.75rem !important;
  border: 1px solid rgba(22, 63, 59, .12);
  border-left: 4px solid var(--kp20-clay);
  border-radius: 1rem !important;
  background: #fffdfa !important;
  box-shadow: 0 16px 46px rgba(22, 63, 59, .07);
}

/* Archive, search and single article surfaces. */
.kp-archive-page,
.kp-search-page,
.kp-single-article {
  background:
    radial-gradient(circle at 95% 4%, rgba(151, 170, 162, .20), transparent 24rem),
    linear-gradient(180deg, #f4f0e9 0, var(--kp20-paper) 28rem) !important;
}

.kp-archive-page > .wp-block-group:first-child,
.kp-search-page > .wp-block-group:first-child,
.kp-article-header {
  position: relative;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--kp20-line);
  border-radius: 2rem;
  background: rgba(255, 253, 249, .72);
  box-shadow: 0 22px 60px rgba(22, 63, 59, .06);
}

.kp-single-article .wp-block-post-content {
  margin-top: clamp(2.5rem, 6vw, 5rem);
}

.kp-single-article .wp-block-post-content > p {
  color: #344d49;
}

.kp-article-disclaimer {
  border: 1px solid var(--kp20-line);
  border-left: 4px solid var(--kp20-clay);
  background: #eef2ec !important;
}

/* Appointment bridge: a clear light panel, deliberately separate from the footer. */
.home .kp-prefooter-cta,
.woocommerce-cart .kp-prefooter-cta,
.woocommerce-checkout .kp-prefooter-cta,
.single-product .kp-prefooter-cta,
.post-type-archive-product .kp-prefooter-cta {
  display: none;
}

.kp-prefooter-cta {
  position: relative;
  z-index: 1;
  margin: 0 !important;
  background: var(--kp20-paper) !important;
}

.kp-prefooter-card {
  position: relative;
  isolation: isolate;
  gap: clamp(2rem, 5vw, 5rem) !important;
  overflow: hidden;
  border: 1px solid rgba(22, 63, 59, .14);
  border-radius: clamp(1.5rem, 3vw, 2.4rem);
  background:
    radial-gradient(circle at 92% 0, rgba(167, 101, 82, .18), transparent 18rem),
    linear-gradient(125deg, #eef2ec 0%, #f4ede5 100%);
  box-shadow: var(--kp20-shadow);
}

.kp-prefooter-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: clamp(1rem, 4vw, 4rem);
  bottom: -7rem;
  width: 18rem;
  aspect-ratio: 1;
  border: 1px solid rgba(22, 63, 59, .11);
  border-radius: 50%;
  box-shadow: 0 0 0 2.5rem rgba(22, 63, 59, .025), 0 0 0 5rem rgba(22, 63, 59, .018);
}

.kp-prefooter-copy {
  flex: 1 1 620px;
  max-width: 780px;
  margin: 0 !important;
}

.kp-prefooter-copy h2 {
  max-width: 18ch;
  margin-top: .55rem;
  margin-bottom: 1rem;
  line-height: 1.05;
  text-wrap: balance;
}

.kp-prefooter-copy > p:last-child {
  max-width: 620px;
  margin-bottom: 0;
  color: #536965;
}

.kp-prefooter-eyebrow {
  margin: 0;
  color: var(--kp20-clay);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.kp-prefooter-action {
  flex: 0 1 270px;
  margin: 0 !important;
}

.kp-prefooter-action .wp-block-button__link {
  width: 100%;
  min-width: 235px;
  padding: 1rem 1.35rem;
  border-radius: 999px;
  background: var(--kp20-deep);
  box-shadow: 0 14px 28px rgba(8, 47, 44, .18);
  text-align: center;
  transition: transform .22s ease, background-color .22s ease, box-shadow .22s ease;
}

.kp-prefooter-action .wp-block-button__link:hover {
  transform: translateY(-3px);
  background: var(--kp20-forest);
  box-shadow: 0 18px 34px rgba(8, 47, 44, .24);
}

.kp-prefooter-action .wp-block-button__link:focus-visible,
.kp-site-footer--v20 a:focus-visible {
  outline: 3px solid #d9b6a7;
  outline-offset: 4px;
}

.kp-prefooter-action p {
  margin: .8rem 0 0;
  color: #657873;
  text-align: center;
}

/* Footer: structured navigation and high-contrast information hierarchy. */
.kp-site-footer--v20 {
  margin: 0 !important;
  overflow: hidden;
  border: 0 !important;
  background:
    radial-gradient(circle at 8% 8%, rgba(151, 170, 162, .15), transparent 22rem),
    linear-gradient(135deg, #062b29 0%, #0b3834 58%, #123f3b 100%) !important;
}

.kp-site-footer--v20::before {
  content: "";
  position: absolute;
  right: -10rem;
  bottom: -13rem;
  width: 31rem;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 253, 249, .055);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgba(255, 253, 249, .012), 0 0 0 8rem rgba(255, 253, 249, .009);
  pointer-events: none;
}

.kp-site-footer--v20::after {
  display: none !important;
}

.kp-footer-main--v20 {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: minmax(280px, 1.65fr) minmax(145px, .7fr) minmax(150px, .72fr) minmax(205px, 1fr);
  gap: clamp(2rem, 4vw, 4.5rem) !important;
  align-items: start !important;
}

.kp-footer-main--v20 > .wp-block-column {
  width: auto !important;
  min-width: 0;
  flex-basis: auto !important;
  padding-left: 0 !important;
  border-left: 0 !important;
}

.kp-footer-main--v20 > .wp-block-column:not(:first-child) {
  padding-top: .45rem;
}

.kp-footer-brand {
  max-width: 520px;
}

.kp-footer-brand .kp-footer-logo {
  margin-bottom: 1.75rem;
}

.kp-footer-brand h2 {
  max-width: 17ch !important;
  margin: 0 0 1rem !important;
  font-size: clamp(1.65rem, 2.8vw, 2.45rem) !important;
  line-height: 1.08;
  text-wrap: balance;
}

.kp-footer-description {
  max-width: 48ch;
  margin: 0;
  color: rgba(255, 253, 249, .68);
  line-height: 1.7;
}

.kp-footer-assurances {
  gap: .55rem !important;
  margin-top: 1.65rem !important;
}

.kp-footer-assurances p {
  margin: 0;
  padding: .45rem .7rem;
  border: 1px solid rgba(255, 253, 249, .13);
  border-radius: 999px;
  background: rgba(255, 253, 249, .045);
  color: rgba(255, 253, 249, .8);
}

.kp-footer-main--v20 h3 {
  margin: 0 0 1.35rem !important;
  color: #fffdfa;
  font-family: var(--wp--preset--font-family--body);
  font-weight: 700;
  letter-spacing: .11em !important;
  text-transform: uppercase;
}

.kp-site-footer--v20 .kp-footer-navigation .wp-block-navigation__container {
  width: 100%;
  gap: .15rem !important;
}

.kp-site-footer--v20 .kp-footer-navigation .wp-block-navigation-item {
  width: 100%;
}

.kp-site-footer--v20 .kp-footer-navigation .wp-block-navigation-item__content {
  display: block;
  width: 100%;
  padding: .48rem 0 !important;
  color: rgba(255, 253, 249, .7) !important;
  line-height: 1.35;
  opacity: 1;
  transition: color .18s ease, transform .18s ease;
}

.kp-site-footer--v20 .kp-footer-navigation .wp-block-navigation-item__content:hover {
  color: #fffdfa !important;
  transform: translateX(4px);
}

.kp-site-footer--v20 .kp-footer-bottom {
  position: relative;
  z-index: 1;
  margin-top: clamp(3rem, 6vw, 5rem) !important;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 253, 249, .12);
  color: rgba(255, 253, 249, .58);
}

.kp-site-footer--v20 .kp-footer-bottom p {
  margin: 0;
  line-height: 1.6;
}

.kp-site-footer--v20 .kp-footer-bottom p:last-child {
  max-width: 620px;
  text-align: right;
}

@media (max-width: 1100px) {
  .kp-footer-main--v20 {
    grid-template-columns: minmax(280px, 1.4fr) repeat(2, minmax(150px, .7fr));
  }

  .kp-footer-main--v20 > .wp-block-column:last-child {
    grid-column: 2 / -1;
  }

  .kp-footer-legal .wp-block-navigation__container {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    column-gap: 2rem !important;
  }
}

@media (max-width: 781px) {
  body:not(.home) .kp-page-hero {
    padding: 3.5rem 1rem !important;
  }

  body:not(.home) .kp-page-hero .wp-block-columns {
    gap: 2rem !important;
  }

  body:not(.home) .kp-page-hero .wp-block-column {
    flex-basis: 100% !important;
  }

  body:not(.home) .kp-page-hero .wp-block-column > h1 {
    max-width: 13ch;
    font-size: clamp(2.7rem, 11vw, 4.2rem) !important;
  }

  body:not(.home) .kp-about-main-photo img,
  body:not(.home) .kp-online-photo img {
    max-height: 580px;
  }

  .kp-prefooter-card {
    display: block !important;
  }

  .kp-prefooter-action {
    margin-top: 1.75rem !important;
  }

  .kp-prefooter-action .wp-block-buttons,
  .kp-prefooter-action .wp-block-button,
  .kp-prefooter-action .wp-block-button__link {
    width: 100%;
  }

  .kp-footer-main--v20 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kp-footer-brand {
    grid-column: 1 / -1;
  }

  .kp-footer-main--v20 > .wp-block-column:last-child {
    grid-column: 1 / -1;
  }

  .kp-site-footer--v20 .kp-footer-bottom {
    display: block !important;
  }

  .kp-site-footer--v20 .kp-footer-bottom p:last-child {
    margin-top: .75rem;
    text-align: left;
  }
}

@media (max-width: 560px) {
  body:not(.home) .kp-page-hero {
    padding-block: 3rem !important;
  }

  body:not(.home) .kp-legal-hero {
    min-height: 0;
  }

  .kp-about-hero + .has-warm-white-background-color > .wp-block-columns,
  .kp-page-hero:has(.kp-online-photo) ~ .has-warm-white-background-color .wp-block-columns {
    padding: 1rem;
    border-radius: 1.35rem;
  }

  .kp-legal-page {
    padding-inline: .75rem !important;
  }

  .kp-legal-page > p,
  .kp-legal-page > ul,
  .kp-legal-page > ol,
  .kp-legal-page > h2,
  .kp-legal-page > h3,
  .kp-legal-page > .wp-block-group:not(.kp-legal-notice) {
    padding-inline: .75rem;
  }

  .kp-prefooter-cta {
    padding: 2.5rem 1rem !important;
  }

  .kp-prefooter-card {
    padding: 1.5rem !important;
    border-radius: 1.35rem;
  }

  .kp-prefooter-copy h2 {
    font-size: clamp(2rem, 10vw, 2.7rem) !important;
  }

  .kp-prefooter-action .wp-block-button__link {
    min-width: 0;
  }

  .kp-footer-main--v20 {
    grid-template-columns: 1fr;
    gap: 2.25rem !important;
  }

  .kp-footer-brand,
  .kp-footer-main--v20 > .wp-block-column:last-child {
    grid-column: auto;
  }

  .kp-footer-legal .wp-block-navigation__container {
    grid-template-columns: 1fr;
  }

  .kp-footer-main--v20 > .wp-block-column:not(:first-child) {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 253, 249, .1) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kp-prefooter-action .wp-block-button__link,
  .kp-site-footer--v20 .kp-footer-navigation .wp-block-navigation-item__content,
  .kp-query-card--visual,
  .kp-query-card--visual .kp-query-image img {
    transition: none !important;
  }
}
