/*
Theme Name: Worth School
Theme URI: https://innermedia.co.uk
Author: InnerMedia
Author URI: https://innermedia.co.uk
Description: Child theme of SCMS Starter for Worth School. Design ported from worthschool.org.uk (Mercer Design) onto ACF Gutenberg blocks.
Version: 1.0.33
Template: scms-starter
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
License: Proprietary
Text Domain: worth
*/

/* ============================================================
   WordPress-specific additions on top of the ported live CSS
   (assets/css/worth-legacy*.css). Keep design rules there.
   ============================================================ */

body { background: #fff; color: #000; font-family: var(--font-global); }
a { text-decoration: none; color: inherit; }
img { display: inline-block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Parent defaults that fight the ported design */
ul, ol { padding-left: 2rem; }
.clearlist, .clearlist li, .works-grid, .section-nav, #nav_accordion, .sidebar ul { padding-left: 0; }
li { margin-bottom: 0; }
blockquote { border-left: 0; font-style: normal; color: inherit; }
h1, h2, h3, h4, h5, h6 { color: inherit; font-family: inherit; }
.serif { font-family: var(--font-global-alt); }

/* Admin bar offset for the fixed chrome */
.admin-bar .main-nav.stick-fixed, .admin-bar .side-nav.stick-fixed { top: 32px !important; }
@media (max-width: 782px) { .admin-bar .main-nav.stick-fixed, .admin-bar .side-nav.stick-fixed { top: 46px !important; } }

/* Home hero: slow zoom background (live inline style on index.php) */
.bg-grow { width: 100vw; height: 100vh; background-repeat: no-repeat; background-position: center center; background-size: cover; animation: worthGrow alternate ease-in-out 8s; animation-fill-mode: forwards; }
@keyframes worthGrow { 0% { transform: scale(1.2); } 100% { transform: scale(1); } }
.worth-amp { color: #fcd405; }

/* Reveal animations: visible without JS / in the editor */
html:not(.worth-js) .wow, html:not(.worth-js) .wow-p, html:not(.worth-js) .wow-menubar { opacity: 1 !important; }
html:not(.worth-js) .page-loader { display: none; }
.wp-admin .page-loader, .editor-styles-wrapper .page-loader { display: none; }
.animated { animation-duration: 1s; animation-fill-mode: both; }
.wow.animated, .wow-p.animated, .wow-menubar.animated { opacity: 1; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translate3d(0, 100%, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
.fadeIn { animation-name: fadeIn; } .fadeInUp { animation-name: fadeInUp; } .fadeOut { animation-name: fadeOut; }

/* Owl Carousel 2 → styled like the live site's Owl 1 controls */
.owl-carousel .owl-nav button.owl-prev, .owl-carousel .owl-nav button.owl-next {
	position: absolute; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; padding: 11px !important; box-sizing: content-box;
	background: #fff !important; color: #111 !important; border-radius: 50%; box-shadow: 0 3px 5px 0 rgba(0,0,0,.1); opacity: .8; z-index: 6; border: 0; line-height: 1;
}
.owl-carousel .owl-nav button.owl-prev:hover, .owl-carousel .owl-nav button.owl-next:hover { opacity: 1; }
.owl-carousel .owl-nav button.owl-prev { left: 290px; } .owl-carousel .owl-nav button.owl-next { right: 50px; }
.owl-carousel .owl-nav button svg { display: block; width: 20px; height: 20px; }
.owl-carousel .owl-nav.disabled { display: none; }
.owl-carousel .owl-dots { display: block; width: 100%; position: absolute; bottom: 30px; left: 0; text-align: center; line-height: 1; }
.owl-carousel .owl-dots .owl-dot { display: inline-block; padding: 7px !important; position: relative; z-index: 1000; background: none; border: 0; }
.owl-carousel .owl-dots .owl-dot span { width: 8px; height: 8px; display: block; background: none; border: 1px solid #111; border-radius: 50%; transition: all .27s cubic-bezier(0,0,.58,1); }
.owl-carousel .owl-dots .owl-dot.active span { background: #111; }
.owl-carousel .owl-item img { width: auto; max-width: 100%; }
.owl-carousel .owl-item .define-hr img { width: 40px; }
@media (max-width: 992px) { .owl-carousel .owl-nav button.owl-prev { left: 20px; } .owl-carousel .owl-nav button.owl-next { right: 20px; } }

/* Fixed award roundels never cover the side nav links on short screens */
.award-scroll { pointer-events: none; }

/* Non-Worth blocks (e.g. the SCMS dynamic-* library) sit on white beside the side menu */
#main > .dynamicContent { background: #fff; padding: 30px 30px 30px 250px; position: relative; margin-top: -1px; }
@media (max-width: 992px) { #main > .dynamicContent { padding-left: 30px; } }
.worth-plain-content { background: #fff; padding-bottom: 60px; }

/* News index filter + pagination */
.works-filter a.active { opacity: 1; }
.worth-pagination { text-align: center; padding: 40px 0 80px; }
.worth-pagination .nav-links { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.worth-pagination .page-numbers { display: inline-block; min-width: 36px; padding: 6px 10px; border: 1px solid rgba(0,0,0,.15); border-radius: 3px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.worth-pagination .page-numbers.current { background: #111; color: #fff; border-color: #111; }
.worth-pagination .nav-links .prev, .worth-pagination .nav-links .next { border: 0; }

/* Search form */
.worth-search-form .form-control { height: 48px; border: 1px solid rgba(0,0,0,.2); }
.worth-search-form .form-control:focus { color: #000; background: #fff; border-color: #6da3b8; }

/* WPForms inside the Enquire pop-up */
#myEnquire .wpforms-container { text-align: left; margin: 0; }
#myEnquire .wpforms-field-name .wpforms-field-row-block { width: 100% !important; padding: 0 !important; margin: 0 0 10px !important; float: none !important; }
#myEnquire .wpforms-field-label { font-weight: 400; font-size: 13px; color: #000; }
#myEnquire .wpforms-field input, #myEnquire .wpforms-field select { max-width: 100% !important; border-radius: 2px; }
#myEnquire .wpforms-submit { background: #000 !important; border-color: #000 !important; border-radius: 2px !important; color: #fff !important; }

/* Parent alert pop-up (Theme Settings > Alert Settings) in Worth style */
.popupAlert { max-width: 760px; padding: 40px; text-align: center; font-family: var(--font-global); }
.popupAlert .popTitle { font-family: var(--font-global-alt); text-transform: lowercase; font-size: 28px; margin-bottom: 20px; }

/* Content images from WYSIWYG fields */
.content-text img, .worth-content img { height: auto; }
.content-text .alignright { float: right; margin: 0 0 20px 30px; }
.content-text .alignleft { float: left; margin: 0 30px 20px 0; }
.content-text .aligncenter { display: block; margin: 0 auto 20px; }
.content-text iframe { max-width: 100%; }
.worth-video { position: relative; padding-bottom: 56.25%; height: 0; margin-bottom: 1.5em; }
.worth-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Skip link must not take up space */
a.skip-to-content { position: absolute !important; }
footer.footer { font-size: 14px; }
.lead-alt .lead-previous { font-family: var(--font-global); text-transform: uppercase; letter-spacing: .1em; font-size: 13px; line-height: 1.61; }
.lead-alt .lead-previous a { border: 0; font-weight: 300; }

/* The live site lays the tile grids out with Isotope (masonry). Tiles are equal-sized, so a
   wrapping flex row gives the same result without the script. */
.works-grid { display: flex; flex-wrap: wrap; }
.works-grid > .work-item { float: none; }
.works-grid::before, .works-grid::after { display: none; }

/* SCMS dynamic-* blocks in Worth style */
.dynamicContent .section_title h2, .dynamicContent .quotesTitle { font-family: var(--font-global-alt); font-weight: 300; text-transform: lowercase; color: #90c5d9; font-size: 38px; letter-spacing: -0.04em; }
.dynamicContent h3 { font-family: var(--font-global-alt); font-weight: 300; text-transform: lowercase; }
.dynamicContent .button, .dynamicContent a.button { background: #111; border-radius: 2px; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; text-decoration: none; }
.dynamicContent .body-text a { border-bottom: dotted 1px rgba(0,0,0,.5); font-weight: 700; text-decoration: none; }

/* Logged-in admin bar pushes the page down 32px (46px on small screens); shorten full-screen
   banners by the same amount so the scroll-down arrow sits where visitors see it. */
.admin-bar .min-height-100vh { min-height: calc(100vh - 32px); }
@media (max-width: 782px) { .admin-bar .min-height-100vh { min-height: calc(100vh - 46px); } }

/* Quote slider: Owl 1 "fade" transition timing (0.7s) as on the live site */
.fullwidth-slider-fade .owl-item.animated { animation-duration: .7s; animation-timing-function: ease; animation-fill-mode: both; }
.owl-delay-450 { transition-delay: .45s; }

/* Vimeo embeds: live has an empty <p> (from the player script) after the video wrapper, giving 24px before the next element */
.content-text div[style*="padding"]:has(> iframe) { margin-bottom: 24px; }

/* Magnific Popup — live overrides (magnific-popup.css on the old site) */
.mfp-container.mfp-iframe-holder .mfp-content { width: 90%; max-width: 1300px; }
body.worth-popup-page { background: #fff; }
/* Pop-up sits above everything, including the side nav (z 1500) and the enquire modal (z 5000) */
.mfp-bg { z-index: 6000 !important; }
.mfp-wrap { z-index: 6001 !important; }

/* iSAMS admissions widgets (Registration form etc.) — live site's overrides, verbatim */
.admissionsEnquiry h1, .modal-school-group h1, .modal-confirm h1, .admissionsEnquiry .h1, .modal-school-group .h1, .modal-confirm .h1 { font-family: trajan-pro-3, serif !important; font-size: 28px !important; font-weight: 300 !important; letter-spacing: -0.04em !important; text-transform: lowercase !important; color: #000 !important; margin-top: 40px !important; margin-bottom: 20px !important; }
.admissionsEnquiry .panel-group .panel-heading .panel-title { font-family: trajan-pro-3, serif !important; color: #fff !important; font-weight: 300 !important; text-transform: lowercase !important; }
.admissionsEnquiry .panel-group .panel-body { font-size: 1em !important; color: #000 !important; font-family: calibri, sans-serif !important; }
.admissionsEnquiry .formGroup.Applicants > .col-md-12.ng-scope > .ng-isolate-scope > div > .row:nth-child(1) > div > label, .admissionsEnquiry .formGroup.formTypeId-3 > .col-md-12.ng-scope > .ng-isolate-scope > div > .row:nth-child(1) > div > label { font-size: 1.2em !important; }

/* Tables in page content: live has an empty <p> after each table, giving 24px before the next paragraph */
.content-text .table-responsive { margin-bottom: 24px; }
/* Collapsed step titles ("Parent Two Details"): live Bootstrap's text-muted grey (5.3 uses a darker translucent grey) */
.admissionsEnquiry .text-muted { color: #6c757d !important; }
