/* ===== Theme Variables ===== */
:root {
    --sand: hsl(37.89999999999998 42.2% 91.2%);
    --read: hsla(39, 43%, 91%, 0.633);

    /* top & bottom bar background */
    --gold: #c19a4a;
    /* gold for CTA and accents */
    --text: #111;
    /* primary text */
    --muted: #6c757d;
    /* secondary text */
    --green: #2f4f46;
    /* sign button in drawer */
    --border: #e9ecef;

    --border2: #000;
    /* light border */
    --shadow: 0 6px 26px rgba(0, 0, 0, 0.12);
    --radius: 18px;
    --nav-h: 64px;
    /* top navbar height */
    --botnav-h: 72px;
    /* bottom nav height */
    --drawer-w: 340px;
}

/* ===== Reset & base ===== */
* {
    box-sizing: border-box;
}

html.ios {
    --ion-default-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Roboto", sans-serif
}

html.md {
    --ion-default-font: "Roboto", "Helvetica Neue", sans-serif
}

html {
    --ion-dynamic-font: -apple-system-body;
    --ion-font-family: var(--ion-default-font)
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: var(--text);
    background: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== Top navbar ===== */
.topbar {
    /* position: fixed; */
    inset: 8px 8px auto 8px;
    height: var(--nav-h);
    background: var(--sand);
    /* border-radius: var(--radius); */
    display: flex;
    align-items: center;
    padding: 0 14px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 30;
}

/* hamburger (label toggles the hidden checkbox) */
#menuToggle {
    display: none;
}

.hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--gold);
}

.hamburger .bi {
    font-size: 1.6rem;
    line-height: 1;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
}

.modal,
.modal-backdrop {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.modal.active,
.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow);
    z-index: 100;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-logo img {
    width: 60px;
    display: block;
    margin: 0 auto;
}

.modal-logo p {
    font-size: 0.8rem;
    margin-top: 4px;
    letter-spacing: 2px;
    color: var(--muted);
}

.input-group {
    display: flex;
    gap: 5px;
    margin: 20px 0;
}

.input-group select,
.input-group input {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.input-group select {
    width: 100px;
}

.input-group input {
    flex: 1;
}

.btn-gold {
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
    padding: 10px;
    border-radius: 15px;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.35s ease;
    margin-top: 10px;
}

.btn-gold:hover {
    background: var(--gold);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border2) !important;
    padding: 10px;
    border-radius: 15px;
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.35s ease;
}

.btn-outline:hover {
    background-color: #000;
    color: #fff;
}

.btn-outline:focus {
    color: #fff;
}

.note {
    font-size: 0.7rem;
    color: var(--muted);
    display: block;
    margin: 10px 0;
}

/* centered logo */
.brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    pointer-events: auto;
}

.brand img {
    height: 50px;
    display: block;
    /* leave src empty; user will set it */
}

/* ===== Hero section ===== */
.hero {
    position: relative;
    /* topbar + its vertical margins */
    margin-bottom: calc(var(--botnav-h) + 16px);
    /* leave room for bottom nav */
    height: calc(100vh - var(--nav-h) - var(--botnav-h) - 32px);
    min-height: 420px;
    height: 91.4%;
    overflow: hidden;
    background: #ddd center/cover no-repeat;
    background-image: url("../imgs/bg-sm.jpg") !important;
    /* set via CSS var */
}

.read {
    text-align: center;
    line-height: 1.6;
    background: var(--read);
    color: var(--text);
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.read h1,
h2,
h3 {
    color: var(--gold);
}

.read>div {
    max-width: 650px;
    text-align: left;
    line-height: 1.6;
}

.read ul {
    list-style: none;
    padding-left: 0;
}

.read ul li {
    margin-bottom: 6px;
    padding-left: 28px;
    background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/OOjs_UI_icon_star-progressive.svg/20px-OOjs_UI_icon_star-progressive.svg.png') no-repeat left center;
    background-size: 16px;
}

.read h1 {
    margin-top: 0px;
}

/* centered CTA */
.cta {
    position: absolute;
    left: 50%;
    top: 82%;
    transform: translate(-50%, -50%);
    background: var(--gold);
    color: var(--green);
    font-weight: 600;
    border: none;
    cursor: pointer;
    padding: 14px 36px;
    border-radius: 999px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    letter-spacing: 0.2px;
}

.login {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--gold);
    color: var(--green);
    font-weight: 600;
    border: none;
    cursor: pointer;
    padding: 14px 36px;
    border-radius: 999px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    letter-spacing: 0.2px;
}

/* ===== Bottom nav ===== */
.bottomnav {
    position: fixed;
    inset: auto 0px 0px 0px;
    height: var(--botnav-h);
    background: var(--sand);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 20;
}

.bottomnav a:hover {
    color: var(--green)
}

.tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 90px;
    color: #9a813e;
    /* close to sand/gold mix in screenshot */
    user-select: none;
}

.tab .bi {
    font-size: 1.4rem;
    display: block;
}

.tab span {
    font-size: 0.9rem;
}

/* ===== Drawer (offcanvas) with checkbox hack ===== */
.drawer {
    position: fixed;
    top: 0px;
    bottom: 0px;
    left: 0px;
    width: var(--drawer-w);
    background: #fff;
    /* border-radius: 18px; */
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transform: translateX(calc(-100% - 16px));
    transition: transform 0.35s ease;
    z-index: 40;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    padding-bottom: 20px;
}

/* show drawer when checked */
#menuToggle:checked~.drawer {
    transform: translateX(0);
}

/* backdrop */
.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 35;
}

#menuToggle:checked~.backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* drawer content */
.btn-sign {
    background: var(--green);
    color: #fff;
    font-weight: 600;
    border-radius: 5px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    transition: all 0.3s ease;
    margin: 8px;
}

.btn-sign:hover {
    background-color: #2f4f46dd;
}

.menu {
    list-style: none;
    margin: 18px 0;
    padding: 0;
    left: 0px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.menu li {
    transition: background-color 0.3s ease;
    padding: 3px;
}

.menu li:hover {
    background-color: #d8d8d8;
}

.menu a {
    margin-left: 5px;
    padding: 2px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text);
    font-weight: 500;
}

.menu .bi {
    font-size: 1.6rem;
    color: #000;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 14px 0;
}

/* language row */
.lang {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--muted);
    font-weight: 500;
}

/* custom switch */
.switch {
    position: relative;
    width: 48px;
    height: 28px;
}

.switch input {
    display: none;
}

.knob {
    position: absolute;
    inset: 0;
    background: #e6e6e6;
    border-radius: 999px;
}

.knob::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s ease;
}

.switch input:checked+.knob {
    background: #d8d8d8;
}

.switch input:checked+.knob::after {
    transform: translateX(20px);
}

/* drawer footer */
.drawer-footer {
    margin-top: auto;
    text-align: center;
    padding-top: 5px;
    padding-left: 5px !important;
    padding-right: 5px !important;
    /* border: 1px solid #000; */
    border-radius: 5px;
}

.drawer-footer small {
    color: var(--muted);
    display: block;
    margin-bottom: 6px;
}

.eventat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    font-weight: 700;
    color: #111;
}

.eventat-badge img {
    height: 15px;
    display: block;
}

/* leave src empty */

/* ===== Responsive tweaks ===== */
@media (max-width: 420px) {
    :root {
        --drawer-w: 300px;
    }

    .tab {
        min-width: auto;
    }

    .brand img {
        height: 50px;
    }

    .cta {
        padding: 12px 28px;
    }

    .bottomnav {
        justify-content: space-evenly;
    }
}

@media (min-width: 1200px) {
    .brand img {
        height: 44px;
    }
}