/**
 * Near Me / Directory Styles
 * MyHomePros - City & State listing pages
 * 
 * Styles the HTML pasted into the WP editor:
 *   .city-list / .city-grid   – Jump-link navigation
 *   .city-section             – Per-city wrapper
 *   .service-category         – Service grouping
 *   .service-subcategory      – Article list
 *
 * Requires: main.css for variables
 * 
 * @package MyHomePros
 */

/* ========================================
   HERO
   ======================================== */
.nm-hero {
    background: linear-gradient(135deg, var(--slate-900) 0%, var(--slate-800) 100%);
    padding: 4rem 1.5rem 4.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .nm-hero {
        padding: 5rem 2rem 5.5rem;
    }
}

.nm-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

/* Breadcrumb overrides for dark hero */
.nm-hero .mhp-breadcrumb {
    justify-content: center;
    margin-bottom: 1.5rem;
}

.nm-hero .mhp-breadcrumb-link {
    color: var(--slate-400);
}

.nm-hero .mhp-breadcrumb-link:hover {
    color: var(--primary-400);
}

.nm-hero .mhp-breadcrumb-separator {
    color: var(--slate-500);
}

.nm-hero .mhp-breadcrumb-current {
    color: var(--slate-300);
}

.nm-hero-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 400;
    color: white;
    margin: 0 0 1rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .nm-hero-title {
        font-size: 2.75rem;
    }
}

.nm-hero-subtitle {
    font-size: 1.0625rem;
    color: var(--slate-300);
    margin: 0;
    line-height: 1.7;
}

/* ========================================
   CONTENT WRAPPER
   ======================================== */
.nm-content {
    padding: 3rem 1.5rem 4rem;
    background: var(--slate-50);
}

@media (min-width: 768px) {
    .nm-content {
        padding: 3.5rem 2rem 5rem;
    }
}

.nm-content-inner {
    max-width: 1000px;
    margin: 0 auto;
}

/* ========================================
   CITY JUMP-LINK GRID
   ======================================== */
.city-list {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--slate-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.city-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.city-grid a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-50);
    color: var(--primary-600) !important;
    border-radius: 0.375rem;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--primary-100);
    transition: all 0.2s;
}

.city-grid a:hover {
    background: var(--primary-500);
    color: white !important;
    border-color: var(--primary-500);
    text-decoration: none;
}

/* ========================================
   CITY SECTION
   ======================================== */
.city-section {
    background: white;
    padding: 1.75rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--slate-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
    .city-section {
        padding: 2rem 2.25rem;
    }
}

/* City name (h2) */
.city-section h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--slate-900);
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-500);
    line-height: 1.3;
}

@media (min-width: 768px) {
    .city-section h2 {
        font-size: 1.75rem;
    }
}

/* Service type (h3) - e.g. "Roofing", "HVAC" */
.city-section h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--slate-800);
    margin: 1.25rem 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.city-section h3:first-of-type {
    margin-top: 0;
}

/* ========================================
   SERVICE CATEGORY
   ======================================== */
.service-category {
    margin-left: 0;
    border-left: 3px solid var(--primary-200);
    padding-left: 1.25rem;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Subcategory heading (h4) */
.service-category h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--slate-700);
    margin: 0.75rem 0 0.375rem;
}

.service-category h4:first-child {
    margin-top: 0;
}

/* ========================================
   SERVICE SUBCATEGORY (Article Links)
   ======================================== */
.service-subcategory ul {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem;
}

.service-subcategory ul li {
    margin: 0;
    padding: 0;
}

.service-subcategory ul li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--primary-600) !important;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.15s;
    line-height: 1.4;
}

.service-subcategory ul li a::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-300);
    flex-shrink: 0;
    transition: background 0.15s;
}

.service-subcategory ul li a:hover {
    background: var(--primary-50);
    color: var(--primary-700) !important;
    text-decoration: none;
}

.service-subcategory ul li a:hover::before {
    background: var(--primary-500);
}

/* ========================================
   STATE LIST (top-level /near-me/ page)
   Uses default WP list output
   ======================================== */
.nm-content-inner > ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 480px) {
    .nm-content-inner > ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .nm-content-inner > ul {
        grid-template-columns: repeat(3, 1fr);
    }
}

.nm-content-inner > ul > li {
    margin: 0;
}

.nm-content-inner > ul > li > a {
    display: block;
    padding: 1rem 1.25rem;
    background: white;
    color: var(--slate-800) !important;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    border: 1px solid var(--slate-200);
    transition: all 0.2s;
}

.nm-content-inner > ul > li > a:hover {
    background: var(--primary-50);
    border-color: var(--primary-200);
    color: var(--primary-600) !important;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 480px) {
    .city-grid a {
        padding: 0.4375rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .city-section {
        padding: 1.25rem 1rem;
    }
    
    .service-category {
        padding-left: 1rem;
    }
}
