/* ==========================================================================
   KickA$$ Custom Directory Plugin - Core Styles
   ========================================================================== */

:root {
    --cdp-primary: #2563eb;       /* Main Brand Color (Blue) */
    --cdp-primary-hover: #1d4ed8; /* Darker Brand Color for Hover */
    --cdp-bg-color: #ffffff;      /* Card Background */
    --cdp-bg-alt: #f8fafc;        /* Subtle background for tags/widgets */
    --cdp-text-main: #1e293b;     /* Main Text Color */
    --cdp-text-muted: #64748b;    /* Muted Text (Meta data) */
    --cdp-border: #e2e8f0;        /* Light Border Color */
    --cdp-radius: 8px;            /* Standard Border Radius */
    --cdp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --cdp-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* --- Container & Typography --- */
.cdp-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    color: var(--cdp-text-main);
    font-family: inherit;
}

.cdp-page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--cdp-border);
}

.cdp-page-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.cdp-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* --- Universal Grid System --- */
.cdp-grid {
    display: grid;
    gap: 1.5rem;
}

/* Auto-responsive grids: No media queries needed! */
.cdp-grid-states, 
.cdp-grid-cities {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.cdp-grid-listings {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* 2-Column layout for sidebars/widgets */
.cdp-grid-2-col {
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .cdp-grid-2-col {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* --- Utility Classes --- */
.cdp-mt-4 {
    margin-top: 2.5rem;
}

/* --- Cards (Listings, States, etc.) --- */
.cdp-card {
    background: var(--cdp-bg-color);
    border: 1px solid var(--cdp-border);
    border-radius: var(--cdp-radius);
    padding: 1.5rem;
    box-shadow: var(--cdp-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

a.cdp-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cdp-shadow-hover);
    border-color: var(--cdp-primary);
}

.cdp-card-title,
.cdp-listing-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.cdp-listing-title a {
    color: var(--cdp-primary);
    text-decoration: none;
}

.cdp-listing-title a:hover {
    text-decoration: underline;
}

.cdp-listing-meta {
    font-size: 0.9rem;
    color: var(--cdp-text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- County Groupings (State Page) --- */
.cdp-county-group {
    margin-bottom: 2.5rem;
}
.cdp-county-title {
    font-size: 1.25rem;
    background: var(--cdp-bg-alt);
    padding: 0.5rem 1rem;
    border-left: 4px solid var(--cdp-primary);
    margin-bottom: 1rem;
    border-radius: 0 var(--cdp-radius) var(--cdp-radius) 0;
}

/* --- Single Listing Profile Attributes --- */
.cdp-listing-profile {
    padding: 2rem;
}

.cdp-attr-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--cdp-border);
}

.cdp-attr-row:last-child {
    border-bottom: none;
}

.cdp-attr-label {
    font-weight: 600;
    color: var(--cdp-text-main);
}

.cdp-attr-data a {
    color: var(--cdp-primary);
    font-weight: 500;
    text-decoration: none;
}

.cdp-attr-data a:hover {
    text-decoration: underline;
}

/* --- Widgets & Tags (Zip Codes, Nearby Cities) --- */
.cdp-sidebar-widget {
    background: var(--cdp-bg-alt);
    padding: 1.5rem;
    border-radius: var(--cdp-radius);
    border: 1px solid var(--cdp-border);
}

.cdp-widget-title {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--cdp-border);
    padding-bottom: 0.5rem;
}

.cdp-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cdp-tag,
.cdp-tag-link {
    display: inline-block;
    background: var(--cdp-bg-color);
    border: 1px solid var(--cdp-border);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--cdp-text-main);
    text-decoration: none;
    transition: all 0.2s ease;
}

.cdp-tag:hover,
.cdp-tag-link:hover {
    background: var(--cdp-primary);
    color: #ffffff;
    border-color: var(--cdp-primary);
}

.cdp-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cdp-link-list li {
    margin-bottom: 0.5rem;
}

.cdp-link-list a {
    color: var(--cdp-primary);
    text-decoration: none;
}

.cdp-link-list a:hover {
    text-decoration: underline;
}

/* --- Supplemental Content --- */
.cdp-supplemental-content {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--cdp-border);
    line-height: 1.6;
}

/* Breadcrumbs (assuming your existing function outputs .cdp-breadcrumbs) */
.cdp-breadcrumbs {
    font-size: 0.9rem;
    color: var(--cdp-text-muted);
    margin-bottom: 1.5rem;
}

.cdp-breadcrumbs a {
    color: var(--cdp-primary);
    text-decoration: none;
}

.cdp-breadcrumbs a:hover {
    text-decoration: underline;
}

/* --- B2B Service Page Form Styling --- */
.cdp-b2b-form label {
    display: block;
    margin-bottom: 15px;
    font-weight: 500;
    color: #f8fafc; /* Light grey/white for readability */
}

.cdp-b2b-form input[type="text"],
.cdp-b2b-form input[type="email"],
.cdp-b2b-form input[type="tel"],
.cdp-b2b-form input[type="url"],

.cdp-b2b-form textarea {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 1px solid #334155;
    border-radius: 6px;
    background-color: #f8fafc;
    color: #1e293b;
    font-size: 1rem;
}

.cdp-b2b-form input:focus,
.cdp-b2b-form textarea:focus {
    outline: none;
    border-color: var(--cdp-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.cdp-b2b-form input[type="submit"] {
    background-color: var(--cdp-primary);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s ease;
    margin-top: 10px;
}

.cdp-b2b-form input[type="submit"]:hover {
    background-color: var(--cdp-primary-hover);
}

/* Success/Error message styling */
.cdp-b2b-form .wpcf7-response-output {
    margin: 20px 0 0 0;
    padding: 15px;
    border-radius: 6px;
    border: 2px solid #2563eb !important;
    background: #ffffff;
    color: #1e293b;
}

/* --- Tax Pro Footer CTA --- */
.cdp-pro-footer-cta {
    margin-top: 4rem;
    background: #1e293b; /* Dark navy to distinguish from content */
    color: #ffffff;
    padding: 2.5rem;
    border-radius: var(--cdp-radius);
    border-bottom: 4px solid var(--cdp-primary);
}

.cdp-pro-cta-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.cdp-pro-cta-text h3 {
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.cdp-pro-cta-text p {
    margin: 0;
    color: #cbd5e1;
    font-size: 1.1rem;
}

/* Button style for the footer link */
.cdp-btn-secondary {
    display: inline-block;
    background-color: var(--cdp-primary);
    color: #ffffff !important;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 600;
    transition: background 0.2s ease;
}

.cdp-btn-secondary:hover {
    background-color: var(--cdp-primary-hover);
    transform: translateY(-2px);
}

/* Desktop Layout */
@media (min-width: 768px) {
    .cdp-pro-cta-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    .cdp-pro-cta-text {
        max-width: 70%;
    }
}