/* ===== Basic page settings ===== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #FAF8F2;
    color: #292929;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

/* =====resize images to fit on device sreens ===== */
img {
  max-width: 100%;
  height: auto;
  display: block; /* Removes unwanted gaps underneath the image */
}

/* ===== Header ===== */
header {
    position: relative;
    text-align: center;
    padding: 70px 20px;
    background-image: 
        linear-gradient(rgba(0,0,0,0.35),
                        rgba(0,0,0,0.35)),
        url("images/header.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
        }

header h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
}

header p {
    margin: 4px 0 0;
    font-size: 1rem;
}

.header-enquiry {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    z-index: 10;

    display: inline-block;
    padding: 14px 24px;

    background: #800000;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05rem;

    border: 2px solid white;
    border-radius: 6px;

    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.header-enquiry:hover {
    background: #A52A2A;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.5);
}

/* ===== Navigation ===== */

nav {
    background: #720000;
    border-top: 1px solid #5C0000;
    border-bottom: 1px solid #5C0000;
}

.nav-inner {
    position: relative;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main navigation */

.main-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;

    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu li {
    margin: 0;
}

nav a {
    display: block;
    padding: 10px 13px;

    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
}

nav a:hover,
nav a:focus {
    background: #A52A2A;
    text-decoration: underline;
}


/* Social icons and Email us */

.social-menu {
    position: absolute;
    top: 0;
    right: 15px;

    height: 100%;

    display: flex;
    align-items: center;

    list-style: none;
    margin: 0;
    padding: 0;
}

.social-icon a {
    padding: 7px 9px;
}

.social-icon img {
    width: 26px;
    height: 26px;
    display: block;
}

.social-icon a:hover img,
.social-icon a:focus img {
    transform: scale(1.15);
}

.email-link {
    margin-left: 5px;
}

.email-link a {
    padding: 10px 8px;
}


/* ===== Mobile hamburger button ===== */

.menu-toggle {
    display: none;

    width: 44px;
    height: 44px;

    margin: 6px auto;
    padding: 0;

    background: transparent;
    border: none;
    cursor: pointer;
}

/* The three lines */

.menu-toggle span {
    display: block;

    width: 28px;
    height: 3px;

    margin: 5px auto;

    background: white;
    border-radius: 2px;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}

/* Hamburger becomes an X */

.menu-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===== Main content ===== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px 30px;
}

.intro {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr);
    gap: 30px;
    align-items: start;
}

.intro h2 {
    margin-top: 12px;
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
}

.intro ul {
    padding-left: 25px;
}

.image-caption {
    margin-top: 0;
    margin-bottom: 8px;
    font-style: italic;
    text-align: left;
    font-size: 0.8rem;
}

.intro-image {
    width: 100%;
    max-width: 521px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ===== Contacts page layout ===== */
.contacts {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contacts h2 {
    text-align: center;
}

.contacts-list {
    display: flex;
    align-items: baseline;
    padding-left: 12rem;
}

.title {
    margin: 0;
    width: 12rem;
    margin-left: -12rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

.indent-text {
    margin: 0;
    flex: 1;
}

/* ===== Phone number reveal ===== */

.show-phone-button {
    margin: 0;
    flex: 1;
    padding: 4px 10px;

    background: #800000;
    color: white;

    border: 1px solid #600000;
    border-radius: 4px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    font-weight: bold;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.show-phone-button:hover,
.show-phone-button:focus {
    background: #a52a2a;
    transform: scale(1.03);
}

.phone-number {
    margin: 0;
    flex: 1;
    padding: 4px 0;
    /*margin-left: 10px;*/
}

.phone-number a {
    color: #800000;
    text-decoration: none;
}

.phone-number a:hover,
.phone-number a:focus {
    text-decoration: underline;
}


/* ===== About page layout ===== */
.photo-left {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 1.4fr);
    gap: 60px;
    align-items: start;
}

.photo-left > div > p:first-child {
    margin-top: 0;
}

.photo-left h2 {
    text-align: center;
    font-family: "Times New Roman", cursive;
    font-style: italic;
    font-size: 19px;
}

/* ===== For tables of items in Program and Balls pages - table2 = two columns, table3 = 3 columns ===== */
.table2 {
    margin-top: 25px;
    padding: 20px;
    background: #F1E9D8;
    border: 1px solid #D5CEC0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr);
    gap: 30px;
    align-items: start;
}

.table3 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 1fr) minmax(0px, 1fr);
    gap: 30px;
    align-items: start;
}

.quote-text {
    width: 50%; 
    margin: 0 auto;
    text-align: center;
    font-family: "Times New Roman", cursive;
    font-style: italic;
    font-size: 28px;
}

/* ===== News box ===== */
.news {
    margin-top: 25px;
    padding: 20px;
    background: #FFFFFF;
    border: 1px solid #D5CEC0;
    border-top: 4px solid #B89B5E;
}

.news h2 {
    margin: 0 0 10px;
    text-align: center;
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 2rem;
    color: #800000;
}

.news h3 {
    margin: 18px 0 5px;
}

.news p {
    margin: 8px 0;
}

/* ===== YouTube Video ===== */
.video-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    align-items: centre;
    aspect-ratio: 16 / 9;
}

.video-container iframe {
    width: 100%;
    height: 100%;
}

/* =========================================================
   SOCIAL MEDIA HUB
   ========================================================= */

.social-hub {
    margin-top: 0px;
    padding: 25px;
    margin-bottom: 30px;

    background: #F1E9D8;

    border: 1px solid #D5CEC0;
}

.social-hub > h2 {
    margin: 0 0 20px;

    text-align: center;

    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 2rem;

    color: #800000;
}


/* Two-column layout */

.social-hub-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 25px;
}


/* Individual social cards */

.social-hub-card {
    display: flex;
    flex-direction: column;

    background: #FFFFFF;

    border: 1px solid #D5CEC0;

    box-shadow:
        0 3px 8px rgba(0,0,0,0.12);

    padding: 20px;
}


/* Heading */

.social-hub-heading {
    display: flex;
    align-items: center;

    gap: 10px;

    border-bottom: 2px solid #B89B5E;

    padding-bottom: 10px;

    margin-bottom: 15px;
}

.social-hub-heading img {
    width: 30px;
    height: 30px;

    display: block;
}

.social-hub-heading h3 {
    margin: 0;

    color: #800000;

    font-size: 1.3rem;
}


/* Facebook post */

.social-post h4 {
    margin: 0 0 8px;

    color: #800000;

    font-size: 1.15rem;
}

.social-post p {
    margin: 8px 0;
}

.social-post img {
    display: block;

    width: 100%;
    height: auto;

    margin-top: 15px;
}


/* Instagram */

.instagram-preview {
    flex: 1;

    text-align: center;

    padding: 20px 10px;
}

.instagram-preview p {
    margin-bottom: 15px;
}

.instagram-preview a {
    color: #800000;

    font-weight: bold;

    text-decoration: none;
}

.instagram-preview a:hover {
    text-decoration: underline;
}


/* Bottom links */

.social-hub-link {
    display: block;

    margin-top: auto;
    padding-top: 15px;

    color: #800000;

    font-weight: bold;

    text-decoration: none;

    text-align: center;
}

.social-hub-link:hover {
    text-decoration: underline;
}


/* =========================================================
   BALLS PAGE
   ========================================================= */

.balls-page {
    max-width: 1100px;
    margin: 0 auto;
}

.balls-page > h2 {
    margin-top: 0;
    text-align: center;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    color: #800000;
}

.balls-page > h3 {
    margin-top: 0;
    text-align: center;

    font-style: bold;
    font-size: 1.2rem;
}

.balls-introduction {
    max-width: 750px;
    margin: 0 auto 30px;
    text-align: center;
}


/* ===== Ball jukebox ===== */

.ball-jukebox {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
    max-width: 1100px;

    margin: 30px auto 10px;
}


/* The area containing the cards */

.ball-carousel {
    position: relative;

    width: 100%;
    min-height: 650px;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;
}


/* Individual ball cards */

.ball-card {
    position: absolute;

    width: 350px;

    padding: 20px;

    background: white;
    border: 1px solid #cccccc;

    box-shadow: 0 4px 12px rgba(0,0,0,0.18);

    text-align: center;

    opacity: 0;

    transform:
        translateX(0)
        scale(0.8);

    transition:
        transform 0.4s ease,
        opacity 0.4s ease,
        box-shadow 0.4s ease;

    pointer-events: none;
}


/* Current card */

.ball-card.active {
    opacity: 1;

    transform:
        translateX(0)
        scale(1);

    z-index: 3;

    box-shadow: 0 8px 20px rgba(0,0,0,0.25);

    pointer-events: auto;
}


/* Card immediately before */

.ball-card.previous {
    opacity: 0.55;

    transform:
        translateX(-360px)
        scale(0.82);

    z-index: 1;
}


/* Card immediately after */

.ball-card.next {
    opacity: 0.55;

    transform:
        translateX(360px)
        scale(0.82);

    z-index: 1;
}


/* Flyer */

.ball-card > a:first-child {
    display: block;
}

.ball-card img {
    display: block;

    width: 100%;
    max-width: 270px;
    height: 365px;

    object-fit: contain;

    margin: 0 auto;
}


/* Ball title */

.ball-card h3 {
    margin: 3px 0 3px;

    color: #800000;

    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-size: 1.35rem;
}


/* Date */

.ball-date {
    /*margin: 0 0 15px;*/
    margin: 18px 0 0px;

    color: #800000;

    font-size: 1.35rem;
    font-weight: bold;
}


/* Links */

.ball-links {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 7px;
}


/* Main buttons */

.ball-button {
    display: inline-block;

    min-width: 120px;

    padding: 9px 18px;

    background: #800000;
    color: white;

    text-decoration: none;
    font-weight: bold;

    border: 1px solid #600000;
    border-radius: 4px;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.ball-button:hover,
.ball-button:focus {
    background: #a52a2a;

    transform: translateY(-1px);

    text-decoration: none;
}


/* Secondary button */

.ball-button.secondary {
    background: #666666;
    border-color: #555555;
}

.ball-button.secondary:hover,
.ball-button.secondary:focus {
    background: #444444;
}


/* Text links */

.ball-text-link {
    color: #800000;
    font-weight: bold;
}

.ball-text-link:hover,
.ball-text-link:focus {
    color: #b00000;
}


/* ===== Previous / next arrows ===== */

.ball-arrow {
    flex: 0 0 auto;

    width: 48px;
    height: 48px;

    padding: 0;

    background: #800000;
    color: white;

    border: none;
    border-radius: 50%;

    font-size: 1.8rem;
    line-height: 1;

    cursor: pointer;

    z-index: 5;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.ball-arrow:hover,
.ball-arrow:focus {
    background: #a52a2a;
    transform: scale(1.08);
}


/* ===== Dots ===== */

.ball-dots {
    display: flex;
    justify-content: center;
    gap: 8px;

    margin: 5px auto 35px;
}

.ball-dot {
    width: 11px;
    height: 11px;

    padding: 0;

    background: #cccccc;

    border: none;
    border-radius: 50%;

    cursor: pointer;
}

.ball-dot.active {
    background: #800000;
    transform: scale(1.25);
}


/* =========================================================
   BALL VIEW CONTROLS
   ========================================================= */

.ball-view-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 25px auto 10px;
}

.view-button {
    padding: 8px 16px;

    background: white;
    color: #800000;

    border: 1px solid #800000;
    border-radius: 4px;

    font-weight: bold;
    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.view-button:hover,
.view-button:focus {
    background: #f1f788;
}

.view-button.active {
    background: #800000;
    color: white;
}


/* =========================================================
   GRID VIEW
   ========================================================= */

.ball-jukebox.grid-mode {
    display: block;
}

.ball-jukebox.grid-mode .ball-arrow {
    display: none;
}

.ball-jukebox.grid-mode .ball-carousel {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(280px, 1fr));

    gap: 20px;

    min-height: 0;

    overflow: visible;

    align-items: start;
}


.ball-jukebox.grid-mode .ball-card,
.ball-jukebox.grid-mode .ball-card.active,
.ball-jukebox.grid-mode .ball-card.previous,
.ball-jukebox.grid-mode .ball-card.next {

    position: static;

    width: auto;
    height: 680px;

    opacity: 1;

    transform: none;

    pointer-events: auto;

    z-index: auto;

    display: flex;
    flex-direction: column;

    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.ball-jukebox.grid-mode .ball-links {
    margin-top: auto;
}

/* Make the grid cards a little more compact */

.ball-jukebox.grid-mode .ball-card img {
    height: 380px;
}


/* In grid view the navigation dots aren't necessary */

.ball-jukebox.grid-mode + .ball-dots {
    display: none;
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 15px 20px 25px;
    font-size: 0.75rem;
    color: #5A5752;
}

/* ===== Mobile layout ===== */
@media (max-width: 700px) {

    /* ===== Mobile navigation ===== */

    .nav-inner {
        display: block;
    }

    /* Hamburger */

    .menu-toggle {
        display: block;
    }

    /* Main menu is hidden until hamburger is opened */

    .main-menu {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .main-menu.show {
        display: flex;
    }

    .main-menu li {
        width: 100%;
    }

    .main-menu a {
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }


    /* Social menu is hidden until hamburger is opened */

    .social-menu {
        position: static;

        display: none;

        height: auto;
        width: 100%;

        justify-content: center;
        align-items: center;

        text-align: center;
    }

    .social-menu.show {
        display: flex;
    }

    .social-icon {
        display: inline-flex;
    }

    .social-icon a {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .social-start {
        margin-left: 0;
    }

    .email-link {
        margin-left: 0;
    }

    .email-link a {
        padding: 10px 8px;
    }


    /* ===== Mobile page layout ===== */

    main {
        padding: 20px 15px;
    }

    .intro {
        display: block;
    }

    .intro-image {
        margin-top: 20px;
    }

    .photo-left {
        display: block;
    }

    .table2 {
        display: block;
    }

    .table3 {
        display: block;
    }

    .news {
        margin-top: 25px;
        padding: 15px;
    }

    .title {
        width: 11rem;
        margin-left: -11rem;
    }


    /* ===== Social media hub ===== */

    .social-hub {
        margin-top: 25px;
        padding: 15px;
        background: #f1f788;
        border: 1px solid #cccc66;
    }

    .social-hub > h2 {
        font-size: 1.6rem;
    }

    .social-hub-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .social-hub-card {
        padding: 15px;
    }

    .facebook-feed {
        max-width: 500px;
        margin: 30px auto;
        text-align: center;
    }

    /* ===== Mobile phone display ===== */

    .show-phone-button {
        display: block;
        margin: 8px auto;
    }

    .phone-number {
        display: block;
        margin-left: 0;
    }

    
    /* ===== Balls Page ===== */
    .balls-page > h2 {
        font-size: 1.7rem;
    }


    .balls-introduction {
        text-align: left;
    }


    .ball-jukebox {
        margin-top: 20px;
    }


    .ball-carousel {
        min-height: 590px;
    }


    .ball-card {
        width: 330px;
        max-width: 100%;
        padding: 15px;
        box-sizing: border-box;
    } 


    .ball-card img {
        height: 320px;
    }


    /*
       On phones we don't show the neighbouring
       cards because there isn't enough room.
    */

    .ball-card.previous,
    .ball-card.next {
        opacity: 0;
        transform: translateX(0) scale(0.8);
    }


    .ball-arrow {
        width: 40px;
        height: 40px;

        font-size: 1.5rem;
    }


    .ball-card h3 {
        font-size: 1.15rem;
    }


/* ===== Balls grid on mobile ===== */

.ball-jukebox.grid-mode .ball-carousel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    min-height: 0;
}

.ball-jukebox.grid-mode .ball-card,
.ball-jukebox.grid-mode .ball-card.active,
.ball-jukebox.grid-mode .ball-card.previous,
.ball-jukebox.grid-mode .ball-card.next {
    position: static;
    display: flex;

    box-sizing: border-box;

    width: 100%;
    max-width: 330px;

    height: 600px;
    min-height: 620px;

    margin-left: auto;
    margin-right: auto;

    padding: 15px;

    opacity: 1;
    transform: none;

    pointer-events: auto;
    z-index: auto;

    flex-direction: column;
}

.ball-jukebox.grid-mode .ball-card img {
    width: 100%;
    height: 340px;
    object-fit: contain;
    flex-shrink: 0;
}

    /* ===== Mobile enquiry button ===== */

    .header-enquiry {
        top: auto;
        bottom: 15px;
        left: 50%;
        right: auto;

        transform: translateX(-50%);

        padding: 8px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .header-enquiry:hover {
        transform: translateX(-50%) scale(1.05);
    }


    /* ===== Mobile quotation ===== */

    .quote-text {
        width: 100%;
        font-family: "Times New Roman", cursive;
        font-style: italic;
        font-size: 24px;
    }
}

/* ===== Enquiry form ===== */

.enquiry-form {
    max-width: 700px;
    margin: 30px auto;
    padding: 25px;
    background: #FFFFFF;
    border: 1px solid #D5CEC0;
}

.enquiry-form h2 {
    margin-top: 0;
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    color: #800000;
}

.enquiry-form p {
    margin-bottom: 25px;
}

.enquiry-form label {
    display: block;
    margin-top: 18px;
    margin-bottom: 5px;
    font-weight: bold;
}

.enquiry-form input:focus,
.enquiry-form select:focus,
.enquiry-form textarea:focus {
    outline: 2px solid #800000;
    outline-offset: 1px;
    width: 100%;
    padding: 10px;
    border: 1px solid #999999;
    border-radius: 3px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
}

.enquiry-form textarea {
    resize: vertical;
}

.submit-button {
    display: block;
    margin: 25px auto 5px;
    padding: 12px 28px;
    transition: background 0.2s ease,
    transform 0.2s ease;
    background: #800000;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

.submit-button:hover {
    background: #A52A2A;
    transform: translateY(-1px);
}

/* Hidden spam-trap field */

.website-field {
    position: absolute;
    left: -9999px;
}