/* ==========================================================
   Waterfall & O'Brien Ltd.
   Governance Core Stylesheet
   Version: 1.0
   ========================================================== */

:root {
    /* Core Colours */
    --wob-white: #ffffff;
    --wob-graphite: #2e3238;
    --wob-slate: #6b7280;
    --wob-light: #f5f6f7;
    --wob-border: #d9dde1;
    --wob-accent: #b87333;
    --wob-link: #295a8a;

    /* Typography */
    --wob-text-size: 16px;
    --wob-line-height: 1.75;

    /* Layout */
    --wob-max-width: 900px;
}

/* ==========================================================
   Base Typography
   ========================================================== */

body {
    margin: 0;
    padding: 0;
    background: var(--wob-white);
    color: var(--wob-graphite);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: var(--wob-text-size);
    line-height: var(--wob-line-height);
}

/* ==========================================================
   Content Container
   ========================================================== */

.content-page {
    max-width: var(--wob-max-width);
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* ==========================================================
   Governance Header
   ========================================================== */

.governance-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--wob-border);
}

.section-label {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: var(--wob-accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.governance-header h1 {
    margin: 0;
    color: var(--wob-graphite);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.governance-header p {
    margin-top: 1rem;
    margin-bottom: 0;
    color: var(--wob-slate);
}

.document-date {
    font-size: 0.9rem;
    color: var(--wob-slate);
}

/* ==========================================================
   Headings
   ========================================================== */

.content-page h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    color: var(--wob-graphite);
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 1px solid var(--wob-border);
}

.content-page h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--wob-graphite);
    font-size: 1.15rem;
    font-weight: 600;
}

/* ==========================================================
   Paragraphs
   ========================================================== */

.content-page p {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

/* ==========================================================
   Lists
   ========================================================== */

.content-page ul,
.content-page ol {
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.content-page li {
    margin-bottom: 0.5rem;
}

/* ==========================================================
   Hyperlinks
   ========================================================== */

.content-page a {
    color: var(--wob-link);
    text-decoration: none;
}

.content-page a:hover {
    text-decoration: underline;
}

.content-page a:focus {
    outline: 2px solid var(--wob-accent);
    outline-offset: 2px;
}

/* ==========================================================
   Tables
   ========================================================== */

.content-page table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.content-page th {
    background: var(--wob-light);
    text-align: left;
    font-weight: 600;
}

.content-page th,
.content-page td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--wob-border);
}

.content-page tr:nth-child(even) {
    background: #fafafa;
}

/* ==========================================================
   Document Cards
   ========================================================== */

.document-card {
    margin-bottom: 1rem;
    padding: 1.5rem;
    background: #fafafa;
    border: 1px solid var(--wob-border);
    border-radius: 6px;
}

.document-card h3 {
    margin-top: 0;
}

.document-card p:last-child {
    margin-bottom: 0;
}

/* ==========================================================
   Notice / Information Panels
   ========================================================== */

.notice {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: var(--wob-light);
    border-left: 4px solid var(--wob-accent);
}

.notice p:last-child {
    margin-bottom: 0;
}

/* ==========================================================
   Definition Lists
   Useful for Legal Notice page
   ========================================================== */

.content-page dl {
    margin: 1.5rem 0;
}

.content-page dt {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--wob-graphite);
}

.content-page dd {
    margin-left: 0;
    margin-top: 0.25rem;
    color: var(--wob-slate);
}

/* ==========================================================
   Horizontal Rules
   ========================================================== */

.content-page hr {
    margin: 3rem 0;
    border: 0;
    border-top: 1px solid var(--wob-border);
}

/* ==========================================================
   Footer Document Metadata
   ========================================================== */

.document-meta {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--wob-border);
    color: var(--wob-slate);
    font-size: 0.9rem;
}

/* ==========================================================
   Mobile
   ========================================================== */

@media (max-width: 768px) {
    .content-page {
        padding: 2rem 1.25rem;
    }

    .governance-header h1 {
        font-size: 2rem;
    }

    .content-page h2 {
        font-size: 1.25rem;
    }

    .content-page table {
        display: block;
        overflow-x: auto;
    }

}

/* ==========================================================
   Print Styles
   Governance documents should print cleanly.
   ========================================================== */

@media print {

    body {
        background: #ffffff;
        color: #000000;
    }

    .content-page {
        max-width: 100%;
        padding: 0;
    }

    a {
        color: #000000;
        text-decoration: none;
    }

    .governance-header {
        border-bottom: 1px solid #000000;
    }

}

/* ========================================
   HEADER
   ======================================== */

.site-header {
    border-bottom: 1px solid var(--wob-border);
    background: #ffffff;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo a {
    color: var(--wob-graphite);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
}

.main-nav ul {
    display: flex;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.main-nav a {
    color: var(--wob-graphite);
    text-decoration: none;
}

.main-nav a:hover {
    color: var(--wob-accent);
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
    margin-top: 5rem;
    background: var(--wob-light);
    border-top: 1px solid var(--wob-border);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.footer-column h3 {
    margin-top: 0;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    text-decoration: none;
    color: var(--wob-slate);
}

.footer-column a:hover {
    color: var(--wob-accent);
}

.footer-bottom {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--wob-border);
    color: var(--wob-slate);
}

/* ==========================================================
   SECTION NAVIGATION
   Reusable for Company, Governance, Quality,
   Commercial and Resources sections
   ========================================================== */

.section-nav {
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--wob-border);
}

.section-nav-title {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--wob-slate);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Navigation Container */

.section-nav ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0 0 0.5rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

/* Optional Webkit Scrollbar Styling */

.section-nav ul::-webkit-scrollbar {
    height: 6px;
}

.section-nav ul::-webkit-scrollbar-track {
    background: var(--wob-light);
}

.section-nav ul::-webkit-scrollbar-thumb {
    background: var(--wob-border);
    border-radius: 3px;
}

/* Navigation Items */
.section-nav li {
    flex: 0 0 auto;
}

/* Links */

.section-nav a {
    display: block;
    padding: 0.45rem 0.9rem;
    border-radius: 4px;
    text-decoration: none;
    color: var(--wob-link);
    font-weight: 600;
    white-space: nowrap;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

/* Hover */

.section-nav a:hover {
    background: var(--wob-light);
    color: var(--wob-accent);
}

/* Active Page */

.section-nav a.active {
    background: var(--wob-accent);
    color: #ffffff;
}

/* Keyboard Accessibility */

.section-nav a:focus {
    outline: 2px solid var(--wob-accent);
    outline-offset: 2px;
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 768px) {

    .section-nav {
        margin-bottom: 1.5rem;
    }

    .section-nav-title {
        margin-bottom: 0.5rem;
        font-size: 0.8rem;
    }

    .section-nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* ==========================================================
   LARGE SCREENS
   Allow wrapping instead of scrolling
   ========================================================== */

@media (min-width: 1024px) {

    .section-nav ul {
        flex-wrap: wrap;
        overflow-x: visible;
        padding-bottom: 0;
    }
}

.list-legal ol {
    list-style-type: none;
    counter-reset: list;
    margin: 0;
    padding: 0;
}

.list-legal ol > li {
    display: table;
    counter-increment: list;
    margin-bottom: 0.75rem;
}

.list-legal ol > li:before {
    content: counters(list, ".") ") ";
    display: table-cell;
    padding-right: 0.75rem;
    font-weight: 600;
}

.list-legal li ol > li {
    margin: 0.5rem 0;
}

/* ==========================================================
   Cookie Banner
   ========================================================== */

.cookie-banner {

    position: fixed;

    left: 1rem;
    right: 1rem;
    bottom: 1rem;

    z-index: 9999;

    background: #ffffff;

    border: 1px solid var(--wob-border);

    border-radius: 6px;

    box-shadow: 0 4px 12px rgba(0,0,0,0.15);

    max-width: 600px;

    margin: 0 auto;

}

.cookie-banner-content {

    padding: 1rem;

}

.cookie-banner-text {

    margin: 0 0 1rem 0;

    font-size: 0.9rem;

    line-height: 1.5;

    color: var(--wob-text);

}

.cookie-banner-actions {

    display: flex;

    gap: 0.5rem;

    margin-bottom: 0.75rem;

}

.cookie-btn {

    border: none;

    border-radius: 4px;

    padding: 0.6rem 1rem;

    font-size: 0.9rem;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s ease;

}

.cookie-btn-accept {

    background: var(--wob-accent);

    color: #ffffff;

}

.cookie-btn-accept:hover {

    opacity: 0.9;

}

.cookie-btn-reject {

    background: var(--wob-light);

    color: var(--wob-text);

}

.cookie-btn-reject:hover {

    background: var(--wob-border);

}

.cookie-banner-policy {

    margin: 0;

    font-size: 0.85rem;

}

.cookie-banner-policy a {

    color: var(--wob-link);

    text-decoration: none;

}

.cookie-banner-policy a:hover {

    text-decoration: underline;

}

/* ==========================================================
   Mobile
   ========================================================== */

@media (max-width: 768px) {

    .cookie-banner {
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }

    .cookie-banner-text {
        font-size: 0.85rem;
    }

    .cookie-banner-actions {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

}
