/* ════════════════════════════════════════════════════
   Travelhawk Bus Intelligence — Global Stylesheet
   Pierce.gr palette: primary #CC0033
   ════════════════════════════════════════════════════ */

:root {
    --red:       #CC0033;
    --red-dark:  #a3002a;
    --red-glow:  rgba(204, 0, 51, 0.12);
    --text:      #1c1c1e;
    --sub:       #3a3a3c;
    --muted:     #8e8e93;
    --border:    #e5e5ea;
    --bg:        #f2f2f7;
    --white:     #ffffff;
}

/* ── Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Public navbar ────────────────────────────────── */
.th-navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
}

.th-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.th-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.th-brand i { color: var(--red); }


.th-nav-links {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.th-nav-links a {
    font-size: 0.84rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--muted);
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.th-nav-links a:hover {
    color: var(--text);
    background: var(--bg);
}

.th-nav-links .nav-login {
    color: var(--text);
    border: 1.5px solid var(--border);
}

.th-nav-links .nav-login:hover {
    border-color: var(--red);
    color: var(--red);
    background: rgba(204, 0, 51, 0.04);
}

.th-nav-links .nav-register {
    color: var(--white);
    background: var(--red);
    border: 1.5px solid var(--red);
}

.th-nav-links .nav-register:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    color: var(--white);
}

/* ── Logged-in navbar ─────────────────────────────── */
.th-navbar-auth {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
}

.th-nav-auth-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.th-nav-auth-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: -0.2px;
}

.th-nav-auth-brand i { color: var(--red); }

.th-nav-auth-user {
    font-size: 0.78rem;
    color: var(--muted);
    flex-shrink: 0;
    padding: 0.3rem 0.65rem;
    background: var(--bg);
    border-radius: 100px;
    border: 1px solid var(--border);
}

.th-nav-auth-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: auto;
}

.th-nav-auth-links a {
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--muted);
    padding: 0.38rem 0.65rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.th-nav-auth-links a:hover {
    color: var(--text);
    background: var(--bg);
}

.th-nav-auth-links .nav-logout {
    color: var(--red);
    border: 1.5px solid rgba(204, 0, 51, 0.2);
}

.th-nav-auth-links .nav-logout:hover {
    background: rgba(204, 0, 51, 0.06);
    border-color: var(--red);
    color: var(--red-dark);
}

/* ── Page body ────────────────────────────────────── */
.th-page {
    flex: 1;
    padding: 3rem 1.5rem;
}

.th-container {
    max-width: 760px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem 3rem;
}

/* ── Content typography ───────────────────────────── */
.th-container h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.4px;
    margin: 0 0 0.35rem;
}

.th-page-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.th-container h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin: 2rem 0 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.th-container p {
    color: var(--sub);
    margin: 0 0 1rem;
}

.th-container ul,
.th-container ol {
    color: var(--sub);
    padding-left: 1.3rem;
    margin-bottom: 1rem;
}

.th-container li { margin-bottom: 0.35rem; }

.th-container a {
    color: var(--red);
    text-decoration: none;
}

.th-container a:hover { text-decoration: underline; }

.th-container strong { color: var(--text); }

/* ── Contact info block ───────────────────────────── */
.th-info-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
}

.th-info-block p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.9;
}

.th-info-block strong { font-weight: 600; }

/* ── Footer ───────────────────────────────────────── */
.th-footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 1.1rem 1.5rem;
    text-align: center;
}

.th-footer small {
    font-size: 0.75rem;
    color: var(--muted);
}

.th-footer a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

.th-footer a:hover { color: var(--red); }

.th-sep { margin: 0 0.4rem; opacity: 0.35; }

/* ── Error page ───────────────────────────────────── */
.th-error-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.th-error-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.75rem 2.5rem;
    text-align: center;
    max-width: 480px;
    width: 100%;
}

.th-error-icon {
    width: 68px;
    height: 68px;
    background: #fff0f3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.6rem;
    color: var(--red);
}

.th-error-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.75rem;
}

.th-error-message {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0 0 2rem;
    line-height: 1.65;
}

.th-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--red);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    padding: 0.72rem 1.75rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.th-btn:hover {
    background: var(--red-dark);
    box-shadow: 0 4px 14px rgba(204, 0, 51, 0.28);
    transform: translateY(-1px);
    color: var(--white);
    text-decoration: none;
}

.th-btn:active { transform: translateY(0); }

/* ── Mobile navigation hamburger ─────────────────── */
.th-nav-hamburger {
    display: none;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
    cursor: pointer;
    color: var(--muted);
    font-size: 1rem;
    margin-left: auto;
    align-items: center;
    line-height: 1;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.th-nav-hamburger:hover {
    background: var(--bg);
    border-color: var(--red);
    color: var(--red);
}

/* Force auth links always visible on desktop */
@media (min-width: 769px) {
    .th-nav-auth-links { display: flex !important; }
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .th-container {
        padding: 1.75rem 1.25rem;
        border-radius: 12px;
    }

    .th-page { padding: 1.5rem 1rem; }

    .th-nav-links .nav-register { display: none; }

    /* Show hamburger, hide user email badge */
    .th-nav-hamburger { display: flex; }
    .th-nav-auth-user { display: none; }

    /* Allow inner row to wrap so dropdown sits below brand */
    .th-nav-auth-inner {
        height: auto;
        min-height: 60px;
        flex-wrap: wrap;
        align-items: center;
        padding-top: 0;
        padding-bottom: 0;
    }

    /* Dropdown menu */
    .th-nav-auth-links {
        width: 100%;
        flex-direction: column;
        gap: 0.1rem;
        padding: 0.5rem 0 0.75rem;
        border-top: 1px solid var(--border);
        margin-left: 0;
    }

    /* Bootstrap collapse: show as flex column */
    .th-nav-auth-links.show {
        display: flex !important;
    }

    .th-nav-auth-links.collapsing {
        display: flex !important;
        flex-direction: column;
        overflow: hidden;
    }

    /* Full-width links in dropdown */
    .th-nav-auth-links a {
        width: 100%;
        padding: 0.55rem 0.75rem;
        border-radius: 8px;
    }
}
