/* ==========================================================================
   Mwepesi English Academy — Design System
   Translated from the Tailwind v4 / oklch theme into vanilla CSS variables.
   ========================================================================== */

:root {
    --radius: 14px;
    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 22px;
    --radius-pill: 999px;

    --background: #fcfcf8;
    --foreground: #0e1430;
    --card: #ffffff;
    --card-foreground: #0e1430;

    --primary: rgb(25, 25, 181);
    --primary-foreground: #fcfcf8;
    --primary-deep: #060853;

    --secondary: #eef1fb;
    --secondary-foreground: #1a1f6b;

    --muted: #f1f3fa;
    --muted-foreground: #6b7088;

    --accent: rgb(223, 247, 75);
    --accent-foreground: #0e1430;

    --border: #e3e6f1;
    --input: #e6e9f3;

    --shadow-soft: 0 10px 30px -10px rgba(14, 20, 48, 0.15);
    --shadow-elegant: 0 25px 50px -15px rgba(14, 20, 48, 0.35);
    --shadow-glow: 0 20px 60px -20px rgba(255, 168, 50, 0.45);

    --gradient-hero: linear-gradient(135deg, rgb(25, 25, 181) 0%, rgb(20, 20, 145) 100%);
    --gradient-cta: linear-gradient(135deg, #ffb547 0%, #ff7a3a 100%);
    --gradient-accent: linear-gradient(135deg, rgb(223, 247, 75) 0%, #e7a23a 100%);
    --gradient-radial: radial-gradient(circle at 30% 20%, rgba(60, 60, 220, 0.55), transparent 60%);
    --gradient-footer: linear-gradient(180deg, rgb(1, 11, 71) 0%, rgb(1, 11, 71) 100%);

    --font-display: "Fraunces", Georgia, serif;
    --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;

    --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-color: var(--border);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--background);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.25s var(--transition-smooth);
}

a:hover {
    color: var(--primary-deep);
}

h1, h2, h3, h4, .font-display {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    color: var(--foreground);
    font-weight: 700;
    line-height: 1.1;
}

h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem); }
h2 { font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.125rem; }

p { color: var(--foreground); }

img { max-width: 100%; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-balance { text-wrap: balance; }
.italic { font-style: italic; }

/* ==========================================================================
   Header / navigation
   ========================================================================== */

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(8px);
}

.site-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--gradient-hero);
    display: grid;
    place-items: center;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.1rem;
    box-shadow: var(--shadow-soft);
}

.brand-text {
    line-height: 1.05;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.15rem;
    color: var(--primary);
    letter-spacing: 0.02em;
}

.brand-tagline {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    color: var(--muted-foreground);
    text-transform: uppercase;
    font-weight: 600;
}

.nav-pills {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: transparent;
}

.nav-pills a {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-pill);
    color: var(--foreground);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.25s var(--transition-smooth);
}

.nav-pills a:hover {
    background: var(--secondary);
    color: var(--primary);
}

.nav-pills a.is-active {
    background: var(--secondary);
    color: var(--primary);
    font-weight: 600;
}

.nav-cta {
    margin-left: 0.5rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s var(--transition-smooth);
    line-height: 1;
    white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn-primary {
    background: var(--gradient-cta);
    color: #1a1308;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover { color: #1a1308; box-shadow: 0 25px 50px -15px rgba(255, 168, 50, 0.6); }

.btn-secondary {
    background: var(--primary);
    color: #fff;
}
.btn-secondary:hover { color: #fff; background: var(--primary-deep); }

.btn-ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.7); }

.btn-outline {
    background: #fff;
    color: var(--primary);
    border-color: var(--border);
}
.btn-outline:hover { color: var(--primary-deep); border-color: var(--primary); }

.btn-lg { padding: 0.95rem 1.85rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* Backwards compat: keep old .btn-secondary but also expose modifiers above */

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    position: relative;
    background: var(--gradient-hero);
    color: #fff;
    overflow: hidden;
    border-radius: 0 0 32px 32px;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--gradient-radial);
    pointer-events: none;
    opacity: 0.7;
}

.hero .container {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding-top: 4rem;
    padding-bottom: 4.5rem;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    margin-bottom: 1.5rem;
}

.hero-eyebrow::before {
    content: "✦";
    color: var(--accent);
    font-size: 0.85rem;
}

.hero-title {
    color: #fff;
    font-size: clamp(2.5rem, 5vw, 4.25rem);
    font-weight: 900;
    margin-bottom: 1.25rem;
    line-height: 1.05;
}

.hero-title em {
    font-style: italic;
    font-weight: 700;
    color: var(--accent);
    background: linear-gradient(135deg, var(--accent) 0%, #fff8a3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-lead {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    max-width: 30rem;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-media {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-elegant);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.25) 100%);
    pointer-events: none;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
    padding: 5rem 0;
}

.section-eyebrow {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.section-header {
    text-align: center;
    max-width: 42rem;
    margin: 0 auto 3rem;
}

.section-header p {
    color: var(--muted-foreground);
    margin-top: 0.75rem;
    font-size: 1.05rem;
}

main { min-height: 50vh; }

main.container { padding-top: 2rem; padding-bottom: 4rem; }

/* ==========================================================================
   Cards / grid
   ========================================================================== */

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    transition: all 0.3s var(--transition-smooth);
    color: var(--card-foreground);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(25, 25, 181, 0.25);
}

.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--muted-foreground); margin-bottom: 1rem; }

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--secondary);
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.card-accent {
    background: var(--gradient-accent);
    color: var(--primary-deep);
    border: none;
}

.card-accent h3, .card-accent p { color: var(--primary-deep); }

/* Niveau cards keep their colored left border */
.card-niveau {
    border-left: 4px solid var(--primary);
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes pop {
    0%   { transform: scale(0.96); }
    60%  { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Hero entrance */
.hero-eyebrow { animation: fadeUp 0.7s var(--transition-smooth) both; }
.hero-title   { animation: fadeUp 0.8s 0.05s var(--transition-smooth) both; }
.hero-lead    { animation: fadeUp 0.8s 0.18s var(--transition-smooth) both; }
.hero-cta     { animation: fadeUp 0.8s 0.30s var(--transition-smooth) both; }
.hero-media   { animation: fadeIn 1s 0.25s var(--transition-smooth) both, float 7s 1.5s ease-in-out infinite; }

/* Scroll reveal — controlled by IntersectionObserver in layout.php */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--transition-smooth), transform 0.7s var(--transition-smooth);
    will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--transition-smooth), transform 0.6s var(--transition-smooth);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-stagger > *, .hero-eyebrow, .hero-title, .hero-lead, .hero-cta, .hero-media {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Button microinteraction */
.btn { position: relative; overflow: hidden; }
.btn::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.btn:hover::after { opacity: 1; animation: shimmer 1.2s linear infinite; }

/* Card icon micro-bounce on hover */
.card:hover .card-icon { animation: pop 0.4s var(--transition-smooth); }

/* ==========================================================================
   Carousel
   ========================================================================== */

.carousel {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: var(--card);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar { display: none; }

.carousel-slide {
    position: relative;
    flex: 0 0 100%;
    scroll-snap-align: start;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2rem 2rem 1.75rem;
    background: linear-gradient(180deg, transparent 0%, rgba(1, 11, 71, 0.85) 80%);
    color: #fff;
}

.carousel-caption h3 {
    color: #fff;
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
}

.carousel-caption p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    max-width: 38rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-soft);
    transition: all 0.25s var(--transition-smooth);
    z-index: 2;
}

.carousel-btn:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.carousel-btn-prev { left: 1rem; }
.carousel-btn-next { right: 1rem; }

.carousel-dots {
    position: absolute;
    bottom: 0.85rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    z-index: 2;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    cursor: pointer;
    transition: all 0.25s var(--transition-smooth);
    padding: 0;
}

.carousel-dot.is-active {
    background: var(--accent);
    width: 22px;
}

@media (max-width: 720px) {
    .carousel-slide { aspect-ratio: 4 / 3; }
    .carousel-caption { padding: 1.25rem 1.25rem 1.5rem; }
    .carousel-caption h3 { font-size: 1.15rem; }
    .carousel-btn { width: 38px; height: 38px; }
}

/* ==========================================================================
   Club CTA banner
   ========================================================================== */

.club-cta {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background:
        radial-gradient(1200px 400px at -10% 120%, rgba(223, 247, 75, 0.18), transparent 60%),
        linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 60%, #2d2dd6 100%);
    color: #fff;
    padding: 3.5rem 2.5rem;
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 2.5rem;
    align-items: center;
    box-shadow: 0 30px 60px -30px rgba(25, 25, 181, 0.55);
}

.club-cta::after {
    content: "";
    position: absolute;
    top: -40%;
    right: -10%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(223, 247, 75, 0.22) 0%, transparent 70%);
    filter: blur(20px);
    pointer-events: none;
}

.club-cta-copy h2 {
    color: #fff;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    margin: 0.5rem 0 1rem;
}

.club-cta-copy h2 em {
    font-style: italic;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.club-cta-copy p {
    color: rgba(255, 255, 255, 0.86);
    max-width: 38rem;
    margin: 0 0 1.5rem;
}

.club-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.club-cta-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
    position: relative;
    z-index: 1;
}

.club-cta-points li {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 0.85rem 1.1rem;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.club-cta-points li strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
    .club-cta {
        grid-template-columns: 1fr;
        padding: 2.5rem 1.5rem;
        text-align: center;
    }
    .club-cta-actions { justify-content: center; }
    .club-cta-points { margin-top: 0.5rem; }
}

/* ==========================================================================
   Admin
   ========================================================================== */

.admin-shell {
    background: linear-gradient(135deg, var(--primary-deep), var(--primary));
    color: #fff;
    border-radius: 24px;
    padding: 2rem 2rem 0;
    margin: 0 0 2rem;
    box-shadow: var(--shadow-card);
}

.admin-shell h1 { color: #fff; font-size: clamp(1.6rem, 3vw, 2rem); }
.admin-shell .section-eyebrow { color: var(--accent); }

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
}

.admin-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.admin-actions .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    background: transparent;
}
.admin-actions .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.admin-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-deep);
}

.admin-tabs {
    display: flex;
    gap: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 0.4rem;
    margin-top: 0.2rem;
    overflow-x: auto;
}

.admin-tabs a {
    color: rgba(255, 255, 255, 0.78);
    padding: 0.85rem 1.25rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 14px 14px 0 0;
    white-space: nowrap;
    transition: background 0.2s var(--transition-smooth), color 0.2s var(--transition-smooth);
}
.admin-tabs a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.admin-tabs a.is-active {
    background: var(--background);
    color: var(--primary-deep);
}

/* Stats row */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-stat {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admin-stat-value {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2rem;
    color: var(--primary-deep);
    line-height: 1;
}

.admin-stat-label {
    color: var(--muted-foreground);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-stat-success { border-color: #b8e6c8; }
.admin-stat-success .admin-stat-value { color: #15803d; }
.admin-stat-warn    { border-color: #f0d8a0; }
.admin-stat-warn .admin-stat-value    { color: #b45309; }

/* List of articles */
.admin-list {
    display: grid;
    gap: 1rem;
}

.admin-item {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.25s var(--transition-smooth), transform 0.25s var(--transition-smooth);
}

.admin-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px -18px rgba(14, 20, 48, 0.18);
}

.admin-item-cover {
    width: 140px;
    height: 96px;
    border-radius: 14px;
    background-color: var(--secondary);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.admin-item-cover--blank {
    display: grid;
    place-items: center;
    background: var(--secondary);
    color: var(--primary);
    font-size: 1.8rem;
}

.admin-item-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.admin-item-title {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
    color: var(--primary-deep);
}

.admin-item-excerpt {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.admin-item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: stretch;
    min-width: 120px;
}

.admin-item-actions .btn { font-size: 0.85rem; padding: 0.5rem 0.9rem; text-align: center; }

.admin-delete {
    color: #b91c1c;
    font-size: 0.8rem;
    text-align: center;
    padding-top: 0.3rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.admin-delete:hover { color: #7f1d1d; }

.admin-tag {
    background: var(--secondary);
    color: var(--primary-deep);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-pill);
}

.admin-badge {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-pill);
}
.admin-badge-success { background: #dcfce7; color: #15803d; }
.admin-badge-warn    { background: #fef3c7; color: #92400e; }

.admin-date {
    color: var(--muted-foreground);
    font-size: 0.8rem;
    margin-left: auto;
}

/* Suggested category chips (form) */
.chip-suggest {
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--muted-foreground);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--transition-smooth);
}
.chip-suggest:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--secondary);
}

/* Login card */
.admin-login-card {
    max-width: 460px;
    margin: 3rem auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
}

.admin-login-card h1 { margin: 0.4rem 0 0.5rem; font-size: 2rem; }
.admin-login-card p { color: var(--muted-foreground); margin: 0; }

@media (max-width: 720px) {
    .admin-item { grid-template-columns: 1fr; text-align: left; }
    .admin-item-cover { width: 100%; height: 160px; }
    .admin-item-actions { flex-direction: row; flex-wrap: wrap; }
    .admin-date { margin-left: 0; }
}

/* ==========================================================================
   Forms
   ========================================================================== */

form {
    max-width: 720px;
    margin: 2rem auto;
}

form.form-wide { max-width: 100%; }

.form-group { margin-bottom: 1.25rem; }

.form-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Stylish fieldset / step block */
fieldset.form-step {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.75rem 1.75rem 1.5rem;
    margin: 0 0 1.5rem;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth);
}

fieldset.form-step:hover {
    box-shadow: 0 18px 40px -18px rgba(14, 20, 48, 0.18);
}

fieldset.form-step legend {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--primary);
    padding: 0.4rem 0.9rem;
    background: var(--secondary);
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    margin-left: -0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

fieldset.form-step legend .step-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gradient-cta);
    color: #1a1308;
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 0.8rem;
    display: grid;
    place-items: center;
}

.form-help {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    margin-top: 0.35rem;
}

/* Chip-style checkboxes / radios */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.chip {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.chip input { position: absolute; opacity: 0; pointer-events: none; }

.chip-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-pill);
    background: var(--secondary);
    color: var(--secondary-foreground);
    border: 1.5px solid transparent;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s var(--transition-smooth);
}

.chip:hover .chip-label {
    background: #e3e9fb;
    transform: translateY(-1px);
}

.chip input:checked + .chip-label {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary-deep);
    box-shadow: 0 8px 18px -8px rgba(25, 25, 181, 0.45);
}

.chip input:checked + .chip-label::before {
    content: "✓";
    font-weight: 800;
    color: var(--accent);
}

.chip input:focus-visible + .chip-label {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Photo upload zone */
.upload-zone {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px dashed var(--input);
    border-radius: var(--radius-lg);
    background: #fafbff;
    cursor: pointer;
    transition: all 0.25s var(--transition-smooth);
}

.upload-zone:hover {
    border-color: var(--primary);
    background: #f1f4ff;
}

.upload-zone input[type="file"] {
    display: none;
}

.upload-zone .upload-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--gradient-accent);
    color: var(--primary-deep);
    font-size: 1.4rem;
    font-weight: 700;
}

.upload-zone .upload-text strong { color: var(--foreground); display: block; }
.upload-zone .upload-text span { color: var(--muted-foreground); font-size: 0.85rem; }

/* Page-intro block above forms */
.form-intro {
    text-align: center;
    margin: 0 auto 2rem;
    max-width: 36rem;
}

.form-intro .section-eyebrow { margin-bottom: 0.5rem; }
.form-intro p { color: var(--muted-foreground); margin-top: 0.5rem; }

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--foreground);
    font-size: 0.9rem;
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    color: var(--foreground);
    background: #fff;
    transition: all 0.2s var(--transition-smooth);
}

textarea { resize: vertical; min-height: 130px; }

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(25, 25, 181, 0.12);
}

/* ==========================================================================
   Tables
   ========================================================================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

th, td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th { background: var(--secondary); font-weight: 600; color: var(--secondary-foreground); }

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(238, 241, 251, 0.5); }

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 1px solid transparent;
    font-weight: 500;
}

.alert-success { background: #e8f8ee; color: #0d6b32; border-color: #b6e7c5; }
.alert-error   { background: #fdecec; color: #8a1f1f; border-color: #f3c2c2; }
.alert-info    { background: #e8efff; color: #1a3da8; border-color: #c2d2ff; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: var(--gradient-footer);
    color: #cdd1ee;
    padding: 4rem 0 2rem;
    margin-top: 6rem;
}

.site-footer h3 { color: #fff; margin-bottom: 1rem; font-size: 1.1rem; }
.site-footer p, .site-footer li { color: #cdd1ee; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--accent); }

.site-footer .grid { gap: 2.5rem; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(205, 209, 238, 0.7);
}

/* ==========================================================================
   Mobile menu toggle (progressively enhanced via :target)
   ========================================================================== */

.nav-toggle {
    display: none;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.55rem 0.75rem;
    color: var(--primary);
    font-size: 1.1rem;
    cursor: pointer;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    .hero-media { order: -1; }
}

@media (max-width: 760px) {
    .nav-toggle { display: inline-flex; }
    .nav-pills {
        position: absolute;
        top: 100%;
        left: 1rem;
        right: 1rem;
        flex-direction: column;
        align-items: stretch;
        background: #fff;
        padding: 1rem;
        border-radius: var(--radius-lg);
        border: 1px solid var(--border);
        box-shadow: var(--shadow-soft);
        display: none;
        gap: 0.25rem;
    }
    .nav-pills.is-open { display: flex; }
    .nav-pills a { width: 100%; }
    .nav-cta { margin-left: 0; }
    .section { padding: 3.5rem 0; }
    main.container { padding-top: 1rem; }
}
