:root {
    --navy: #142b45;
    --blue: #1767a8;
    --blue-dark: #105486;
    --ink: #263445;
    --muted: #667587;
    --line: #e3e9ef;
    --surface: #f5f8fb;
    --white: #ffffff;
    --radius: 13px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--navy);
    font-size: 18px;
    font-weight: 750;
    line-height: 1.25;
}

.brand:hover { text-decoration: none; }

.brand small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
    margin-top: 4px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border-radius: 11px;
    color: white;
    background: var(--blue);
    font-size: 14px;
}

.main-nav { display: flex; gap: 25px; }
.main-nav a { color: var(--ink); font-weight: 600; }

.hero {
    margin-top: 32px;
    padding: 70px 28px 60px;
    text-align: center;
    background: linear-gradient(135deg, #edf5fc, #f7f9fc);
    border: 1px solid #e6eef6;
    border-radius: 18px;
}

.eyebrow {
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 12px auto;
    color: var(--navy);
    font-size: clamp(30px, 5vw, 45px);
    line-height: 1.15;
}

.hero-text { color: var(--muted); margin: 15px auto 26px; }

.search-form {
    display: flex;
    width: min(680px, 100%);
    margin: 0 auto;
    padding: 6px;
    background: white;
    border: 1px solid #dbe4ed;
    border-radius: 11px;
    box-shadow: 0 5px 20px rgba(24, 55, 85, .06);
}

.search-form input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 13px 15px;
    font-size: 15px;
}

.search-form button, .primary-link {
    border: 0;
    border-radius: 8px;
    padding: 12px 20px;
    color: white;
    background: var(--blue);
    font-weight: 700;
    cursor: pointer;
}

.search-form button:hover, .primary-link:hover {
    background: var(--blue-dark);
    color: white;
    text-decoration: none;
}

.directory-count, .result-count {
    color: var(--muted);
    font-size: 13px;
}

.section { padding: 55px 0; }

.section-heading h2, .info-section h2 {
    color: var(--navy);
    font-size: 27px;
    margin: 3px 0 20px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
}

.category-card {
    display: block;
    padding: 22px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    transition: border-color .15s, transform .15s;
}

.category-card:hover {
    border-color: #9cbdd9;
    transform: translateY(-2px);
    text-decoration: none;
}

.category-icon { color: var(--blue); font-size: 23px; }
.category-card h3 { margin: 10px 0 5px; color: var(--navy); font-size: 17px; }
.category-card p { min-height: 48px; margin: 0 0 13px; color: var(--muted); font-size: 13px; }
.category-count { color: var(--blue); font-size: 12px; font-weight: 700; }

.info-section {
    margin: 10px 0 55px;
    padding: 28px;
    background: var(--surface);
    border-radius: var(--radius);
}

.info-section p { max-width: 800px; color: var(--muted); }

.page-heading { padding: 45px 0 20px; }
.page-heading h1, .profile h1, .not-found h1 {
    margin: 8px 0;
    color: var(--navy);
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.2;
}

.page-heading > p:not(.eyebrow) { color: var(--muted); }

.compact-search {
    margin: 10px 0 28px;
    max-width: 600px;
}

.listing-list { border-top: 1px solid var(--line); }

.listing-card {
    padding: 22px 4px;
    border-bottom: 1px solid var(--line);
}

.listing-card h2 { margin: 0 0 7px; font-size: 19px; }
.listing-card p { margin: 5px 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.details-link { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; }
.listing-category { color: var(--blue); font-size: 12px; font-weight: 700; }

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 30px 0;
    color: var(--muted);
    font-size: 14px;
}

.pagination a { font-weight: 700; }

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 32px 0;
    color: var(--muted);
    font-size: 13px;
}

.profile { max-width: 780px; margin: 0 auto 65px; }
.profile-intro { color: var(--muted); }

.contact-panel {
    margin: 25px 0;
    padding: 10px 25px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.contact-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
}

.contact-item:last-child { border-bottom: 0; }
.contact-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }

.disclaimer { color: var(--muted); font-size: 13px; }
.back-link { display: inline-block; margin-top: 20px; font-weight: 700; }

.not-found { padding: 70px 0; }

.site-footer {
    margin-top: 40px;
    padding: 32px 0;
    color: #d5e0eb;
    background: var(--navy);
    font-size: 13px;
}

.site-footer strong { color: white; font-size: 17px; }
.site-footer p { margin: 7px 0; }

@media (max-width: 850px) {
    .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .container { width: min(100% - 28px, 1120px); }
    .header-inner { min-height: 68px; }
    .brand { font-size: 15px; }
    .brand-mark { width: 38px; height: 38px; }
    .brand small { font-size: 10px; }
    .main-nav { gap: 12px; font-size: 13px; }
    .hero { margin-top: 18px; padding: 48px 16px 35px; }
    .hero h1 { font-size: 31px; }
    .search-form { flex-direction: column; gap: 5px; }
    .search-form input { width: 100%; }
    .category-grid { grid-template-columns: 1fr; }
    .category-card p { min-height: 0; }
    .section { padding: 38px 0; }
    .pagination { gap: 12px; }
}


/* Directory Philippines promotional message */
.directory-promo {
    margin: 13px 0 5px;
    padding: 10px 12px;
    border-left: 3px solid var(--blue);
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.directory-promo strong {
    color: var(--navy);
}

.directory-promo a {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.profile > .directory-promo {
    margin-top: 22px;
    margin-bottom: 18px;
}


/* Directory Philippines sharing panel */
.directory-share-panel {
    margin: 30px 0 26px;
    padding: 22px;
    background: #f6f8fb;
    border: 1px solid #e3e9f0;
    border-radius: 16px;
    box-shadow: 0 3px 14px rgba(20, 42, 67, .045);
}

.directory-share-panel h2 {
    margin: 0 0 6px;
    color: var(--navy);
    font-size: 21px;
    line-height: 1.3;
}

.directory-share-panel > p:not(.share-status) {
    margin: 6px 0 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.directory-share-buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.directory-share-panel .share-btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 9px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(20, 42, 67, .10);
    transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

.directory-share-panel .share-btn::before {
    display: inline-block;
    flex: 0 0 auto;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}

.directory-share-panel .share-btn:hover {
    color: #fff;
    filter: brightness(.93);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 9px rgba(20, 42, 67, .14);
}

.directory-share-panel .share-btn:focus-visible {
    outline: 3px solid #9bc5f5;
    outline-offset: 2px;
}

.directory-share-panel .share-facebook { background: #1877f2; }
.directory-share-panel .share-facebook::before { content: "f"; }

.directory-share-panel .share-messenger { background: #0866ff; }
.directory-share-panel .share-messenger::before { content: "↗"; }

.directory-share-panel .share-x { background: #171717; }
.directory-share-panel .share-x::before { content: "𝕏"; }

.directory-share-panel .share-viber { background: #665cac; }
.directory-share-panel .share-viber::before { content: "☎"; }

.directory-share-panel .share-whatsapp { background: #168b48; }
.directory-share-panel .share-whatsapp::before { content: "◉"; }

.directory-share-panel .share-telegram { background: #168ac4; }
.directory-share-panel .share-telegram::before { content: "➤"; }

.directory-share-panel .share-sms { background: #526477; }
.directory-share-panel .share-sms::before { content: "▣"; }

.directory-share-panel .share-email { background: #46566a; }
.directory-share-panel .share-email::before { content: "✉"; }

.directory-share-panel .share-more {
    background: var(--blue);
    color: #fff;
}
.directory-share-panel .share-more::before { content: "+"; }

.directory-share-panel .share-copy {
    background: var(--navy);
    color: #fff;
}
.directory-share-panel .share-copy::before { content: "⧉"; }

.directory-share-panel .share-status {
    min-height: 20px;
    margin: 12px 0 0;
    color: var(--blue-dark);
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .directory-share-panel {
        padding: 17px;
        border-radius: 13px;
    }

    .directory-share-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .directory-share-panel .share-btn {
        min-height: 45px;
        padding: 10px 7px;
        font-size: 12px;
    }
}

@media (max-width: 340px) {
    .directory-share-panel {
        padding: 13px;
    }

    .directory-share-panel .share-btn {
        font-size: 11px;
    }
}




/* Business city and province subcategory navigation */
.business-subcategories {
    margin: 8px 0 30px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.business-subcategories-heading h2 {
    margin: 3px 0 17px;
    color: var(--navy);
    font-size: 22px;
}

.business-subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.business-subcategory-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    transition: border-color .15s, transform .15s;
}

.business-subcategory-card:hover {
    border-color: #9cbdd9;
    transform: translateY(-2px);
    text-decoration: none;
}

.business-subcategory-name {
    color: var(--navy);
    font-weight: 700;
}

.business-subcategory-count {
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 560px) {
    .business-subcategories {
        padding: 16px;
    }

    .business-subcategory-grid {
        grid-template-columns: 1fr;
    }
}


/* CDA registered cooperatives: filters and metadata */
.cooperative-filter-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
    margin: 18px 0 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}
.cooperative-filter-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}
.cooperative-filter-field label {
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
}
.cooperative-filter-field select {
    width: 100%;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}
.cooperative-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 16px;
}
.cooperative-filter-actions button {
    min-height: 42px;
    padding: 10px 18px;
    border: 0;
    border-radius: 7px;
    background: var(--blue);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.cooperative-filter-actions a {
    font-weight: 700;
}
.cooperative-results-count {
    margin: 8px 0 18px;
    color: var(--muted, #64748b);
    font-size: 14px;
}
.cooperative-meta {
    overflow-wrap: anywhere;
}
@media (max-width: 600px) {
    .cooperative-filter-form {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }
    .cooperative-filter-actions {
        grid-column: auto;
        flex-wrap: wrap;
    }
    .cooperative-filter-actions button {
        flex: 1 1 150px;
    }
}
