/* 
 * Custom Stylesheet for Directory Template (Integrates with Native Dark Mode)
 * Filename: custom.css
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Color Variables (Scoped to Theme's Native Dark Mode Settings) */
:root {
    --bg-color: #090a0f;
    --text-color: #e2e8f0;
    --hero-bg: linear-gradient(135deg, #171923 0%, #090a0f 100%);
    --card-bg: linear-gradient(135deg, rgba(23, 25, 35, 0.8) 0%, rgba(15, 16, 22, 0.9) 100%);
    --card-header-bg: rgba(9, 10, 15, 0.4);
    --border-color: rgba(255, 255, 255, 0.04);
    --accent-color: #45f3ff;
    --accent-hover: #ffffff;
    --accent-glow: rgba(69, 243, 255, 0.15);
    --select-bg: #090a0f;
    --select-border: rgba(69, 243, 255, 0.3);
    --btn-bg: linear-gradient(90deg, #45f3ff 0%, #171923 150%);
    --btn-text: #090a0f;
    --text-muted: #a0aec0;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --glow-color: rgba(69, 243, 255, 0.25);
    --title-color: #ffffff;
    --arrow-color: #ff007f;
}

html[data-darkmode="light"] {
    --bg-color: #f7fafc;
    --text-color: #2d3748;
    --hero-bg: linear-gradient(135deg, #edf2f7 0%, #f7fafc 100%);
    --card-bg: linear-gradient(135deg, #ffffff 0%, #edf2f7 100%);
    --card-header-bg: rgba(0, 0, 0, 0.03);
    --border-color: rgba(0, 0, 0, 0.08);
    --accent-color: #3182ce;
    --accent-hover: #1a202c;
    --accent-glow: rgba(49, 130, 206, 0.1);
    --select-bg: #ffffff;
    --select-border: rgba(49, 130, 206, 0.4);
    --btn-bg: linear-gradient(90deg, #3182ce 0%, #2b6cb0 150%);
    --btn-text: #ffffff;
    --text-muted: #718096;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --glow-color: rgba(49, 130, 206, 0.2);
    --title-color: #1a202c;
    --arrow-color: #3182ce;
}

html[data-darkmode="dark"] {
    --bg-color: #090a0f;
    --text-color: #e2e8f0;
    --hero-bg: linear-gradient(135deg, #171923 0%, #090a0f 100%);
    --card-bg: linear-gradient(135deg, rgba(23, 25, 35, 0.8) 0%, rgba(15, 16, 22, 0.9) 100%);
    --card-header-bg: rgba(9, 10, 15, 0.4);
    --border-color: rgba(255, 255, 255, 0.04);
    --accent-color: #45f3ff;
    --accent-hover: #ffffff;
    --accent-glow: rgba(69, 243, 255, 0.15);
    --select-bg: #090a0f;
    --select-border: rgba(69, 243, 255, 0.3);
    --btn-bg: linear-gradient(90deg, #45f3ff 0%, #171923 150%);
    --btn-text: #090a0f;
    --text-muted: #a0aec0;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --glow-color: rgba(69, 243, 255, 0.25);
    --title-color: #ffffff;
    --arrow-color: #ff007f;
}

.directory-container {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    padding: 30px 20px 60px 20px;
    /* min-height: 80vh; */
    border-radius: 16px;
    transition: all 0.3s ease;
}

/* Full-Width Top Search Banner */
.directory-fullwidth-search {
    background: var(--hero-bg);
    padding: 45px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 45px;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all 0.3s ease;
}

.directory-fullwidth-search .directory-search-card {
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section with Filter */
.directory-hero-section {
    background: var(--hero-bg);
    border-radius: 20px;
    padding: 30px 40px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 15px 40px var(--shadow-color);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.directory-hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.directory-hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--title-color);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px var(--shadow-color);
    background: linear-gradient(135deg, var(--title-color) 30%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.directory-hero-subtitle {
    font-size: 1.25rem;
    color: var(--accent-color);
    margin-bottom: 25px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Search Form Glassmorphic Card */
.directory-search-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 25px 30px;
    max-width: 1000px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    transition: all 0.3s ease;
}

.directory-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.directory-search-col {
    flex: 1;
    min-width: 200px;
}

.directory-search-col.button-col {
    flex: 0 0 auto;
    min-width: auto;
}

.directory-select-custom {
    width: 100%;
    background: var(--select-bg) !important;
    border: 1px solid var(--select-border) !important;
    color: var(--text-color) !important;
    border-radius: 10px !important;
    padding: 12px 18px !important;
    font-size: 0.95rem !important;
    height: auto !important;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233182ce'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 18px !important;
}

/* In Dark Mode, update select arrow to cyan */
:not(.light-mode) .directory-select-custom {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2345f3ff'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
}

.directory-select-custom:hover {
    border-color: var(--accent-color) !important;
}

.directory-select-custom:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 10px var(--glow-color) !important;
    outline: none;
}

.directory-search-btn {
    background: var(--btn-bg);
    border: none;
    color: var(--btn-text);
    padding: 12px 35px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px var(--glow-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.directory-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--glow-color);
    color: var(--accent-hover);
}

/* Section Titles */
.directory-section-title {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--title-color);
    margin-top: 10px;
    margin-bottom: 25px;
    text-align: center;
    letter-spacing: -0.5px;
}

.directory-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 8px auto 0;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--glow-color);
}

/* Grid of States */
.directory-states-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* State Card styling */
.directory-state-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.directory-state-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px var(--glow-color);
    border-color: var(--accent-color);
}

.directory-state-header {
    background: var(--card-header-bg);
    padding: 22px 28px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--title-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.directory-state-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.directory-state-icon {
    fill: var(--accent-color);
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 6px var(--glow-color));
}

.directory-city-count {
    font-size: 0.85rem;
    background: var(--accent-glow);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--select-border);
    font-weight: 600;
}

/* Cities List */
.directory-cities-list {
    padding: 15px 24px 20px 24px;
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.directory-city-item {
    display: flex;
    align-items: center;
}

.directory-city-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 500;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.directory-city-link::before {
    content: '→';
    color: transparent;
    transition: all 0.25s ease;
    font-weight: 700;
    margin-left: -12px;
    opacity: 0;
}

.directory-city-link:hover {
    color: var(--accent-color);
    transform: translateX(12px);
}

.directory-city-link:hover::before {
    color: var(--arrow-color);
    opacity: 1;
    margin-left: 0;
}

.directory-show-more-item {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.directory-toggle-cities-btn {
    background: var(--card-header-bg);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.directory-toggle-cities-btn:hover {
    background: var(--btn-bg);
    color: var(--btn-text);
    border-color: transparent;
    box-shadow: 0 4px 12px var(--glow-color);
    transform: translateY(-1px);
}

.directory-no-cities {
    color: var(--text-muted);
    font-size: 1.05rem;
    font-style: italic;
    padding: 10px 0;
}

/* State Cities Navigation Grid */
.state-cities-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: 0 10px 25px var(--shadow-color);
    transition: all 0.3s ease;
}

.state-cities-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--title-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.state-cities-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.state-city-item {
    margin: 0;
}

.state-city-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--card-header-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.state-city-link:hover {
    background: var(--btn-bg);
    color: var(--btn-text);
    border-color: transparent;
    box-shadow: 0 4px 12px var(--glow-color);
    transform: translateY(-2px);
}

/* Listing Grid for Location Archive Pages */
.directory-archive-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--title-color);
    margin-bottom: 30px;
    text-align: left;
    border-left: 5px solid var(--accent-color);
    padding-left: 15px;
}

.directory-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.directory-post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 10px 25px var(--shadow-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.directory-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px var(--glow-color);
    border-color: var(--accent-color);
}

.directory-post-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--title-color);
}

.directory-post-title a {
    color: var(--title-color);
    text-decoration: none;
    transition: color 0.25s ease;
}

.directory-post-title a:hover {
    color: var(--accent-color);
}

.directory-post-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.directory-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: auto;
}

.directory-post-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--card-header-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.25s ease;
    margin-top: 15px;
}

.directory-post-btn:hover {
    background: var(--btn-bg);
    color: var(--btn-text);
    border-color: transparent;
    box-shadow: 0 4px 12px var(--glow-color);
}

/* Empty State Styling */
.directory-empty-state {
    grid-column: 1 / -1;
    background: var(--card-bg);
    border: 1px dashed var(--select-border);
    border-radius: 16px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 8px 30px var(--shadow-color);
    max-width: 1000px;
    margin: 20px auto;
}

.directory-empty-state-icon {
    width: 60px;
    height: 60px;
    fill: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.6;
}

.directory-empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--title-color);
    margin-bottom: 10px;
}

.directory-empty-state-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* 1. Breadcrumbs Spacing Reductions */
.bloghash-breadcrumbs,
#page .bloghash-breadcrumbs,
.page-header .bloghash-breadcrumbs {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    font-size: 0.9rem !important;
}

#page .page-header {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    min-height: auto !important;
}

/* 2. Search Container Spacing Reductions */
.directory-fullwidth-search {
    padding: 15px 20px !important;
    margin-bottom: 20px !important;
}

/* 4. Important Notice Styling */
.directory-important-notice {
    background: linear-gradient(135deg, rgba(255, 0, 127, 0.1) 0%, rgba(9, 10, 15, 0.9) 100%);
    border: 1px solid rgba(255, 0, 127, 0.3);
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 30px;
    color: var(--text-color);
    font-size: 1.05rem;
    line-height: 1.6;
    position: relative;
    box-shadow: 0 4px 15px rgba(255, 0, 127, 0.05);
}

.directory-important-notice strong {
    color: #ff007f;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-right: 5px;
}

/* 5 & 6. Taxonomy Footer Styling: Nearby Areas & Location Description */
.taxonomy-footer-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 35px 30px;
    margin-top: 45px;
    box-shadow: 0 10px 30px var(--shadow-color);
}

.taxonomy-footer-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--title-color);
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-color);
    padding-left: 12px;
}

.taxonomy-footer-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.taxonomy-nearby-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--title-color);
    margin-top: 25px;
    margin-bottom: 15px;
}

.taxonomy-nearby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.taxonomy-nearby-link {
    display: block;
    text-align: center;
    background: var(--card-header-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.taxonomy-nearby-link:hover {
    background: var(--btn-bg);
    color: var(--btn-text);
    border-color: transparent;
    transform: translateY(-2px);
}

.taxonomy-footer-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.taxonomy-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.taxonomy-action-btn.primary-btn {
    background: var(--btn-bg);
    color: var(--btn-text);
    box-shadow: 0 4px 15px var(--glow-color);
}

.taxonomy-action-btn.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--glow-color);
    color: var(--accent-hover);
}

.taxonomy-action-btn.secondary-btn {
    background: var(--card-header-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.taxonomy-action-btn.secondary-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
    border-color: transparent;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .directory-hero-title {
        font-size: 2.2rem;
    }
    .directory-hero-section {
        padding: 40px 20px;
    }
    .directory-search-card {
        padding: 20px;
    }
    .directory-archive-title {
        font-size: 1.8rem;
    }
    .state-cities-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .taxonomy-footer-buttons {
        flex-direction: column;
    }
}

/* Improve Card Layout and Images */
.bloghash-blog-entry-wrapper {
    display: flex;
    gap: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 30px var(--shadow-color);
    margin-bottom: 25px;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.bloghash-blog-entry-wrapper:hover {
    transform: translateY(-2px);
    border-color: rgba(69, 243, 255, 0.2);
    box-shadow: 0 12px 35px var(--glow-color);
}

.bloghash-blog-entry-wrapper .post-thumb {
    width: 180px !important;
    height: 180px !important;
    max-width: 180px !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
    margin: 0 !important;
    flex-shrink: 0;
}

.bloghash-blog-entry-wrapper .post-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
}

.bloghash-blog-entry-wrapper:hover .post-thumb img {
    transform: scale(1.05);
}

/* Right-side Contact Action Column */
@media (min-width: 769px) {
    .bloghash-blog-entry-wrapper {
        display: flex !important;
        align-items: stretch !important;
    }
    .bloghash-entry-content-wrapper {
        flex: 1 !important;
        padding-right: 15px;
    }
    .card-contact-right {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 12px;
        padding-left: 20px;
        border-left: 1px solid var(--border-color);
        min-width: 160px;
        flex-shrink: 0;
    }
    .card-contact-right .taxonomy-action-btn {
        padding: 10px 14px !important;
        font-size: 0.9rem !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }
}

@media (max-width: 768px) {
    .bloghash-blog-entry-wrapper {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .bloghash-blog-entry-wrapper .post-thumb {
        width: 100% !important;
        height: 220px !important;
        max-width: 100% !important;
        margin-bottom: 15px !important;
    }
    .card-contact-right {
        display: flex;
        flex-direction: row;
        gap: 10px;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid var(--border-color);
        justify-content: stretch;
    }
    .card-contact-right .taxonomy-action-btn {
        flex: 1;
        text-align: center;
        padding: 10px 14px;
        font-size: 0.9rem;
    }
}



