/**
 * modern-ui.css
 * Site-wide visual overrides for King Henry VIII College.
 * Reuses existing class names only. Load after theme/custom CSS.
 * Structure: 1 typography · 2 layout · 3 spacing · 4 buttons · 5 cards · 6 hero · 7 images · 8 modal · 9 tables/forms · 10 responsive
 */

/* Fonts loaded via <link> in head.php — no @import needed here */

/* ==========================================================================
   1. TYPOGRAPHY
   ========================================================================== */

/* Base body font */
body {
  font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
}

.main .lead {
  font-size: 1.125rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.main .testimonial .lead {
  margin-bottom: 0;
}

.main h1,
.main h2,
.main h3,
.main h4,
.main h5,
.main h6 {
  font-family: 'Libre Baskerville', Georgia, serif;
  line-height: 1.25;
  font-weight: 600;
}

/* Heading scale within main content */
.main h1 {
  font-size: 3.75rem; /* 60px — Design System H1 */
  font-weight: 700;
}

.main h2 {
  font-size: 2.375rem; /* 38px — Design System H2 */
  font-weight: 700;
  letter-spacing: -0.01em;
}

.main h3 {
  font-size: 1.5rem; /* ≈ 24px */
  font-weight: 600;
}

.main h4 {
  font-size: 1.25rem; /* ≈ 20px */
  font-weight: 500;
}

/* Heading spacing and rhythm */
.main h1,
.main h2 {
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.main h3 {
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

/* Normalise section heading spacing without overriding scale */
.main section .container h1,
.main section .container h2.font-weight-normal,
.main section .container h2.text-primary,
.main section .container h2.font-weight-extra-bold {
  line-height: 1.25;
  margin-bottom: 1.25rem;
}

.main section .page-header h1,
.main section .page-header h1 strong.text-orange {
  font-size: 1.75rem;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .main section .page-header h1,
  .main section .page-header h1 strong.text-orange {
    font-size: 2.25rem;
  }
}

.main p {
  margin-bottom: 1rem;
  font-size: 1.0625rem; /* 17px */
  line-height: 1.75;
  font-family: 'Source Sans 3', system-ui, sans-serif;
}

/* Limit reading width for body copy inside sections (not kickers or UI labels) */
.main section p:not(.kh8-kicker):not(.kh8-hero-contact):not(.kh8-page-hero__sub) {
  max-width: 42.5rem; /* 680px — Design System text column max */
}

/* Only center paragraphs when the container uses text-center */
.main .text-center p,
.main section .text-center p {
  margin-left: auto;
  margin-right: auto;
}

.main .breadcrumb.breadcrumb-light {
  font-size: 0.9375rem;
}

#footer .lead {
  font-size: 1rem;
  line-height: 1.6;
  font-family: 'Source Sans 3', system-ui, sans-serif;
}

#footer h2.text-6 {
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  font-family: 'Libre Baskerville', Georgia, serif;
}

/* ==========================================================================
   2. LAYOUT
   ========================================================================== */

.main .container {
  max-width: 1200px;
}

.main .container.container-lg-custom {
  max-width: 1320px;
}

.main .divider.divider-small hr,
.main .divider-secondary.divider-small hr {
  width: 4.5rem;
  max-width: 100%;
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
  margin-left: 0;      /* default: align with left edge of title/text */
  margin-right: auto;
  border-width: 2px;
}

/* Heading → divider → body spacing */
.main h1 + .divider.divider-small,
.main h1 + .divider-secondary.divider-small,
.main h2 + .divider.divider-small,
.main h2 + .divider-secondary.divider-small,
.main h3 + .divider.divider-small,
.main h3 + .divider-secondary.divider-small {
  margin-top: 0.25rem;
}

.main .divider.divider-small + p,
.main .divider-secondary.divider-small + p {
  margin-top: 0.5rem;
}

/* Centered titles: center the decorative underline */
.main .text-center .divider.divider-small hr,
.main .text-center .divider-secondary.divider-small hr {
  margin-left: auto;
  margin-right: auto;
}

/* Right-aligned titles (where used): align underline to the right edge */
.main .text-right .divider.divider-small hr,
.main .text-right .divider-secondary.divider-small hr,
.main .text-lg-right .divider.divider-small hr,
.main .text-lg-right .divider-secondary.divider-small hr {
  margin-left: auto;
  margin-right: 0;
}

/* ==========================================================================
   3. SPACING
   ========================================================================== */

.main section.section-no-margin {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.main section.section-no-margin.section-height-3 {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 768px) {
  .main section.section-no-margin {
    padding-top: 4.75rem;
    padding-bottom: 4.75rem;
  }
  .main section.section-no-margin.section-height-3 {
    padding-top: 4.75rem;
    padding-bottom: 4.75rem;
  }
}

/* Section backgrounds are set explicitly via .kh8-bg-warm-white / .kh8-bg-cream */

/* Image + text sections: balance spacing between paired columns */
.main section.section-no-margin .row.align-items-center > [class*="col-"] {
  margin-bottom: 1.5rem;
}

@media (min-width: 992px) {
  .main section.section-no-margin .row.align-items-center > [class*="col-"] {
    margin-bottom: 0;
  }
}

@media (min-width: 992px) {
  .main section.section-no-margin {
    padding-top: 6.75rem;
    padding-bottom: 6.75rem;
  }
  .main section.section-no-margin.section-height-3 {
    padding-top: 6.75rem;
    padding-bottom: 6.75rem;
  }
}

.main section.section-default,
.main section.section-with-divider {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 768px) {
  .main section.section-default,
  .main section.section-with-divider {
    padding-top: 4.75rem;
    padding-bottom: 4.75rem;
  }
}

@media (min-width: 992px) {
  .main section.section-default,
  .main section.section-with-divider {
    padding-top: 6.75rem;
    padding-bottom: 6.75rem;
  }
}

.main section#welcome .col-lg-12.bg-primary {
  border-radius: 8px;
  padding: 2.5rem 2rem !important;
}

@media (min-width: 768px) {
  .main section#welcome .col-lg-12.bg-primary {
    padding: 3rem 3.5rem !important;
  }
}

.main section .row.mt-5 {
  margin-top: 3rem !important;
}

.main section .row.mt-5 .mb-4 {
  margin-bottom: 1.5rem !important;
}

@media (min-width: 992px) {
  .main section .row.mt-5 .mb-4 {
    margin-bottom: 2rem !important;
  }
}

.main section .mb-3 {
  margin-bottom: 1rem !important;
}

.main section .mb-4 {
  margin-bottom: 1.5rem !important;
}

.main .page-header .looking-for {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

#footer .row.py-5.my-4 {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

@media (min-width: 768px) {
  #footer .row.py-5.my-4 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }
}

/* ==========================================================================
   4. BUTTONS
   ========================================================================== */

.main .btn,
#footer .btn,
.main a.btn,
#footer a.btn-flat {
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.main .btn:hover,
#footer .btn-flat:hover,
.main a.btn:hover {
  transform: translateY(-1px);
}

#footer a.btn-flat.text-color-light {
  transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

#footer a.btn-flat.text-color-light:hover {
  transform: translateY(-1px);
}

/* Hero CTA – link styled as button */
.main .owl-carousel-wrapper .position-relative.overlay a.text-color-light.px-5.py-3 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 1rem 2rem !important;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff !important;
  background: #e09701;
  border: 2px solid #e09701;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.main .owl-carousel-wrapper .position-relative.overlay a.text-color-light.px-5.py-3:hover {
  color: #fff !important;
  background: #c98401;
  border-color: #c98401;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
}

/* In-page CTA blocks (Enquiries / Arrange a Visit) */
.main .custom-call-to-action {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  /* border-radius: 6px; */
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.main .looking-for-box a:hover .custom-call-to-action,
.main a:hover .custom-call-to-action .action-info {
  opacity: 0.95;
}

.main .custom-call-to-action .action-title {
  font-size: 1.25rem;
}

.main .custom-call-to-action .action-info {
  font-size: 1rem;
  transition: opacity 0.2s ease;
}

/* ==========================================================================
   5. CARDS & CONTENT BLOCKS
   ========================================================================== */

.main .portfolio-item {
  margin-bottom: 2rem;
}

.main .portfolio-item .thumb-info,
.main .thumb-info.thumb-info-no-borders,
.main .thumb-info.custom-thumb-info-1 {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
  transition: box-shadow 0.3s ease, transform 0.25s ease, transform-origin 0.2s ease;
  background-color: #ffffff;
}

.main .portfolio-item a:hover .thumb-info,
.main a:hover .thumb-info.thumb-info-no-borders,
.main a:hover .thumb-info.custom-thumb-info-1 {
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  transform: translateY(-6px);
}

.main .thumb-info-caption.bg-color-light {
  padding: 1.35rem 1.5rem;
  border-radius: 0 0 10px 10px;
}

.main .thumb-info-caption-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.main .toggle {
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.main .toggle .toggle-title {
  padding: 1rem 1.25rem;
  font-size: 1rem;
}

.main .toggle .toggle-content {
  padding: 1rem 1.25rem 1.25rem;
}

.main .card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(15, 23, 42, 0.04);
  background-color: #ffffff;
  transition: box-shadow 0.3s ease, transform 0.25s ease;
}

.main .card .card-body {
  padding: 1.5rem;
}

.main .card:hover {
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  transform: translateY(-6px);
}

/* ==========================================================================
   6. HERO SECTIONS
   ========================================================================== */

/* Stronger, more contemporary overlay on hero imagery */
.main .owl-carousel-wrapper .position-relative.overlay {
  position: relative;
}

.main .owl-carousel-wrapper .position-relative.overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.06), transparent 45%),
    linear-gradient(to bottom right, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.95));
  mix-blend-mode: normal;
  pointer-events: none;
  z-index: 1;
}

.main .owl-carousel-wrapper .position-relative.overlay .container {
  position: relative;
  z-index: 2;
}

.main .owl-carousel-wrapper .position-relative.overlay .container .row .d-flex {
  max-width: 38em;
  margin-left: auto;
  margin-right: auto;
}

.main .owl-carousel-wrapper .position-relative.overlay h2.text-color-light {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.06em;
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 1rem !important;
  line-height: 1.12 !important;
  text-align: center;
  max-width: 45rem;
  margin-left: auto;
  margin-right: auto;
}

.main .owl-carousel-wrapper .position-relative.overlay h4.text-color-light {
  font-size: 1.35rem;
  opacity: 0.96;
  margin-bottom: 1.75rem !important;
  text-align: center;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .main .owl-carousel-wrapper .position-relative.overlay h4.text-color-light {
    font-size: 1.5rem;
  }
}

.main .page-header.page-header-modern.page-header-background {
  position: relative;
  padding-top: 3rem;
  padding-bottom: 2rem;
  overflow: hidden;
}

.main .page-header.page-header-modern.page-header-background::before {
  content: "";
  position: absolute;
  inset: 0;
  /* background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.5)); */
  z-index: 1;
}

.main .page-header.page-header-modern.page-header-background .container {
  position: relative;
  z-index: 2;
}

.main .page-header .container .row.mt-5 {
  margin-top: 1.5rem !important;
}

.main .page-header .breadcrumb {
  margin-bottom: 1rem;
}

.main .page-header h1 {
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   7. IMAGES
   ========================================================================== */

.main .portfolio-item .thumb-info-wrapper,
.main .thumb-info-wrapper {
  overflow: hidden;
  border-radius: 10px;
}

.main .portfolio-item .thumb-info-wrapper .img-fluid,
.main .thumb-info-wrapper .img-fluid {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.main .portfolio-item a:hover .thumb-info-wrapper .img-fluid,
.main a:hover .thumb-info-wrapper .img-fluid {
  transform: scale(1.04);
}

/* Allow hover zoom via linked card containers only */
.main a.thumb-info:hover .thumb-info-wrapper .img-fluid,
.main a:hover .thumb-info-wrapper .img-fluid {
  transform: scale(1.05);
}

/* Portrait-style grids (staff, governors) – more consistent crop */
.main .col-lg-4 img.img-fluid:not(.border-radius-0),
.main .col-md-4 img.img-fluid:not(.border-radius-0) {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main a.col-lg-4 img.img-fluid:not(.border-radius-0):hover,
.main a.col-md-4 img.img-fluid:not(.border-radius-0):hover,
.main .col-lg-4 a img.img-fluid:not(.border-radius-0):hover,
.main .col-md-4 a img.img-fluid:not(.border-radius-0):hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
}

.main .toggle-content img.img-fluid:hover {
  transform: none;
  box-shadow: none;
}

.main .portfolio-item .thumb-info-action-icon {
  transition: transform 0.3s ease, background 0.3s ease;
}

.main .portfolio-item a:hover .thumb-info-action-icon {
  transform: scale(1.08);
}

.main .img-fluid {
  max-width: 100%;
  height: auto;
}

/* Image + text layouts: normalise inline 2-column images */
.main .col-lg-6 > img.img-fluid,
.main .col-lg-6 > img[style*="width:100%"] {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.16);
}

/* Parallax image strips – subtle overlay and rhythm */
.main .parallax-img {
  position: relative;
  background-position: center;
  background-size: cover;
}

.main .parallax-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.45));
  mix-blend-mode: multiply;
}

.main .dialog .img-fluid.mb-4 {
  border-radius: 8px;
  overflow: hidden;
}

/* ==========================================================================
   9. TABLES & FORMS
   ========================================================================== */

.main .form-group {
  margin-bottom: 1.25rem;
}

.main .form-control {
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 0.625rem 0.875rem;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.main .form-control:focus {
  border-color: #284338;
  box-shadow: 0 0 0 3px rgba(40, 67, 56, 0.15);
  outline: 0;
}

.main .form-horizontal.form-bordered .control-label {
  font-weight: 600;
  padding-top: 0.5rem;
}

.main .form-horizontal .form-group.row {
  margin-bottom: 1rem;
}

/* Table polish (fees, etc.) */
.main .table {
  border-radius: 8px;
  overflow: hidden;
}

.main .table.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

.main .table thead th {
  font-weight: 600;
  padding: 0.875rem 1rem;
}

.main .table td,
.main .table th {
  padding: 0.75rem 1rem;
}

/* Footer link hover */
#footer .link-hover-style-1:hover {
  opacity: 0.9;
}

/* ==========================================================================
   10. RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 767px) {
  .main h1 {
    font-size: 2.125rem; /* 34px mobile */
  }
  .main h2 {
    font-size: 1.625rem; /* 26px mobile */
  }
  .main section.section-no-margin {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  .main section.section-no-margin.section-height-3 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  .main section .container h2.font-weight-normal,
  .main section .container h2.text-primary,
  .main section .container h2.font-weight-extra-bold {
    font-size: 1.5rem;
  }
  .main section .page-header h1,
  .main section .page-header h1 strong.text-orange {
    font-size: 1.5rem;
  }
  .main .page-header.page-header-modern.page-header-background {
    padding-top: 1.75rem;
  }
  #footer .row.py-5.my-4 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
}

@media (min-width: 992px) {
  .main .col-lg-4 .thumb-info .thumb-info-caption,
  .main .col-lg-6 .thumb-info .thumb-info-caption {
    min-height: 0;
  }
}
