/* ===========================================================================
 * Nocrich theme — design for a scout centre in a Transylvanian village.
 *
 * Brand: deep red (#5c0501, the centre's colour) on white, with a slightly
 * lighter brick-red accent. Editorial serif headings (Fraunces) over a clean
 * sans (Inter) body. Structure/approach inspired by scout-centre sites (KISC):
 * a strong hero, activity cards, "plan your visit" blocks, news feed.
 *
 * Brand colours come per-site from theme_config as CSS custom properties
 * (--nocrich-primary / --nocrich-secondary, injected in base_site.html).
 * Everything below keys off those + a few derived tokens so one Site
 * config change re-skins the whole site.
 * ========================================================================= */

:root {
    --nocrich-primary: #5c0501;
    --nocrich-secondary: #8a1f1a;

    /* Derived tokens (fall back gracefully where color-mix is unsupported) */
    --nocrich-primary-dark: color-mix(in srgb, var(--nocrich-primary) 80%, black);
    --nocrich-primary-soft: color-mix(in srgb, var(--nocrich-primary) 6%, white);
    --nocrich-ink: #2a211f;
    --nocrich-muted: #6c625f;
    --nocrich-paper: #ffffff;
    --nocrich-line: #ece2e0;
}

/* --- Base ---------------------------------------------------------------- */
body.nocrich {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    color: var(--nocrich-ink);
    background: var(--nocrich-paper);
}

body.nocrich h1,
body.nocrich h2,
body.nocrich h3,
body.nocrich .nocrich-brand-text {
    font-family: "Fraunces", Georgia, serif;
    letter-spacing: -0.01em;
}

body.nocrich a {
    color: var(--nocrich-primary);
    text-underline-offset: 2px;
}

body.nocrich a:hover {
    color: var(--nocrich-primary-dark);
}

body.nocrich .text-secondary-accent {
    color: var(--nocrich-secondary) !important;
}

/* --- Buttons ------------------------------------------------------------- */
body.nocrich .btn-primary {
    --bs-btn-bg: var(--nocrich-primary);
    --bs-btn-border-color: var(--nocrich-primary);
    --bs-btn-hover-bg: var(--nocrich-primary-dark);
    --bs-btn-hover-border-color: var(--nocrich-primary-dark);
    --bs-btn-active-bg: var(--nocrich-primary-dark);
    --bs-btn-disabled-bg: var(--nocrich-primary);
    --bs-btn-disabled-border-color: var(--nocrich-primary);
    border-radius: 999px;
    padding-inline: 1.4rem;
    font-weight: 600;
}

body.nocrich .btn-accent {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--nocrich-secondary);
    --bs-btn-border-color: var(--nocrich-secondary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: color-mix(in srgb, var(--nocrich-secondary) 85%, black);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--nocrich-secondary) 85%, black);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: color-mix(in srgb, var(--nocrich-secondary) 85%, black);
    border-radius: 999px;
    padding-inline: 1.4rem;
    font-weight: 600;
}

/* Secondary CTA on the hero: white text + outline on the photo, fills white
   (dark-red text) on hover so it stays readable both ways. */
body.nocrich .btn-outline-light {
    --bs-btn-color: #fff;
    --bs-btn-border-color: rgba(255, 255, 255, 0.85);
    --bs-btn-hover-color: var(--nocrich-primary);
    --bs-btn-hover-bg: #fff;
    --bs-btn-hover-border-color: #fff;
    --bs-btn-active-color: var(--nocrich-primary);
    --bs-btn-active-bg: #fff;
    border-radius: 999px;
    padding-inline: 1.4rem;
    font-weight: 600;
}

/* --- Header / nav -------------------------------------------------------- */
.nocrich-header {
    background: var(--nocrich-primary);
    color: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.nocrich-header .navbar {
    padding-block: 0.6rem;
}

.nocrich-header .navbar-brand,
.nocrich-header .nav-link,
.nocrich-header .navbar-text {
    color: #fff;
}

.nocrich-header .nav-link {
    font-weight: 500;
    position: relative;
}

.nocrich-header .nav-link:hover,
.nocrich-header .nav-link:focus {
    color: #fff;
    opacity: 0.9;
}

/* Gold underline on hover/active nav items */
.nocrich-header .navbar-nav:not(.nocrich-lang-switch) .nav-link::after {
    content: "";
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.15rem;
    height: 2px;
    background: var(--nocrich-secondary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.18s ease;
}

.nocrich-header .navbar-nav:not(.nocrich-lang-switch) .nav-link:hover::after {
    transform: scaleX(1);
}

.nocrich-logo {
    height: 48px;
    width: auto;
    display: block;
}

.nocrich-brand-text {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.05;
}

.nocrich-header .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.4);
}

.nocrich-header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Language switcher — uppercase pills, divider on desktop */
.nocrich-lang-switch {
    flex-direction: row;
    gap: 0.1rem;
    align-items: center;
    border-left: 1px solid rgba(255, 255, 255, 0.28);
    padding-left: 0.75rem;
    margin-left: 0.5rem;
}

.nocrich-lang-switch .nav-link {
    padding: 0.2rem 0.45rem;
    text-transform: uppercase;
    font-size: 0.78rem;
    opacity: 0.75;
}

.nocrich-lang-switch .nav-link.active {
    opacity: 1;
}

@media (max-width: 991.98px) {
    .nocrich-lang-switch {
        border-left: 0;
        padding-left: 0;
        margin-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.25);
        padding-top: 0.5rem;
        margin-top: 0.5rem;
    }
}

/* --- Hero ---------------------------------------------------------------- */
.nocrich-hero {
    position: relative;
    color: #fff;
    background: var(--nocrich-primary);
    overflow: hidden;
}

.nocrich-hero--image {
    background-size: cover;
    background-position: center;
}

/* Readability scrim over photos + brand tint */
.nocrich-hero--image::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(42, 12, 14, 0.25), rgba(42, 12, 14, 0.7)),
        linear-gradient(90deg, color-mix(in srgb, var(--nocrich-primary) 55%, transparent), transparent);
}

.nocrich-hero__inner {
    position: relative;
    z-index: 1;
    padding-block: clamp(3.5rem, 9vw, 7rem);
    max-width: 720px;
}

.nocrich-hero h1 {
    font-size: clamp(2.1rem, 5vw, 3.5rem);
    font-weight: 600;
    line-height: 1.05;
    margin-bottom: 1rem;
}

.nocrich-hero p {
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    opacity: 0.95;
    max-width: 54ch;
}

/* Decorative mountain silhouette (placeholder until real photos arrive) */
.nocrich-hero__range {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: auto;
    display: block;
    z-index: 1;
    color: var(--nocrich-paper);
}

/* --- Section rhythm ------------------------------------------------------ */
.nocrich-section {
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.nocrich-section--soft {
    background: var(--nocrich-primary-soft);
}

.nocrich-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--nocrich-secondary);
}

.nocrich-section-title {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    margin-bottom: 0.25rem;
}

/* Accent rule under interior page titles */
body.nocrich .nocrich-prose > h1:first-child::after,
body.nocrich main .nocrich-page-title::after {
    content: "";
    display: block;
    width: 3rem;
    height: 4px;
    margin-top: 0.6rem;
    border-radius: 2px;
    background: var(--nocrich-secondary);
}

/* --- Cards --------------------------------------------------------------- */
body.nocrich .card {
    border: 1px solid var(--nocrich-line);
    border-radius: 0.9rem;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.16s ease, transform 0.16s ease;
}

body.nocrich .card:hover {
    box-shadow: 0 0.65rem 1.6rem rgba(122, 30, 35, 0.12);
    transform: translateY(-3px);
}

body.nocrich .card-img-top {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

/* Pin/recommended badge picks up the accent */
body.nocrich .badge.bg-warning-subtle {
    background: color-mix(in srgb, var(--nocrich-secondary) 22%, white) !important;
    color: var(--nocrich-primary-dark) !important;
}

/* --- Prose --------------------------------------------------------------- */
.nocrich-prose {
    font-size: 1.06rem;
    line-height: 1.7;
}

.nocrich-prose img {
    border-radius: 0.6rem;
}

/* --- Footer -------------------------------------------------------------- */
.nocrich-footer {
    background: var(--nocrich-primary);
    color: rgba(255, 255, 255, 0.85);
    border-top: 4px solid var(--nocrich-secondary);
}

body.nocrich .nocrich-footer a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

body.nocrich .nocrich-footer a:hover {
    color: #fff;
    opacity: 0.8;
}

/* --- Inline edit button (signed-in editors only) ------------------------- */
.nocrich-edit-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1030;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: var(--nocrich-primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.nocrich-edit-fab:hover,
.nocrich-edit-fab:focus {
    background: var(--nocrich-primary-dark);
    color: #fff;
}
