/* ===========================================
   WNC THEME — Custom Styles
   Theme-specific CSS for layout, components,
   and WooCommerce integration.
   =========================================== */


/* ===========================================
   1. BASE RESET
   Box-sizing, body defaults, images, nav
   elements, and global link styles.
   =========================================== */

/* Skip-to-content link — visible only on keyboard focus */
.wnc-skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 10000;
    padding: 0.5rem 1rem;
    background: var(--wp--preset--color--brand);
    color: var(--wp--preset--color--white);
    font-weight: 700;
    border-radius: 0 0 var(--wp--custom--border-radius--default) var(--wp--custom--border-radius--default);
    text-decoration: none;
    transition: top 0.15s ease;
}

.wnc-skip-link:focus {
    top: 0;
    outline: 3px solid var(--wp--preset--color--brand);
    outline-offset: 2px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    line-height: 1.5;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent inline element gaps */
nav, header, footer, main, section {
    display: block;
}

a {
    color: var(--wp--preset--color--link);
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--wp--preset--color--link-hover) !important;
    text-decoration: underline solid;
}

/* Visible focus ring for keyboard navigation only */
:focus-visible {
    outline: 2px solid var(--wp--preset--color--brand);
    outline-offset: 2px;
}

/* Remove focus ring on mouse clicks */
:focus:not(:focus-visible) {
    outline: none;
}

/* No focus ring on non-interactive elements */
[role="alert"]:focus-visible,
.wc-block-components-notice-banner:focus-visible,
.woocommerce-message:focus-visible,
.woocommerce-info:focus-visible,
.woocommerce-error:focus-visible,
.sq-card-wrapper:focus-visible,
.sq-card-wrapper *:focus-visible,
div[id^="sq-"]:focus-visible,
.wc-square-credit-card-hosted-field:focus-visible,
iframe:focus-visible {
    outline: none;
}

/* Subtler focus for form inputs — border highlight instead of outline */
input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: none;
    border-color: var(--wp--preset--color--brand);
    box-shadow: 0 0 0 1px var(--wp--preset--color--brand);
}

/* Buttons should never have underlines */
.wp-element-button,
.wp-element-button:hover {
    text-decoration: none !important;
}


/* ===========================================
   2. WORDPRESS BLOCK RESET
   wp-site-blocks spacing, sticky header,
   and admin bar offset.
   =========================================== */

/* Remove all spacing between top-level blocks (header, section, footer) */
.wp-site-blocks {
    padding-top: 0 !important;
}

.wp-site-blocks > * {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}

.wp-site-blocks > header.wp-block-template-part {
    position: sticky;
    top: 0;
    z-index: 1030;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Offset sticky for WordPress admin bar when logged in */
.admin-bar .wp-site-blocks > header.wp-block-template-part {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .wp-site-blocks > header.wp-block-template-part {
        top: 46px;
    }
}


/* ===========================================
   3. COMPONENTS: BUTTONS
   Base button styles and variants.
   =========================================== */

.btn {
    display: inline-block;
    font-family: var(--wp--preset--font-family--heading);
    font-weight: var(--wp--custom--font-weight--bold);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.667em 1.333em;
    border-radius: var(--wp--custom--border-radius--default);
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color var(--wp--custom--transition-duration);
}

.btn-light {
    background: var(--wp--preset--color--white);
    color: var(--wp--preset--color--text-dark);
}

.btn-light:hover {
    background: var(--wp--preset--color--border-light);
    color: var(--wp--preset--color--text-dark);
}


/* ===========================================
   4. COMPONENTS: FORMS
   Form control base, global input styles,
   labels, and focus states.
   =========================================== */

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: var(--wp--custom--border-radius--default);
    font-size: inherit;
    font-family: inherit;
    color: var(--wp--preset--color--text);
    background-color: var(--wp--preset--color--white);
    box-sizing: border-box;
}

/* Global form element styles — ensures all form elements
   are styled consistently regardless of source markup. */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: var(--wp--custom--border-radius--default);
    font-size: inherit;
    font-family: inherit;
    color: var(--wp--preset--color--text);
    background-color: var(--wp--preset--color--white);
    box-sizing: border-box;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

label {
    font-weight: var(--wp--custom--font-weight--bold);
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
    display: block;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--wp--preset--color--brand) !important;
    box-shadow: none !important;
}


/* ===========================================
   5. COMPONENTS: CARDS
   Card container, body, and image styles.
   =========================================== */

.card {
    background: var(--wp--preset--color--white);
    border: 1px solid var(--wp--preset--color--border-light);
    border-radius: var(--wp--custom--border-radius--large);
    overflow: hidden;
}

.card-body {
    padding: 1rem;
}

.card-img-top {
    width: 100%;
    display: block;
    border-radius: 0;
}

.card:hover {
    box-shadow: var(--wp--custom--shadow--md);
}

/* WordPress wraps featured images in <figure> — reset its margin */
.card .wp-block-post-featured-image {
    margin: 0;
}

.card .wp-block-post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
}

/* Tighter spacing for WordPress blocks inside card-body */
.card .card-body > * {
    margin-block-start: 0.375rem;
}

.card .card-body > *:first-child {
    margin-block-start: 0;
}

/* WordPress block-specific sizing inside cards */
.card .card-body .wp-block-post-title {
    font-size: var(--wp--preset--font-size--medium);
    margin-bottom: 0.5rem;
}

.card .card-body .wp-block-post-date {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--text-secondary);
}

.card .card-body .wp-block-post-excerpt {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--text-secondary);
    margin-block-start: 0.5rem;
    margin-block-end: 0.375rem;
}


/* ===========================================
   6. COMPONENTS: TABLES
   Base table styles and branded table headers
   for content areas.
   =========================================== */

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--wp--preset--color--border-light);
    vertical-align: top;
}

.table-striped tbody tr:nth-child(odd) {
    background: var(--wp--preset--color--bg-subtle);
}

/* Brand red table headers — only in blog/page content, not WC */
.entry-content table:not(.wc-block-cart-items):not(.woocommerce-table):not(.woocommerce-orders-table) th,
.wp-block-post-content table:not(.wc-block-cart-items):not(.woocommerce-table):not(.woocommerce-orders-table) th {
    font-family: var(--wp--preset--font-family--heading);
    background-color: var(--wp--preset--color--brand) !important;
    color: var(--wp--preset--color--white) !important;
}

/* WC tables — neutral headers */
.woocommerce table th,
.woocommerce-page table th,
table.wc-block-cart-items th {
    background: none !important;
    color: var(--wp--preset--color--text) !important;
    font-family: var(--wp--preset--font-family--heading);
    font-weight: 600;
    font-size: var(--wp--preset--font-size--small);
    text-transform: none;
    letter-spacing: 0;
    border: none !important;
    border-radius: 0 !important;
}


/* ===========================================
   7. NAVBAR
   Base navbar, hamburger toggler, collapse,
   dropdown menus, and mobile/desktop behaviour.
   =========================================== */

.navbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    text-decoration: none;
    transition: color var(--wp--custom--transition-duration);
}

/* Hamburger toggler */
.navbar-toggler {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
}

.navbar-toggler-icon {
    display: block;
    width: 1.5em;
    height: 1.5em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

/* Collapse — hidden on mobile until .show */
.navbar-collapse {
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* Dropdown menu — hidden by default */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 10rem;
    background: var(--wp--preset--color--white);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

/* Show dropdown via JS (.open) or CSS hover */
.nav-item.dropdown.open > .dropdown-menu {
    display: block;
}

/* Dropdown toggle arrow */
.dropdown-toggle::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.3em;
    vertical-align: 0.15em;
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-left: 0.3em solid transparent;
}

.dropdown-item {
    display: block;
    text-decoration: none;
    white-space: nowrap;
}

/* Space between nav item and dropdown — use padding-top on the
   menu instead of margin so the hover zone is continuous */
.dropdown-menu {
    margin-top: 0 !important;
    padding-top: 0.75rem !important;
}

/* Mobile: stack nav vertically, show hamburger */
@media (max-width: 991.98px) {
    .navbar-toggler {
        display: block;
    }

    .navbar-collapse {
        display: none;
        width: 100%;
        flex-basis: 100%;
    }

    .navbar-collapse.show {
        display: block;
    }

    .navbar-nav {
        flex-direction: column;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
    }

    .nav-item.dropdown.open > .dropdown-menu {
        display: block;
    }
}

/* Desktop: always show collapse */
@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
    }
}


/* ===========================================
   8. HEADER
   Site header, logo, nav links, dropdown
   styles, accent bar, and all responsive
   breakpoints.
   =========================================== */

.wnc-header {
    background-color: var(--wp--preset--color--brand);
    background-image: url('../images/cool-background.png');
    background-blend-mode: multiply;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--wp--preset--color--white);
    box-shadow: var(--wp--custom--shadow--lg);
    padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 3vw, 2rem);
}

.wnc-header .navbar {
    padding: 0;
    margin: 0 auto;
    max-width: var(--wp--custom--container-width--full);
}

.wnc-header .navbar-brand img {
    height: clamp(45px, 2.5rem + 3vw, 85px);
    width: auto;
}

/* Nav links */
.wnc-header .nav-link {
    font-family: var(--wp--preset--font-family--heading);
    font-weight: 600;
    font-size: clamp(0.8rem, 0.55rem + 0.65vw, 1.1rem);
    color: var(--wp--custom--white-alpha--strong) !important;
    padding: 0.5rem clamp(0.4rem, 1.2vw, 1.5rem) !important;
}

.wnc-header .nav-link:hover,
.wnc-header .nav-link:focus {
    color: var(--wp--preset--color--white) !important;
    text-decoration: none !important;
}

.wnc-header .dropdown-item:hover,
.wnc-header .dropdown-item:focus {
    text-decoration: none !important;
}

/* Active/current top-level nav — stays white, full opacity */
.wnc-header .nav-link.active {
    color: var(--wp--preset--color--white) !important;
    opacity: 1;
}

/* Dropdown arrow pointer — larger, visible above the menu */
.wnc-header .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -4px;
    right: 1.5rem;
    width: 16px;
    height: 16px;
    background: var(--wp--preset--color--white);
    transform: rotate(45deg);
    border-top: 1px solid var(--wp--preset--color--border-light);
    border-left: 1px solid var(--wp--preset--color--border-light);
    z-index: 1;
}

/* Accent bar below header */
.wnc-header__accent {
    height: 4px;
    background: linear-gradient(90deg,
        var(--wp--preset--color--brand-dark),
        var(--wp--preset--color--brand),
        var(--wp--preset--color--brand-dark));
}

/* Desktop dropdown — white panel with red hover accent */
@media (min-width: 992px) {
    .wnc-header .dropdown-menu {
        border: 1px solid var(--wp--preset--color--border-light);
        border-radius: var(--wp--custom--border-radius--default);
        box-shadow: var(--wp--custom--shadow--lg);
        padding: 0.5rem 0.375rem;
        min-width: 200px;
        right: 0;
        left: auto;
    }

    .wnc-header .dropdown-item {
        font-family: var(--wp--preset--font-family--heading);
        font-weight: var(--wp--custom--font-weight--medium);
        font-size: clamp(0.75rem, 0.55rem + 0.5vw, 0.95rem);
        color: var(--wp--preset--color--text);
        padding: clamp(0.375rem, 0.7vw, 0.5rem) clamp(0.75rem, 1.2vw, 1.25rem) clamp(0.375rem, 0.7vw, 0.5rem) calc(clamp(0.75rem, 1.2vw, 1.25rem) + 3px);
        position: relative;
        transition: color var(--wp--custom--transition-duration), background-color var(--wp--custom--transition-duration);
    }

    .wnc-header .dropdown-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 3px;
        height: 100%;
        background: var(--wp--preset--color--brand);
        transform: scaleY(0);
        transition: transform var(--wp--custom--transition-duration);
    }

    .wnc-header .dropdown-item:hover,
    .wnc-header .dropdown-item:focus {
        color: var(--wp--preset--color--brand);
        background-color: var(--wp--preset--color--bg-brand-subtle);
    }

    .wnc-header .dropdown-item:hover::before,
    .wnc-header .dropdown-item:focus::before,
    .wnc-header .dropdown-item.active::before {
        transform: scaleY(1);
    }

    .wnc-header .dropdown-item.active,
    .wnc-header .dropdown-item:active {
        color: var(--wp--preset--color--brand);
        background-color: var(--wp--preset--color--bg-brand-subtle);
        border-left-color: var(--wp--preset--color--brand);
    }
}

/* Header — mobile: when menu is open, html background goes red so it
   fills the viewport behind all WordPress padding/margin gaps.
   iOS Safari doesn't repaint background-blend-mode on dynamic resize,
   so we can't rely on .wnc-header background extending. */
@media (max-width: 991.98px) {
    html.wnc-menu-open {
        background: #c00d37;
    }

    html.wnc-menu-open .wnc-header {
        background-image: none;
        background-blend-mode: normal;
        background-color: #c00d37;
    }

    .wnc-header {
        position: relative;
    }

    .wnc-header .navbar-collapse {
        margin: 0;
        padding: 0.5rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .wnc-header .nav-link {
        padding: 0.75rem 1.25rem 0.25rem !important;
        font-size: var(--wp--preset--font-size--medium);
    }

    .wnc-header .dropdown-menu {
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 40% 0.25rem 0.75rem;
    }

    .wnc-header .dropdown-menu::before {
        display: none;
    }

    .wnc-header .dropdown-item {
        color: var(--wp--custom--white-alpha--mid) !important;
        background: transparent;
        border-left: 3px solid transparent;
        padding: 0.5rem 1.25rem;
        font-size: 0.875rem;
        border-radius: 0;
    }

    .wnc-header .dropdown-item::before {
        display: none;
    }

    .wnc-header .dropdown-item:hover,
    .wnc-header .dropdown-item:focus,
    .wnc-header .dropdown-item:active,
    .wnc-header .dropdown-item.active {
        color: var(--wp--preset--color--white) !important;
        background: var(--wp--custom--white-alpha--subtle);
        border-left-color: var(--wp--preset--color--white);
    }

    /* Hamburger — white background, red lines */
    .wnc-header .navbar-toggler {
        background: var(--wp--preset--color--white);
        border: none;
        padding: 0.5rem 0.75rem;
        border-radius: var(--wp--custom--border-radius--default);
    }

    .wnc-header .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23DC0032' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
}

/* ===========================================
   9. FOOTER
   Site footer layout, logo, text, social
   links, and responsive breakpoints.
   =========================================== */

.wnc-footer {
    background-color: var(--wp--preset--color--brand);
    background-image: url('../images/cool-background.png');
    background-blend-mode: multiply;
    background-size: cover;
    background-position: center;
    padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 3vw, 2rem);
}

.wnc-footer__inner {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 3.5rem;
    max-width: var(--wp--custom--container-width--grid);
    margin: 0 auto;
}

.wnc-footer__logo {
    flex-shrink: 0;
}

.wnc-footer__logo img {
    height: 130px;
    width: auto;
}

.wnc-footer__text {
    flex: 1;
}

.wnc-footer__text p {
    color: var(--wp--preset--color--white) !important;
    font-size: var(--wp--preset--font-size--small);
    line-height: var(--wp--custom--line-height--loose);
    margin: 0 0 1rem;
}

.wnc-footer__text p:last-child {
    margin-bottom: 0;
}

.wnc-footer__acknowledgement {
    color: var(--wp--preset--color--white) !important;
    font-size: var(--wp--preset--font-size--small) !important;
}

.wnc-footer__privacy {
    font-size: 0.75rem;
    margin-top: 0.75rem;
    text-align: center;
}

.wnc-footer__privacy a {
    color: var(--wp--custom--white-alpha--light) !important;
    text-decoration: none !important;
}

.wnc-footer__privacy a:hover {
    color: var(--wp--preset--color--white) !important;
}

.wnc-footer__social {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.wnc-footer__social-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--wp--preset--color--white) !important;
    text-decoration: none !important;
    font-size: var(--wp--preset--font-size--small);
    font-weight: 700;
}

.wnc-footer__social-link:hover {
    color: var(--wp--preset--color--white) !important;
    text-decoration: none !important;
}

.wnc-footer__social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none !important;
    box-shadow: none !important;
    border-radius: var(--wp--custom--border-radius--default);
    -webkit-appearance: none;
}

/* Back to top button */
.wnc-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wp--preset--color--brand);
    color: var(--wp--preset--color--white);
    border-radius: 50%;
    box-shadow: var(--wp--custom--shadow--md);
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    transform: translateY(1rem);
}

.wnc-back-to-top.is-visible {
    opacity: 0.8;
    visibility: visible;
    transform: translateY(0);
}

.wnc-back-to-top:hover,
.wnc-back-to-top:focus {
    opacity: 1;
    color: var(--wp--preset--color--white) !important;
}

/* Footer — small mobile */
@media (max-width: 767.98px) {
    .wnc-footer__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--wp--custom--grid-gap);
    }

    .wnc-footer__logo {
        order: 1;
    }

    .wnc-footer__social {
        order: 2;
        align-items: center;
    }

    .wnc-footer__text {
        order: 3;
    }

    .wnc-footer__logo img {
        height: 72px;
    }
}


/* ===========================================
   10. PAGE SECTIONS
   Full-width textured backgrounds, content
   cards, and edge resets.
   =========================================== */

.wnc-section {
    background-image: url('../images/cool-background.png');
    background-size: 100% auto;
    background-repeat: repeat-y;
    padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
}

/* Light (default) — grey with cool background texture */
.wnc-section,
.wnc-section--light {
    background-color: var(--wp--preset--color--bg-page);
    background-image: url('../images/cool-background.png');
    background-blend-mode: multiply;
    background-size: cover;
    background-position: center;
}

/* Dark — brand red texture (matches header/footer) */
.wnc-section--dark {
    background-color: var(--wp--preset--color--brand);
    background-blend-mode: multiply;
    color: var(--wp--preset--color--white);
}

.wnc-section--dark a {
    color: var(--wp--preset--color--white);
}

/* Content card — white box inside a section */
.wnc-content-card {
    background: var(--wp--preset--color--white);
    color: var(--wp--preset--color--text);
    border: 1px solid var(--wp--preset--color--border-light);
    border-radius: var(--wp--custom--border-radius--large);
    box-shadow: var(--wp--custom--shadow--sm);
    max-width: var(--wp--custom--container-width--narrow);
    margin: 0 auto;
    padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 4vw, 3.5rem);
}

/* Wide variant — for pages with grids/columns that need more room */
.wnc-content-card--wide {
    max-width: var(--wp--custom--container-width--wide);
    padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 4vw, 3.5rem);
}

.wnc-content-card a:not(.wp-element-button) {
    color: var(--wp--preset--color--link);
}

/* Transparent variant — invisible container, just constrains width */
.wnc-content-card--transparent {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    max-width: var(--wp--custom--container-width--grid);
}

/* Section edge resets — section padding is the sole edge controller */
.wnc-section > *:first-child {
    margin-top: 0;
}

.wnc-section > *:last-child {
    margin-bottom: 0;
}

.wnc-content-card--transparent > *:first-child {
    margin-top: 0;
}

.wnc-content-card--transparent > *:last-child {
    margin-bottom: 0;
}

/* Kill WordPress block gap inside our content cards — we control all spacing */
.wnc-content-card.is-layout-flow > * {
    margin-block-start: 0 !important;
}

.wnc-content-card h1,
.wnc-content-card h2,
.wnc-content-card h3,
.wnc-content-card h4,
.wnc-content-card h5,
.wnc-content-card h6 {
    color: var(--wp--preset--color--text-dark);
}


/* Section "more" link — centred link at bottom of a section */
.wnc-section-more {
    text-align: center;
    margin-top: 2rem;
    clear: both;
}

.wnc-section-more a {
    color: var(--wp--custom--white-alpha--mid) !important;
    text-decoration: underline dotted;
}

.wnc-section-more a:hover {
    color: var(--wp--preset--color--white) !important;
    text-decoration: underline solid;
}

.wnc-section--light .wnc-section-more a {
    color: var(--wp--preset--color--link) !important;
}

.wnc-section--light .wnc-section-more a:hover {
    color: var(--wp--preset--color--link-hover) !important;
}


/* ===========================================
   11. SECTION TITLE
   Heading with brand-coloured underline bar.
   =========================================== */

.wnc-section-title {
    position: relative;
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
}

/* Consistent gap from section title underline to following content */
.wnc-section-title + * {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
}

.wnc-section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--wp--preset--color--brand);
    margin-top: 0.75rem;
}

/* Section title on dark/red sections — white text, white underline */
.wnc-section--dark .wnc-section-title {
    color: var(--wp--preset--color--white);
}

.wnc-section--dark .wnc-section-title::after {
    background: var(--wp--preset--color--white);
}


/* ===========================================
   12. RESPONSIVE GRID SYSTEM
   Fixed column counts with consistent breakpoints.
   Desktop: 992px+  |  Tablet: 768-991px  |  Mobile: <768px
   =========================================== */

.wnc-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--wp--custom--grid-gap);
}

.wnc-grid-3,
.wp-block-post-template.is-layout-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--wp--custom--grid-gap);
}

.wnc-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--wp--custom--grid-gap);
}

/* Reset top margin on first child inside grid columns */
:is(.wnc-grid-2, .wnc-grid-3, .wnc-grid-4) > * > :first-child {
    margin-top: 0;
}

@media (max-width: 991.98px) {
    .wnc-grid-4,
    .wnc-grid-3,
    .wp-block-post-template.is-layout-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {
    .wnc-grid-4,
    .wnc-grid-3,
    .wnc-grid-2,
    .wp-block-post-template.is-layout-grid {
        grid-template-columns: 1fr;
    }
}


/* ===========================================
   12b. UNIFIED COLUMN SYSTEM
   Single column system for all layouts.
   Same breakpoints as grid system above.
   =========================================== */

.wnc-cols-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--wp--custom--grid-gap);
}

.wnc-cols-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--wp--custom--grid-gap);
}

.wnc-cols-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--wp--custom--grid-gap);
}

.wnc-auto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--wp--custom--grid-gap);
}

@media (max-width: 991.98px) {
    .wnc-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {
    .wnc-cols-4,
    .wnc-cols-3,
    .wnc-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* Photo frame — shared base for all framed images */
.wnc-photo-frame,
.entry-content > .wp-block-image,
:is(.wnc-grid-2, .wnc-grid-3, .wnc-grid-4, .wnc-masonry-2, .wnc-masonry-3) .wp-block-image,
:is(.wnc-masonry-2, .wnc-masonry-3) > a {
    border: 6px solid var(--wp--preset--color--white);
    border-radius: var(--wp--custom--border-radius--large);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform var(--wp--custom--transition-duration), box-shadow var(--wp--custom--transition-duration);
}

.wnc-photo-frame:hover,
.entry-content > .wp-block-image:hover,
:is(.wnc-grid-2, .wnc-grid-3, .wnc-grid-4, .wnc-masonry-2, .wnc-masonry-3) .wp-block-image:hover,
:is(.wnc-masonry-2, .wnc-masonry-3) > a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.wnc-photo-frame img,
.entry-content > .wp-block-image img,
:is(.wnc-grid-2, .wnc-grid-3, .wnc-grid-4, .wnc-masonry-2, .wnc-masonry-3) .wp-block-image img,
:is(.wnc-masonry-2, .wnc-masonry-3) > a > img {
    width: 100%;
    display: block;
    margin: 0;
}

.wnc-photo-frame a,
.entry-content > .wp-block-image a,
:is(.wnc-grid-2, .wnc-grid-3, .wnc-grid-4, .wnc-masonry-2, .wnc-masonry-3) .wp-block-image a {
    display: block;
    line-height: 0;
}

/* Photo frame — standalone images in article content */
.entry-content > .wp-block-image {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.entry-content > .wp-block-image figcaption {
    padding: 0.4rem 0.75rem 0.2rem;
    font-size: var(--wp--preset--font-size--small);
    color: #666;
    text-align: center;
    font-style: italic;
}

/* No focus outline on image lightbox links */
.wp-block-image a:focus-visible {
    outline: none;
}

/* Grid layout — margin reset */
:is(.wnc-grid-2, .wnc-grid-3, .wnc-grid-4) .wp-block-image {
    margin: 0;
}

/* Fluid grids — auto-fit for when item count varies */
.wnc-grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--wp--custom--grid-gap);
}


/* ===========================================
   13. HOMEPAGE: HERO
   Two-column hero layout with image,
   text, CTA button, and links.
   =========================================== */

/* Page banner — red section with title + excerpt + featured image */
.wnc-page-banner__inner {
    display: flex;
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: flex-start;
    max-width: var(--wp--custom--container-width--full);
    margin: 0 auto;
}

.wnc-page-banner__text {
    flex: 1 1 55%;
}

.wnc-page-banner__text .wp-block-post-title,
.wnc-page-banner__text h1 {
    color: var(--wp--preset--color--white);
    margin-bottom: 0.75rem;
}

.wnc-page-banner__text .wp-block-post-excerpt,
.wnc-page-banner__text .wp-block-term-description {
    color: var(--wp--custom--white-alpha--medium);
    font-size: var(--wp--preset--font-size--medium);
    line-height: var(--wp--custom--line-height--loose);
}

.wnc-page-banner__text > p {
    color: var(--wp--custom--white-alpha--medium);
    font-size: var(--wp--preset--font-size--medium);
    line-height: var(--wp--custom--line-height--loose);
}

.wnc-page-banner__text .wp-block-post-excerpt p,
.wnc-page-banner__text .wp-block-term-description p {
    margin: 0;
}

.wnc-page-banner .wp-block-post-featured-image {
    flex: 1 1 45%;
    margin: 0;
}

.wnc-page-banner .wp-block-post-featured-image img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    border: 4px solid var(--wp--preset--color--white);
    border-radius: var(--wp--custom--border-radius--default);
}

/* Archive banner — latest post image via query */
.wnc-page-banner__image-query {
    flex: 1 1 45%;
    margin: 0;
}

.wnc-page-banner__image-query .wp-block-post-template {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Static banner image (404, search — no post context) */
.wnc-page-banner__static-image {
    flex: 1 1 45%;
    margin: 0;
}

.wnc-page-banner__static-image img {
    width: 100%;
    height: auto;
    display: block;
    border: 4px solid var(--wp--preset--color--white);
    border-radius: var(--wp--custom--border-radius--default);
}

/* No featured image — centre text, cap width */
.wnc-page-banner__inner:not(:has(.wp-block-post-featured-image)):not(:has(.wnc-page-banner__static-image)) {
    max-width: var(--wp--custom--container-width--narrow);
    text-align: center;
}

@media (max-width: 767.98px) {
    .wnc-page-banner__inner {
        flex-direction: column;
        text-align: center;
    }

    .wnc-page-banner .wp-block-post-featured-image {
        max-width: 100%;
    }

    .wnc-page-banner__text .wp-block-post-excerpt,
    .wnc-page-banner__text .wp-block-term-description {
        display: none;
    }
}

/* Search form in banner — white input, brand button */
.wnc-search-form {
    margin-top: 1.5rem;
    max-width: 400px;
}

.wnc-search-form .wp-block-search__inside-wrapper {
    border: none;
    background: transparent;
    padding: 0;
}

.wnc-search-form .wp-block-search__input {
    background: var(--wp--preset--color--white);
    border: none;
    border-radius: var(--wp--custom--border-radius--default);
    padding: 0.625rem 1rem;
    font-size: var(--wp--preset--font-size--small);
}

.wnc-search-form .wp-block-search__button {
    background: var(--wp--preset--color--brand-dark);
    color: var(--wp--preset--color--white);
    border: none;
    border-radius: var(--wp--custom--border-radius--default);
    padding: 0.625rem 1rem;
    cursor: pointer;
}

.wnc-search-form .wp-block-search__button:hover {
    background: var(--wp--preset--color--white);
    color: var(--wp--preset--color--brand);
}

/* No results state */
.wnc-no-results {
    text-align: center;
    padding: 3rem 1rem;
}


.wnc-hero__columns {
    display: flex;
    gap: clamp(1.5rem, 3vw, 3.5rem);
    align-items: flex-start;
    max-width: var(--wp--custom--container-width--full);
    margin: 0 auto;
}

.wnc-hero__text-col {
    flex: 1 1 55%;
    text-align: left;
}

.wnc-hero__image-col {
    flex: 1 1 45%;
}

.wnc-hero__image {
    width: 100%;
    height: auto;
    display: block;
    border: 4px solid var(--wp--preset--color--white);
    border-radius: var(--wp--custom--border-radius--default);
}

.wnc-hero__text {
    color: var(--wp--preset--color--white);
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 500;
    line-height: var(--wp--custom--line-height--loose);
    margin-bottom: 0.75rem;
}

.wnc-hero__text-col .wnc-hero-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.wnc-hero__cta-wrap {
    text-align: center;
}

/* CTA button — prominent button on dark/red backgrounds */
.btn-cta {
    background: var(--wp--preset--color--white);
    font-size: var(--wp--preset--font-size--medium);
    padding: 0.667em 1.333em;
    color: var(--wp--preset--color--text-dark) !important;
    border: 2px solid rgba(0, 0, 0, 0.15);
    transition: color var(--wp--custom--transition-duration), border-color var(--wp--custom--transition-duration);
}

.btn-cta:hover {
    background: var(--wp--preset--color--white) !important;
    color: var(--wp--preset--color--brand) !important;
    border-color: rgba(0, 0, 0, 0.35);
}

/* CTA button — red variant for light backgrounds */
.btn-cta--red {
    background: var(--wp--preset--color--brand);
    color: var(--wp--preset--color--white) !important;
    border: 2px solid var(--wp--preset--color--brand);
}

.btn-cta--red:hover {
    background: var(--wp--preset--color--brand-dark) !important;
    color: var(--wp--preset--color--white) !important;
    border-color: var(--wp--preset--color--brand-dark);
}

.wnc-hero__cta {
    margin: 1.25rem 0;
}

.wnc-hero__links {
    color: var(--wp--custom--white-alpha--mid);
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    text-align: center;
}

.wnc-hero__links a {
    color: var(--wp--preset--color--white);
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}

.wnc-hero__links a:hover {
    color: var(--wp--preset--color--white) !important;
    text-decoration: underline solid;
}

/* Page title — shared style for all main page headings */
.wnc-hero-title,
.wnc-single-post .wp-block-post-title,
.wnc-page-banner .wp-block-post-title,
.wp-block-query-title,
.wnc-page-title {
    font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
    font-weight: var(--wp--custom--font-weight--bold);
    line-height: 1.15;
    margin-bottom: 0.5rem;
}

/* Archive title — extra bottom spacing before post grid */
.wp-block-query-title {
    margin-bottom: 1.5rem;
}

/* In the banner, query title uses standard title spacing */
.wnc-page-banner .wp-block-query-title {
    margin-bottom: 0.5rem;
}

/* White variant for use on dark/red backgrounds */
.wnc-hero-title--light,
.wnc-single-post .wp-block-post-title,
.wnc-page-banner .wp-block-post-title,
.wnc-page-banner .wp-block-query-title,
.wnc-page-banner .wnc-page-title {
    color: var(--wp--preset--color--white);
}


/* ===========================================
   14. HOMEPAGE: BLURBS
   Icon + title + text feature blocks,
   displayed in a 4-column grid.
   =========================================== */

.wnc-blurbs {
    display: grid;
    gap: 2rem;
    max-width: var(--wp--custom--container-width--grid);
    margin: 0 auto;
}

.wnc-blurbs-4 {
    grid-template-columns: repeat(4, 1fr);
}

.wnc-blurbs-3 {
    grid-template-columns: repeat(3, 1fr);
}

.wnc-blurbs-2 {
    grid-template-columns: repeat(2, 1fr);
}

.wnc-blurb {
    text-align: center;
    text-decoration: none !important;
    color: inherit;
    padding: 1.5rem 1rem;
    border-radius: var(--wp--custom--border-radius--large);
    background-color: rgba(255, 255, 255, 0.5);
    transition: background-color var(--wp--custom--transition-duration);
}

.wnc-blurb:hover {
    background-color: var(--wp--preset--color--white);
    color: inherit;
}

.wnc-blurb__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    display: block;
    color: var(--wp--preset--color--brand);
}

.wnc-blurb h4 {
    color: var(--wp--preset--color--link);
    font-weight: 700;
    font-size: var(--wp--preset--font-size--large);
    margin-bottom: 0.5rem;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

.wnc-blurb:hover h4 {
    color: var(--wp--preset--color--link-hover);
    text-decoration: underline solid;
}

.wnc-blurb p {
    font-size: var(--wp--preset--font-size--medium);
    color: var(--wp--preset--color--text-secondary);
    margin-bottom: 0;
}


/* ===========================================
   15. HOMEPAGE: STATS
   Animated stat counters displayed in a
   horizontal row.
   =========================================== */

.wnc-hero__stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    max-width: var(--wp--custom--container-width--grid);
    margin: clamp(2rem, 5vw, 4rem) auto 0;
}

.wnc-stat {
    text-align: center;
}

.wnc-stat__number {
    display: inline;
    font-family: var(--wp--preset--font-family--heading);
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--wp--preset--color--white);
    line-height: 1;
}

.wnc-stat__suffix {
    font-family: var(--wp--preset--font-family--heading);
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--wp--preset--color--white);
    line-height: 1;
}

.wnc-stat__label {
    display: block;
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 700;
    color: var(--wp--custom--white-alpha--medium);
    margin-top: 0.25rem;
}


/* ===========================================
   16. TESTIMONIALS
   Centred italic quotes on dark sections
   with decorative styling and author attribution.
   =========================================== */

.wnc-testimonial {
    max-width: var(--wp--custom--container-width--narrow);
    margin: 0 auto 2.5rem;
    text-align: center;
}

.wnc-testimonial:last-child {
    margin-bottom: 0;
}

.wnc-testimonial p {
    color: var(--wp--preset--color--white);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-style: italic;
    font-weight: 400;
    line-height: 1.9;
    margin: 0;
}

.wnc-testimonial__author {
    display: block;
    margin-top: 1rem;
    color: var(--wp--custom--white-alpha--light);
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: right;
}


/* ===========================================
   17. HOMEPAGE: SUBSCRIBE / MAILING LIST
   Two-column subscribe form with text
   and input fields.
   =========================================== */

.wnc-subscribe {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.wnc-subscribe__text {
    flex: 1;
}

.wnc-subscribe__text p {
    color: var(--wp--custom--white-alpha--medium);
    font-weight: 500;
}

/* MC4WP form — base styles for light backgrounds */
.mc4wp-form .mc4wp-form-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 500px;
}

.mc4wp-form .wnc-subscribe__row {
    display: flex;
    gap: 0.5rem;
}

.mc4wp-form .wnc-subscribe__row .form-control {
    flex: 1;
}

.mc4wp-form .form-control {
    border: 1px solid #999;
    padding: 0.5rem 0.75rem;
    border-radius: var(--wp--custom--border-radius--default);
}

.mc4wp-form input[type="submit"] {
    margin-top: 0.25rem;
    background: var(--wp--preset--color--brand);
    color: var(--wp--preset--color--white);
    border: none;
    padding: 0.667em 1.333em;
    font-family: var(--wp--preset--font-family--heading);
    font-weight: var(--wp--custom--font-weight--bold);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--wp--custom--border-radius--default);
    cursor: pointer;
    width: 100%;
}

.mc4wp-form input[type="submit"]:hover {
    background: var(--wp--preset--color--brand-dark);
}

/* Override to white button on dark homepage section */
.wnc-subscribe .mc4wp-form input[type="submit"] {
    background: var(--wp--preset--color--white);
    color: var(--wp--preset--color--text-dark);
}

.wnc-subscribe .mc4wp-form input[type="submit"]:hover {
    background: var(--wp--preset--color--white);
    opacity: 0.9;
}

/* MC4WP on dark backgrounds (homepage subscribe section) */
.wnc-subscribe__form,
.wnc-subscribe .mc4wp-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wnc-subscribe__row {
    display: flex;
    gap: 0.5rem;
}

.wnc-subscribe__row .form-control {
    flex: 1;
}

.wnc-subscribe .mc4wp-form p {
    margin: 0;
}

.wnc-subscribe .mc4wp-form .form-control {
    border-radius: var(--wp--custom--border-radius--default);
    padding: 0.5rem 0.75rem;
}

.wnc-subscribe .mc4wp-response {
    color: var(--wp--preset--color--white);
}

.wnc-subscribe__btn,
.wnc-subscribe .mc4wp-form input[type="submit"] {
    width: 100%;
    padding: 0.6rem;
}

.wnc-subscribe__form .form-control,
.wnc-subscribe .mc4wp-form .form-control {
    background: var(--wp--preset--color--white);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--wp--preset--color--text-dark);
}

.wnc-subscribe__form .form-control::placeholder,
.wnc-subscribe .mc4wp-form .form-control::placeholder {
    color: #999;
}

.wnc-subscribe__form .form-control:focus,
.wnc-subscribe .mc4wp-form .form-control:focus {
    background: var(--wp--preset--color--white);
    border-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--text-dark);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}


/* ===========================================
   18. HOMEPAGE: RESPONSIVE
   All homepage-related media queries grouped
   together.
   =========================================== */

@media (min-width: 992px) {
    .wnc-hero__text-col .wnc-hero-title {
        margin-top: 0;
    }
}

@media (max-width: 991.98px) {
    .wnc-hero__columns {
        flex-direction: column;
        gap: 0.75rem;
    }

    .wnc-hero__image-col {
        order: -1;
        width: 100%;
        margin: 0 auto;
    }

    .wnc-blurbs-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .wnc-hero__stats {
        gap: 2rem;
    }

    .wnc-stat__number,
    .wnc-stat__suffix {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    .wnc-subscribe {
        flex-direction: column;
        gap: var(--wp--custom--grid-gap);
    }

    .wnc-subscribe__form,
    .wnc-subscribe .mc4wp-form {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .wnc-blurbs-4,
    .wnc-blurbs-3,
    .wnc-blurbs-2 {
        grid-template-columns: 1fr;
    }

    .wnc-hero__stats {
        flex-wrap: wrap;
        gap: var(--wp--custom--grid-gap);
    }

    .wnc-stat {
        flex: 0 0 45%;
    }
}


/* ===========================================
   19. SINGLE POST
   Post header, featured image, content
   area, and responsive adjustments.
   =========================================== */

.wnc-single-post {
    padding-bottom: 4rem;
    padding-top: clamp(1rem, 2vw, 1.75rem) !important;
}

@media (max-width: 767.98px) {
    .wnc-page-banner {
        padding-top: clamp(1rem, 2vw, 1.75rem) !important;
    }
}

.wnc-single-post__header {
    max-width: var(--wp--custom--container-width--wide);
    margin: 0 auto;
    padding: 0 1rem 1.5rem;
    text-align: center;
}

.wnc-single-post .wp-block-post-date {
    color: var(--wp--custom--white-alpha--mid);
    font-size: var(--wp--preset--font-size--small);
    margin-bottom: 0.75rem;
}

.wnc-single-post .wp-block-post-featured-image {
    max-width: var(--wp--custom--container-width--wide);
    margin: 0 auto;
}

.wnc-single-post .wp-block-post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border: 4px solid var(--wp--preset--color--white);
    border-radius: var(--wp--custom--border-radius--default);
}

.wnc-single-post__content {
    margin-top: 2rem;
}

/* Post categories at top of article body */
.wnc-post-categories {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin-bottom: 1.5rem;
}

.wnc-post-categories a {
    color: #999;
}

.wnc-post-categories a:hover {
    color: var(--wp--preset--color--brand);
}

/* Override constrained layout inside single post content card */
.wnc-single-post__content .wp-block-group {
    max-width: none;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.wnc-single-post__content .wp-block-group > * {
    max-width: none !important;
}

.wnc-single-post__content img {
    border-radius: var(--wp--custom--border-radius--default);
    width: 100%;
    height: auto;
}

@media (max-width: 767.98px) {
    .wnc-single-post__header {
        padding: 0 0.5rem 1rem;
    }
}


/* ===========================================
   20. POST CARDS & ARCHIVE
   Card integration with WordPress blocks,
   link styles, read-more, and post template.
   =========================================== */

/* WordPress block link overrides — WP sets text-decoration:none/inherit
   on these blocks, which prevents the dotted underline from applying.
   Also covers heading links in content where the heading's
   colour property overrides the link hover. */
.wp-block-post-title a,
.wp-block-read-more,
.entry-content h2 a,
.entry-content h3 a,
.entry-content h4 a,
.wp-block-post-content h2 a,
.wp-block-post-content h3 a,
.wp-block-post-content h4 a {
    text-decoration: underline dotted !important;
    text-underline-offset: 2px;
    color: var(--wp--preset--color--link);
}

.wp-block-post-title a:hover,
.wp-block-read-more:hover,
.entry-content h2 a:hover,
.entry-content h3 a:hover,
.entry-content h4 a:hover,
.wp-block-post-content h2 a:hover,
.wp-block-post-content h3 a:hover,
.wp-block-post-content h4 a:hover {
    text-decoration: underline solid !important;
    color: var(--wp--preset--color--link-hover) !important;
}

.wp-block-read-more {
    font-size: var(--wp--preset--font-size--small);
    font-weight: var(--wp--custom--font-weight--medium);
    margin-top: 0 !important;
}

/* Reset list styling on post template */
.wp-block-post-template {
    list-style: none;
    padding: 0;
    margin: 0;
}


/* ===========================================
   21. PAGINATION
   WordPress pagination numbers styled as
   pill-shaped page links.
   =========================================== */

.wp-block-query-pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.wp-block-query-pagination-numbers {
    display: flex;
    justify-content: center;
    gap: 0.375rem;
}

.wp-block-query-pagination-numbers .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    padding: 0.375rem 0.75rem;
    font-size: var(--wp--preset--font-size--medium);
    color: var(--wp--preset--color--link);
    text-decoration: none;
    background-color: var(--wp--preset--color--white);
    border: 1px solid var(--wp--preset--color--border-light);
    border-radius: var(--wp--custom--border-radius--default);
    transition: color var(--wp--custom--transition-duration), background-color var(--wp--custom--transition-duration), border-color var(--wp--custom--transition-duration);
}

.wp-block-query-pagination-numbers .page-numbers:not(.dots):not(.current):hover {
    color: var(--wp--preset--color--white) !important;
    background-color: var(--wp--preset--color--brand);
    border-color: var(--wp--preset--color--brand);
}

.wp-block-query-pagination-numbers .page-numbers.current {
    color: var(--wp--preset--color--white);
    background-color: var(--wp--preset--color--brand);
    border-color: var(--wp--preset--color--brand);
}

.wp-block-query-pagination-numbers .page-numbers.dots {
    border: none;
    background: transparent;
    min-width: auto;
    padding: 0 0.25rem;
}


/* ===========================================
   22. CALLOUT BOXES
   Colour-coded left-border callout blocks
   for tips, warnings, and info.
   =========================================== */

.wnc-callout,
.wnc-callout-default,
.wnc-callout-info,
.wnc-callout-tip,
.wnc-callout-important,
.wnc-callout-caution,
.wnc-callout-warning {
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid;
    border-radius: 0 var(--wp--custom--border-radius--default) var(--wp--custom--border-radius--default) 0;
}

.wnc-callout p:first-child,
[class*="wnc-callout-"] p:first-child { margin-top: 0; }

.wnc-callout > :first-child,
[class*="wnc-callout-"] > :first-child { margin-top: 0; margin-block-start: 0; }

.wnc-callout > :last-child,
[class*="wnc-callout-"] > :last-child { margin-bottom: 0; margin-block-end: 0; }

.wnc-callout,
.wnc-callout-default   { border-color: var(--wp--preset--color--text-secondary); background: var(--wp--custom--callout-bg--default); }
.wnc-callout-info      { border-color: var(--wp--preset--color--callout-info); background: var(--wp--custom--callout-bg--info); }
.wnc-callout-tip       { border-color: var(--wp--preset--color--callout-tip); background: var(--wp--custom--callout-bg--tip); }
.wnc-callout-important { border-color: var(--wp--preset--color--callout-important); background: var(--wp--custom--callout-bg--important); }
.wnc-callout-caution   { border-color: var(--wp--preset--color--callout-caution); background: var(--wp--custom--callout-bg--caution); }
.wnc-callout-warning   { border-color: var(--wp--preset--color--callout-warning); background: var(--wp--custom--callout-bg--warning); }


/* ===========================================
   23. INFO CARDS
   Stacked cards with coloured left border.
   Used for fee breakdowns, feature comparisons, etc.
   =========================================== */

.wnc-info-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wnc-info-card {
    background: var(--wp--preset--color--bg-subtle);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--wp--custom--border-radius--default) var(--wp--custom--border-radius--default) 0;
    border-left: 4px solid var(--wp--preset--color--brand);
}

.wnc-info-card__inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wnc-info-card__detail {
    color: var(--wp--preset--color--text-secondary);
    font-size: var(--wp--preset--font-size--small);
}

.wnc-info-card__value {
    text-align: right;
}

.wnc-info-card__value .wnc-info-card__detail {
    text-align: right;
}

/* Colour variants — match programme/age pathway colours */
.wnc-info-card--netsetgo { border-left-color: var(--wp--custom--programme--netsetgo); }
.wnc-info-card--junior { border-left-color: var(--wp--custom--programme--junior); }
.wnc-info-card--mid-junior { border-left-color: var(--wp--custom--programme--mid-junior); }
.wnc-info-card--senior { border-left-color: var(--wp--custom--programme--senior); }
.wnc-info-card--social { border-left-color: var(--wp--custom--programme--social); }

/* Sponsorship tier colours */
.wnc-info-card--team { border-left-color: var(--wp--custom--programme--junior); }
.wnc-info-card--bronze { border-left-color: var(--wp--custom--programme--bronze); }
.wnc-info-card--silver { border-left-color: var(--wp--custom--programme--silver); }
.wnc-info-card--gold { border-left-color: var(--wp--custom--programme--gold); }

/* Semantic variants — non-programme colours */
.wnc-info-card--info { border-left-color: var(--wp--preset--color--callout-info); }
.wnc-info-card--tip { border-left-color: var(--wp--preset--color--callout-tip); }
.wnc-info-card--neutral { border-left-color: var(--wp--preset--color--neutral); }
.wnc-info-card--important { border-left-color: var(--wp--preset--color--callout-important); }
.wnc-info-card--caution { border-left-color: var(--wp--preset--color--callout-caution); }

/* Grid variant — styling for role/contact cards (grid handled by wnc-cols-N) */
.wnc-info-cards--grid {
    margin-bottom: 0.5rem;
}

.wnc-info-cards--grid .wnc-info-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wnc-info-cards--grid .wnc-info-card h3 {
    margin: 0;
    font-size: var(--wp--preset--font-size--medium);
}

.wnc-info-cards--grid .wnc-info-card p {
    margin: 0;
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--text-secondary);
    flex: 1;
}

.wnc-info-cards--grid .wnc-info-card a {
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
}

/* Info cards responsive grid handled by wnc-cols-N */


/* ===========================================
   24. GUIDE CARDS
   Content index page cards with brand-coloured
   left border.
   =========================================== */

/* Guide grid layout handled by wnc-auto-grid */
.wnc-guide-grid,
.wnc-auto-grid {
    margin: 1.5rem 0;
}

.wnc-guide-card {
    background: var(--wp--preset--color--bg-subtle);
    border: 1px solid var(--wp--preset--color--border-light);
    border-left: 4px solid var(--wp--preset--color--brand);
    border-radius: var(--wp--custom--border-radius--large);
    padding: 1.25rem 1.5rem;
}

.wnc-guide-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: var(--wp--preset--font-size--large);
}

.wnc-guide-card p:last-child {
    margin-bottom: 0;
}


/* ===========================================
   25. POSITION DIAGRAMS
   Court SVG and text displayed side by side,
   stacking on mobile.
   =========================================== */

/* Diagram + text side-by-side layout (positions, rules, umpiring) */
.wnc-diagram-section {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    align-items: flex-start;
}

.wnc-diagram {
    flex: 0 0 35%;
}

.wnc-diagram svg,
.wnc-diagram img {
    width: 100%;
    height: auto;
    cursor: zoom-in;
}

/* Full-width standalone SVG diagrams (age pathway, substitution flow, etc.) */
.wnc-svg-full {
    display: block;
    width: 100%;
    height: auto;
    margin: 1.5rem 0;
    cursor: zoom-in;
}

.wnc-diagram-text {
    flex: 1;
}

.wnc-diagram-text h3 {
    margin-top: 0;
}

/* Position page — individual position close-up diagrams */
.wnc-position-section { display: flex; gap: 2rem; margin: 2rem 0; align-items: flex-start; }
.wnc-position-diagram { flex: 0 0 25%; }
.wnc-position-diagram svg { width: 100%; height: auto; }
.wnc-position-text { flex: 1; }
.wnc-position-text h3 { margin-top: 0; }

@media (max-width: 767.98px) {
    .wnc-diagram-section,
    .wnc-position-section {
        flex-direction: column;
        gap: 1rem;
    }

    .wnc-diagram,
    .wnc-position-diagram {
        width: 60%;
        max-width: 250px;
        margin: 0 auto;
        flex: none;
    }
}


/* ===========================================
   26. CONTENT COMPONENTS: BLOCKQUOTES
   Em-dash citation prefix and last-child
   margin reset.
   =========================================== */

.wp-block-quote p:last-child,
blockquote p:last-child {
    margin-bottom: 0;
}

.wp-block-quote cite::before,
blockquote cite::before {
    content: '— ';
}


/* ===========================================
   27. CONTENT COMPONENTS: HEADING SPACING
   Extra top margin for section separation
   on direct-child headings in content areas.
   =========================================== */

/* Section-break spacing — direct children only, so headings
   inside cards/callouts/components are unaffected */
.entry-content > h2,
.wp-block-post-content > h2 {
    margin-top: 2.5rem;
}

.entry-content > h3,
.wp-block-post-content > h3 {
    margin-top: 2rem;
}

.entry-content > h4,
.wp-block-post-content > h4,
.entry-content > h5,
.wp-block-post-content > h5 {
    margin-top: 1.5rem;
}

.entry-content > :first-child,
.wp-block-post-content > :first-child {
    margin-top: 0;
}


/* ===========================================
   28. SPONSOR LOGOS
   Grid of sponsor logo images with hover
   effects.
   =========================================== */

.wnc-sponsors {
    /* Grid handled by wnc-cols-N class */
}

.wnc-sponsor {
    display: block;
    text-decoration: none !important;
    transition: opacity var(--wp--custom--transition-duration);
}

.wnc-sponsor:hover {
    opacity: 0.8;
    z-index: 10;
}

.wnc-sponsor img {
    width: 100%;
    height: auto;
    display: block;
}

/* Sponsors responsive grid handled by wnc-cols-N */


/* ===========================================
   29. SPONSOR LOGO SLIDER
   Horizontally sliding track of sponsor logos
   with responsive item widths.
   =========================================== */

.wnc-logo-slider {
    overflow: hidden;
    padding-bottom: 2.5rem;
    margin-bottom: -2.5rem;
}

.wnc-logo-slider__track {
    display: flex;
    transition: transform var(--wp--custom--transition-duration-slow);
}

.wnc-logo-slider__track a {
    flex: 0 0 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    text-decoration: none !important;
    transition: opacity var(--wp--custom--transition-duration);
}

.wnc-logo-slider__track a:hover {
    opacity: 0.8;
    z-index: 10;
}

.wnc-logo-slider__track [data-tooltip]::after {
    bottom: -2rem;
}

.wnc-logo-slider__track img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 991.98px) {
    .wnc-logo-slider__track a {
        flex: 0 0 33.333%;
    }
}

@media (max-width: 575.98px) {
    .wnc-logo-slider__track a {
        flex: 0 0 50%;
    }
}


/* ===========================================
   30. MASONRY GALLERY
   JS-positioned masonry layout for image
   galleries. Items are absolutely positioned
   by masonry-init.js after measuring heights.
   =========================================== */

.wnc-masonry-3,
.wnc-masonry-2 {
    position: relative;
    padding-bottom: 1rem;
}

/* Items are absolutely positioned by JS */
:is(.wnc-masonry-2, .wnc-masonry-3) > .wp-block-image,
:is(.wnc-masonry-2, .wnc-masonry-3) > a {
    position: absolute;
    margin: 0;
}

/* Masonry direct links (homepage snapshots) */
:is(.wnc-masonry-2, .wnc-masonry-3) > a {
    display: block;
    border-width: 3px;
}

/* Mobile: disable absolute positioning, stack normally */
@media (max-width: 767.98px) {
    :is(.wnc-masonry-2, .wnc-masonry-3) > .wp-block-image,
    :is(.wnc-masonry-2, .wnc-masonry-3) > a {
        position: static !important;
        width: 100% !important;
        margin-bottom: 1rem;
    }
    .wnc-masonry-3,
    .wnc-masonry-2 {
        height: auto !important;
    }
}


/* ===========================================
   31. TOOLTIPS
   Data-attribute-driven tooltip popups
   used on sponsors and logo slider.
   =========================================== */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--wp--preset--color--text-dark);
    color: var(--wp--preset--color--white);
    font-size: 0.8rem;
    font-family: var(--wp--preset--font-family--heading);
    padding: 0.35rem 0.75rem;
    border-radius: var(--wp--custom--border-radius--default);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--wp--custom--transition-duration-slow);
}

[data-tooltip]:hover::after {
    opacity: 1;
}


/* ===========================================
   32. SHOP LISTING
   Product grid, cards, pricing, and
   account bar.
   =========================================== */

.wnc-account-bar {
    margin-bottom: 1.5rem;
    font-size: var(--wp--preset--font-size--small);
}

.wnc-account-bar a {
    font-weight: 600;
}

/* Hide empty WC products header (banner handles title) */
.woocommerce-products-header {
    display: none;
}

.wnc-shop__grid .card {
    text-decoration: none !important;
    color: inherit;
    transition: box-shadow var(--wp--custom--transition-duration);
}

.wnc-shop__grid .card:hover {
    box-shadow: var(--wp--custom--shadow--md);
    color: inherit;
}

.wnc-shop__grid .card .card-img-top {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.wnc-shop__title {
    font-size: var(--wp--preset--font-size--medium);
    color: var(--wp--preset--color--link);
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}

.wnc-shop__grid .card:hover .wnc-shop__title {
    color: var(--wp--preset--color--link-hover);
    text-decoration: underline solid;
}

.wnc-shop__price {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.375rem;
}

.wnc-shop__description {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--text-secondary);
    margin-top: 0.5rem;
}

.wnc-shop__description p {
    margin: 0;
}


/* ===========================================
   33. SINGLE PRODUCT
   Product gallery, summary, variations,
   cart controls, tabs, and related products.
   =========================================== */

/* Two columns: gallery left, summary right */
.wnc-product__columns {
    display: flex;
    gap: 2rem;
}

.wnc-product__gallery {
    flex: 0 0 55%;
    max-width: 55%;
}

.wnc-product__summary {
    flex: 1;
}

@media (max-width: 767.98px) {
    .wnc-product__columns {
        flex-direction: column;
    }
    .wnc-product__gallery {
        flex: none;
        max-width: 100%;
    }
}

/* Gallery — reserve space to prevent layout shift */
.wnc-product__gallery .woocommerce-product-gallery {
    opacity: 1 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    float: none !important;
}

.wnc-product__gallery .woocommerce-product-gallery__wrapper {
    border: none !important;
    background: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide zoom trigger */
.wnc-product__gallery .woocommerce-product-gallery__trigger {
    display: none !important;
}

/* Gallery thumbnails */
.wnc-product__gallery .flex-control-thumbs {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none;
    display: flex;
    gap: 0.5rem;
}

.wnc-product__gallery .flex-control-thumbs li {
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 60px;
}

.wnc-product__gallery .flex-control-thumbs li img {
    border-radius: var(--wp--custom--border-radius--default);
    border: 2px solid transparent !important;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--wp--custom--transition-duration);
}

.wnc-product__gallery .flex-control-thumbs li img:hover,
.wnc-product__gallery .flex-control-thumbs li img.flex-active {
    border-color: var(--wp--preset--color--brand) !important;
    opacity: 1 !important;
}

/* Product title with red underline bar */
.wnc-product-title {
    font-size: var(--wp--preset--font-size--xx-large);
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.wnc-product-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--wp--preset--color--brand);
    margin-top: 0.625rem;
}

/* Price — brand red */
.wnc-product__summary .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wp--preset--color--brand);
    margin-bottom: 1rem;
}

/* Variations */
.wnc-product__summary .variations {
    width: 100%;
    margin-bottom: 1.5rem;
}

.wnc-product__summary .variations th.label {
    padding: 0.5rem 0.9375rem 0.5rem 0;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.wnc-product__summary .variations th.label label {
    font-family: var(--wp--preset--font-family--heading);
    font-weight: var(--wp--custom--font-weight--semibold);
    color: var(--wp--preset--color--text);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1;
}

.wnc-product__summary .variations td.value {
    padding: 6px 0;
    vertical-align: middle;
}

/* Hide Clear link */
.wnc-product__summary .variations td.value a {
    display: none !important;
}

.wnc-product__summary .variations select {
    width: 100% !important;
    padding: 10px 32px 10px 12px !important;
    border: 1px solid var(--wp--preset--color--border) !important;
    border-radius: var(--wp--custom--border-radius--default) !important;
    font-size: 0.875rem !important;
    color: var(--wp--preset--color--text) !important;
    background-color: var(--wp--preset--color--white) !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='2' fill='none'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 12px !important;
    box-sizing: border-box !important;
}

/* Prevent layout shift — hide empty variation info, show when populated */
.wnc-product__summary .woocommerce-variation:empty {
    display: none;
}

/* Quantity + Add to Cart on same line */
.wnc-product__summary .woocommerce-variation-add-to-cart,
.wnc-product__summary .cart:not(.variations_form) {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.wnc-product__summary .cart .quantity {
    display: inline-block;
}

.wnc-product__summary .cart .quantity .qty {
    width: 3.75rem;
    padding: 0.5rem 0.375rem;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: var(--wp--custom--border-radius--default);
    text-align: center;
}

/* Stock */
.wnc-product__summary .stock.in-stock {
    color: var(--wp--preset--color--positive);
    font-size: var(--wp--preset--font-size--small);
}

/* Meta (SKU, category) */
.wnc-product__summary .product_meta {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--text-secondary);
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--wp--preset--color--border-light);
}

.wnc-product__summary .product_meta a {
    color: var(--wp--preset--color--link);
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}

.wnc-product__summary .product_meta a:hover {
    color: var(--wp--preset--color--link-hover);
    text-decoration: underline solid;
}

/* Tabs */
.wnc-product .woocommerce-tabs {
    margin-top: 2rem;
}

.wnc-product .woocommerce-tabs ul.tabs {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 1.25rem !important;
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--wp--preset--color--border);
    background: none !important;
}

.wnc-product .woocommerce-tabs ul.tabs::before,
.wnc-product .woocommerce-tabs ul.tabs::after {
    display: none !important;
}

.wnc-product .woocommerce-tabs ul.tabs li {
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
}

.wnc-product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 0.75rem 1.25rem;
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
    color: var(--wp--preset--color--text-secondary);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color var(--wp--custom--transition-duration), border-color var(--wp--custom--transition-duration);
}

.wnc-product .woocommerce-tabs ul.tabs li a:hover {
    color: var(--wp--preset--color--text);
}

.wnc-product .woocommerce-tabs ul.tabs li.active a {
    color: var(--wp--preset--color--brand);
    border-bottom-color: var(--wp--preset--color--brand);
}

.wnc-product .woocommerce-tabs .panel {
    font-size: var(--wp--preset--font-size--small);
    line-height: var(--wp--custom--line-height--loose);
}

.wnc-product .woocommerce-tabs .panel h2 {
    display: none;
}

.wnc-product .shop_attributes th {
    background: var(--wp--preset--color--bg-subtle);
    font-weight: 600;
    padding: 0.625rem 1rem;
}

.wnc-product .shop_attributes td {
    padding: 0.625rem 1rem;
}

/* Related products */
.wnc-product .related.products {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--wp--preset--color--border-light);
}

.wnc-product .related.products h2 {
    font-size: var(--wp--preset--font-size--x-large);
    margin-bottom: 1rem;
}


/* ===========================================
   34. WOOCOMMERCE BLOCKS (Cart & Checkout)
   WC block theming: custom properties, buttons,
   product links, form inputs, coupon section,
   and notices.
   =========================================== */

/* Block-level custom properties for WC components */
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
    --wc-block-components-border-color: var(--wp--preset--color--border-light);
    --wc-block-components-border-radius: var(--wp--custom--border-radius--default);
}

/* Remove WC block default max-width — our container handles it */
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
    max-width: none !important;
}

/* Table headers — neutral, larger */
.wc-block-cart-items .wc-block-cart-items__header,
.wc-block-cart-items .wc-block-cart-items__header span,
.wc-block-cart-items__header-image,
.wc-block-cart-items__header-product,
.wc-block-cart-items__header-total {
    background: none !important;
    color: var(--wp--preset--color--text) !important;
    font-weight: 600;
    font-size: var(--wp--preset--font-size--medium) !important;
    text-transform: none;
    border: none !important;
    border-radius: 0 !important;
    padding: 0.5rem 0 !important;
}

/* Line totals — right-aligned and top-aligned */
.wc-block-cart-items__row .wc-block-cart-item__total {
    text-align: right !important;
    vertical-align: top !important;
    padding-top: 20px !important;
}

/* Align headers with content — remove extra left padding */
table.wc-block-cart-items th,
table.wc-block-cart-items td {
    padding-left: 0 !important;
}

table.wc-block-cart-items th:last-child,
table.wc-block-cart-items td:last-child {
    padding-right: 0 !important;
}

/* Cart totals heading larger */
.wc-block-cart__totals-title {
    font-size: var(--wp--preset--font-size--medium) !important;
}

/* Buttons in WC blocks — brand styled */
.wc-block-components-button:not(.is-link) {
    background-color: var(--wp--preset--color--brand) !important;
    color: var(--wp--preset--color--white) !important;
    border: none;
    border-radius: var(--wp--custom--border-radius--default) !important;
    font-family: var(--wp--preset--font-family--heading);
    font-weight: var(--wp--custom--font-weight--bold);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wc-block-components-button:not(.is-link):not(.wc-block-components-totals-coupon__button):hover {
    background-color: var(--wp--preset--color--brand-dark) !important;
}

/* Product links in cart/checkout — larger text */
.wc-block-components-product-name {
    color: var(--wp--preset--color--link) !important;
    text-decoration: underline dotted !important;
    text-underline-offset: 2px;
    font-size: var(--wp--preset--font-size--medium) !important;
}

.wc-block-components-product-name:hover {
    color: var(--wp--preset--color--link-hover) !important;
    text-decoration: underline solid !important;
}

/* Cart item details — override WC default sizing */
table.wc-block-cart-items .wc-block-cart-items__row {
    font-size: var(--wp--preset--font-size--medium) !important;
}

table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
    font-size: var(--wp--preset--font-size--medium) !important;
}

table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
    font-size: var(--wp--preset--font-size--medium) !important;
}

/* WC blocks — use theme fonts and text colour everywhere.
   WC blocks use currentColor for borders, so setting colour
   ensures focus borders match the theme. */
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout,
.wc-block-checkout,
.wc-block-cart {
    font-family: var(--wp--preset--font-family--body) !important;
    color: var(--wp--preset--color--text) !important;
}

.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-block-components-combobox input,
.wc-block-components-address-form input,
.wc-block-components-address-form select,
.wc-blocks-components-select__select {
    font-family: var(--wp--preset--font-family--body) !important;
    color: var(--wp--preset--color--text) !important;
}

/* Cart/checkout product images */
.wc-block-cart-items__row .wc-block-components-product-image img,
.wc-block-components-order-summary-item__image img {
    border-radius: var(--wp--custom--border-radius--default);
}

/* Space between image and product details */
.wc-block-cart-items__row .wc-block-cart-item__image {
    padding-right: 1rem !important;
}

/* Quantity controls */
.wc-block-components-quantity-selector {
    border-radius: var(--wp--custom--border-radius--default) !important;
}

/* Totals section */
.wc-block-components-totals-wrapper {
    border-color: var(--wp--preset--color--border-light) !important;
}

/* Checkout form inputs — border radius and focus colour */
.wc-block-components-text-input input,
.wc-block-components-text-input select,
.wc-block-components-combobox .components-combobox-control input {
    border-radius: var(--wp--custom--border-radius--default) !important;
}

/* Override focus border colour — force all form wrappers
   and inputs to use text colour instead of brand colour. */
.wc-block-checkout *:not(button):not(.wc-block-components-button),
.wc-block-cart .wc-block-components-totals-coupon *:not(button):not(.wc-block-components-button) {
    --form--border-color: var(--wp--preset--color--border);
    color: inherit;
}

.wc-block-checkout .wc-block-components-text-input.is-active,
.wc-block-checkout .wc-blocks-components-select .wc-blocks-components-select__select:focus {
    border-color: var(--wp--preset--color--text) !important;
}

/* Coupon section — input border and Apply button */
.wc-block-components-totals-coupon__content .wc-block-components-text-input input[type="text"] {
    border-color: var(--wp--preset--color--border) !important;
}

.wc-block-components-totals-coupon__content .wc-block-components-text-input.is-active input[type="text"],
.wc-block-components-totals-coupon__content .wc-block-components-text-input input[type="text"]:focus {
    border-color: var(--wp--preset--color--border) !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Apply button — outline grey with hover */
button.wc-block-components-totals-coupon__button.wc-block-components-button,
button.wc-block-components-totals-coupon__button.wc-block-components-button:focus {
    background: transparent !important;
    color: var(--wp--preset--color--text) !important;
    border: 1px solid var(--wp--preset--color--border) !important;
    opacity: 1 !important;
}

.wc-block-components-totals-coupon__content button:hover,
.wc-block-components-totals-coupon__content button:focus,
button.wc-block-components-totals-coupon__button:hover,
button.wc-block-components-totals-coupon__button:focus {
    background-color: var(--wp--preset--color--bg-page) !important;
    color: var(--wp--preset--color--text) !important;
    border-color: var(--wp--preset--color--text-secondary) !important;
    opacity: 1 !important;
    cursor: pointer;
}

/* Coupon row — reduce height */
.wc-block-components-totals-coupon__content .wc-block-components-text-input {
    margin: 0 !important;
}

.wc-block-components-totals-coupon__content .wc-block-components-text-input input[type="text"] {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
    height: auto !important;
    min-height: 0 !important;
}

.wc-block-components-totals-coupon__content .wc-block-components-text-input label {
    font-size: 0.875rem !important;
}

button.wc-block-components-totals-coupon__button.wc-block-components-button {
    padding: 0.5rem 1.25rem !important;
    min-height: 0 !important;
}

/* Notices */
.wc-block-components-notice-banner {
    border-radius: var(--wp--custom--border-radius--default);
}

.wc-block-components-notice-banner.is-success {
    border-color: var(--wp--preset--color--positive);
}

.wc-block-components-notice-banner.is-error {
    border-color: var(--wp--preset--color--negative);
}

.wc-block-components-notice-banner.is-info {
    border-color: var(--wp--preset--color--callout-info);
}


/* ===========================================
   35. MY ACCOUNT PAGE
   Account navigation tabs, order tables,
   form controls, and responsive adjustments.
   =========================================== */

/* Wider card and breadcrumb for account page */
.woocommerce-account .wnc-content-card,
.woocommerce-account .wnc-section .wnc-breadcrumb {
    max-width: var(--wp--custom--container-width--wide);
}

/* Wider card and breadcrumb for calendar page */
.page-id-3587 .wnc-content-card,
.page-id-3587 .wnc-section .wnc-breadcrumb {
    max-width: var(--wp--custom--container-width--wide);
}

/* Horizontal tab navigation — matches product page tabs */
.woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 1.5rem !important;
    display: flex;
    align-items: stretch;
    gap: 0;
    border-bottom: 2px solid var(--wp--preset--color--border);
}

.woocommerce-MyAccount-navigation li {
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide Downloads — not applicable */
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--downloads {
    display: none;
}

.woocommerce-MyAccount-navigation li a {
    display: block;
    padding: 0.75rem 1.25rem;
    font-family: var(--wp--preset--font-family--heading);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wp--preset--color--text-secondary);
    text-decoration: none !important;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color var(--wp--custom--transition-duration), border-color var(--wp--custom--transition-duration);
    white-space: nowrap;
}

.woocommerce-MyAccount-navigation li a:hover {
    color: var(--wp--preset--color--text);
}

.woocommerce-MyAccount-navigation li.is-active a {
    color: var(--wp--preset--color--brand);
    border-bottom-color: var(--wp--preset--color--brand);
}

/* Remember me checkbox inline with button */
.woocommerce-account .woocommerce-form__label-for-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
    font-size: var(--wp--preset--font-size--small);
}

/* Hide unstyled password toggle */
.show-password-input {
    display: none !important;
}

/* Lost password link */
.woocommerce-account .lost_password a {
    font-size: var(--wp--preset--font-size--small);
}

/* All WC tables on account pages — consistent with cart */
.woocommerce-orders-table,
.woocommerce-table,
.woocommerce-table--order-details,
.woocommerce-MyAccount-content table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-orders-table th,
.woocommerce-orders-table td,
.woocommerce-table th,
.woocommerce-table td,
.woocommerce-MyAccount-content table th,
.woocommerce-MyAccount-content table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--wp--preset--color--border-light);
    text-align: left;
    vertical-align: middle;
}

.woocommerce-orders-table thead th,
.woocommerce-table thead th,
.woocommerce-MyAccount-content table thead th {
    background: var(--wp--preset--color--bg-subtle) !important;
    color: var(--wp--preset--color--text) !important;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

/* Footer rows (subtotal, total etc) — right aligned values */
.woocommerce-table tfoot th {
    text-align: right;
    font-weight: 700;
    background: var(--wp--preset--color--bg-subtle) !important;
    color: var(--wp--preset--color--text) !important;
    text-transform: none;
    letter-spacing: 0;
    font-size: inherit;
}

.woocommerce-table tfoot td {
    text-align: right;
}

/* Product variation meta — inline after product name, same size */
.wc-item-meta {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline;
    font-size: inherit;
    color: var(--wp--preset--color--text-secondary);
}

.wc-item-meta li {
    display: inline;
}

.wc-item-meta li p {
    display: inline;
    margin: 0;
}

.wc-item-meta li::before {
    content: ' — ';
}

.wc-item-meta li strong,
.wc-item-meta-label {
    display: none !important;
}

/* Total column right-aligned in order details */
.woocommerce-table--order-details .product-total {
    text-align: right;
}

/* Order detail summary — clean up <mark> elements */
.woocommerce-view-order mark {
    background: none;
    font-weight: 600;
    color: var(--wp--preset--color--text-dark);
}

.woocommerce-view-order mark.order-status {
    color: var(--wp--preset--color--positive);
}

/* Order notes timeline */
.woocommerce-OrderUpdates {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.woocommerce-OrderUpdate {
    border-left: 3px solid var(--wp--preset--color--border-light);
    padding: 0.5rem 0 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.woocommerce-OrderUpdate-meta {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--text-secondary);
    margin-bottom: 0.25rem;
}

/* Billing address spacing */
.woocommerce-customer-details {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--wp--preset--color--border-light);
}

/* Hide Order Again button */
.order-again {
    display: none;
}

/* Highlighted marks (order number, date, status) */
.woocommerce-MyAccount-content mark {
    background: none;
    font-weight: 600;
}

/* View/Pay buttons in orders */
.woocommerce-orders-table .woocommerce-button {
    display: inline-block;
    font-family: var(--wp--preset--font-family--heading);
    font-size: 0.75rem;
    font-weight: var(--wp--custom--font-weight--bold);
    padding: 0.667em 1.333em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: var(--wp--custom--border-radius--default);
    background: transparent;
    color: var(--wp--preset--color--text);
    text-decoration: none !important;
    transition: background-color var(--wp--custom--transition-duration);
}

.woocommerce-orders-table .woocommerce-button:hover {
    background: var(--wp--preset--color--bg-subtle);
}

/* Account content links */
.woocommerce-MyAccount-content a {
    color: var(--wp--preset--color--link);
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}

.woocommerce-MyAccount-content a:hover {
    color: var(--wp--preset--color--link-hover);
    text-decoration: underline solid;
}

@media (max-width: 767.98px) {
    .woocommerce-MyAccount-navigation ul {
        flex-wrap: wrap;
    }

    .woocommerce-MyAccount-navigation li a {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}


/* ===========================================
   BREADCRUMBS
   Navigation breadcrumb bar with width
   matching the content card variant below.
   =========================================== */

/* Shared base */
.wnc-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: var(--wp--preset--font-size--small);
    margin-bottom: 0;
}

.wnc-breadcrumb a {
    text-decoration: none;
    color: var(--wp--preset--color--text-secondary);
}

.wnc-breadcrumb a:hover {
    color: var(--wp--preset--color--text-dark);
    text-decoration: underline;
}

.wnc-breadcrumb__sep {
    color: var(--wp--preset--color--text-muted);
}

.wnc-breadcrumb__current {
    color: var(--wp--preset--color--text-dark);
    font-weight: 600;
}

/* Strip style — semi-transparent white bar with red left border */
.wnc-breadcrumb--strip {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 0.5rem 1rem;
    border-radius: var(--wp--custom--border-radius--default);
    border-left: 3px solid var(--wp--preset--color--brand);
}

/* Breadcrumb inside light section — sits above content card */
.wnc-section .wnc-breadcrumb {
    max-width: var(--wp--custom--container-width--narrow);
    margin: 0 auto 1.5rem;
}

/* Match wider content card variants */
.wnc-section:has(.wnc-content-card--wide) .wnc-breadcrumb {
    max-width: var(--wp--custom--container-width--wide);
}

.wnc-section:has(.wnc-content-card--transparent) .wnc-breadcrumb {
    max-width: var(--wp--custom--container-width--grid);
}

/* Breadcrumbs inside dark sections (single post) */
.wnc-section--dark .wnc-breadcrumb {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.wnc-section--dark .wnc-breadcrumb--strip {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--wp--preset--color--white);
}

.wnc-section--dark .wnc-breadcrumb a {
    color: rgba(255, 255, 255, 0.85) !important;
}

.wnc-section--dark .wnc-breadcrumb a:hover {
    color: var(--wp--preset--color--white) !important;
}

.wnc-section--dark .wnc-breadcrumb__sep {
    color: rgba(255, 255, 255, 0.5);
}

.wnc-section--dark .wnc-breadcrumb__current {
    color: var(--wp--preset--color--white);
}


/* ===========================================
   PRINT STYLES
   Clean, ink-friendly output for printed pages.
   =========================================== */

@media print {
    /* --- Print header with logo on red bar --- */
    body::before {
        content: "";
        display: block;
        height: 120pt;
        margin: 0 0 1.5rem;
        padding: 15pt 0;
        background: #DC0032 url("../images/wnc-logo-print.svg") no-repeat center;
        background-size: auto 90pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* --- Hide non-content elements --- */
    .wnc-header,
    .wnc-footer,
    .wnc-back-to-top,
    .wnc-search-form,
    .wnc-logo-slider,
    .wnc-subscribe,
    .wnc-section-more,
    .wnc-hero__cta,
    .wnc-hero__links,
    .mc4wp-form,
    .wp-block-search,
    .wp-block-query-pagination,
    .woocommerce-cart-form,
    #wpadminbar {
        display: none !important;
    }

    /* --- Reset backgrounds and colours for ink --- */
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11pt;
        line-height: 1.5;
    }

    .wnc-section,
    .wnc-section--dark,
    .wnc-section--light,
    .wnc-page-banner,
    .wnc-content-card,
    .wnc-content-card--wide,
    .wnc-content-card--transparent,
    .wp-block-group {
        background: none !important;
        background-image: none !important;
        background-color: transparent !important;
        color: #000 !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* --- Page banner — keep title, make it black --- */
    .wnc-page-banner {
        padding: 0 !important;
        margin-bottom: 1rem !important;
    }

    .wnc-page-banner__inner {
        max-width: none !important;
        flex-direction: column !important;
    }

    .wnc-page-banner .wp-block-post-title,
    .wnc-page-banner .wp-block-query-title,
    .wnc-page-banner .wnc-page-title,
    .wnc-hero-title {
        color: #000 !important;
        font-size: 18pt !important;
    }

    .wnc-page-banner .wp-block-post-excerpt,
    .wnc-page-banner .wp-block-term-description {
        display: none !important;
    }

    /* Hide banner images and search in print — keep content images */
    .wnc-page-banner .wp-block-post-featured-image,
    .wnc-page-banner__static-image,
    .wnc-page-banner__image-query,
    .wnc-page-banner .wp-block-query,
    .wnc-hero__image-col {
        display: none !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* --- Typography — all black --- */
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid;
    }

    h2 { font-size: 14pt !important; }
    h3 { font-size: 12pt !important; }

    p, li, td, th, dd, dt {
        color: #000 !important;
    }

    /* --- Links — show URL after link text --- */
    a[href]:not([href^="#"]):not([href^="javascript"]):not([href^="mailto"]) {
        color: #000 !important;
        text-decoration: underline !important;
    }

    /* All links — show full URL */
    .wnc-content-card a[href^="/"]:after,
    .wp-block-post-content a[href^="/"]:after,
    .entry-content a[href^="/"]:after {
        content: " (https://warrandytenetball.org" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }

    .wnc-content-card a[href^="http"]:after,
    .wp-block-post-content a[href^="http"]:after,
    .entry-content a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
        word-break: break-all;
    }

    /* Don't show URL for buttons and nav links */
    .btn:after,
    .wp-element-button:after,
    .nav-link:after,
    .wnc-blurb a:after {
        content: none !important;
    }

    /* --- Images — sensible sizing --- */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    .wp-block-post-featured-image img {
        max-width: 50% !important;
    }

    /* --- Tables — visible borders --- */
    table, th, td {
        border: 1px solid #ccc !important;
        color: #000 !important;
        background: none !important;
    }

    th {
        background: #eee !important;
        font-weight: bold;
    }

    /* --- Callouts — keep border, remove background --- */
    [class*="wnc-callout"] {
        background: #f9f9f9 !important;
        color: #000 !important;
        border-left-width: 3px !important;
        page-break-inside: avoid;
    }

    /* --- Info cards — keep border, simplify --- */
    .wnc-info-card {
        background: #f9f9f9 !important;
        color: #000 !important;
        page-break-inside: avoid;
    }

    .wnc-info-card__detail {
        color: #333 !important;
    }

    /* --- Grids — two columns for print to avoid full-width stretch --- */
    .wnc-grid-2,
    .wnc-grid-3,
    .wnc-grid-4,
    .wp-block-post-template.is-layout-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    /* Post cards — remove shadows and hover effects */
    .card,
    .wnc-post-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        padding: 0.75rem !important;
        page-break-inside: avoid;
    }

    .card-img-top {
        display: none !important;
    }

    /* --- Masonry — single column for print --- */
    :is(.wnc-masonry-2, .wnc-masonry-3) > .wp-block-image,
    :is(.wnc-masonry-2, .wnc-masonry-3) > a {
        position: static !important;
        width: 100% !important;
        margin-bottom: 1rem;
    }
    .wnc-masonry-2,
    .wnc-masonry-3 {
        height: auto !important;
    }

    /* --- Diagram sections — stack --- */
    .wnc-diagram-section,
    .wnc-position-section {
        flex-direction: column !important;
    }

    .wnc-diagram,
    .wnc-position-diagram {
        width: 60% !important;
        flex: none !important;
        margin: 0 auto 1rem !important;
    }

    /* --- Section titles — black with underline --- */
    .wnc-section-title {
        color: #000 !important;
        font-size: 14pt !important;
    }

    .wnc-section-title::after {
        background: #000 !important;
    }

    /* --- Blurbs — hide icons, just show text --- */
    .wnc-blurb {
        background: none !important;
        text-align: left !important;
        padding: 0.5rem 0 !important;
        border-bottom: 1px solid #eee;
    }

    .wnc-blurb__icon {
        display: none !important;
    }

    .wnc-blurb h4 {
        color: #000 !important;
        text-decoration: none !important;
    }

    /* --- Page breaks --- */
    h2, h3, h4 {
        page-break-after: avoid;
    }

    p, li, blockquote, ul, ol, table, .wnc-callout, .wnc-info-card, img {
        page-break-inside: avoid;
    }

    /* --- Testimonials — black italic --- */
    .wnc-testimonial p {
        color: #000 !important;
    }

    .wnc-testimonial__author {
        color: #666 !important;
    }

    /* --- Sponsors — hide (not useful in print) --- */
    .wnc-sponsors {
        display: none !important;
    }
}


/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
