/*
 Theme Name:   Astra Child
 Theme URI:    https://example.com
 Description:  Astra Child Theme
 Author:       Pete
 Author URI:   https://example.com
 Template:     astra
 Version:      1.0.0
 Text Domain:  astra-child
*/

/* =============================================================
   1. VARIABLES
   ============================================================= */

:root {
    --club-red: #c8102e;
    --club-red-dark: #96001f;
    --club-white: #ffffff;
    --club-dark: #1a1a1a;
    --header-height: 140px;
    --mobile-header-height: 90px;
}


/* =============================================================
   2. GLOBAL / SHARED
   ============================================================= */

.site-header * {
    box-sizing: border-box;
}

.section-heading {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--club-dark);
    text-align: center;
    margin-top: 34px;
    margin-bottom: 32px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.page-title {
    text-align: center;
    color: var(--club-dark);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.page-intro {
    text-align: center;
    color: #666;
    font-size: 1.05rem;
    margin-bottom: 50px;
}


/* =============================================================
   3. SITE HEADER
   ============================================================= */

.site-header {
    background-color: var(--club-red);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 999;
}

.site-header__inner {
    margin: 0 auto;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* Branding */
.site-header__branding img {
    max-height: calc(var(--header-height) - 24px);
    width: auto;
    transition: transform 0.2s ease;
}

.site-header__branding a:hover img {
    transform: scale(1.04);
}

.site-header__logo-text {
    color: var(--club-dark);
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
}

/* Nav */
.site-header__nav {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}

.site-header__menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.site-header__menu > li {
    position: relative;
    margin: 0 12px;
}

.site-header__menu a {
    display: block;
    padding: 12px 4px;
    color: var(--club-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.site-header__menu > li > a {
    position: relative;
}

.site-header__menu > li > a,
.site-header__menu > li > a:focus,
.site-header__menu > li > a:active {
    background-color: transparent;
    color: var(--club-dark);
}

.site-header__menu > li > a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 0;
    height: 2px;
    background-color: var(--club-dark);
    transition: width 0.25s ease;
}

@media (hover: hover) {
    .site-header__menu > li > a:hover::after {
        width: 100%;
    }
}

.site-header__menu > li > a:focus-visible {
    outline: 2px solid var(--club-dark);
    outline-offset: 2px;
}

/* Dropdown (sub-menu) - dark by default (mobile), overridden to red on desktop below */
.site-header__menu ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--club-dark);
    list-style: none;
    margin: 0;
    padding: 6px;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-top: 3px solid var(--club-red);
}

.site-header__menu li:hover > ul,
.site-header__menu li:focus-within > ul {
    display: block;
}

.site-header__menu ul a {
    padding: 10px 14px;
    white-space: nowrap;
}

/* Mobile toggle - hidden on desktop */
.site-header__toggle {
    display: none;
    cursor: pointer;
    padding: 8px;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.site-header__toggle:focus-visible {
    outline: 2px solid var(--club-dark);
    outline-offset: 2px;
}

.site-header__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--club-dark);
    margin: 5px 0;
    -webkit-tap-highlight-color: transparent;
}

.site-header__toggle,
.site-header__toggle:hover,
.site-header__toggle:focus,
.site-header__toggle:active {
    background: none !important;
    background-color: transparent !important;
    color: inherit !important;
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Mobile breakpoint */
@media (max-width: 860px) {
    .site-header__inner {
        height: var(--mobile-header-height);
    }

    .site-header__branding img {
        max-height: calc(var(--mobile-header-height) - 24px);
        width: auto;
        transition: transform 0.2s ease;
    }

    .site-header__nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--club-red);
        max-height: calc(100vh - var(--mobile-header-height));
        overflow-y: auto;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    }

    .site-header__nav.is-open {
        display: block;
    }

    .site-header__menu {
        flex-direction: column;
        gap: 2px;
        padding: 12px;
    }

    .site-header__menu > li {
        margin: 0;
    }

    /* Top-level items - rounded "chip" feel, subtle separation */
    .site-header__menu > li > a {
        padding: 14px 16px;
        border-radius: 8px;
        text-transform: none;
        letter-spacing: normal;
        font-weight: 700;
        transition: background-color 0.2s ease;
    }

    .site-header__menu > li.submenu-open > a {
        background-color: rgba(0, 0, 0, 0.12);
    }

    .site-header__menu > li > a::after {
        display: none;
    }

    /* Second-level panel (e.g. Sports' children) */
    .site-header__menu ul {
        position: static;
        box-shadow: none;
        border-top: none;
        border-radius: 10px;
        margin: 4px 0 8px;
        padding-left: 0;
        padding-top: 0;
        padding-bottom: 0;
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        background-color: rgba(0, 0, 0, 0.85);
    }

    .site-header__menu li.submenu-open > ul {
        max-height: 700px;
        padding: 6px;
    }

    .site-header__menu ul a {
        border-radius: 6px;
        font-weight: 500;
        font-size: 0.92rem;
    }

    /* Third-level panel (e.g. Football's children) - visually
       distinguished with a subtle left accent + lighter background */
    .site-header__menu ul ul {
        background-color: rgba(255, 255, 255, 0.06);
        border-left: 2px solid var(--club-red);
        margin: 4px 0 4px 12px;
        border-radius: 6px;
    }

    .site-header__menu ul ul a {
        font-size: 0.88rem;
        font-weight: 400;
        color: #e8e8e8 !important;
        padding: 10px 14px;
    }

    .site-header__menu li.menu-item-has-children > a {
        position: relative;
        padding-left: 32px;
    }

    .site-header__menu li.menu-item-has-children > a::before {
        content: '';
        position: absolute;
        left: 14px;
        top: 50%;
        width: 12px;
        height: 12px;
        background-color: currentColor;
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
        -webkit-mask-size: contain;
        mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        transform: translateY(-50%) rotate(-90deg);
        transition: transform 0.2s ease;
    }

    .site-header__menu li.submenu-open > a::before {
        transform: translateY(-50%) rotate(0deg);
    }

    .site-header__menu ul a,
    .site-header__menu ul a:focus,
    .site-header__menu ul a:active {
        color: var(--club-white) !important;
        background-color: transparent !important;
    }

    @media (hover: hover) {
        .site-header__menu ul a:hover {
            background-color: rgba(255, 255, 255, 0.1) !important;
            color: var(--club-white) !important;
        }
    }

    .site-header__menu ul a:focus-visible {
        outline: 2px solid var(--club-white);
        outline-offset: -2px;
    }

    .site-header__toggle {
        display: block;
    }

    .site-header__toggle.is-active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .site-header__toggle.is-active span:nth-child(2) {
        opacity: 0;
    }
    .site-header__toggle.is-active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* Desktop only: logo left, nav centered independently, dropdown becomes red,
   and third-level flyouts anchor correctly */
@media (min-width: 861px) {
    .site-header__inner {
        display: grid;
        grid-template-columns: auto auto 1fr;
        align-items: center;
    }

    .site-header__branding {
        grid-column: 1;
        justify-self: start;
    }

    .site-header__nav {
        grid-column: 2;
        justify-self: left;
        align-self: end;
    }

    .site-header__toggle {
        grid-column: 3;
    }

    .site-header__menu a {
        font-size: 1.05rem;
    }

    .site-header__menu ul {
        background-color: var(--club-red);
    }

    .site-header__menu ul a {
        color: var(--club-white);
    }

    .site-header__menu ul a:hover,
    .site-header__menu ul a:focus {
        background-color: var(--club-dark);
        color: var(--club-white);
    }

    /* Third-level flyout: sub-menu items need their own li positioned,
       so their own nested dropdown anchors correctly rather than
       falling back to the outer top-level item */
    .site-header__menu ul li {
        position: relative;
    }

    /* Fly the third level out to the RIGHT of its parent item,
       rather than stacking below (which would overlap siblings) */
    .site-header__menu ul ul {
        top: 0;
        left: 100%;
    }
}


/* =============================================================
   4. HERO (shared across homepage + inner pages)
   ============================================================= */

.hero {
    background-image:
        linear-gradient(rgba(26, 26, 26, 0.65), rgba(26, 26, 26, 0.65)),
        url('images/first-team-pitch-2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 100px 20px;
    text-align: center;
}

.hero__inner {
    max-width: 800px;
    margin: 0 auto;
}

.hero__title {
    color: var(--club-white);
    font-size: 2.4rem;
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.2;
}

.hero__subtitle {
    color: #cccccc;
    font-size: 1.1rem;
    margin: 0 0 32px;
}

.hero__cta {
    display: inline-block;
    background-color: var(--club-red);
    color: var(--club-white);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 14px 32px;
    border-radius: 4px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.hero__cta:hover {
    background-color: var(--club-red-dark);
    transform: translateY(-2px);
}

@media (max-width: 860px) {
    .hero {
        padding: 60px 20px;
    }

    .hero__title {
        font-size: 1.8rem;
    }
}


/* =============================================================
   5. HOMEPAGE - OUR SPORTS
   ============================================================= */

.our-sports {
    padding: 60px 20px;
    background-color: #f7f7f7;
}

.our-sports__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.our-sports__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.sport-tile {
    background-color: var(--club-white);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 32px 20px;
    text-align: center;
    text-decoration: none;
    border-top: 4px solid var(--club-red);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sport-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.sport-tile__badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sport-tile__badge--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--club-dark);
    font-size: 2.2rem;
}

.sport-tile__title {
    color: var(--club-dark);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.sport-tile__desc {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 860px) {
    .our-sports__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 544px) {
    .our-sports__grid {
        grid-template-columns: 1fr;
    }
}


/* =============================================================
   6. HOMEPAGE - NEXT MATCH
   ============================================================= */

.next-match {
    padding: 60px 20px;
    background-color: #f7f7f7;
}

.next-match__inner {
    max-width: 800px;
    margin: 0 auto;
}

.next-match__card {
    background-color: var(--club-white);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 32px;
    text-align: center;
    border-top: 4px solid var(--club-red);
}

.next-match__competition {
    color: #777;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.next-match__teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.next-match__team {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--club-dark);
}

.next-match__vs {
    color: var(--club-red);
    font-weight: 600;
    font-size: 0.9rem;
}

.next-match__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.next-match__team-label {
    font-weight: 700;
    color: var(--club-dark);
    margin-bottom: 6px;
}

.next-match__loading {
    color: #999;
    font-style: italic;
    font-size: 0.85rem;
    padding: 8px 0;
    margin: 0;
}

@media (max-width: 860px) {
    .next-match__teams {
        flex-direction: column;
        gap: 8px;
    }
}


/* =============================================================
   7. HOMEPAGE - NEWS GRID
   ============================================================= */

.news-grid {
    padding: 60px 20px;
}

.news-grid__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.news-grid__posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.news-card {
    background-color: var(--club-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.news-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-card__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card__body {
    padding: 20px;
}

.news-card__date {
    color: var(--club-red);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.news-card__title {
    color: var(--club-dark);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 8px 0;
    line-height: 1.3;
}

.news-card__excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 860px) {
    .news-grid__posts {
        grid-template-columns: 1fr;
    }
}


/* =============================================================
   8. FIXTURES, RESULTS & TABLE PAGE (Football)
   ============================================================= */

.fixtures-page {
    padding: 60px 20px;
}

.fixtures-page__inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* Base look now lives in .page-title (section 2) — this only overrides spacing */
.fixtures-page__title {
    margin-bottom: 40px;
}

.fixtures-page__team-select {
    text-align: center;
    margin-bottom: 32px;
}

.fixtures-page__team-select label {
    font-weight: 600;
    color: var(--club-dark);
    margin-right: 10px;
}

.fixtures-page__team-select select {
    padding: 8px 14px;
    border: 2px solid var(--club-red);
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--club-dark);
    background-color: var(--club-white);
    cursor: pointer;
}

.fixtures-page__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.fixtures-page__table,
.fixtures-page__fixtures {
    background-color: var(--club-white);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 24px;
    border-top: 4px solid var(--club-red);
    min-width: 0;
    overflow-x: auto;
}

.fixtures-page__fixtures {
    max-height: 700px;
    overflow-y: auto;
}

.fixtures-page__fixtures::-webkit-scrollbar {
    width: 8px;
}

.fixtures-page__fixtures::-webkit-scrollbar-track {
    background: #f2f2f2;
    border-radius: 4px;
}

.fixtures-page__fixtures::-webkit-scrollbar-thumb {
    background-color: var(--club-red);
    border-radius: 4px;
}

/* Force the FA widgets to fill their container instead of using their own fixed width */
.fixtures-page__table [id^="lrep"],
.fixtures-page__fixtures [id^="lrep"] {
    width: 100% !important;
}

.fixtures-page__table table,
.fixtures-page__fixtures table {
    width: 100% !important;
}

@media (max-width: 860px) {
    .fixtures-page__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}


/* =============================================================
   9. HISTORY PAGE (Football)
   ============================================================= */

.history-page {
    padding: 60px 20px;
}

.history-page__inner {
    max-width: 800px;
    margin: 0 auto;
}

/* .history-page__title needs no overrides — matches .page-title default */

/* .history-page__intro needs no overrides — matches .page-intro default */

.timeline {
    position: relative;
    padding-left: 32px;
    border-left: 3px solid var(--club-red);
}

.timeline__item {
    position: relative;
    padding-bottom: 40px;
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__item::before {
    content: '';
    position: absolute;
    left: -41px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--club-red);
    border: 3px solid var(--club-white);
    box-shadow: 0 0 0 2px var(--club-red);
}

.timeline__item--current::before {
    background-color: var(--club-dark);
    box-shadow: 0 0 0 2px var(--club-dark);
}

.timeline__year {
    display: inline-block;
    background-color: var(--club-dark);
    color: var(--club-white);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.timeline__item--current .timeline__year {
    background-color: var(--club-red);
}

.timeline__content h3 {
    color: var(--club-dark);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.timeline__content p {
    color: #444;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 860px) {
    .timeline {
        padding-left: 24px;
    }

    .timeline__item::before {
        left: -33px;
        width: 14px;
        height: 14px;
    }
}


/* =============================================================
   10. GROUND PAGE (Football)
   ============================================================= */

.ground-page__inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Base look now lives in .page-intro (section 2) — this only overrides
   color/line-height/width, since this page's intro is darker and wider */
.ground-page__intro {
    color: #444;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.ground-page__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.ground-card {
    background-color: var(--club-white);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 24px;
    border-top: 4px solid var(--club-red);
}

.ground-card h3 {
    color: var(--club-dark);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 10px;
}

.ground-card p {
    color: #444;
    line-height: 1.6;
    margin: 0;
}

.ground-page__map {
    margin-bottom: 50px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.ground-page__map iframe {
    display: block;
}

.ground-page__map + h2 {
    margin-top: 50px;
}


/* =============================================================
   11. SPONSOR BANNER
   ============================================================= */

.sponsor-banner {
    background-color: var(--club-white);
    border-bottom: 3px solid var(--club-red);
    padding: 20px 0;
    overflow: hidden;
}

.sponsor-banner__track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    width: max-content;
    margin: 0 auto;
}

.sponsor-banner__track.is-scrolling {
    justify-content: flex-start;
    animation: sponsor-scroll linear infinite;
}

.sponsor-banner__logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.sponsor-banner__link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

@keyframes sponsor-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}


/* =============================================================
   12. SITE FOOTER
   ============================================================= */

.site-footer {
    background-color: var(--club-dark);
    color: #cccccc;
    padding: 60px 20px 0;
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.site-footer__col h3 {
    color: var(--club-white);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 20px;
}

.site-footer__links,
.site-footer__contact {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer__links li,
.site-footer__contact li {
    margin-bottom: 12px;
    line-height: 1.5;
}

.site-footer__links a,
.site-footer__contact a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer__links a:hover,
.site-footer__contact a:hover {
    color: var(--club-red);
}

.site-footer__col--logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-footer__logo {
    max-width: 140px;
    height: auto;
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}

@media (max-width: 860px) {
    .site-footer__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .site-footer__col--logo {
        order: -1;
    }
}


/* =============================================================
   13. LEGAL PAGES (Accessibility, Privacy, etc.)
   ============================================================= */

.legal-page {
    padding: 60px 20px;
}

.legal-page__inner {
    max-width: 800px;
    margin: 0 auto;
}

/* Base look now lives in .page-title (section 2) — legal pages are
   left-aligned with tighter spacing, so those are overridden here */
.legal-page__title {
    text-align: left;
    margin-bottom: 8px;
}

.legal-page__updated {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 40px;
}

.legal-page__inner h2 {
    color: var(--club-dark);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 36px 0 14px;
}

.legal-page__inner p {
    color: #444;
    line-height: 1.7;
    margin-bottom: 16px;
}

.legal-page__inner ul {
    margin: 0 0 16px;
    padding-left: 20px;
}

.legal-page__inner li {
    color: #444;
    line-height: 1.7;
    margin-bottom: 8px;
}

.legal-page__inner a {
    color: var(--club-red);
    text-decoration: underline;
}


/* =============================================================
   14. TEAMS PAGE (Football)
   ============================================================= */

.teams-page {
    padding: 60px 20px;
}

.teams-page__inner {
    max-width: 1000px;
    margin: 0 auto;
}

.team-card {
    background-color: var(--club-white);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 32px;
    border-top: 4px solid var(--club-red);
    margin-bottom: 30px;
}

.team-card:last-child {
    margin-bottom: 0;
}

.team-card__title {
    color: var(--club-dark);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 12px;
}

.team-card__desc {
    color: #444;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Expand/collapse toggle button */
.team-card__toggle {
    display: inline-block;
    background-color: var(--club-red);
    color: var(--club-white);
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.85rem;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.team-card__toggle:hover {
    background-color: var(--club-red-dark);
}

/* Collapsible content area - height-capped, animated open/closed via JS toggling .is-open */
.team-card__collapsible {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.team-card__collapsible.is-open {
    max-height: 2000px;
    margin-top: 24px;
}

.team-card__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.team-card__widget {
    min-width: 0;
    overflow-x: auto;
}

.team-card__widget [id^="lrep"],
.team-card__widget table {
    width: 100% !important;
}

.team-card__next-match {
    background-color: #f7f7f7;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.team-card__next-match-label {
    font-weight: 700;
    color: var(--club-dark);
    margin-right: 6px;
}

.team-card__next-match-competition {
    color: #666;
}

.team-card__widget--fixtures {
    max-height: 500px;
    overflow-y: auto;
}

@media (max-width: 860px) {
    .team-card__grid {
        grid-template-columns: 1fr;
    }

    .team-card__widget--fixtures {
        max-height: 400px !important;
    }
}


/* =============================================================
   15. CONTACT PAGE
   ============================================================= */

.whsc-contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.whsc-contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.whsc-info-card,
.whsc-contact-form-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 28px;
}

.whsc-info-card h2,
.whsc-contact-form-card h2 {
    color: var(--club-red);
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.whsc-contact-detail {
    margin-bottom: 18px;
}

.whsc-contact-detail:last-child {
    margin-bottom: 0;
}

.whsc-contact-detail strong {
    display: block;
    color: var(--club-dark);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.whsc-contact-detail p {
    margin: 0;
    line-height: 1.5;
}

.whsc-contact-detail a {
    color: var(--club-red);
    text-decoration: none;
}

.whsc-contact-detail a:hover {
    text-decoration: underline;
}

.contact-page__map iframe {
    display: block;
    border-radius: 6px;
}

/* Contact form */
.whsc-form-row {
    margin-bottom: 18px;
}

.whsc-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--club-dark);
}

.whsc-required {
    color: var(--club-red);
}

.whsc-form-row input[type="text"],
.whsc-form-row input[type="email"],
.whsc-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

.whsc-form-row textarea {
    resize: vertical;
}

.whsc-form-row input:focus,
.whsc-form-row textarea:focus {
    outline: none;
    border-color: var(--club-red);
}

/* Honeypot - hidden from humans, visible to bots that ignore CSS */
.whsc-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

.whsc-btn-primary {
    background: var(--club-red);
    color: var(--club-white);
    border: none;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

@media (hover: hover) {
    .whsc-btn-primary:hover {
        background: var(--club-red-dark);
    }
}

.whsc-form-message {
    padding: 14px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.whsc-form-success {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
}

.whsc-form-error {
    background: #fdecea;
    border: 1px solid #f5b7b1;
    color: var(--club-red);
}

.whsc-form-error ul {
    margin: 0;
    padding-left: 20px;
}

@media (max-width: 768px) {
    .whsc-contact-wrapper {
        grid-template-columns: 1fr;
    }
}


/* =============================================================
   16. CRICKET - PLAY-CRICKET LIVE SCORE WIDGET
   ============================================================= */

.lsw_container,
.lsw-col-12 {
    min-height: 40px;
}


/* =============================================================
   17. SPORT PAGES (Netball, Bowls, etc.)
   ============================================================= */

.sport-page {
    padding: 60px 20px;
}

.sport-page__inner {
    max-width: 800px;
    margin: 0 auto;
}

/* Base look now lives in .page-intro (section 2) — this page's intro
   is darker and has a line-height, so those are overridden here */
.sport-page__intro {
    color: #444;
    line-height: 1.6;
}

.sport-page__badge {
    text-align: center;
    margin-bottom: 30px;
}

.sport-page__badge img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}


/* =============================================================
   18. TEAM PHOTO (replaces hero section on sport pages)
   ============================================================= */

.team-photo {
    overflow: hidden;
    line-height: 0; /* removes the small gap under inline images */
}

.team-photo__image {
    width: 100%;
    height: 360px;
    object-fit: cover;
    object-position: center 28%;
    display: block;
}

.team-photo__caption {
    line-height: normal;
    padding: 20px 20px 2px;
    text-align: center;
}

.team-photo__caption h2 {
    color: var(--club-dark);
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 12px;
}

.team-photo__caption p {
    color: #666;
    font-size: 1.05rem;
    margin: 0;
}

@media (max-width: 860px) {
    .team-photo__caption {
        padding: 24px 20px 20px;
    }

    .team-photo__caption h2 {
        font-size: 1.6rem;
    }
}


/* =============================================================
   19. GET INVOLVED
   ============================================================= */

.get-involved {
    text-align: center;
    padding: 30px 20px;
}

.get-involved .section-heading {
    margin-bottom: 20px;
}

.get-involved p {
    color: #444;
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 30px;
}


/* =============================================================
   20. IMAGE GALLERY (reusable - works on any element with class "image-gallery")
   ============================================================= */

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 30px;
}

.image-gallery img {
    flex: 0 1 calc(33.333% - 11px);
    min-width: 0;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
}

.image-gallery img:hover {
    transform: scale(1.03);
}


/* =============================================================
   21. LIGHTBOX (reusable - works on any element with class "lightbox-gallery")
   ============================================================= */

.lightbox-gallery img {
    cursor: zoom-in;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    z-index: 2000;
}

.lightbox-overlay.is-open {
    display: flex;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-overlay__close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: var(--club-white);
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 8px;
}

.lightbox-overlay__close:hover {
    color: var(--club-red);
}

.lightbox-overlay__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--club-white);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    padding: 0;
}

.lightbox-overlay__nav:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-overlay__nav--prev {
    left: 20px;
}

.lightbox-overlay__nav--next {
    right: 20px;
}

.lightbox-chevron {
    display: block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.lightbox-chevron--prev {
    transform: rotate(90deg);
}

.lightbox-chevron--next {
    transform: rotate(-90deg);
}

@media (max-width: 640px) {
    .lightbox-overlay__nav {
        width: 44px;
        height: 44px;
    }

    .lightbox-chevron {
        width: 11px;
        height: 11px;
    }

    .lightbox-overlay__nav--prev {
        left: 10px;
    }

    .lightbox-overlay__nav--next {
        right: 10px;
    }
}


/* =============================================================
   22. WHAT3WORDS
   ============================================================= */

.w3w-address {
    display: inline-block;
    color: var(--club-dark);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

p.w3w-container {
    text-align: center;
}

.w3w-address:hover {
    color: var(--club-red);
    text-decoration: underline;
}

.w3w-slashes {
    color: #E11F26;
    font-weight: 800;
}


/* =============================================================
   23. COMPANY NOTICE (statutory disclosure)
   ============================================================= */

.company-notice {
    max-width: 700px;
    margin: 0 auto 30px;
    padding: 28px 32px;
    background-color: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.company-notice__title {
    color: var(--club-dark);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 20px;
}

.company-notice__list {
    margin: 0;
}

.company-notice__row {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
}

.company-notice__row:last-child {
    border-bottom: none;
}

.company-notice__row dt {
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
}

.company-notice__row dd {
    margin: 0;
    color: var(--club-dark);
    font-size: 0.9rem;
    line-height: 1.5;
}

.company-notice__ref {
    display: block;
    color: #999;
    font-size: 0.78rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    margin-top: 2px;
}

@media (max-width: 640px) {
    .company-notice {
        padding: 20px;
    }

    .company-notice__row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}


/* =============================================================
   24. MATCH PROGRAMME DOWNLOAD (Next Match cards)
   ============================================================= */

.next-match__programme-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--club-red);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
}

.next-match__programme-link:hover {
    text-decoration: underline;
}


/* =============================================================
   25. CLUB ADMIN PANEL
   ============================================================= */

.club-admin-page {
    padding: 60px 20px;
}

.club-admin-page__inner {
    max-width: 800px;
    margin: 0 auto;
}

.club-admin-page__denied {
    text-align: center;
    padding: 100px 20px;
    color: #666;
    font-size: 1.1rem;
}

.club-admin-notice {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.club-admin-notice--success {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
}

.club-admin-notice--error {
    background: #fdecea;
    border: 1px solid #f5b7b1;
    color: var(--club-red);
}

.club-admin-card {
    background-color: var(--club-white);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 32px;
    border-top: 4px solid var(--club-red);
    margin-bottom: 40px;
}

.club-admin-card__title {
    color: var(--club-dark);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.club-admin-card__desc {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.club-admin-form__row {
    margin-bottom: 18px;
}

.club-admin-form__row label {
    display: block;
    font-weight: 600;
    color: var(--club-dark);
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.club-admin-form__row input[type="text"],
.club-admin-form__row input[type="date"],
.club-admin-form__row input[type="file"],
.club-admin-form__row select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

.club-admin-form__fieldset {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 16px 20px 4px;
    margin-bottom: 20px;
}

.club-admin-form__fieldset legend {
    font-weight: 700;
    color: var(--club-dark);
    padding: 0 8px;
}

.club-admin-form__submit {
    background: var(--club-red);
    color: var(--club-white);
    border: none;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.club-admin-form__submit:hover {
    background: var(--club-red-dark);
}

.club-admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
}

.club-admin-table th,
.club-admin-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.club-admin-table th {
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

.club-admin-table__delete {
    background: none;
    border: none;
    color: var(--club-red);
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
    padding: 0;
}

.club-admin-empty {
    color: #999;
    font-style: italic;
    margin-top: 20px;
}


/* =============================================================
   26. MATCH PROGRAMMES ARCHIVE PAGE
   ============================================================= */

.programmes-page {
    padding: 60px 20px;
}

.programmes-page__inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.programmes-page__empty {
    color: #999;
    font-style: italic;
    padding: 40px 0;
}

.programmes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.programme-card {
    display: flex;
    align-items: stretch;
    background-color: var(--club-white);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border-left: 4px solid var(--club-red);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.programme-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.programme-card__thumb {
    flex-shrink: 0;
    width: 110px;
    aspect-ratio: 3 / 4;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.programme-card__thumb canvas,
.programme-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.programme-card__thumb-fallback {
    color: #aaa;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.programme-card__body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 20px;
    gap: 4px;
}

.programme-card__fixture {
    font-weight: 700;
    color: var(--club-dark);
    font-size: 1.05rem;
}

.programme-card__date {
    color: var(--club-red);
    font-size: 1.15rem;
    font-weight: 700;
}

.programme-card__download {
    flex-shrink: 0;
    align-self: center;
    margin-right: 20px;
    background-color: var(--club-red);
    color: var(--club-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px 20px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.programme-card__download:hover {
    background-color: var(--club-red-dark);
}

@media (max-width: 544px) {
    .programme-card {
        flex-wrap: wrap;
    }

    .programme-card__thumb {
        width: 90px;
    }

    .programme-card__download {
        width: 100%;
        margin: 0;
        text-align: center;
        order: 3;
    }
}

/* Pagination */

.programmes-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
}

.programmes-pagination__link {
    color: var(--club-red);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.programmes-pagination__link:hover {
    text-decoration: underline;
}

.programmes-pagination__status {
    color: #666;
    font-size: 0.85rem;
}