/* Public marketing site (friday.tj landing + About/Programs/Teachers/
   Results/Contacts). Deliberately self-contained and only loaded by
   _PublicLayout so it never touches the authenticated app's styles. */

:root {
    --pub-bg: #ffffff;
    --pub-surface: #f6f7fb;
    --pub-ink: #14181f;
    --pub-muted: #5b6472;
    /* Same indigo family as the authenticated app's --accent token
       (design-tokens.css) - kept as its own literal value rather than
       a var() reference so this file stays self-contained. */
    --pub-accent: #5b4cf0;
    --pub-accent-dark: #4a3be0;
    --pub-border: #e5e7eb;
    --pub-radius: 14px;
    --pub-max: 1080px;
}

.pub-body {
    margin: 0;
    background: var(--pub-bg);
    color: var(--pub-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.pub-body a { color: var(--pub-accent); }

.pub-container {
    max-width: var(--pub-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.pub-header {
    border-bottom: 1px solid var(--pub-border);
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(6px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.pub-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 64px;
}

.pub-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 18px;
    color: var(--pub-ink);
    text-decoration: none;
    flex-shrink: 0;
}

.pub-brand img { height: 32px; width: auto; }

.pub-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-size: 18px;
}

.pub-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-wrap: wrap;
}

.pub-nav a {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--pub-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.pub-nav a:hover,
.pub-nav a.is-active { color: var(--pub-ink); background: var(--pub-surface); }

/* "a." qualifier is load-bearing, not decoration: every .pub-btn is an
   <a>, and plain ".pub-btn" (one class, specificity 0-1-0) loses to the
   site-wide ".pub-body a" link color (one class + one element,
   0-1-1) - without it the button text renders in the same accent
   color as its own background and disappears entirely. */
a.pub-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 10px;
    background: var(--pub-accent);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border: 0;
    cursor: pointer;
    transition: background .15s ease;
}

a.pub-btn:hover { background: var(--pub-accent-dark); color: #fff; }

a.pub-btn-ghost {
    background: transparent;
    color: var(--pub-ink);
    border: 1px solid var(--pub-border);
}

a.pub-btn-ghost:hover { background: var(--pub-surface); color: var(--pub-ink); }

.pub-lang {
    display: flex;
    gap: 2px;
    border: 1px solid var(--pub-border);
    border-radius: 9px;
    padding: 2px;
}
.pub-lang form { margin: 0; }

.pub-lang button, .pub-lang a {
    border: 0;
    background: transparent;
    color: var(--pub-muted);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 7px;
    cursor: pointer;
    text-decoration: none;
}

.pub-lang button.is-active, .pub-lang a.is-active { background: var(--pub-accent); color: #fff; }
.pub-lang a:focus-visible { outline: 3px solid #b16b00; outline-offset: 3px; }

/* Hero */
.pub-hero {
    padding: 72px 0 48px;
    text-align: center;
}

.pub-hero h1 {
    font-size: clamp(28px, 5vw, 46px);
    line-height: 1.15;
    margin: 0 0 16px;
    letter-spacing: -.02em;
}

.pub-hero p {
    font-size: clamp(16px, 2.5vw, 19px);
    color: var(--pub-muted);
    max-width: 640px;
    margin: 0 auto 28px;
}

.pub-hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections */
.pub-section { padding: 48px 0; }
.pub-section-alt { background: var(--pub-surface); }

.pub-section h2 {
    font-size: clamp(22px, 3.5vw, 30px);
    margin: 0 0 8px;
    letter-spacing: -.01em;
}

.pub-section-lead {
    color: var(--pub-muted);
    max-width: 640px;
    margin: 0 0 28px;
}

.pub-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.pub-card {
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius);
    padding: 22px;
    background: var(--pub-bg);
}

.pub-card h3 { margin: 0 0 6px; font-size: 17px; }
.pub-card p { margin: 0; color: var(--pub-muted); font-size: 14px; }

.pub-placeholder {
    border: 1px dashed #c7cbd4;
    border-radius: 12px;
    padding: 16px 18px;
    background: #fbfbfd;
    color: var(--pub-muted);
    font-size: 14px;
    margin: 12px 0;
}

.pub-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.pub-contact-list li {
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.pub-contact-list b { min-width: 120px; }

/* Footer */
.pub-footer {
    border-top: 1px solid var(--pub-border);
    padding: 32px 0;
    color: var(--pub-muted);
    font-size: 13px;
}

.pub-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.pub-footer nav { display: flex; gap: 14px; flex-wrap: wrap; }
.pub-footer nav a { color: var(--pub-muted); text-decoration: none; }
.pub-footer nav a:hover { color: var(--pub-ink); }

@media (max-width: 960px) {
    .pub-header-inner { flex-wrap: wrap; min-height: 0; padding: 10px 0; gap: 10px; }
    .pub-nav { order: 3; width: 100%; margin-left: 0; }
    .pub-lang { margin-left: auto; }
}

@media (max-width: 640px) {
    .pub-hero { padding: 48px 0 32px; }
    .pub-footer-inner { flex-direction: column; }
}

/* =========================================================
   HOMEPAGE LANDING (redesign) - hero-with-image, vertical
   direction cards, benefits row, closing CTA banner. Scoped
   with its own classes so /about, /programs etc. (still using
   the plain .pub-hero/.pub-section/.pub-card shapes above)
   are untouched.
   ========================================================= */

.pub-admin-banner {
    background: #eef2ff;
    color: var(--pub-accent-dark);
    border-bottom: 1px solid #d9ddfb;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
}

/* Small pencil buttons - Admin-only, rendered server-side only when
   User.IsInRole(Roles.Admin) is true (see Views/Home/Index.cshtml) -
   this styling is not the security boundary, just the appearance. */
.pub-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.pub-edit-btn:hover { background: #ffedd5; color: #c2410c; }

.pub-edit-btn-card {
    position: absolute;
    top: 14px;
    right: 14px;
    margin-bottom: 0;
    z-index: 2;
}

.pub-edit-btn-dark {
    position: absolute;
    top: 14px;
    right: 14px;
    margin-bottom: 0;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border-color: rgba(255, 255, 255, .35);
}

.pub-edit-btn-dark:hover { background: rgba(255, 255, 255, .25); color: #fff; }

/* Hero */
.pub-hero-split { padding: 56px 0; }

.pub-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
}

.pub-hero-copy h1 {
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
    margin: 0 0 16px;
    letter-spacing: -.02em;
}

.pub-hero-copy p {
    font-size: clamp(15px, 1.6vw, 18px);
    color: var(--pub-muted);
    max-width: 520px;
    margin: 0 0 26px;
}

.pub-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }

.pub-hero-highlights { display: flex; gap: 22px; flex-wrap: wrap; }

.pub-hero-highlight {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--pub-ink);
    font-size: 13px;
    font-weight: 700;
}

.pub-hero-highlight i { color: var(--pub-accent); font-size: 16px; }

.pub-hero-visual {
    border-radius: 24px;
    overflow: hidden;
    background: var(--pub-surface);
    min-height: 320px;
}

.pub-hero-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pub-hero-visual-placeholder {
    height: 100%;
    min-height: 320px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    color: var(--pub-accent);
    font-size: 72px;
}

/* Directions - always stacked vertically, one card per row, on every
   screen size (not a 4-up grid) per the reference layout. */
.pub-section-head { margin-bottom: 22px; }
.pub-section-head h2 { font-size: clamp(22px, 3.5vw, 30px); margin: 0 0 8px; letter-spacing: -.01em; }

.pub-directions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pub-direction-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius);
    background: var(--pub-bg);
}

.pub-direction-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 22px;
    flex-shrink: 0;
}

.pub-direction-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pub-direction-body strong { font-size: 18px; }
.pub-direction-body span { color: var(--pub-muted); font-size: 14px; }

.pub-direction-extra {
    color: var(--pub-muted);
    font-size: 13px;
    max-width: 320px;
    display: none;
}

.pub-direction-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

.pub-direction-visual {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 26px;
    overflow: hidden;
    flex-shrink: 0;
}

.pub-direction-visual img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 860px) {
    .pub-direction-card {
        grid-template-columns: auto 1fr 1fr auto auto;
    }
    .pub-direction-extra { display: block; }
}

/* Benefits */
.pub-benefits-wrap { position: relative; }

.pub-benefits-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.pub-benefit { display: flex; flex-direction: column; gap: 4px; }

.pub-benefit-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eef2ff;
    color: var(--pub-accent);
    font-size: 20px;
    margin-bottom: 6px;
}

.pub-benefit strong { font-size: 15px; }
.pub-benefit span { color: var(--pub-muted); font-size: 13px; }

/* Closing CTA banner */
.pub-cta-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 36px 40px;
    border-radius: 24px;
    background: linear-gradient(120deg, #4f46e5, #7c3aed);
    color: #fff;
}

.pub-cta-banner h2 { margin: 0 0 6px; font-size: clamp(20px, 3vw, 26px); }
.pub-cta-banner p { margin: 0; color: rgba(255, 255, 255, .85); font-size: 14px; }

a.pub-btn-light {
    background: #fff;
    color: var(--pub-accent-dark);
}

a.pub-btn-light:hover { background: #f3f4ff; color: var(--pub-accent-dark); }

@media (max-width: 860px) {
    .pub-hero-grid { grid-template-columns: 1fr; }
    .pub-hero-visual { order: -1; min-height: 220px; }
    .pub-hero-visual-placeholder { min-height: 220px; font-size: 52px; }
    .pub-direction-card {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "icon body visual"
            "extra extra extra"
            "arrow arrow arrow";
    }
    .pub-direction-icon { grid-area: icon; }
    .pub-direction-body { grid-area: body; }
    .pub-direction-visual { grid-area: visual; }
    .pub-direction-extra { display: block; grid-area: extra; max-width: none; }
    .pub-direction-arrow { grid-area: arrow; justify-self: start; }
    .pub-cta-banner { flex-direction: column; align-items: flex-start; text-align: left; padding: 28px 24px; }
}

@media (max-width: 480px) {
    .pub-direction-visual { display: none; }
    .pub-direction-card {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "icon body"
            "extra extra"
            "arrow arrow";
    }
}
