/* Public landing & portals */

:root {
    --public-content-width: 1100px;
    --public-content-pad: 1.5rem;
}

.public-site {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Shared width with header, hero, and body sections */
.public-container {
    width: 100%;
    max-width: var(--public-content-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--public-content-pad);
    padding-right: var(--public-content-pad);
    box-sizing: border-box;
}

.public-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
    overflow: visible;
}

.public-header-inner {
    max-width: var(--public-content-width);
    margin: 0 auto;
    padding: 0.85rem var(--public-content-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
    overflow: visible;
}

.public-header-menu {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.75rem;
    flex-shrink: 0;
    overflow: visible;
}

/* Profile menu styles live in app.css (.account-user-menu) */

.public-brand,
.site-brand--header {
    text-decoration: none;
    color: inherit;
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(420px, 55vw);
}
.public-brand strong {
    display: block;
    font-size: 1.1rem;
    color: var(--primary);
}
.public-brand span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.home-hero-logo-wrap {
    margin-bottom: 0.75rem;
    width: 100%;
    max-width: 360px;
}
.site-logo--hero {
    width: min(340px, 100%);
    max-height: 180px;
    height: auto;
}

/* Desktop inline nav only — mobile drawer rules live in mobile.css */
@media (min-width: 769px) {
    .public-header-menu {
        flex: 1 1 auto;
        justify-content: flex-end;
        min-width: 0;
    }

    .public-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
        flex: 0 1 auto;
    }

    .public-nav a {
        flex-shrink: 0;
    }

    .public-nav a.btn {
        width: auto;
        white-space: nowrap;
    }
}
.public-nav a:not(.btn) {
    color: var(--text-muted);
    text-decoration: none;
}
.public-nav a:not(.btn):hover {
    color: var(--primary);
}

.public-main {
    flex: 1;
}

/* Inner pages (portals, apply, etc.) — same column as header & home sections */
.public-page-content {
    padding-top: 2.5rem;
    padding-bottom: 3rem;
}

.home-section--page-top {
    padding-top: 2.5rem;
}

.public-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.85);
    padding: 2rem 1.5rem;
    margin-top: 3rem;
}
.public-footer-inner {
    max-width: var(--public-content-width);
    margin: 0 auto;
    padding-left: var(--public-content-pad);
    padding-right: var(--public-content-pad);
    text-align: center;
    font-size: 0.85rem;
    box-sizing: border-box;
}
.public-footer-links {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.public-footer-links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
}
.public-footer-links a:hover { color: #fff; }

/* Hero — full-width band, content aligned to .public-container */
.home-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #12875f 100%);
    color: #fff;
    padding: 3.25rem 0 3.75rem;
}

.home-hero-inner {
    text-align: left;
}

.home-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    max-width: 28ch;
}

.home-hero-lead {
    font-size: 1.05rem;
    opacity: 0.92;
    line-height: 1.6;
    margin-bottom: 1.75rem;
    max-width: 52ch;
}

.home-hero-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-start;
    align-items: center;
}

.home-hero-actions .home-hero-btn {
    width: auto;
    min-height: 2.5rem;
    padding: 0.5rem 1.15rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    flex: 0 0 auto;
}

.home-hero .btn-primary.home-hero-btn {
    background: #fff;
    color: var(--primary-dark);
}

.home-hero .btn-primary.home-hero-btn:hover {
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-dark);
}

.home-hero .btn-outline.home-hero-btn {
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: #fff;
    background: transparent;
}

.home-hero .btn-outline.home-hero-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
    color: #fff;
}

.home-section {
    padding: 3rem 0;
}

.home-section--tight-top {
    padding-top: 2rem;
}

.home-section-cta {
    margin-top: 1.5rem;
    text-align: left;
}
.home-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}
.home-section-sub {
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
}

.home-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.home-action-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s;
}
.home-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(13, 110, 79, 0.1);
}
.home-action-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}
.home-action-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.home-action-card.featured {
    border-color: var(--primary);
    border-width: 2px;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.portals-page .portal-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.portals-page .portal-card--spacious {
    padding: 1.5rem;
}
.portal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.portal-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    text-decoration: none;
}
.portal-card .portal-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}
.portal-card h3 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.portal-card p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.portal-card .badge { margin-top: 0.5rem; }

.home-section-features {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 3rem 0;
    margin-bottom: 0;
}

.home-section-features .public-container {
    text-align: center;
}

.home-section-features .home-section-title {
    text-align: center;
}

.home-section-features .home-section-sub {
    text-align: center;
}

.home-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 240px));
    justify-content: center;
    gap: 1.25rem 2rem;
    max-width: 960px;
    margin: 0 auto;
}
.home-feature {
    padding: 0.75rem 0.5rem;
    text-align: center;
}
.home-feature strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--primary);
}
.home-feature span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 0 0 1rem;
    font-size: 0.85rem;
}
.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}
.breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin-left: 0.35rem;
    color: var(--text-muted);
    opacity: 0.6;
}
.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { color: var(--text-muted); }

