/* =========================================
   Wales UI - Layout Overrides & Styles
   ========================================= */

/* Typography & General */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
}

/* Squiggly Underline (used in Headers) */
.squiggly-underline {
  position: relative;
  display: inline-block;
  z-index: 1;
}
.squiggly-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M0,10 Q25,20 50,10 T100,10' fill='none' stroke='%23FF28A8' stroke-width='8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 50px 10px;
  z-index: -1;
}

/* =================================
   SIDE-BY-SIDE HERO
================================= */
.ui-hero {
  background: #f9f9f9;
  padding: 4rem 0;
}

.ui-hero .container {
  max-width: 1200px;
}

.ui-hero h1 {
  color: #06171f;
  line-height: 1.15;
}

.ui-hero .lead {
  color: #47515e !important;
  font-size: 1.15rem;
  line-height: 1.75;
  max-width: 640px;
}

/* CTA button */
.hero-side-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FF28A8 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 0.85rem 1.7rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none !important;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(255, 40, 168, 0.18);
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-side-btn:hover,
.hero-side-btn:focus {
  background: #09096A !important;
  color: #ffffff !important;
  text-decoration: none !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(9, 9, 106, 0.18);
}

/* Image wrapper */
.hero-side-image-wrap {
  max-width: 560px;
  margin-left: auto;
  background: #ffffff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(9, 9, 106, 0.12);
}

/* Image */
.hero-side-image {
  display: block;
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: 28px;
}

/* Responsive */
@media (max-width: 991.98px) {
  .ui-hero {
    padding: 3rem 0;
  }

  .hero-side-image-wrap {
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-side-image {
    height: 420px;
  }
}

@media (max-width: 767.98px) {
  .ui-hero h1 {
    font-size: 2.2rem;
  }

  .ui-hero .lead {
    font-size: 1.02rem;
    line-height: 1.65;
  }

  .hero-side-image {
    height: 300px;
  }

  .hero-side-btn {
    padding: 0.8rem 1.4rem;
    font-size: 0.95rem;
  }
}
/* -----------------------------------------
   Layout 2: Features Grid
   ----------------------------------------- */
.ui-features {
  background-color: #f6f5f3;
}
.max-w-700 { max-width: 700px; }

.feature-card {
  padding: 1rem 0;
}

.feature-icon {
  font-size: 1.8rem;
  color: #FF28A8; /* Brand accent colour */
  display: block;
  margin-bottom: 1rem;
}

.feature-card p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #4a4a4a;
}

/* -----------------------------------------
   Layout 3: Tabs & Masonry
   ----------------------------------------- */
.ui-masonry {
  background-color: #ffffff;
}

/* Pill Tabs */
.ui-custom-tabs .nav-link {
  color: #09096A;
  border: 1px solid #e0e0e0;
  border-radius: 50rem;
  padding: 0.5rem 1.5rem;
  margin-right: 0.8rem;
  font-weight: 500;
  background: transparent;
  transition: all 0.2s ease;
}
.ui-custom-tabs .nav-link.active {
  background-color: #09096A;
  color: #ffffff;
  border-color: #09096A;
}

.custom-check-list li {
  font-size: 1.05rem;
}

.masonry-grid {
  display: block;
}

.masonry-img {
  display: block;
  width: 100%;
  max-width: 560px;
  height: 520px;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 18px 50px rgba(9, 9, 106, 0.12);
  margin-left: auto;
}

.img-1 {
  width: 100%;
}
@media (max-width: 991.98px) {
  .masonry-img {
    max-width: 100%;
    height: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 767.98px) {
  .masonry-img {
    height: 300px;
  }
}

/* -----------------------------------------
   Layout 4: Split Content
   ----------------------------------------- */
.ui-split {
  background-color: #f6f5f3;
}

.split-large-img {
  width: 100%;
  max-width: 550px;
  height: auto;
  border-radius: 32px; /* Very rounded corners matching screenshot */
  object-fit: cover;
}

.why-icon {
  color: #FF28A8;
}

/* =========================================
   SUBJECTS & LEVELS SECTION MOBILE ORDER
========================================= */

/* add spacing for the tabs */
.ui-custom-tabs {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem !important;
  row-gap: 0.75rem;
}

.ui-custom-tabs .nav-item {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

/* mobile and tablet */
@media (max-width: 991.98px) {
  .subject-level-row {
    text-align: center;
  }

  .subject-text-col,
  .subject-image-col {
    text-align: center;
  }

  /* image comes before text block on mobile */
  .subject-image-col {
    order: 1;
  }

  .subject-text-col {
    order: 2;
  }

  .subject-text-col h3,
  .subject-text-col p,
  .subject-text-col .tab-content,
  .subject-text-col .btn {
    margin-left: auto;
    margin-right: auto;
  }

  /* center the pills */
  .ui-custom-tabs {
    justify-content: center;
  }

  /* keep bullet list neat while section stays centered */
  .custom-check-list {
    display: inline-block;
    text-align: left;
    margin: 1.25rem auto 0;
    padding-left: 0;
  }

  .subject-text-col .btn {
    display: inline-flex;
    justify-content: center;
  }

  .masonry-grid {
    display: flex;
    justify-content: center;
  }

  .masonry-img {
    max-width: 100%;
    height: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 767.98px) {
  .subject-text-col h3 {
    text-align: center;
  }

  .subject-text-col p {
    text-align: center;
  }

  .ui-custom-tabs {
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 1.25rem !important;
  }

  .masonry-img {
    height: 300px;
  }
}

@media (max-width: 767.98px) {
  .wales-page .ui-hero,
  .wales-page .ui-features,
  .wales-page .ui-masonry,
  .wales-page .ui-split {
    text-align: center;
  }

  .wales-page .ui-hero .lead,
  .wales-page .ui-hero p,
  .wales-page .ui-hero h1,
  .wales-page .ui-hero h2,
  .wales-page .ui-hero h3,
  .wales-page .ui-hero h4,
  .wales-page .ui-features p,
  .wales-page .ui-features h1,
  .wales-page .ui-features h2,
  .wales-page .ui-features h3,
  .wales-page .ui-features h4,
  .wales-page .ui-masonry p,
  .wales-page .ui-masonry h1,
  .wales-page .ui-masonry h2,
  .wales-page .ui-masonry h3,
  .wales-page .ui-masonry h4,
  .wales-page .ui-split p,
  .wales-page .ui-split h1,
  .wales-page .ui-split h2,
  .wales-page .ui-split h3,
  .wales-page .ui-split h4 {
    margin-left: auto;
    margin-right: auto;
  }

  .wales-page .hero-side-image-wrap,
  .wales-page .hero-side-btn,
  .wales-page .masonry-img,
  .wales-page .split-large-img {
    margin-left: auto;
    margin-right: auto;
  }

  .wales-page .feature-card {
    text-align: center;
  }

  .wales-page .subject-level-row,
  .wales-page .subject-text-col,
  .wales-page .subject-image-col {
    text-align: center;
  }

  .wales-page .masonry-grid {
    display: flex;
    justify-content: center;
  }

  .wales-page .ui-custom-tabs {
    justify-content: center;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem !important;
    row-gap: 0.75rem;
  }

  .wales-page .ui-custom-tabs .nav-item {
    margin: 0.25rem 0.35rem;
  }

  .wales-page .tab-content,
  .wales-page .tab-pane,
  .wales-page .subject-text-col .btn {
    margin-left: auto;
    margin-right: auto;
  }

  .wales-page .custom-check-list {
    display: inline-block;
    text-align: left;
    margin: 1.25rem auto 0;
    padding-left: 0;
  }

  .wales-page .ui-split .row.g-4.mt-2 {
    justify-content: center;
  }

  .wales-page .ui-split .col-sm-6.d-flex {
    justify-content: center;
    text-align: left;
  }
}