/**
 * PublicBar DIY Legal Guides - Styles
 */

/* ============================================
   BASE / RESET
   ============================================ */

.pb-diy-wrap,
.pb-diy-single-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #374151;
    -webkit-font-smoothing: antialiased;
}

.pb-diy-wrap *,
.pb-diy-single-wrap * {
    box-sizing: border-box;
}

/* ============================================
   ARCHIVE / HUB PAGE
   ============================================ */

.pb-diy-wrap {
    background: #f8fafc;
    min-height: 100vh;
}

/* Dark Hero */
.pb-diy-hero {
    background: #1e293b;
    padding: 80px 24px 100px;
    text-align: center;
}

.pb-diy-hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
}

.pb-diy-hero p {
    font-size: 1.15rem;
    color: #94a3b8;
    margin: 0 auto;
    max-width: 550px;
}

/* Container */
.pb-diy-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* Search Bar */
.pb-diy-search-wrap {
    display: flex;
    justify-content: center;
    margin-top: -50px;
    margin-bottom: 48px;
    position: relative;
    z-index: 10;
}

.pb-diy-search-bar {
    position: relative;
    width: 100%;
    max-width: 520px;
}

.pb-diy-search-bar input {
    width: 100%;
    padding: 20px 24px 20px 56px;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    background: #374151;
    color: #fff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    outline: none;
    transition: box-shadow 0.3s ease;
}

.pb-diy-search-bar input::placeholder {
    color: #9ca3af;
}

.pb-diy-search-bar input:focus {
    box-shadow: 0 10px 50px rgba(0,0,0,0.35);
}

.pb-diy-search-bar .dashicons {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Cards Grid */
.pb-diy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

/* Card Item */
.pb-diy-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.pb-diy-card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    transform: translateY(-6px);
    border-color: #d1d5db;
}

.pb-diy-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.pb-diy-card-icon .dashicons {
    color: #fff;
    font-size: 26px;
    width: 26px;
    height: 26px;
}

.pb-diy-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 10px 0;
    line-height: 1.35;
}

.pb-diy-card p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
    flex-grow: 1;
}

.pb-diy-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.pb-diy-read-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: #dc2626;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pb-diy-arrow {
    font-size: 1.75rem;
    color: #dc2626;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.2s ease;
}

.pb-diy-card:hover .pb-diy-arrow {
    transform: translateX(5px);
}

/* No Results */
.pb-diy-no-results {
    text-align: center;
    padding: 60px 24px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    grid-column: 1 / -1;
}

.pb-diy-no-results h3 {
    font-size: 1.25rem;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.pb-diy-no-results p {
    color: #64748b;
    margin: 0;
}

/* Disclaimer Banner */
.pb-diy-disclaimer {
    background: #eff6ff;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    gap: 20px;
}

.pb-diy-disclaimer-bar {
    width: 4px;
    background: #3b82f6;
    border-radius: 2px;
    flex-shrink: 0;
}

.pb-diy-disclaimer-text strong {
    display: block;
    font-size: 1rem;
    color: #1e40af;
    margin-bottom: 8px;
}

.pb-diy-disclaimer-text p {
    font-size: 0.9rem;
    color: #1e40af;
    margin: 0;
    line-height: 1.6;
}

.pb-diy-disclaimer-text a {
    color: #1e40af;
    font-weight: 600;
    text-decoration: underline;
}

/* ============================================
   SINGLE GUIDE PAGE
   ============================================ */

.pb-diy-single-wrap {
    background: #f8fafc;
    min-height: 100vh;
}

/* Dark Hero */
.pb-diy-single-hero {
    background: #1e293b;
    padding: 48px 24px 100px;
    text-align: center;
}

.pb-diy-back-link {
    display: inline-block;
    color: #fbbf24;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.2s ease;
}

.pb-diy-back-link:hover {
    color: #fcd34d;
}

.pb-diy-single-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 16px 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.pb-diy-single-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
    margin: 0 auto;
    max-width: 600px;
    line-height: 1.6;
}

/* Container */
.pb-diy-single-container {
    max-width: 800px;
    margin: -60px auto 0;
    padding: 0 24px 80px;
    position: relative;
    z-index: 10;
}

/* Content Card */
.pb-diy-content-card {
    background: #fff;
    border-radius: 20px;
    padding: 48px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    margin-bottom: 32px;
}

.pb-diy-content {
    color: #374151;
    line-height: 1.8;
    font-size: 1.05rem;
}

.pb-diy-content p {
    margin: 0 0 20px 0;
}

.pb-diy-content p:last-child {
    margin-bottom: 0;
}

/* Headings */
.pb-diy-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin: 48px 0 24px 0;
    letter-spacing: -0.01em;
}

.pb-diy-content h2:first-child {
    margin-top: 0;
}

.pb-diy-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin: 32px 0 12px 0;
}

/* Step Cards - target h3 followed by content */
.pb-diy-content h3:not(:first-child) {
    background: #f8fafc;
    margin: 32px 0 0 0;
    padding: 20px 24px;
    border-radius: 12px 12px 0 0;
    border: 1px solid #e5e7eb;
    border-bottom: none;
}

.pb-diy-content h3 + p,
.pb-diy-content h3 + ul,
.pb-diy-content h3 + ol {
    background: #f8fafc;
    margin-top: 0;
    padding: 0 24px 20px 24px;
    border-radius: 0 0 12px 12px;
    border: 1px solid #e5e7eb;
    border-top: none;
    margin-bottom: 16px;
}

/* Lists */
.pb-diy-content ul,
.pb-diy-content ol {
    margin: 0 0 20px 0;
    padding-left: 24px;
}

.pb-diy-content li {
    margin-bottom: 10px;
    color: #4b5563;
}

.pb-diy-content li strong {
    color: #1f2937;
}

/* Links */
.pb-diy-content a {
    color: #2563eb;
    text-decoration: underline;
}

.pb-diy-content a:hover {
    color: #1d4ed8;
}

/* Warning/Info Boxes */
.pb-diy-content .wp-block-group.pb-diy-warning,
.pb-diy-content .pb-diy-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 0 12px 12px 0;
    padding: 24px;
    margin: 32px 0;
}

.pb-diy-content .pb-diy-warning h3 {
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 12px 0;
    color: #92400e;
    font-size: 1.05rem;
}

.pb-diy-content .pb-diy-warning ul {
    margin: 0;
    padding-left: 20px;
}

.pb-diy-content .pb-diy-warning li {
    color: #a16207;
    margin-bottom: 8px;
}

.pb-diy-content .pb-diy-warning p {
    color: #a16207;
    margin: 0;
}

.pb-diy-content .wp-block-group.pb-diy-info,
.pb-diy-content .pb-diy-info {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    border-radius: 0 12px 12px 0;
    padding: 24px;
    margin: 32px 0;
}

.pb-diy-content .pb-diy-info h3 {
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 12px 0;
    color: #1e40af;
    font-size: 1.05rem;
}

.pb-diy-content .pb-diy-info p {
    color: #1e40af;
    margin: 0;
}

.pb-diy-content .wp-block-group.pb-diy-success,
.pb-diy-content .pb-diy-success {
    background: #dcfce7;
    border-left: 4px solid #22c55e;
    border-radius: 0 12px 12px 0;
    padding: 24px;
    margin: 32px 0;
}

.pb-diy-content .pb-diy-success h3 {
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 12px 0;
    color: #166534;
    font-size: 1.05rem;
}

.pb-diy-content .pb-diy-success p {
    color: #166534;
    margin: 0;
}

/* Footer Navigation */
.pb-diy-single-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.pb-diy-footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pb-diy-footer-btn.outline {
    background: #fff;
    border: 2px solid #1e293b;
    color: #1e293b;
}

.pb-diy-footer-btn.outline:hover {
    background: #1e293b;
    color: #fff;
}

.pb-diy-footer-btn.primary {
    background: #1e293b;
    color: #fff;
    border: 2px solid #1e293b;
}

.pb-diy-footer-btn.primary:hover {
    background: #0f172a;
    border-color: #0f172a;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .pb-diy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pb-diy-hero h1 {
        font-size: 2.25rem;
    }
}

@media (max-width: 640px) {
    .pb-diy-grid {
        grid-template-columns: 1fr;
    }
    
    .pb-diy-hero {
        padding: 60px 20px 80px;
    }
    
    .pb-diy-hero h1 {
        font-size: 1.875rem;
    }
    
    .pb-diy-hero p {
        font-size: 1rem;
    }
    
    .pb-diy-search-wrap {
        margin-top: -40px;
        padding: 0 16px;
    }
    
    .pb-diy-container {
        padding: 0 16px 60px;
    }
    
    .pb-diy-single-hero {
        padding: 40px 20px 80px;
    }
    
    .pb-diy-single-title {
        font-size: 1.875rem;
    }
    
    .pb-diy-single-container {
        padding: 0 16px 60px;
        margin-top: -50px;
    }
    
    .pb-diy-content-card {
        padding: 28px 20px;
        border-radius: 16px;
    }
    
    .pb-diy-content h3:not(:first-child) {
        padding: 16px 20px;
    }
    
    .pb-diy-content h3 + p,
    .pb-diy-content h3 + ul,
    .pb-diy-content h3 + ol {
        padding: 0 20px 16px 20px;
    }
    
    .pb-diy-single-footer {
        flex-direction: column;
    }
    
    .pb-diy-footer-btn {
        width: 100%;
        justify-content: center;
    }
    
    .pb-diy-disclaimer {
        padding: 20px;
        gap: 16px;
    }
}
