@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

/* =====================================================
   1. GLOBAL SETTINGS AND BRAND COLOURS
   ===================================================== */

:root {
    --purple: #762c61;
    --purple-dark: #562049;
    --green: #659447;
    --orange: #ef8d28;
    --gold: #e9b63b;
    --ink: #302333;
    --muted: #6d6470;
    --cream: #fffaf1;
    --line: #eee2d2;
    --white: #ffffff;
    --header-border: #f0e8ef;
    --header-shadow: 0 4px 20px rgba(51, 32, 48, 0.06);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    font: 16px/1.7 'DM Sans', Arial, sans-serif;
    background: #fff;
}

img {
    max-width: 100%;
}

a {
    color: var(--purple);
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid rgba(118, 44, 97, 0.35);
    outline-offset: 3px;
}


/* =====================================================
   2. TOP INFORMATION BAR
   ===================================================== */

.topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 46px;
    padding: 9px 5%;
    background: var(--purple);
    color: #fff;
    font-size: 12px;
    line-height: 1.5;
}

.topline span {
    flex: 1;
    text-align: center;
}

.topline a {
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.topline a:hover {
    text-decoration: underline;
}


/* =====================================================
   3. MAIN WEBSITE HEADER
   Compatible with:
   <header class="site-header">
   ===================================================== */

header.site-header {
    position: relative;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 17px 5%;

    gap: 28px;

    background: #fff;
    border-bottom: 1px solid var(--header-border);
    box-shadow: var(--header-shadow);
}

/* Club logo and name */

.site-header .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    flex: 0 0 auto;
    min-width: 0;
    margin: 0;
    padding: 0;

    color: var(--purple);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-decoration: none;
}

.site-header .brand img {
    display: block;
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    object-fit: contain;
}

.site-header .brand span {
    display: flex;
    flex-direction: column;
    gap: 6px;

    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.04em;
}

.site-header .brand small {
    display: block;
    margin-top: 0;

    color: var(--green);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    white-space: nowrap;
}


/* =====================================================
   4. DESKTOP NAVIGATION
   ===================================================== */

#main-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
    margin: 0;
    padding: 0;
    gap: 3px;
}

#main-navigation > a,
#main-navigation .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;
    min-height: 42px;
    margin: 0;
    padding: 9px 10px;

    border: 0;
    border-radius: 7px;
    background: transparent;

    color: var(--ink);
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

#main-navigation > a:hover,
#main-navigation .dropdown-toggle:hover {
    background: #f8f1f7;
    color: var(--purple);
}

#main-navigation > a:focus-visible,
#main-navigation .dropdown-toggle:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 2px;
}


/* =====================================================
   5. MEMBERSHIP DROPDOWN
   ===================================================== */

#main-navigation .nav-dropdown {
    position: relative;

    display: inline-flex;
    align-items: center;

    flex: 0 0 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}

#main-navigation .dropdown-toggle {
    gap: 7px;
    appearance: none;
    -webkit-appearance: none;
}

#main-navigation .dropdown-toggle .arrow {
    display: inline-block;
    font-size: 11px;
    line-height: 1;

    transition: transform 0.2s ease;
}

#main-navigation .nav-dropdown.open .dropdown-toggle .arrow {
    transform: rotate(180deg);
}


/* Hide the dropdown by default */

#main-navigation .dropdown-menu {
    display: none;

    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 2000;

    width: 245px;
    min-width: 245px;
    margin: 0;
    padding: 8px;

    background: #fff;
    border: 1px solid var(--header-border);
    border-radius: 10px;
    box-shadow: 0 14px 35px rgba(48, 35, 51, 0.14);
}


/* Show dropdown on click */

#main-navigation .nav-dropdown.open > .dropdown-menu {
    display: block;
}


/* Dropdown menu links */

#main-navigation .dropdown-menu a {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 10px 12px;

    border-radius: 6px;
    background: #fff;

    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    white-space: normal;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

#main-navigation .dropdown-menu a:hover {
    background: #f8f1f7;
    color: var(--purple);
}


/* Desktop hover and keyboard support */

@media (min-width: 1101px) {
    #main-navigation .nav-dropdown:hover > .dropdown-menu,
    #main-navigation .nav-dropdown:focus-within > .dropdown-menu {
        display: block;
    }

    #main-navigation .nav-dropdown:hover .dropdown-toggle .arrow {
        transform: rotate(180deg);
    }
}


/* =====================================================
   6. LOGIN AND ACCOUNT BUTTONS
   ===================================================== */

#main-navigation > a.login {
    margin-left: 5px;
    padding: 10px 16px;

    border-radius: 25px;
    background: var(--purple);
    color: #fff;
    font-weight: 700;
}

#main-navigation > a.login:hover {
    background: var(--purple-dark);
    color: #fff;
}

.site-header .toggle {
    display: none;
}


/* =====================================================
   7. HERO SECTION
   ===================================================== */

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;

    min-height: 500px;
    padding: 65px 7%;

    background:
        radial-gradient(
            circle at 90% 15%,
            #f8e8be 0,
            transparent 30%
        ),
        linear-gradient(120deg, #fffaf1, #fff 65%);
}

.herotext {
    max-width: 680px;
}

.eyebrow,
.pagehero > span {
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.19em;
}

.hero h1,
.pagehero h1 {
    margin: 16px 0;
    font: 700 clamp(36px, 5vw, 62px)/1.12
        'Playfair Display', Georgia, serif;
}

.hero h1 em {
    color: var(--purple);
}

p {
    color: var(--muted);
}

.hero p {
    max-width: 600px;
    font-size: 18px;
}

.hero-logo {
    width: min(34vw, 360px);
    border-radius: 50%;
    mix-blend-mode: multiply;
}

.motto {
    margin-top: 25px;
    color: var(--purple);
    font-weight: 700;
}


/* =====================================================
   8. BUTTONS
   ===================================================== */

.btn {
    display: inline-block;

    padding: 12px 22px;
    border: 0;
    border-radius: 28px;

    background: var(--purple);
    color: #fff;

    font: 700 14px 'DM Sans', Arial, sans-serif;
    text-align: center;
    text-decoration: none;

    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background: var(--purple-dark);
    color: #fff;
}

.btn.secondary {
    border: 1px solid var(--purple);
    background: #fff;
    color: var(--purple);
}

.btn.secondary:hover {
    background: #f8f1f7;
}


/* =====================================================
   9. CONTENT SECTIONS AND CARDS
   ===================================================== */

.section {
    max-width: 1300px;
    margin: 0 auto;
    padding: 55px max(6%, calc((100% - 1100px) / 2));
}

.section h2,
.band h2 {
    color: var(--purple);
    font: 700 clamp(26px, 3vw, 38px)/1.25
        'Playfair Display', Georgia, serif;
}

.section h3 {
    color: var(--purple);
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 30px;
}

.cards article {
    padding: 24px;

    border: 1px solid var(--line);
    border-radius: 15px;

    background: #fff;
    box-shadow: 0 8px 28px rgba(81, 36, 73, 0.035);
}

.cards article p {
    font-size: 14px;
}


/* =====================================================
   10. COLOURED CONTENT BAND
   ===================================================== */

.band {
    padding: 42px 7%;
    background: var(--purple);
    color: #fff;
    text-align: center;
}

.band h2,
.band p {
    color: #fff;
}


/* =====================================================
   11. INNER PAGE HERO
   ===================================================== */

.pagehero {
    padding: 55px 7%;
    background: linear-gradient(110deg, #fff7e8, #f8f0f7);
}

.pagehero h1 {
    font-size: clamp(34px, 4vw, 52px);
}

.pagehero p {
    margin-bottom: 0;
}


/* =====================================================
   12. FORMS
   ===================================================== */

.formbox {
    max-width: 700px;
    margin: 25px auto 55px;
    padding: 28px;

    border: 1px solid var(--line);
    border-radius: 18px;

    background: #fff;
    box-shadow: 0 12px 35px rgba(52, 35, 51, 0.045);
}

form label {
    display: block;
    margin-bottom: 15px;
    font-size: 13px;
    font-weight: 700;
}

input,
textarea,
select {
    display: block;

    width: 100%;
    margin-top: 6px;
    padding: 12px;

    border: 1px solid #d9cbd6;
    border-radius: 8px;

    background: #fff;
    color: var(--ink);
    font: inherit;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--purple);
    outline: 2px solid rgba(118, 44, 97, 0.12);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

form .btn {
    margin-top: 5px;
}

.muted {
    font-size: 13px;
}


/* =====================================================
   13. FLASH MESSAGES AND ALERTS
   ===================================================== */

.flash,
.alert {
    max-width: 1100px;
    margin: 18px auto;
    padding: 14px 18px;

    border-radius: 10px;
    background: #fff1d8;
    color: #69430a;
}

.alert {
    background: #fde8ed;
    color: #7b1d39;
}


/* =====================================================
   14. BLOCKQUOTES, LISTS AND TABLES
   ===================================================== */

blockquote {
    margin: 20px 0;
    padding: 20px 25px;

    border-left: 4px solid var(--orange);
    background: var(--cream);

    color: var(--purple);
    font: 600 23px 'Playfair Display', Georgia, serif;
}

ol,
ul {
    padding-left: 24px;
    color: var(--muted);
}

li {
    padding: 5px 0;
}

.tablewrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--cream);
    color: var(--purple);
}

td form {
    margin: 0;
}


/* =====================================================
   15. INLINE FORMS AND CHECKBOXES
   ===================================================== */

.inlineform {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.inlineform select {
    width: auto;
    min-width: 100px;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.check input {
    width: auto;
    margin: 0;
}


/* =====================================================
   16. ADMIN DASHBOARD
   ===================================================== */

.adminmain {
    max-width: 1250px;
    margin: auto;
    padding: 30px 5%;
}

.adminpanel {
    margin: 28px 0;
    padding: 22px;

    border: 1px solid var(--line);
    border-radius: 14px;
}

.adminpanel h2 {
    color: var(--purple);
    font: 700 24px 'Playfair Display', Georgia, serif;
}

.adminform {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.adminform label:nth-child(5),
.adminform .check {
    grid-column: 1 / -1;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.stats div {
    padding: 20px;
    border-radius: 12px;
    background: var(--cream);
}

.stats b {
    display: block;
    color: var(--purple);
    font-size: 30px;
}

.stats span {
    color: var(--muted);
    font-size: 13px;
}

.small {
    padding: 7px 12px;
    font-size: 12px;
}

.danger {
    background: #9d2546;
}


/* =====================================================
   17. FOOTER
   ===================================================== */

footer {
    background: #291e2b;
    color: #fff;
}

.foot {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 30px;
    padding: 35px 6%;
}

.foot img {
    width: 95px;
    height: 95px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
}

.foot h3 {
    color: #fff;
}

.foot p,
.foot a {
    color: #e9dfe8;
    font-size: 13px;
}

.copyright {
    padding: 14px;
    border-top: 1px solid #ffffff22;
    color: #e9dfe8;
    font-size: 12px;
    text-align: center;
}


/* =====================================================
   18. TABLET AND SMALL LAPTOP
   ===================================================== */

@media (max-width: 1400px) and (min-width: 1101px) {

    header.site-header {
        gap: 16px;
        padding-right: 3%;
        padding-left: 3%;
    }

    .site-header .brand {
        gap: 9px;
    }

    .site-header .brand img {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
    }

    .site-header .brand span {
        font-size: 14px;
    }

    .site-header .brand small {
        font-size: 9px;
        letter-spacing: 1.2px;
    }

    #main-navigation {
        gap: 0;
    }

    #main-navigation > a,
    #main-navigation .dropdown-toggle {
        padding-right: 7px;
        padding-left: 7px;
        font-size: 11px;
    }

    #main-navigation > a.login {
        margin-left: 2px;
        padding-right: 11px;
        padding-left: 11px;
    }
}


/* =====================================================
   19. RESPONSIVE NAVIGATION
   Switch to mobile menu at 1100px
   ===================================================== */

@media (max-width: 1100px) {

    /* Top information bar */

    .topline {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px 18px;
        padding: 10px 4%;
        font-size: 12px;
    }

    .topline span {
        flex: 1 1 100%;
        text-align: center;
    }


    /* Header layout */

    header.site-header {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 5%;
    }

    .site-header .brand {
        gap: 10px;
    }

    .site-header .brand img {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
    }

    .site-header .brand span {
        font-size: 15px;
    }

    .site-header .brand small {
        font-size: 10px;
        letter-spacing: 1.3px;
    }


    /* Mobile menu button */

    .site-header .toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        margin-left: auto;
        padding: 0;

        border: 1px solid var(--line);
        border-radius: 8px;

        background: #fff;
        color: var(--purple);
        font-size: 24px;
        line-height: 1;
    }

    .site-header .toggle:hover {
        background: #f8f1f7;
    }


    /* Hide navigation until the button is clicked */

    #main-navigation {
        display: none;

        flex: 0 0 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 3px;

        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 12px 0 0;

        border-top: 1px solid var(--header-border);
    }

    #main-navigation.show {
        display: flex;
    }


    /* Main menu links */

    #main-navigation > a,
    #main-navigation .dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;

        width: 100%;
        min-height: 44px;
        padding: 11px 14px;

        border-radius: 7px;
        font-size: 14px;
        text-align: left;
        white-space: normal;
    }

    #main-navigation > a:hover,
    #main-navigation .dropdown-toggle:hover {
        background: #f8f1f7;
    }


    /* Membership dropdown becomes an expandable section */

    #main-navigation .nav-dropdown {
        display: flex;
        flex-direction: column;
        align-items: stretch;

        width: 100%;
        min-width: 0;
    }

    #main-navigation .dropdown-toggle {
        flex: 0 0 auto;
        appearance: none;
        -webkit-appearance: none;
    }


    /* Disable desktop hover behaviour on mobile */

    #main-navigation .dropdown-menu,
    #main-navigation .nav-dropdown:hover > .dropdown-menu,
    #main-navigation .nav-dropdown:focus-within > .dropdown-menu {
        display: none;

        position: static;
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 4px 0 5px 14px;

        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: #fff;
    }

    #main-navigation .nav-dropdown.open > .dropdown-menu {
        display: block;
    }


    /* Dropdown links */

    #main-navigation .dropdown-menu a {
        display: flex;
        align-items: center;

        width: 100%;
        min-height: 42px;
        padding: 10px 14px;

        border-radius: 6px;
        font-size: 13px;
        white-space: normal;
    }


    /* Account buttons */

    #main-navigation > a.login {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: fit-content;
        min-width: 110px;
        margin: 7px 0;
        padding: 11px 22px;

        border-radius: 25px;
    }


    /* Content grids */

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-logo {
        width: 28vw;
    }

}


/* =====================================================
   20. MOBILE PHONES
   ===================================================== */

@media (max-width: 650px) {

    .topline {
        gap: 5px 12px;
        font-size: 10px;
    }

    .site-header .brand img {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
    }

    .site-header .brand span {
        font-size: 13px;
    }

    .site-header .brand small {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .hero {
        display: block;
        min-height: auto;
        padding: 45px 6%;
    }

    .hero-logo {
        display: block;
        width: 190px;
        max-width: 75%;
        margin: 28px auto 0;
    }

    .hero h1 {
        font-size: 39px;
    }

    .hero p {
        font-size: 16px;
    }

    .section {
        padding: 38px 6%;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .foot {
        grid-template-columns: 1fr;
    }

    .adminform {
        grid-template-columns: 1fr;
    }

    .adminform label:nth-child(5),
    .adminform .check {
        grid-column: auto;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .formbox {
        margin: 20px 5%;
        padding: 20px;
    }

    .pagehero {
        padding: 40px 6%;
    }

    .inlineform {
        display: block;
    }

    .inlineform select {
        width: 100%;
        margin-bottom: 6px;
    }

}


/* =====================================================
   21. VERY SMALL PHONES
   ===================================================== */

@media (max-width: 380px) {

    header.site-header {
        padding-right: 4%;
        padding-left: 4%;
    }

    .site-header .brand {
        gap: 7px;
    }

    .site-header .brand img {
        width: 43px;
        height: 43px;
        flex-basis: 43px;
    }

    .site-header .brand span {
        font-size: 11px;
    }

    .site-header .brand small {
        font-size: 8px;
        letter-spacing: 0.7px;
    }

    .site-header .toggle {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .hero h1 {
        font-size: 34px;
    }

}