:root {
    --bg: #f4f7f8;
    --surface: #ffffff;
    --ink: #1b2a2f;
    --muted: #5d6e75;
    --line: #d7e0e3;
    --brand: #007f5f;
    --brand-dark: #005d46;
    --accent: #ffb703;
    --danger: #cc2f45;
    --radius: 14px;
    --shadow: 0 18px 35px rgba(15, 50, 56, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at top right, #ebf6f2 0%, var(--bg) 50%, #eef3f5 100%);
}

a {
    color: var(--brand-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1140px, 92vw);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(7px);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid #eff3f4;
    padding: 10px 0 10px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--ink);
}

.brand-logo {
    height: 60px;
    width: auto;
    display: block;
}

.brand-text {
    line-height: 1;
}

.main-nav {
    display: flex;
    gap: 18px;
    align-items: center;
}

.main-nav a {
    color: var(--muted);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.main-nav .nav-cta {
    background: linear-gradient(145deg, var(--brand), var(--brand-dark));
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
}

.main-nav .nav-cta:hover {
    color: #ffffff;
    text-decoration: none;
    filter: brightness(1.03);
}

.main-nav a.is-active,
.main-nav a:hover {
    color: var(--brand-dark);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    background: white;
    border-radius: 8px;
    padding: 8px 10px;
}

main {
    min-height: calc(100vh - 160px);
}

.hero {
    padding: 64px 0 36px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: stretch;
}

.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--brand-dark);
    background: #daf4eb;
    border-radius: 999px;
    padding: 6px 12px;
}

h1,
h2,
h3 {
    line-height: 1.15;
    margin-top: 0;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.1rem);
    margin-bottom: 14px;
}

.hero-copy {
    color: var(--muted);
    font-size: 1.08rem;
    max-width: 64ch;
}

.search-form {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    align-items: center;
}

.search-form > * {
    box-sizing: border-box;
    min-height: 50px;
    margin: 0;
}

.search-form input,
.search-form button,
input,
select,
textarea,
button {
    font: inherit;
}

.search-form input {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
}

.search-form select {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    background: #ffffff;
}

.search-form select,
.search-form button {
    min-height: 50px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.search-form button,
.btn {
    border: 0;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--brand), var(--brand-dark));
    color: white;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 700;
}

.search-form button {
    min-width: 170px;
    justify-content: center;
    white-space: nowrap;
}

.btn-danger {
    background: var(--danger);
}

.btn-ghost {
    background: var(--brand);
    color: #fff;
    padding: 8px 14px;
    font-size: 0.875rem;
}

.listing-card p:last-child {
    margin-top: 35px;
}

.hero-card,
.category-card,
.listing-card,
.detail-card,
.panel,
.form-shell,
.table-shell {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid #e8eef0;
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 24px;
}

.hero-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hero-card li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed var(--line);
    padding: 12px 0;
}

.section {
    padding: 26px 0 34px;
}

.section-alt {
    background: linear-gradient(180deg, rgba(250, 252, 252, 0) 0%, rgba(228, 237, 240, 0.35) 100%);
}

.section-head {
    margin-bottom: 18px;
}

.section-head p {
    color: var(--muted);
}

.category-grid,
.listing-grid,
.admin-grid {
    display: grid;
    gap: 16px;
}

.category-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.listing-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.category-card,
.listing-card {
    padding: 18px;
}

.listing-card {
    position: relative;
    overflow: hidden;
}

.listing-card-featured {
    background: linear-gradient(145deg, var(--brand), var(--brand-dark));
    border-color: transparent;
    color: #ffffff;
}

.listing-card-featured h3,
.listing-card-featured p,
.listing-card-featured a,
.listing-card-featured .listing-cat,
.listing-card-featured .rating-text {
    color: #ffffff;
}

.listing-card-featured .star.is-empty {
    color: rgba(255, 255, 255, 0.45);
}

.listing-card-featured .listing-logo,
.listing-card-featured .detail-logo,
.listing-card-featured .logo-preview img {
    background: rgba(255, 255, 255, 0.14);
}

.listing-card-featured .btn-ghost {
    background: #ffffff;
    color: var(--brand-dark);
}

.listing-card-featured .btn-ghost:hover {
    color: var(--brand-dark);
    text-decoration: none;
}

.category-card {
    background: linear-gradient(145deg, var(--brand), var(--brand-dark));
    border-color: transparent;
    color: #ffffff;
}

.category-card h3,
.category-card p,
.category-card span {
    color: #ffffff;
}

.category-card:hover {
    text-decoration: none;
    filter: brightness(1.03);
}

.category-card span {
    font-weight: 700;
    color: #ffffff;
}

.listing-logo,
.detail-logo,
.logo-preview img {
    overflow: hidden;
    background: #f4f7f8;
}

.listing-logo {
    height: 88px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.listing-logo img,
.detail-logo img,
.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-logo {
    max-width: 300px;
    border-radius: 14px;
    margin-bottom: 14px;
}

.detail-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.logo-upload-note {
    display: block;
    margin: -4px 0 12px;
    color: var(--muted);
    font-size: 0.88rem;
}

.logo-preview {
    margin: 10px 0 14px;
}

.logo-preview img {
    width: 180px;
    height: 100px;
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid var(--line);
    margin-bottom: 8px;
}

.listing-cat {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brand-dark);
    font-weight: 700;
    margin-bottom: 8px;
}

.listing-card .badge {
    position: absolute;
    top: 12px;
    left: -34px;
    width: 130px;
    text-align: center;
    background: #ffb703;
    color: #1b2a2f;
    padding: 5px 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transform: rotate(-45deg);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    z-index: 3;
    pointer-events: none;
}

.listing-card-featured .badge {
    background: #ffd166;
}

.rating-stars {
    display: flex;
    align-items: center;
    gap: 3px;
    margin: 6px 0 8px;
}

.star {
    font-size: 1rem;
    line-height: 1;
}

.star.is-filled {
    color: #f5b301;
}

.star.is-empty {
    color: #c7d1d5;
}

.rating-text {
    margin-left: 6px;
    color: var(--muted);
    font-size: 0.88rem;
}

.reviews-list {
    display: grid;
    gap: 12px;
}

.review-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    background: #fbfdfd;
}

.review-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--brand-dark);
}

.breadcrumb-sep {
    color: #94a5ac;
}

.back-link {
    display: inline-block;
    margin-bottom: 14px;
}

.detail-card {
    padding: 24px;
}

.business-description {
    padding-top: 20px;
    padding-bottom: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.detail-grid dt {
    color: var(--muted);
    font-size: 0.88rem;
}

.detail-grid dd {
    margin: 4px 0 0;
}

.contact-action-btn {
    display: inline-block;
    margin-top: 2px;
}

.contact-action-meta {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    word-break: break-word;
}

.promo-tier-card {
    background: linear-gradient(145deg, var(--brand), var(--brand-dark));
    border-color: transparent;
    color: #ffffff;
}

.promo-tier-card h3,
.promo-tier-card p,
.promo-tier-card strong {
    color: #ffffff;
}

.promo-tier-card-free {
    background: #f5f7f8;
    border: 1px solid var(--line);
    color: var(--ink);
}

.promo-tier-card-free h3,
.promo-tier-card-free p,
.promo-tier-card-free strong {
    color: var(--ink);
}

.promo-features {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: grid;
    gap: 11px;
}

.promo-features li {
    color: #ffffff;
    font-size: 0.9rem;
    line-height: 1.35;
}

.promo-features li::before {
    content: "\2713 ";
    font-weight: 700;
    margin-right: 8px;
}

.promo-features li.unavailable {
    color: rgba(255, 255, 255, 0.45);
}

.promo-features li.unavailable::before {
    content: "\2715 ";
}

.promo-tier-card-free .promo-features li {
    color: var(--ink);
}

.promo-tier-card-free .promo-features li.unavailable {
    color: #8a9aa0;
}

.promo-benefit-list {
    margin: 10px 0 0;
    padding-left: 18px;
    color: var(--muted);
}

.promo-benefit-list li {
    margin-bottom: 6px;
}

.detail-actions .btn {
    padding: 8px 14px;
    font-size: 0.875rem;
}

.flash {
    margin-top: 10px;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
}

.flash-success {
    background: #daf4eb;
    color: #09412e;
}

.flash-error {
    background: #ffe2e6;
    color: #6a1020;
}

.site-footer {
    border-top: 1px solid #e4ecef;
    padding: 22px 0;
    margin-top: 24px;
    color: var(--muted);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.panel,
.form-shell,
.table-shell {
    padding: 18px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #edf2f4;
}

.input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    margin: 4px 0 12px;
    background: #fff;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 860px) {
    .hero-grid,
    .row {
        grid-template-columns: 1fr;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 60px;
        right: 4vw;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 10px;
        box-shadow: var(--shadow);
        padding: 12px;
        width: min(260px, 90vw);
        flex-direction: column;
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav .nav-cta {
        text-align: center;
    }

    .brand-logo {
        height: 38px;
    }

    .brand-text {
        font-size: 1.15rem;
    }

    .search-form {
        flex-direction: column;
    }

    .category-card,
    .listing-card-featured {
        background: linear-gradient(145deg, var(--brand), var(--brand-dark)) !important;
        border-color: transparent !important;
        color: #ffffff !important;
    }

    .category-card h3,
    .category-card p,
    .category-card span,
    .category-card a,
    .listing-card-featured h3,
    .listing-card-featured p,
    .listing-card-featured .listing-cat,
    .listing-card-featured .rating-text,
    .listing-card-featured a {
        color: #ffffff !important;
    }

    .listing-card-featured .btn-ghost,
    .listing-card-featured .btn-ghost:hover,
    .listing-card-featured .btn-ghost:visited {
        color: var(--brand-dark) !important;
    }

    .listing-card .badge {
        top: 10px;
        left: -40px;
        width: 142px;
        padding: 6px 0;
        font-size: 0.7rem;
        z-index: 4;
    }
}
