/* Modern Directory Styling — extracted from directory.php Mar 2026 */
body {
    background: white !important;
}

#header {
    background: url('/images/header-bg.jpg') no-repeat;
    background-size: cover;
}

/* Override existing layout - make content full width */
#rhcol,
#rhcol.listings {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.directory-hero {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 30px;
}

.directory-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.directory-hero h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #00498f;
}

/* Results summary - subtle transition between editorial and listings */
.directory-results-summary {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e8e8;
}

.directory-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    background: white;
}

.directory-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}

.directory-main {
    min-height: 400px;
}

.directory-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* Listing Cards */
.result-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.result-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.result-card.premium {
    border-left-color: #ffd700;
    border-left-width: 5px;
    background: linear-gradient(135deg, #fffef7 0%, #ffffff 50%, #fffef7 100%);
    position: relative;
    box-shadow: 0 3px 15px rgba(255, 215, 0, 0.15);
}

.result-card.premium:hover {
    box-shadow: 0 5px 25px rgba(255, 215, 0, 0.25);
}

.result-card.basic {
    border-left-color: #e9ecef;
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #000;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    flex-shrink: 0;
}

.premium-badge svg {
    width: 14px;
    height: 14px;
    fill: #000;
}

.result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 15px;
}

.result-header-left {
    flex: 1;
}

.result-card h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

.result-card h3 a {
    color: #00498f;
    text-decoration: none;
}

.result-card h3 a:hover {
    color: #003366;
    text-decoration: underline;
}

.result-card h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.result-card h4 a {
    color: #00498f;
    text-decoration: none;
}

.result-card h4 a:hover {
    color: #003366;
    text-decoration: underline;
}

.result-content {
    margin-bottom: 15px;
}

.result-content.has-image {
    display: block;
}

.result-image {
    float: left;
    margin-right: 20px;
    margin-bottom: 15px;
}

.result-image img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.result-description {
    color: #555;
    line-height: 1.7;
    font-size: 15px;
    overflow: hidden;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    clear: both;
}

.result-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #777;
}

.result-meta-item a {
    color: #777;
    text-decoration: none;
}

.result-meta-item a:hover {
    color: #00498f;
}

.result-flag {
    width: 20px;
    height: 15px;
    display: inline-block;
    vertical-align: middle;
}

/* Premium CTA */
.premium-cta {
    background: #f8f9fa;
    border: 2px solid #00498f;
    border-radius: 8px;
    padding: 25px 30px;
    margin: 30px 0;
    text-align: center;
    clear: both;
    position: relative;
    z-index: 1;
}

.premium-cta h3 {
    color: #333;
    font-size: 20px;
    margin: 0;
    font-weight: 600;
}

.premium-cta a {
    color: #00498f;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid #00498f;
    padding-bottom: 2px;
    transition: all 0.2s ease;
}

.premium-cta a:hover {
    color: #003366;
    border-bottom-color: #003366;
}

/* Sidebar */
.sidebar-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 20px;
}

.sidebar-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-section li {
    margin-bottom: 12px;
}

.sidebar-section li:last-child {
    margin-bottom: 0;
}

.sidebar-section a {
    color: #555;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar-section a:hover {
    background: #f8f9fa;
    color: #00498f;
    padding-left: 16px;
}

.sidebar-section a::before {
    content: "\203A";
    font-size: 18px;
    font-weight: bold;
    color: #00498f;
}

/* No Results */
.no-results {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 40px;
    text-align: center;
}

.no-results h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.no-results p {
    color: #666;
    margin-bottom: 30px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #00498f;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #00498f;
    color: white;
    border-color: #00498f;
}

.pagination .current {
    background: #00498f;
    color: white;
    border-color: #00498f;
}

/* Legacy pagination class */
.paginationlc {
    display: block !important;
    text-align: center !important;
    margin: 30px 0 !important;
    clear: both !important;
    overflow: hidden !important;
    width: 100% !important;
}

.paginationlc span {
    display: inline-block !important;
    margin: 0 4px !important;
    border: none !important;
    padding: 0 !important;
    background: none !important;
}

.paginationlc a {
    color: black !important;
    display: inline-block !important;
    padding: 8px 16px !important;
    text-decoration: none !important;
    transition: background-color .3s !important;
    border: 1px solid #ddd !important;
    background: white !important;
}

.paginationlc a.active {
    background-color: #4CAF50 !important;
    color: white !important;
    border: 1px solid #4CAF50 !important;
}

.paginationlc a:hover:not(.active) {
    background-color: #ddd !important;
}

/* Global fallback notice */
.global-fallback-notice {
    margin: 8px 0 28px;
    padding: 18px 24px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 4px solid #f9a825;
    border-radius: 0 8px 8px 0;
    color: #5d4700;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
}

.global-fallback-notice p {
    margin: 0;
}

/* Category editorial intro */
.category-intro {
    margin-bottom: 28px;
    padding: 20px 24px;
    background: #f8fafb;
    border-left: 3px solid #00498f;
    border-radius: 0 8px 8px 0;
    line-height: 1.75;
    color: #444;
    font-size: 15px;
}

.category-intro p {
    margin: 0;
}

/* FAQ accordion */
.category-faq {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.category-faq h2 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
}

.faq-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.faq-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.faq-item[open] {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.faq-item summary {
    padding: 16px 20px;
    font-weight: 500;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 20px;
    font-weight: 300;
    color: #00498f;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    content: "\2212";
}

.faq-item summary:hover {
    color: #00498f;
}

.faq-answer {
    padding: 0 20px 18px;
    color: #555;
    line-height: 1.75;
    font-size: 14.5px;
}

.faq-answer p {
    margin: 0;
}

/* Responsive — tablet */
@media (max-width: 968px) {
    .directory-layout {
        grid-template-columns: 1fr;
    }

    .directory-sidebar {
        position: static;
    }

    .result-content {
        flex-direction: column;
    }

    .result-image img {
        width: 100%;
        height: auto;
    }
}

/* Responsive — mobile */
@media (max-width: 768px) {
    body {
        overflow-x: hidden !important;
    }
    
    .directory-layout {
        flex-direction: column !important;
        display: flex !important;
    }

    .directory-main {
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 30px !important;
        flex: 1 !important;
    }

    .directory-sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .directory-container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
    
    .directory-hero-content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
    
    .result-card,
    .premium-cta,
    .sidebar-section {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .directory-hero h1 {
        font-size: 24px;
    }

    .directory-results-summary {
        font-size: 12px;
    }

    .result-card {
        padding: 15px !important;
        margin: 0 0 15px 0 !important;
    }

    .result-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .premium-badge {
        align-self: flex-start !important;
    }

    .result-content.has-image {
        display: block !important;
    }

    .result-image {
        float: none !important;
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 15px !important;
    }
    
    .result-image img {
        width: 100% !important;
        height: auto !important;
        max-width: 300px !important;
    }

    .result-meta {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pagination a, .pagination span {
        padding: 6px 10px;
        font-size: 14px;
    }

    .category-intro {
        padding: 16px 18px;
        font-size: 14px;
    }

    .category-faq h2 {
        font-size: 19px;
    }

    .faq-item summary {
        padding: 14px 16px;
        font-size: 14px;
    }

    .faq-answer {
        padding: 0 16px 14px;
        font-size: 14px;
    }
}

/* Responsive — small mobile */
@media (max-width: 480px) {
    .directory-container {
        padding: 0 15px;
    }

    .directory-hero-content {
        padding: 0 15px;
    }

    .directory-hero h1 {
        font-size: 20px;
    }

    .result-card h3 {
        font-size: 18px;
    }

    .result-description {
        font-size: 14px;
    }

    .premium-cta {
        padding: 20px 15px;
    }

    .premium-cta h3 {
        font-size: 16px;
    }

    .sidebar-section {
        padding: 20px;
    }
}

@media (max-width: 360px) {
    .directory-hero h1 {
        font-size: 18px;
    }

    .result-card {
        padding: 12px;
    }

    .result-card h3 {
        font-size: 16px;
    }

    .result-description {
        font-size: 13px;
    }

    .premium-cta h3 {
        font-size: 15px;
    }

    .pagination a, .pagination span {
        padding: 5px 8px;
        font-size: 13px;
    }
}

/* Google Maps icon in listings */
.gmap {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
}

/* Related Categories cross-links */
.related-categories {
    max-width: 1200px;
    margin: 0 auto 32px;
    padding: 24px 28px;
    background: #f8fafb;
    border-radius: 10px;
    border: 1px solid #e8eef3;
}

.related-categories h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 14px;
}

.related-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.related-category-link {
    display: inline-block;
    padding: 6px 16px;
    background: #fff;
    border: 1px solid #d0dbe5;
    border-radius: 20px;
    color: #00498f;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.related-category-link:hover {
    background: #00498f;
    color: #fff;
    border-color: #00498f;
}
