/* ═══════════════════════════════════════════════
   PUBLIC LAYOUT — Professional Styling
   Only applies to pages using _PublicLayout.
   Index page (Layout = null) is NOT affected.
   ═══════════════════════════════════════════════ */

html, body { overflow-x: hidden; }

:root {
    --pub-brand: #008B9B;
    --pub-brand-dark: #006d7a;
    --pub-text: #1a1d23;
    --pub-muted: #6b7280;
    --pub-light: #f8fafb;
    --pub-border: #e5e7eb;
}

/* ─── Page Shell ──────────────────────────── */
.pub-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #fff;
}
.pub-main {
    flex: 1;
    background: var(--pub-light);
}

/* ─── Navbar ──────────────────────────────── */
.pub-nav {
    background: #fff;
    border-bottom: 1px solid var(--pub-border);
    padding: 0.85rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.pub-nav-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.pub-nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.pub-nav-link {
    text-decoration: none;
    color: var(--pub-muted);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    transition: all 0.2s;
}
.pub-nav-link:hover {
    color: var(--pub-brand);
    background: rgba(0,139,155,0.06);
}
.pub-nav-cta {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    background: var(--pub-brand);
    color: #fff;
    text-decoration: none;
    transition: all 0.2s;
}
.pub-nav-cta:hover {
    background: var(--pub-brand-dark);
    color: #fff;
}
.pub-nav-toggle {
    background: none;
    border: none;
    color: var(--pub-brand);
    font-size: 1.5rem;
    padding: 0.25rem;
    cursor: pointer;
    line-height: 1;
}

/* ─── Mobile Nav ──────────────────────────── */
.pub-mobile-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 270px;
    height: 100vh;
    background: #fff;
    z-index: 1040;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    transition: left 0.3s cubic-bezier(0.4,0,0.2,1);
}
.pub-mobile-nav.open { left: 0; }
.pub-mobile-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--pub-border);
}
.pub-mobile-nav-head a { display: inline-flex; align-items: center; text-decoration: none; }
.pub-mobile-nav-head button {
    background: none;
    border: none;
    font-size: 1.15rem;
    color: var(--pub-muted);
    cursor: pointer;
    padding: 0.25rem;
}
.pub-mobile-nav-body {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
}
.pub-mobile-nav-body a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--pub-text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s;
}
.pub-mobile-nav-body a:hover {
    background: rgba(0,139,155,0.06);
    color: var(--pub-brand);
}
.pub-mobile-nav-body a i { font-size: 1.05rem; color: var(--pub-muted); }
.pub-mobile-nav-body a:hover i { color: var(--pub-brand); }

.pub-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1035;
    backdrop-filter: blur(2px);
}
.pub-overlay.active { display: block; }

/* ─── Shared Logo ─────────────────────────── */
.circle-logo { height: 30px; width: 30px; object-fit: contain; }
.text-logo { height: 22px; object-fit: contain; }

/* ─── Typography & Content ────────────────── */
.pub-main h2 {
    font-weight: 800;
    color: var(--pub-text);
    letter-spacing: -0.3px;
}
.pub-main h5 { font-weight: 700; }
.pub-main .card {
    border: 1px solid var(--pub-border);
    border-radius: 14px;
    transition: all 0.25s;
}
.pub-main .card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.pub-main .btn-outline-primary {
    color: var(--pub-brand);
    border-color: var(--pub-brand);
}
.pub-main .btn-outline-primary:hover {
    background: var(--pub-brand);
    border-color: var(--pub-brand);
    color: #fff;
}

/* ─── Event Cards ─────────────────────────── */
.event-card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}
.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.event-card .card-img-top {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    height: 160px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Equal-height card grid */
#upcomingGrid > [class*="col"],
#pastGrid > [class*="col"]     { display: flex; flex-direction: column; }
#upcomingGrid > [class*="col"] > a,
#pastGrid > [class*="col"] > a { flex: 1; display: flex; flex-direction: column; }
#upcomingGrid > [class*="col"] > a > .card,
#pastGrid > [class*="col"] > a > .card { flex: 1; display: flex; flex-direction: column; }

.event-card .card-body { flex: 1; display: flex; flex-direction: column; }

/* Title — clamp to 2 lines */
.event-card .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

/* Footer info pushed to bottom, text truncated */
.event-card .card-footer-info { margin-top: auto; }
.event-card .footer-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    font-size: 0.8rem;
    color: #6b7280;
}
.event-card .footer-text,
.event-card .location-link {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* ─── Footer ──────────────────────────────── */
.footer {
    background: #fff;
    border-top: 1px solid var(--pub-border);
    padding: 3rem 0;
}
.footer-brand {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1.5rem;
}
.footer h6 {
    color: var(--pub-text);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.footer-links { margin-bottom: 1.5rem; }
.footer-links a {
    color: var(--pub-muted);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    word-break: break-all;
}
.footer-links a:hover {
    color: var(--pub-brand);
    transform: translateX(3px);
}
.social-links { display: flex; gap: 0.75rem; }
.social-link {
    color: var(--pub-muted);
    font-size: 1.3rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: var(--pub-light);
}
.social-link:hover {
    color: #fff;
    background: var(--pub-brand);
    transform: translateY(-2px);
}
.footer .border-top { border-color: var(--pub-border) !important; }

/* ─── Responsive ──────────────────────────── */
@media (max-width: 991px) {
    .pub-main .container { padding-left: 0.75rem; padding-right: 0.75rem; }
}

@media (max-width: 768px) {
    .pub-nav { padding: 0.6rem 0; }
    .pub-nav .container { padding-left: 0.75rem; padding-right: 0.75rem; }
    .pub-nav-cta { font-size: 0.78rem; padding: 0.35rem 0.75rem; }
    .pub-main h2 { font-size: 1.35rem; }
    .pub-main .container { padding-left: 0.5rem; padding-right: 0.5rem; }
    .event-card .card-img-top { height: 150px; }
    .event-card .card-body { padding: 1rem; }

    .footer { padding: 2rem 0; }
    .footer .row { text-align: center; }
    .footer-brand { justify-content: center; margin-bottom: 1.5rem; }
    .social-links { justify-content: center; margin-bottom: 2rem; }
    .footer h6 { margin-top: 1.5rem; margin-bottom: 1rem; }
    .footer-links { margin-bottom: 0; }
    .footer-links li { margin-bottom: 0.5rem; }
    .footer-links a { font-size: 0.875rem; padding: 0.5rem; display: inline-block; }
    .footer .border-top { margin-top: 2rem !important; padding-top: 1.5rem !important; }
    .footer .text-md-start, .footer .text-md-end { text-align: center !important; }
    .footer small { display: block; line-height: 1.6; margin-bottom: 0.5rem; }
}
@media (max-width: 576px) {
    .pub-nav-cta { font-size: 0.72rem; padding: 0.3rem 0.6rem; }
    .pub-main h2 { font-size: 1.15rem; }
    .pub-main .container { padding-left: 0.4rem; padding-right: 0.4rem; }
    .event-card .card-img-top { height: 130px; }
    .event-card .card-body { padding: 0.75rem; }
    .circle-logo { height: 26px; width: 26px; }
    .text-logo { height: 18px; }
    .footer { padding: 1.5rem 0; }
    .footer .col-lg-2, .footer .col-md-4 { margin-bottom: 1.5rem; }
    .footer-links a {
        padding: 0.5rem 1rem;
        margin: 0.25rem 0;
        background: rgba(0,0,0,0.02);
        border-radius: 8px;
    }
    .footer-links a:active { background: rgba(0,0,0,0.05); }
    .footer .row.g-4 { --bs-gutter-y: 1rem; }
    .social-links { gap: 1rem; }
    .social-link { font-size: 1.1rem; width: 34px; height: 34px; }
    .circle-logo { height: 32px; width: 32px; }
    .text-logo { height: 24px; }
}
