/* Additions for the database-driven site. The Kider template styles (style.css, bootstrap.min.css) are unchanged
   except for the typefaces (Montserrat body, Fredoka headings). */

.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.skip-link { position: absolute; left: 8px; top: 8px; z-index: 100000; background: #fff; padding: 8px 14px; border-radius: 6px; }
.skip-link:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; }
:focus-visible { outline: 3px solid #103741; outline-offset: 2px; }
.footer .form-control:focus { color: #fff; }

/* Rich text produced by the CMS */
.cms-content { color: #4d5459; }
.cms-content h2, .cms-content h3, .cms-content h4 { font-family: 'Fredoka', sans-serif; color: var(--dark); margin: 1.2em 0 .5em; }
.cms-content img { max-width: 100%; height: auto; border-radius: .5rem; }
.cms-content ul, .cms-content ol { padding-left: 1.25rem; }
.cms-content blockquote { border-left: 4px solid var(--primary); padding-left: 1rem; font-style: italic; }

/* Cards that reuse the template's classes-item look */
.news-item, .event-item, .block-item { transition: .5s; }
.news-item:hover, .event-item:hover, .block-item:hover { margin-top: -6px; }
.news-item img.news-cover { width: 100%; height: 220px; object-fit: cover; border-radius: .5rem .5rem 0 0; }
.date-badge { min-width: 70px; text-align: center; background: var(--primary); color: #fff; border-radius: .75rem; padding: .5rem .75rem; line-height: 1.1; }
.date-badge .day { font-family: 'Fredoka', sans-serif; font-size: 1.6rem; font-weight: 700; }
.icon-circle { width: 75px; height: 75px; }
.gallery-thumb { display: block; overflow: hidden; border-radius: .75rem; background: var(--light); padding: .5rem; }
.gallery-thumb img { display: block; width: 100%; height: 230px; object-fit: cover; object-position: center 35%; border-radius: .5rem; transition: .4s; }
.gallery-thumb:hover img { transform: scale(1.04); }
.team-item img.team-photo { aspect-ratio: 1 / 1; object-fit: cover; }
.classes-item img.class-photo { aspect-ratio: 1 / 1; object-fit: cover; }
.testimonial-card { background: var(--light); border-radius: 1rem; padding: 2rem; height: 100%; }
.testimonial-card .quote { color: var(--primary); font-size: 2rem; }
.pagination .page-link { color: var(--dark); }
.pagination .active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.form-control.is-invalid { border: 1px solid #dc3545 !important; }
.invalid-msg { color: #dc3545; font-size: .875rem; margin-top: .25rem; }
#lightbox img { max-height: 80vh; object-fit: contain; }


/* Navigation: keep links on one line and fit 7 items + CTA between 992px and 1400px */
.navbar .navbar-nav .nav-link { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1399.98px) {
  .navbar .navbar-nav .nav-link { padding: 30px 9px; font-size: .92rem; }
  .navbar .navbar-brand .h1 { font-size: 1.7rem; }
  .navbar-collapse > .btn.btn-primary { padding-left: 1rem !important; padding-right: 1rem !important; font-size: .9rem; white-space: nowrap; }
}

/* ---- Accessibility: WCAG 2.1 AA colour contrast -------------------------------------------------------
   The Kider palette is kept for decoration (backgrounds, borders, icons). Text and buttons that carry words use
   slightly deeper shades of the same colours so they reach a 4.5:1 contrast ratio. */
:root { --primary-strong: #C8391A; --primary-btn: #D63F19; --primary-btn-hover: #B93314; --body-text: #565A5E; }
body { color: var(--body-text); }
.text-primary, .navbar .navbar-nav .nav-link:hover, .navbar .navbar-nav .nav-link.active, .breadcrumb-item a:hover { color: var(--primary-strong) !important; }
.classes-item .text-primary, .team-item .text-primary { color: var(--primary-strong) !important; }
.classes-item .text-success { color: #146c43 !important; }
.classes-item .text-warning { color: #8a5a00 !important; }
.btn-primary, .btn-primary:focus { background-color: var(--primary-btn) !important; border-color: var(--primary-btn) !important; color: #fff !important; }
.btn-primary:hover, .btn-primary:active { background-color: var(--primary-btn-hover) !important; border-color: var(--primary-btn-hover) !important; }
.btn-outline-primary { color: var(--primary-strong) !important; border-color: var(--primary-btn) !important; }
.btn-outline-primary:hover { background-color: var(--primary-btn) !important; color: #fff !important; }
.bg-primary { background-color: var(--primary-btn) !important; }
.date-badge { background: var(--primary-btn); }
.footer, .footer .text-white-50, .footer p, .footer a.text-white-50 { color: rgba(255, 255, 255, .78) !important; }
.footer .btn-link:hover, .footer .copyright a:hover, .footer .footer-menu a:hover { color: #ffb4a1 !important; }
.footer .form-control::placeholder { color: rgba(255, 255, 255, .7); }
.page-header .breadcrumb-item a, .page-header .breadcrumb-item.active { color: #fff !important; }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .75); }
.form-floating > label { color: #5b5f63; }
/* Links inside running text must not rely on colour alone */
p a:not(.btn), li a:not(.btn), .form-check-label a, small a, .copyright a, .cms-content a { text-decoration: underline; text-underline-offset: 2px; }
.pagination .page-link { color: #1d2b30; }
.pagination .active .page-link { background: var(--primary-btn); border-color: var(--primary-btn); }

.text-success { color: #146c43 !important; }
.text-warning { color: #8a5a00 !important; }
.form-control::placeholder { color: #5b5f63; opacity: 1; }
.form-floating > label, .form-floating > .form-control:focus ~ label, .form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label { opacity: 1; color: #474b4f; }
.table > :not(caption) > * > * { color: var(--body-text); }
th { color: #1d2b30; }

a { color: var(--primary-strong); }
a:hover { color: #A22F14; }
.form-control, .form-select { color: #2b3034; }
.form-control:disabled, .form-control[readonly] { color: #4b5057; }

.text-secondary { color: #565A5E !important; }

/* ---- Hero: cross-fade + slow zoom (images change in place instead of sliding) ---- */
@keyframes heroZoom { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }
.header-carousel .owl-carousel-item { overflow: hidden; }
.header-carousel .owl-carousel-item > img { animation: heroZoom 14s ease-in-out infinite; transform-origin: center; }
.hero-wrap { position: relative; }
.hero-pagination { position: absolute; right: 28px; top: 50%; transform: translateY(-50%); z-index: 5; display: flex; flex-direction: column; gap: 14px; }
.hero-page-num { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--primary-strong); font: 700 13px 'Montserrat', sans-serif; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.2); transition: background-color .3s, color .3s, transform .3s; }
.hero-page-num:hover { transform: scale(1.1); }
.hero-page-num.active { background: var(--primary-btn); color: #fff; }
@media (max-width: 767.98px) { .hero-pagination { right: 12px; gap: 8px; } .hero-page-num { width: 32px; height: 32px; font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .header-carousel .owl-carousel-item > img { animation: none; } }

/* ================= Hero: fixed banner area, darker overlay, staggered text (like the reference sites) ================= */
.header-carousel .owl-carousel-item { position: relative; height: clamp(420px, calc(100vh - 96px), 640px); min-height: 0; overflow: hidden; }
.header-carousel .owl-carousel-item > img.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; }
.hero-overlay { background: linear-gradient(90deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .28) 100%); }
.hero-overlay h2, .hero-overlay p { text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
.hero-h { font-size: clamp(2rem, 4.6vw, 3.9rem); line-height: 1.15; }
.hero-p { font-size: clamp(1rem, 1.4vw, 1.25rem); max-width: 40rem; }
.hero-btns { display: flex; flex-wrap: wrap; gap: .75rem 1rem; }
.hero-btns .btn { padding: .8rem 2.1rem; }

@keyframes heroDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: none; } }
@keyframes heroUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.hero-fade .owl-item .hero-h, .hero-fade .owl-item .hero-p, .hero-fade .owl-item .hero-btns { opacity: 0; }
.hero-fade .owl-item.active .hero-h { animation: heroDown .8s ease .35s both; }
.hero-fade .owl-item.active .hero-p { animation: heroUp .8s ease .75s both; }
.hero-fade .owl-item.active .hero-btns { animation: heroUp .8s ease 1.15s both; }
@media (prefers-reduced-motion: reduce) { .hero-fade .owl-item .hero-h, .hero-fade .owl-item .hero-p, .hero-fade .owl-item .hero-btns { opacity: 1; animation: none !important; } }

@media (max-width: 767.98px) {
  .header-carousel .owl-carousel-item { height: clamp(380px, calc(100vh - 112px), 560px); }
  .hero-overlay { background: linear-gradient(180deg, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .62) 100%); }
  .hero-btns .btn { padding: .65rem 1.4rem; font-size: .92rem; }
  .hero-pagination { display: none; }
}

/* ================= Buttons: consistent, never squashed, never touching ================= */
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.3; }
.btn.rounded-pill, .btn.py-3 { white-space: nowrap; }
.footer .btn.btn-link { display: block; }
.btn.btn-lg-square, .btn-square, .btn-sm-square { display: flex; }
.btn.btn-social { display: flex; }
.position-absolute.btn { display: inline-flex; }
.btn-primary.py-3.px-5, .btn.py-3.px-5 { padding: .8rem 2.2rem !important; }
@media (max-width: 575.98px) {
  .btn.py-3.px-5, .btn-primary.py-3.px-5 { padding: .65rem 1.4rem !important; font-size: .92rem; }
  .btn.w-100.py-3 { padding: .7rem 1rem !important; }
  .bg-light.rounded .p-5, .bg-light .p-5 { padding: 1.5rem !important; }
  .text-center .btn, .btn.mb-2 { max-width: 100%; }
  .btn { white-space: normal; }
  .btn.rounded-pill { white-space: nowrap; }
}
@media (max-width: 359.98px) { .btn.py-3.px-5, .btn-primary.py-3.px-5 { padding: .6rem 1rem !important; font-size: .85rem; } .hero-btns .btn { padding: .55rem 1rem; font-size: .85rem; } }

/* ================= Team cards on small phones: the photo must stay visible ================= */
@media (max-width: 575.98px) {
  .team-item { max-width: 340px; margin-left: auto; margin-right: auto; }
  .team-item img.team-photo { width: 82% !important; }
  .team-item .team-text { width: 46%; height: auto; aspect-ratio: 1; border-width: 8px; padding: .25rem; }
  .team-item .team-text h3 { font-size: .8rem; line-height: 1.15; margin-bottom: .1rem; }
  .team-item .team-text p { font-size: .68rem; margin-bottom: .2rem; line-height: 1.15; }
  .team-item .team-text .btn-square { width: 28px; height: 28px; font-size: .7rem; }
}

/* ================= Footer credit + manager modal ================= */
.credit-link { background: none; border: 0; padding: 0; color: #fff !important; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.credit-link:hover { color: #ffb4a1 !important; }
.manager-modal .modal-content { border: 0; border-radius: 1.25rem; overflow: hidden; }
.manager-modal .mm-head { background: linear-gradient(135deg, #103741 0%, #1b5563 100%); color: #fff; text-align: center; padding: 2rem 1.5rem 1.25rem; position: relative; }
.manager-modal .mm-avatar { width: 84px; height: 84px; border-radius: 50%; background: #fff; color: var(--primary-strong); display: flex; align-items: center; justify-content: center; margin: 0 auto .75rem; font: 700 1.9rem 'Fredoka', sans-serif; box-shadow: 0 0 0 5px rgba(255, 255, 255, .25); }
.manager-modal .mm-head h3 { color: #fff; margin: 0; font-size: 1.45rem; }
.manager-modal .mm-role { opacity: .85; font-size: .9rem; }
.manager-modal .btn-close { position: absolute; top: 14px; right: 14px; filter: invert(1); opacity: .8; }
.manager-modal .mm-body { padding: 1.25rem 1.5rem 1.5rem; }
.manager-modal .mm-row { display: flex; align-items: center; gap: .9rem; padding: .7rem .9rem; border-radius: .8rem; background: #f6f8fa; margin-bottom: .6rem; text-decoration: none !important; color: #1d2b30 !important; transition: transform .2s, box-shadow .2s, background-color .2s; }
.manager-modal .mm-row:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16, 55, 65, .14); background: #fff; }
.manager-modal .mm-ico { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.15rem; }
.manager-modal .mm-ico.li { background: #0a66c2; } .manager-modal .mm-ico.wa { background: #1c9a4a; }
.manager-modal .mm-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #565A5E; display: block; }
.manager-modal .mm-value { font-weight: 600; font-size: .95rem; }
.manager-modal .mm-go { margin-left: auto; color: #565A5E; }
.manager-modal .mm-foot { text-align: center; font-size: .72rem; color: #565A5E; padding-top: .35rem; }

@media (max-width: 359.98px) { .navbar .navbar-brand .h1 { font-size: 1.3rem; } .navbar .navbar-brand .h1 i { margin-right: .5rem !important; } }

@media (max-width: 767.98px) { .footer .copyright { padding-bottom: 76px; } }

/* Circular photos are always true circles, whatever proportions the original picture had */
img.rounded-circle { aspect-ratio: 1 / 1; object-fit: cover; }
