/* =========
   Base
   ========= */
* {
    box-sizing: border-box;
}

:root {
    --bg: #f6f7fb;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --brand: #0074BC;
    --brand-green: #306B34;
    --brand-brown:#3F0D12;
    --brand-amber:#FFAE03;
    --dt-row-selected: 0, 116, 188;
    --brand-600: #0c78bb;
    --danger: #C9252C;
    --danger-600: #cc3239;
    --card-bg: #fff;
    --success-bg: #e1f7e7;
    --success-border: #86efac;
    --error-bg: #fde2e2;
    --error-border: #fca5a5;
    --radius: 12px;
    --shadow: 0 2px 8px rgba(0, 0, 0, .04);
    --dt-row-selected-link: 255, 255, 255;
    --logo-size: clamp(96px, 10vw, 120px);
    --logo-gap: clamp(5px, 1vw, 12px);
    color-scheme: light dark;
}

body.page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
main {
    flex: 1 1 auto;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Open Sans", sans-serif;
    line-height: 1.7;
    font-size: 16px
}


/* =========
   Layout
   ========= */
.container {
    width: 80vw;
    max-width:900px;
    margin: 0 auto;
    padding: 16px;
}

.large-container{
    width: 98vw;
    max-width: 100%;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.site-header .logo {
    height: 56px;
    vertical-align: middle;
    margin: 0 ;
}

.site-header .event-name {
    display: inline-block;
    vertical-align: middle;
    margin: 0;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin: 6px 0;
    box-shadow: var(--shadow);
    overflow: hidden;
    /* clip inner overflow (e.g., DataTables) */
}

h1,
h2,
h3 {
    margin: 0 0 12px 0;
}

/* Grid (used on form) */
.grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 12px 0;
}

.grid label {
    display: flex;
    flex-direction: column;
    font-weight: 600;
}

/* Inputs */
input,
select {
    padding: 4px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    min-width: 250px;
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    border: 0;
    border-radius: 5px;
    padding: 5px 10px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Open Sans", sans-serif;
    transition: transform .02s ease, filter .15s ease;
    font-size:14px;
    margin:1px;
}

.btn[disabled] {
    opacity: .6;
    cursor: not-allowed;
    filter: grayscale(0.15);
}

.btn:hover {
    filter: brightness(1.2);
}
/* Alerts */
.alert {
    padding: 6px;
    border-radius: var(--radius);
    margin: 6px 0;
}

.alert.success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
}

.alert.error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
}

/* Footer */
.footer {
    color: var(--muted);
    padding: 24px 0;
    text-align: center;
}


/* =========
   Responsive tweaks
   ========= */


@media (max-width: 640px) {
    :root {
        --logo-size: clamp(120px, 40vw, 180px);
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 16px 12px;
    }

    .site-header .logo {
        height: 44px;
    }
}

/* The footer bar that holds the logos */
footer.logo-footer {
    margin-top: auto;
    /* stays at the bottom of the space */
    /* padding: 16px clamp(12px, 4vw, 24px); */
    border-top: 1px solid #e5e7eb;
    background: color-mix(in oklab, white 80%, transparent);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
}

/* Responsive grid that centers items and wraps on small screens */
.logo-grid {
    display: grid;
    gap: var(--logo-gap);
    justify-items: center;
    align-items: center;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}


/* Each logo sits in a fixed-size square so all appear the same size */
.logo-cell {
    width: var(--logo-size);
    aspect-ratio: 1 / 1;
    /* guarantees a square box */
    display: grid;
    place-items: center;
    /* padding: 8px; */
    border-radius: 12px;
    background: transparent;
    /* or use #fff if you want a tile */
}


/* Fit every image inside its square without distortion */
.logo-cell img {
    /* width: 100%;
    height: 100%; */
    object-fit: contain;
    /* keeps proportions, same visual size */
    object-position: center;
    display: block;
    height: var(--logo-size);
    width: var(--logo-size);
}


/* Optional: make keyboard focus visible if the tiles become links later */
.logo-cell:focus-within {
    outline: 2px solid #94a3b8;
    outline-offset: 2px;
    border-radius: 12px;
}

@media (max-width: 600px) {
    .logo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

