/* Király Tamás — programs subsite
   Palette: off-white bg, petrol text, gold accent */
:root {
    --bg: #f6f1e8;
    --bg-alt: #efe8da;
    --petrol: #0f3a3d;
    --petrol-dark: #082428;
    --petrol-soft: #27535a;
    --gold: #b58a3b;
    --gold-soft: #d6b36b;
    --ink: #1b1b1b;
    --muted: #6b6b6b;
    --rule: rgba(15, 58, 61, 0.18);
    --danger: #a63a2a;
    --radius: 10px;
    --max: 920px;
    --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --sans: 'Inter', -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(ellipse 60% 40% at 85% 15%, rgba(176, 110, 200, 0.18), transparent 60%),
        radial-gradient(ellipse 55% 35% at 10% 85%, rgba(100, 170, 200, 0.14), transparent 60%),
        var(--bg);
    background-attachment: fixed;
}

a { color: var(--petrol); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--petrol-dark); }
:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
    border-radius: 4px;
}
img { max-width: 100%; height: auto; display: block; }

/* ---------- Public page ---------- */
.site {
    max-width: var(--max);
    margin: 0 auto;
    padding: 12px 24px 80px;
}
.site__brand {
    text-align: center;
    margin-bottom: 32px;
}
.site__logo {
    width: 110px;
    margin: 0 auto;
}
.site__brand-name {
    font-family: var(--sans);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: 13px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 14px;
}

/* ---------- Fixed-photo layout (public page) ---------- */
.layout-fixed { position: relative; min-height: 100vh; }
.layout-fixed__photo {
    position: fixed;
    top: 0;
    right: 0;
    width: 50vw;
    height: 100vh;
    background-color: var(--bg);  /* keep page bg behind image; wide left-edge fade blends photo */
    background-size: cover;
    background-position: center top;
    z-index: 1;
}
.layout-fixed__photo::before {
    /* Fade from page bg into the photo on its left edge */
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--bg) 0%, rgba(246,241,232,0.7) 6%, transparent 18%);
    pointer-events: none;
}
.layout-fixed__photo::after {
    /* Soft aura wash: lavender top, teal bottom */
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 70% 25%, rgba(176,110,200,0.20), transparent 60%),
        radial-gradient(ellipse 65% 50% at 80% 90%, rgba(100,170,200,0.16), transparent 60%);
    mix-blend-mode: screen;
    pointer-events: none;
}
.layout-fixed__scroll {
    position: relative;
    z-index: 2;
    width: 50vw;
    min-height: 100vh;
    padding: 56px clamp(24px, 4.5vw, 72px) 100px;
    display: block;
}
.layout-fixed__scroll .brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
}
.layout-fixed__scroll .brand img { width: 72px; height: auto; }
.layout-fixed__scroll .brand .site__brand-name { margin: 0; }

.hero-text { margin-bottom: 64px; }
.hero-text h1 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(40px, 5.4vw, 68px);
    line-height: 1.02;
    color: var(--petrol);
    margin: 0 0 20px;
    letter-spacing: -0.015em;
}
.hero-text p {
    font-size: 18px;
    color: var(--petrol-soft);
    margin: 6px 0;
    max-width: 520px;
}

@media (max-width: 820px) {
    .layout-fixed__photo { display: none; }
    .layout-fixed__scroll {
        width: 100%;
        padding: 40px 20px 80px;
        text-align: center;
    }
    .layout-fixed__scroll .brand { justify-content: center; }
    .hero-text { text-align: center; }
    .hero-text p { margin-left: auto; margin-right: auto; }
}

.programs { list-style: none; margin: 0; padding: 0; }
.program {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
    padding: 32px 0;
    border-top: 1px solid var(--rule);
}
.program .btn { justify-self: start; }
.program:last-child { border-bottom: 1px solid var(--rule); }
.program__cat {
    font-family: var(--sans);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 10px;
}
.program__title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 32px;
    line-height: 1.15;
    color: var(--petrol);
    margin: 0 0 10px;
}
.program__desc {
    color: var(--muted);
    margin: 0 0 8px;
}
.program__meta {
    color: var(--petrol-soft);
    font-size: 15px;
}
.program__meta span + span::before {
    content: ' · ';
    color: var(--rule);
    margin: 0 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--petrol);
    color: #fff;
    padding: 14px 24px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid var(--petrol);
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--petrol-dark); color: #fff; }
.btn--outline { background: transparent; color: var(--petrol); }
.btn--outline:hover { background: var(--petrol); color: #fff; }
.btn--gold { background: var(--gold); border-color: var(--gold); }
.btn--gold:hover { background: #9a7429; border-color: #9a7429; }
.btn--danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: var(--danger); color: #fff; }
.btn--eye   { background: transparent; color: #1f6feb; border-color: #1f6feb; }
.btn--eye:hover   { background: #1f6feb; color: #fff; }
.btn--edit  { background: transparent; color: #1f8a4c; border-color: #1f8a4c; }
.btn--edit:hover  { background: #1f8a4c; color: #fff; }
.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn--icon {
    padding: 8px;
    width: 36px;
    height: 36px;
    justify-content: center;
    border-radius: 8px;
    gap: 0;
}
.btn--icon svg { width: 18px; height: 18px; display: block; }

.site__footer {
    margin-top: 72px;
    padding-top: 28px;
    border-top: 1px solid var(--rule);
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    letter-spacing: 0.04em;
}
.site__footer a { color: var(--petrol-soft); }

@media (max-width: 640px) {
    .site { padding: 32px 18px 60px; }
    .program {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 28px 0;
    }
    .program__title { font-size: 26px; }
    .program .btn { width: 100%; justify-content: center; }
    .table .actions .btn--icon { width: 36px; }
}

/* ---------- Admin ---------- */
.admin {
    min-height: 100vh;
    background: var(--bg);
}
.admin__bar {
    background: var(--petrol);
    color: #fff;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.admin__bar a, .admin__bar button {
    color: #fff;
    text-decoration: none;
    background: transparent;
    border: 0;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
}
.admin__bar a:hover, .admin__bar button:hover { background: rgba(255,255,255,0.1); }
.admin__bar .spacer { flex: 1; }
.admin__bar strong {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 0.02em;
}

.admin__container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 36px 24px 80px;
}
.admin__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}
.admin__header h1 {
    font-family: var(--serif);
    color: var(--petrol);
    font-size: 32px;
    margin: 0;
}
.alert {
    background: var(--bg-alt);
    border-left: 4px solid var(--gold);
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 6px;
    color: var(--petrol-dark);
}
.alert--error { border-left-color: var(--danger); color: var(--danger); }

.card {
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 12px;
    overflow: hidden;
}
.table th, .table td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid var(--rule);
    font-size: 15px;
    vertical-align: middle;
}
.table th {
    background: var(--bg-alt);
    font-weight: 600;
    color: var(--petrol);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
}
.table tr:last-child td { border-bottom: 0; }
.table .actions { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: flex-end; align-items: center; }
.table .handle { cursor: grab; color: var(--muted); user-select: none; width: 28px; text-align: center; }
.table tr.dragging { opacity: 0.5; }
.table tr.hidden-row { opacity: 0.45; }

.badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg-alt);
    color: var(--petrol-soft);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.badge--off { background: #f1dcd6; color: var(--danger); }

.form-row { margin-bottom: 18px; }
.form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--petrol);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.form-row input[type=text],
.form-row input[type=email],
.form-row input[type=url],
.form-row input[type=password],
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--rule);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    background: #fff;
    color: var(--ink);
}
.form-row textarea { min-height: 110px; resize: vertical; }
.form-row input:focus, .form-row textarea:focus {
    border-color: var(--petrol);
    outline: 3px solid rgba(15,58,61,0.15);
}
.form-row .hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.form-row .error { color: var(--danger); font-size: 13px; margin-top: 6px; }
.form-row .check {
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
}
.form-row .check input { width: 18px; height: 18px; }

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ---------- Login ---------- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    max-width: 400px;
    width: 100%;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 14px;
    padding: 40px 32px;
    text-align: center;
}
.login-card img { width: 90px; margin: 0 auto 16px; }
.login-card h1 {
    font-family: var(--serif);
    color: var(--petrol);
    font-size: 26px;
    margin: 0 0 24px;
}
.login-card .form-row { text-align: left; }
