/* GLOBAL */
body {
    font-family: "Segoe UI", sans-serif;
    font-size: 10pt;
    margin: 0;
    background: #f5f5f7;
}

/* HEADER (Masters) */
.header-image {
    position: relative;
}

.header-image img {
    width: 100%;
    display: block;
}

/* HOME ICON IN HEADER */
.home-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.home-icon img {
    width: 42px;
    height: auto;
    opacity: 0.95;
    transition: opacity 0.2s ease;
}

.home-icon img:hover {
    opacity: 1;
}

/* PAGE CONTAINER */
.container {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
}

/* LAYOUT */
.layout {
    display: flex;
    gap: 1rem;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    background: #ffffff;
    padding: 1rem;
    border-radius: 6px;
    height: fit-content;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    margin-bottom: 0.5rem;
}

.sidebar a {
    text-decoration: none;
    color: #0077cc;
}

.sidebar a:hover {
    text-decoration: underline;
}

/* SPACER LINE */
.sidebar .spacer {
    border-bottom: 1px solid #ddd;
    margin: 10px 0;
}

/* MAIN CONTENT (Masters) */
.content {
    flex: 1;
    background: #ffffff;
    padding: 0;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* FOOTER */
.site-footer {
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 9pt;
    color: #666;
}

/* MOBILE MENU BUTTON */
.menu-toggle {
    display: none;
}

/* MOBILE BEHAVIOUR */
@media (max-width: 800px) {

    .layout {
        flex-direction: column;
    }

    .menu-toggle {
        display: block;
        background: #0077cc;
        color: white;
        padding: 10px 14px;
        border: none;
        border-radius: 4px;
        margin-bottom: 10px;
        font-size: 14px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -260px;
        width: 240px;
        height: 100%;
        background: white;
        padding: 1rem;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
        transition: left 0.3s ease;
        z-index: 9999;
        overflow-y: auto;
    }

    .sidebar.open {
        left: 0;
    }

    body.menu-open::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 9998;
    }
}

.hidden {
    display: none !important;
}

/* SIDEBAR TITLE */
.sidebar-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #009999;
    color: #009999;
}

/* Remove default margins inside iframe pages */
iframe body,
iframe html {
    margin: 0;
    padding: 0;
}

.content-frame {
    width: 100%;
    height: 100vh;
    border: none;
    display: block;
}

/* Mini League Table (scorecards) */
.mini-league-section {
    margin: 1rem 1.5rem;
}

.mini-league-section h2 {
    margin: 0 0 0.5rem 0;
    font-size: 12pt;
    font-weight: 600;
}

.mini-league-table {
    width: 50ch;
    /* 40ch + 10ch */
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 10pt;
    table-layout: fixed;
    /* respect column widths */
}

.mini-league-table th,
.mini-league-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #ddd;
}

.mini-league-table td:nth-child(2),
.mini-league-table th:nth-child(2) {
    width: 260px;
    /* adjust to match Player column */
}


.mini-league-table th {
    text-align: left;
    font-weight: 600;
    color: #333;
}

.mini-league-table td.name-col {
    width: 40ch;
    /* 40 characters */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-league-table td.id-col {
    width: 10ch;
    /* 10 characters */
    font-weight: 600;
}

.mini-league-table a {
    text-decoration: none;
    color: #0066cc;
}

.mini-league-table a:hover {
    text-decoration: underline;
    color: #003d80;
}

.charity-logos {
    margin: 60px auto;
    text-align: center;
}

.charity-logos h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 25px;
    align-items: center;
}

.logo-grid img {
    width: 100%;
    max-width: 160px;
    height: auto;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter 0.2s ease;
}

.logo-grid img:hover {
    filter: grayscale(0%);
}

.sponsors-footer {
    background: #f5f5f5;
    padding: 50px 0;
    margin-top: 60px;
    text-align: center;
}

.sponsors-footer h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 25px;
    align-items: center;
    margin-bottom: 20px;
}

.sponsor-grid img {
    width: 100%;
    max-width: 160px;
    height: auto;
    object-fit: contain;
    filter: grayscale(30%);
    transition: filter 0.2s ease;
}

.sponsor-grid img:hover {
    filter: grayscale(0%);
}

.footer-note {
    font-size: 0.9rem;
    color: #555;
}

/* HOMEPAGE GRID (tournament cards) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.card {
    position: relative;
    height: 180px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.card .overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.55);
    color: white;
}

.card .title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.card .amount {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* HERO CARD (Masters 2026 banner) */
.hero-card {
    position: relative;
    height: 260px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    margin: 40px 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.hero-button {
    background: rgba(0, 0, 0, 0.65);
    color: white;
    padding: 14px 28px;
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 20px;
    transition: background 0.2s ease;
}

.hero-button:hover {
    background: rgba(0, 0, 0, 0.85);
}