/*--------------------------------------------------------------
  Specializations Page Styles - KineKracht
  Hero + Stacked Cards Design

  Design Tokens:
  - Primary blue: #203965
  - Text heading: #464646
  - Text body: #666666
  - Background light: #F5F8FB
  - Font body: Open Sans
  - Font heading: Nunito
--------------------------------------------------------------*/

/*--------------------------------------------------------------
  0. Layout Overrides - Break out of Bootstrap container
--------------------------------------------------------------*/
/* Remove content-area margin when specialization template is used */
.content-area:has(.spec-hero) {
  margin-bottom: 0 !important;
}

/* Make hero break out of Bootstrap container */
.content-area:has(.spec-hero) > .container {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
}

.content-area:has(.spec-hero) > .container > .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.content-area:has(.spec-hero) > .container > .row > .content,
.content-area:has(.spec-hero) > .container > .row > main {
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
  max-width: none !important;
  float: none !important;
}

/* Same layout overrides for page-header (no hero) */
.content-area:has(.spec-page-header) {
  margin-bottom: 0 !important;
}

.content-area:has(.spec-page-header) > .container {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
}

.content-area:has(.spec-page-header) > .container > .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.content-area:has(.spec-page-header) > .container > .row > .content,
.content-area:has(.spec-page-header) > .container > .row > main {
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
  max-width: none !important;
  float: none !important;
}

/*--------------------------------------------------------------
  1. Hero Section
--------------------------------------------------------------*/
.spec-hero {
  position: relative;
  width: 100vw;
  height: 350px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
  margin-left: calc(-50vw + 50%);
  padding-top: 65px;
}

.spec-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(32, 57, 101, 0.3) 0%,
    rgba(32, 57, 101, 0.7) 100%
  );
  z-index: 1;
}

.spec-hero__content {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
  padding: 0 20px;
}

.spec-hero__title {
  font-family: 'Nunito', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.spec-hero__subtitle {
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
  opacity: 0.9;
}

/*--------------------------------------------------------------
  2. Content Container
--------------------------------------------------------------*/
.spec-content {
  background-color: #F5F8FB;
  padding: 40px 0 60px 0;
}

/*--------------------------------------------------------------
  3. Card Styles
--------------------------------------------------------------*/
.spec-card {
  background-color: #ffffff;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 35px 40px;
  max-width: 900px;
  margin: 0 auto 30px auto;
  position: relative;
}

.spec-card:last-child {
  margin-bottom: 0;
}

.spec-card--with-icon {
  padding-top: 50px;
}

.spec-card__icon {
  position: absolute;
  top: -20px;
  left: 40px;
  width: 50px;
  height: 50px;
  background-color: #203965;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 20px;
}

.spec-card__icon i,
.spec-card__icon .fa {
  color: #ffffff;
  font-size: 20px;
}

.spec-card__title {
  font-family: 'Nunito', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #464646;
  margin: 0 0 15px 0;
  line-height: 1.3;
}

.spec-card__text {
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #666666;
  line-height: 1.7;
  margin: 0;
}

.spec-card__text p {
  margin: 0 0 15px 0;
}

.spec-card__text p:last-child {
  margin-bottom: 0;
}

.spec-card__text img,
.spec-content-image {
  max-width: 280px;
  height: auto;
  border-radius: 8px;
  margin: 0 0 15px 20px;
  float: right;
  shape-margin: 15px;
}

@media (max-width: 576px) {
  .spec-card__text img,
  .spec-content-image {
    float: none;
    max-width: 100%;
    margin: 15px 0;
    display: block;
  }
}

/* Introduction flex layout (text + image side by side) */
.spec-intro-flex {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.spec-intro-flex__text {
  flex: 1;
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #666666;
  line-height: 1.7;
}

.spec-intro-flex__text p {
  margin: 0 0 15px 0;
}

.spec-intro-flex__text p:last-child {
  margin-bottom: 0;
}

.spec-intro-flex__image {
  flex: 0 0 280px;
}

.spec-intro-flex__image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

@media (max-width: 576px) {
  .spec-intro-flex {
    flex-direction: column;
  }

  .spec-intro-flex__image {
    flex: 0 0 auto;
    text-align: center;
  }

  .spec-intro-flex__image img {
    max-width: 280px;
  }
}

.spec-card__text ul,
.spec-card__text ol {
  margin: 15px 0;
  padding-left: 20px;
}

.spec-card__text li {
  margin-bottom: 8px;
}

/*--------------------------------------------------------------
  4. Benefits Section
--------------------------------------------------------------*/
.spec-benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.spec-benefits__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  font-size: 15px;
  color: #666666;
  line-height: 1.5;
}

.spec-benefits__item::before {
  content: '\f00c';
  font-family: 'FontAwesome';
  color: #203965;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 3px;
}

/*--------------------------------------------------------------
  5. CTA Card
--------------------------------------------------------------*/
.spec-cta {
  background-color: #203965;
  border-radius: 4px;
  padding: 40px;
  max-width: 900px;
  margin: 30px auto;
  text-align: center;
}

.spec-cta__title {
  font-family: 'Nunito', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px 0;
}

.spec-cta__text {
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 25px 0;
  line-height: 1.6;
}

.spec-cta__buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.spec-cta__btn--primary {
  display: inline-block;
  background-color: #ffffff;
  color: #203965;
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 2px solid #ffffff;
}

.spec-cta__btn--primary:hover,
.spec-cta__btn--primary:focus {
  background-color: transparent;
  color: #ffffff;
  text-decoration: none;
}

.spec-cta__btn--outline {
  display: inline-block;
  background-color: transparent;
  color: #ffffff;
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: all 0.2s ease;
}

.spec-cta__btn--outline:hover,
.spec-cta__btn--outline:focus {
  background-color: #ffffff;
  color: #203965;
  text-decoration: none;
}

/*--------------------------------------------------------------
  7. Responsive Styles - Tablet (max-width: 991px)
--------------------------------------------------------------*/
@media (max-width: 991px) {
  .spec-hero {
    height: 300px;
  }

  .spec-hero__title {
    font-size: 36px;
  }

  .spec-hero__subtitle {
    font-size: 16px;
  }

  .spec-content {
    padding: 50px 0 60px 0;
  }

  .spec-card {
    padding: 30px 35px;
    margin-left: 15px;
    margin-right: 15px;
  }

  .spec-card--with-icon {
    padding-left: 90px;
  }

  .spec-card__icon {
    left: 30px;
    top: 30px;
  }

  .spec-cta {
    margin-left: 15px;
    margin-right: 15px;
    padding: 35px 30px;
  }

  .spec-cta__title {
    font-size: 24px;
  }
}

/*--------------------------------------------------------------
  8. Responsive Styles - Mobile Large (max-width: 767px)
--------------------------------------------------------------*/
@media (max-width: 767px) {
  .spec-hero {
    height: 250px;
  }

  .spec-hero__content {
    bottom: 30px;
  }

  .spec-hero__title {
    font-size: 28px;
  }

  .spec-hero__subtitle {
    font-size: 15px;
  }

  .spec-content {
    padding: 40px 0 50px 0;
  }

  .spec-card {
    padding: 25px 20px;
    margin-bottom: 20px;
  }

  .spec-card--with-icon {
    padding-left: 25px;
    padding-top: 80px;
  }

  .spec-card__icon {
    left: 25px;
    top: 25px;
  }

  .spec-card__title {
    font-size: 20px;
  }

  .spec-card__text {
    font-size: 14px;
  }

  .spec-benefits__item {
    font-size: 14px;
  }

  .spec-cta {
    padding: 30px 20px;
  }

  .spec-cta__title {
    font-size: 22px;
  }

  .spec-cta__text {
    font-size: 14px;
  }

  .spec-cta__buttons {
    flex-direction: column;
    gap: 12px;
  }

  .spec-cta__btn--primary,
  .spec-cta__btn--outline {
    width: 100%;
    text-align: center;
  }

  .spec-related {
    padding: 40px 0;
  }

  .spec-related__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .spec-related__title {
    font-size: 24px;
  }

  .spec-related__item {
    padding: 20px 15px;
  }

  .spec-related__item-icon {
    width: 45px;
    height: 45px;
  }

  .spec-related__item-icon i,
  .spec-related__item-icon .fa {
    font-size: 18px;
  }

  .spec-related__item-title {
    font-size: 14px;
  }
}

/*--------------------------------------------------------------
  9. Responsive Styles - Mobile Small (max-width: 575px)
--------------------------------------------------------------*/
@media (max-width: 575px) {
  .spec-hero__title {
    font-size: 24px;
  }

  .spec-hero__subtitle {
    font-size: 14px;
  }

  .spec-hero__content {
    bottom: 25px;
    padding: 0 15px;
  }

  .spec-card {
    padding: 20px;
    margin-left: 10px;
    margin-right: 10px;
  }

  .spec-card--with-icon {
    padding-left: 20px;
    padding-top: 75px;
  }

  .spec-card__icon {
    left: 20px;
    top: 20px;
    width: 45px;
    height: 45px;
  }

  .spec-card__icon i,
  .spec-card__icon .fa {
    font-size: 18px;
  }

  .spec-card__title {
    font-size: 18px;
  }

  .spec-benefits {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .spec-cta {
    margin-left: 10px;
    margin-right: 10px;
    padding: 25px 15px;
  }

  .spec-cta__title {
    font-size: 20px;
  }

  .spec-cta__btn--primary,
  .spec-cta__btn--outline {
    padding: 10px 20px;
    font-size: 13px;
  }

  .spec-related__grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 10px;
  }

  .spec-related__header {
    padding: 0 15px;
    margin-bottom: 30px;
  }

  .spec-related__title {
    font-size: 22px;
  }

  .spec-related__subtitle {
    font-size: 14px;
  }
}

/*--------------------------------------------------------------
  10. Utility Classes
--------------------------------------------------------------*/
.spec-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.spec-card + .spec-cta {
  margin-top: 30px;
}

/* Ensure images within cards are responsive */
.spec-card img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Lists within card text */
.spec-card__text ul,
.spec-card__text ol {
  margin: 15px 0;
  padding-left: 20px;
}

.spec-card__text li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/*--------------------------------------------------------------
  11. Page Header (no hero image)
--------------------------------------------------------------*/
.spec-page-header {
  background-color: #F5F8FB;
  padding: 60px 0 40px 0;
  margin-bottom: 0;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.spec-page-header__title {
  font-family: 'Nunito', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: #203965;
  margin: 0 0 10px 0;
}

.spec-page-header__subtitle {
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  font-size: 16px;
  color: #666666;
  margin: 0;
}

/*--------------------------------------------------------------
  12. Therapists Section
--------------------------------------------------------------*/
.spec-therapists {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.spec-therapists__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 16px 0;
}

.spec-therapists__list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.spec-therapist {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spec-therapist__photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.spec-therapist__name {
  font-weight: 500;
  color: rgba(255,255,255,0.9);
}

/* ==========================================================================
   Related Blog Articles
   ========================================================================== */
.spec-related__title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #203965;
    margin: 0 0 20px 0;
}

.spec-related__title i {
    margin-right: 8px;
    color: #aeaa8b;
}

.spec-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 991px) {
    .spec-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .spec-related__grid {
        grid-template-columns: 1fr;
    }
}

.spec-related__item {
    display: flex;
    flex-direction: column;
    background: #F5F8FB;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.spec-related__item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.spec-related__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.spec-related__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.spec-related__item:hover .spec-related__image img {
    transform: scale(1.05);
}

.spec-related__content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.spec-related__category {
    display: inline-block;
    background: #aeaa8b;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
    align-self: flex-start;
}

.spec-related__item-title {
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: #464646;
    margin: 0 0 8px 0;
}

.spec-related__meta {
    font-size: 12px;
    color: #999;
    margin-top: auto;
}

.spec-related__more {
    text-align: center;
    margin-top: 15px;
}

.spec-related__btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #203965;
    border: 2px solid #203965;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.spec-related__btn:hover {
    background: #203965;
    color: #ffffff;
    text-decoration: none;
}

.spec-related__btn i {
    margin-left: 6px;
    font-size: 12px;
}

/* Print styles */
@media print {
  .spec-hero {
    height: auto;
    min-height: 150px;
    background: #203965 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .spec-hero::before {
    display: none;
  }

  .spec-card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .spec-cta {
    background: #203965 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .spec-related__item {
    border: 1px solid #ddd;
  }
}
