:root {
    --brand-ink: #14213d;
    --brand-accent: #0b6e4f;
    --brand-accent-dark: #085640;
    --brand-sand: #f3f1ec;
    --brand-line: #d9d4cb;
    --brand-muted: #5c6570;
    --font-sans: "Source Sans 3", "Segoe UI", sans-serif;
    --font-display: "Source Serif 4", Georgia, serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--brand-ink);
    background:
        radial-gradient(circle at top right, rgba(11, 110, 79, 0.08), transparent 40%),
        linear-gradient(180deg, #fbfaf7 0%, var(--brand-sand) 100%);
}

a {
    color: var(--brand-accent);
}

a:hover {
    color: var(--brand-accent-dark);
}

.site-brand {
    color: var(--brand-ink);
    letter-spacing: -0.02em;
    font-family: var(--font-display);
}

.site-header .nav-link {
    color: var(--brand-ink);
    font-weight: 600;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
    color: var(--brand-accent);
}

.hero-shell {
    background:
        linear-gradient(135deg, rgba(20, 33, 61, 0.92), rgba(11, 110, 79, 0.78)),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    color: #fff;
}

.hero-shell .text-secondary,
.hero-shell .lead {
    color: rgba(255, 255, 255, 0.85) !important;
}

.hero-eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
}

.hero-title {
    font-family: var(--font-display);
    letter-spacing: -0.03em;
}

.hero-search {
    max-width: 40rem;
}

.btn-primary {
    --bs-btn-bg: var(--brand-accent);
    --bs-btn-border-color: var(--brand-accent);
    --bs-btn-hover-bg: var(--brand-accent-dark);
    --bs-btn-hover-border-color: var(--brand-accent-dark);
    --bs-btn-active-bg: var(--brand-accent-dark);
    --bs-btn-active-border-color: var(--brand-accent-dark);
}

.btn-outline-secondary {
    --bs-btn-color: #fff;
    --bs-btn-border-color: rgba(255, 255, 255, 0.55);
    --bs-btn-hover-bg: rgba(255, 255, 255, 0.12);
    --bs-btn-hover-border-color: #fff;
    --bs-btn-hover-color: #fff;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.chip:hover,
.chip:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
    color: #fff;
}

.step-number {
    width: 2.25rem;
    height: 2.25rem;
    margin-inline: auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(11, 110, 79, 0.12);
    color: var(--brand-accent);
    font-weight: 700;
}

.empty-state {
    border: 1px dashed var(--brand-line);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.7);
}

.footer-link {
    color: var(--brand-muted);
    text-decoration: none;
}

.footer-link:hover,
.footer-link:focus {
    color: var(--brand-accent);
}

.site-footer {
    color: var(--brand-muted);
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.85rem;
    }

    .hero-search .input-group-lg > .form-control,
    .hero-search .input-group-lg > .btn {
        font-size: 1rem;
    }
}

.auth-body {
    background:
        radial-gradient(circle at top right, rgba(11, 110, 79, 0.12), transparent 45%),
        linear-gradient(180deg, #fbfaf7 0%, var(--brand-sand) 100%);
}

.admin-body {
    background: #eef1f4;
    overflow-x: hidden;
}

.admin-shell {
    min-height: 100vh;
    min-width: 0;
}

.admin-sidebar {
    --bs-offcanvas-width: min(20rem, 88vw);
    width: var(--bs-offcanvas-width);
    max-width: 20rem;
}

.admin-topbar-title {
    min-width: 0;
}

.admin-sidebar .nav-link {
    border-radius: 0.5rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
}

.admin-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.14);
}

.admin-main {
    min-width: 0;
}

@media (min-width: 992px) {
    .admin-sidebar {
        --bs-offcanvas-width: 17.5rem;
        width: 17.5rem;
        max-width: none;
        position: sticky;
        top: 0;
        height: 100vh;
        display: flex !important;
        flex-direction: column;
        visibility: visible !important;
        transform: none !important;
    }

    .admin-sidebar .offcanvas-body {
        height: 100%;
        overflow-y: auto;
    }
}

.franchise-card__paraguay {
    color: var(--brand-ink-muted, #5c6670);
}

.franchise-status-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
    border: 1px solid transparent;
}

.franchise-status-badge--franchising {
    color: #0b5c45;
    background: #e7f6ef;
    border-color: #b7e0cd;
}

.franchise-status-badge--company_owned_only {
    color: #5c4a17;
    background: #f7f1d8;
    border-color: #e2d39a;
}

.franchise-status-badge--not_currently_offering {
    color: #6b3a12;
    background: #f8e8dc;
    border-color: #e5c2a4;
}

.franchise-status-badge--unknown {
    color: #4b5563;
    background: #eef1f4;
    border-color: #d5dbe3;
}

.directory-sidebar {
    width: 100%;
    max-width: 18.75rem;
    position: sticky;
    top: 5rem;
}

.directory-filters-toggle,
.directory-mobile-filter-bar {
    z-index: 1020;
}

.directory-mobile-filter-bar {
    position: sticky;
    bottom: 0;
    padding: 0.75rem 1rem;
    background: rgba(251, 250, 247, 0.96);
    border-top: 1px solid var(--brand-line);
}

.franchise-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--brand-line);
    border-radius: 1rem;
    overflow: hidden;
}

.franchise-card__media {
    position: relative;
    min-height: 7.5rem;
    background: linear-gradient(135deg, #e8f2ee, #f6f4ef);
    display: grid;
    place-items: center;
}

.franchise-card__logo {
    max-height: 4.5rem;
    max-width: 70%;
    object-fit: contain;
}

.franchise-card__logo-fallback {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: grid;
    place-items: center;
    background: var(--brand-ink);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.franchise-card__featured {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #fff;
    border: 1px solid var(--brand-line);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
}

.franchise-card__sponsored {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--brand-ink);
    color: #fff;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
}

.franchise-card__body {
    padding: 1rem 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.franchise-card__title {
    font-family: var(--font-display);
}

.franchise-card__facts {
    display: grid;
    gap: 0.55rem;
}

.franchise-card__facts dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brand-muted);
    margin: 0;
}

.franchise-card__facts dd {
    margin: 0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.franchise-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.franchise-card__chips li {
    font-size: 0.75rem;
    border: 1px solid var(--brand-line);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    background: var(--brand-sand);
}

.franchise-card__trust {
    color: var(--brand-ink);
}

.category-tile {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    height: 100%;
    padding: 1rem;
    border: 1px solid var(--brand-line);
    border-radius: 1rem;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.category-tile:hover,
.category-tile:focus {
    border-color: var(--brand-accent);
    color: inherit;
    transform: translateY(-2px);
}

.category-tile__icon {
    font-weight: 700;
    color: var(--brand-accent);
}

.category-tile__name {
    font-weight: 700;
}

.category-tile__count {
    font-size: 0.875rem;
    color: var(--brand-muted);
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--brand-line);
    background: #fff;
    color: var(--brand-ink);
    text-decoration: none;
    font-size: 0.875rem;
}

.filter-pill:hover,
.filter-pill:focus {
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

.chip-light {
    border-color: var(--brand-line);
    color: var(--brand-ink);
    background: #fff;
}

.chip-light:hover,
.chip-light:focus {
    border-color: var(--brand-accent);
    color: var(--brand-accent);
    background: #fff;
}

.guide-teaser {
    border: 1px solid var(--brand-line);
    border-radius: 1.25rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 241, 236, 0.95));
}

.btn.disabled,
.btn:disabled,
.nav-link.disabled {
    cursor: not-allowed;
}

.franchise-detail__logo,
.franchise-detail__logo-fallback {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 0.85rem;
    object-fit: contain;
    flex-shrink: 0;
}

.franchise-detail__logo-fallback {
    display: grid;
    place-items: center;
    background: var(--brand-ink);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.75rem;
}

.franchise-detail__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--brand-line);
    border-radius: 0.85rem;
    background: #fff;
    font-size: 0.925rem;
}

.detail-section {
    padding: 1.25rem 0;
    border-top: 1px solid var(--brand-line);
}

.detail-facts {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.detail-facts dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brand-muted);
    margin: 0;
}

.detail-facts dd {
    margin: 0.15rem 0 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.investment-summary {
    border: 1px solid var(--brand-line);
    border-radius: 1rem;
    background: #fff;
    padding: 1.15rem;
}

@media (min-width: 992px) {
    .investment-summary {
        position: sticky;
        top: 5.5rem;
    }
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 0.75rem;
}

.support-grid__item {
    display: flex;
    gap: 0.65rem;
    padding: 0.75rem;
    border: 1px solid var(--brand-line);
    border-radius: 0.75rem;
    background: #fff;
}

.support-grid__mark {
    font-weight: 700;
    color: var(--brand-accent);
}

.source-list__item {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--brand-line);
}

.detail-disclaimer {
    padding: 1rem;
    border-radius: 0.85rem;
    background: rgba(20, 33, 61, 0.04);
    border: 1px solid var(--brand-line);
    color: var(--brand-muted);
    font-size: 0.925rem;
}

.preserve-lines {
    white-space: pre-line;
}

.compare-table-wrap {
    border: 1px solid var(--brand-line);
    border-radius: 0.85rem;
    background: #fff;
}

.compare-table th:first-child,
.compare-table td:first-child {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 1;
    min-width: 11rem;
}

.compare-card {
    border: 1px solid var(--brand-line);
    border-radius: 0.85rem;
    background: #fff;
    padding: 1rem;
}

.compare-card__row {
    display: grid;
    gap: 0.25rem;
    padding: 0.55rem 0;
    border-top: 1px solid var(--brand-line);
}

.compare-tray {
    position: sticky;
    bottom: 0;
    z-index: 1040;
    background: rgba(20, 33, 61, 0.96);
    color: #fff;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.compare-tray a,
.compare-tray .btn-outline-secondary {
    color: inherit;
}

.compare-tray .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.45);
}

.compare-tray .btn-primary {
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #fff;
    --bs-btn-color: var(--brand-ink);
    --bs-btn-hover-bg: var(--brand-sand);
    --bs-btn-hover-border-color: var(--brand-sand);
    --bs-btn-hover-color: var(--brand-ink);
}

.js-compare-toggle.active {
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

.journey-card {
    display: block;
    height: 100%;
    padding: 1.5rem;
    border: 1px solid var(--brand-line);
    border-radius: 1rem;
    background: linear-gradient(160deg, #fff 0%, rgba(20, 33, 61, 0.03) 100%);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.journey-card:hover {
    border-color: var(--brand-accent);
    transform: translateY(-2px);
    color: inherit;
}

.topic-tile {
    padding: 0.85rem 1rem;
    border: 1px solid var(--brand-line);
    border-radius: 0.75rem;
    background: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.journey-roadmap__item {
    position: relative;
    padding: 1rem 1rem 1rem 1.25rem;
    margin-bottom: 0.85rem;
    border-left: 3px solid var(--brand-accent);
    background: #fff;
    border-radius: 0 0.75rem 0.75rem 0;
    border-top: 1px solid var(--brand-line);
    border-right: 1px solid var(--brand-line);
    border-bottom: 1px solid var(--brand-line);
}

.journey-roadmap__step {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brand-accent);
    margin-bottom: 0.35rem;
}

.guide-article .source-list__item {
    margin-bottom: 0.5rem;
}

.franchise-detail__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 0.75rem;
}

.franchise-detail__gallery-item {
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #f3f1ec;
}

.franchise-detail__gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.franchise-media-admin {
    max-width: 100%;
    min-width: 0;
}

.franchise-media-admin__card {
    border: 1px solid var(--brand-line, #ddd);
    border-radius: 0.85rem;
    padding: 1rem;
    background: #fff;
    min-width: 0;
}

.franchise-media-admin__logo-preview {
    width: 160px;
    height: 160px;
    max-width: 100%;
    border: 1px solid var(--brand-line, #ddd);
    border-radius: 0.85rem;
    overflow: hidden;
    background: #f3f1ec;
    display: grid;
    place-items: center;
}

.franchise-media-admin__logo-link {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.franchise-media-admin__logo-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.franchise-media-admin__logo-empty {
    color: #6c757d;
    font-size: 0.875rem;
    text-align: center;
    padding: 0.5rem;
}

.franchise-media-admin__logo-meta,
.franchise-media-admin__logo-meta-form {
    min-width: 0;
    max-width: 100%;
}

.franchise-media-admin__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11.25rem, 13.75rem));
    gap: 0.85rem;
    justify-content: start;
    max-width: 100%;
}

.franchise-media-admin__thumb {
    border: 1px solid var(--brand-line, #ddd);
    border-radius: 0.75rem;
    padding: 0.65rem;
    background: #fff;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.franchise-media-admin__thumb-media {
    width: 100%;
    height: 9.25rem;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f3f1ec;
}

.franchise-media-admin__thumb-link {
    display: block;
    width: 100%;
    height: 100%;
}

.franchise-media-admin__thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.franchise-media-admin__thumb-form,
.franchise-media-admin__thumb-form .form-control {
    max-width: 100%;
    min-width: 0;
}

@media (max-width: 575.98px) {
    .franchise-media-admin__logo-preview {
        width: 120px;
        height: 120px;
    }

    .franchise-media-admin__gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .franchise-media-admin__thumb-media {
        height: 7.5rem;
    }
}

