/**
 * PBA DIY Legal Guides - Frontend Styles
 */

/* ============ VARIABLES ============ */
:root {
    --pba-diy-primary: #1e3a5f;
    --pba-diy-primary-dark: #0f2744;
    --pba-diy-gold: #c9a227;
    --pba-diy-text: #1f2937;
    --pba-diy-text-light: #64748b;
    --pba-diy-bg: #f8fafc;
    --pba-diy-white: #ffffff;
    --pba-diy-border: #e2e8f0;
}

/* ============ HERO SECTION ============ */
.pba-diy-hero {
    background: linear-gradient(135deg, var(--pba-diy-primary) 0%, var(--pba-diy-primary-dark) 100%);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.pba-diy-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.pba-diy-hero h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 2.75rem;
    font-weight: 800;
    margin: 0 0 16px 0;
    color: #fff;
    line-height: 1.2;
}

.pba-diy-hero p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.85);
    margin: 0;
    line-height: 1.6;
}

.pba-diy-hero .back-link {
    display: inline-block;
    color: var(--pba-diy-gold);
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 20px;
    text-decoration: none;
    transition: color 0.2s;
}

.pba-diy-hero .back-link:hover {
    color: #fff;
}

/* ============ CONTAINER ============ */
.pba-diy-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ============ SEARCH BAR ============ */
.pba-diy-search-wrap {
    max-width: 600px;
    margin: 0 auto 40px;
}

.pba-diy-search {
    position: relative;
}

.pba-diy-search input {
    width: 100%;
    padding: 16px 16px 16px 52px;
    border-radius: 50px;
    border: 1px solid var(--pba-diy-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pba-diy-search input:focus {
    border-color: var(--pba-diy-gold);
    box-shadow: 0 4px 20px rgba(201,162,39,0.15);
}

.pba-diy-search .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    color: var(--pba-diy-text-light);
}

/* ============ GRID ============ */
.pba-diy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

@media (max-width: 768px) {
    .pba-diy-grid {
        grid-template-columns: 1fr;
    }
}

/* ============ CARDS ============ */
.pba-diy-card {
    background: var(--pba-diy-white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid var(--pba-diy-border);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.pba-diy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.pba-diy-card .card-content {
    padding: 28px;
    flex: 1;
}

.pba-diy-card .card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pba-diy-card .card-icon svg {
    width: 28px;
    height: 28px;
    color: #fff;
}

.pba-diy-card h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pba-diy-text);
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.pba-diy-card p {
    font-size: 0.95rem;
    color: var(--pba-diy-text-light);
    margin: 0;
    line-height: 1.6;
}

.pba-diy-card .card-footer {
    background: #f8fafc;
    padding: 16px 28px;
    border-top: 1px solid var(--pba-diy-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pba-diy-card .read-guide {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pba-diy-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pba-diy-card .arrow-icon {
    width: 16px;
    height: 16px;
    color: var(--pba-diy-gold);
    transition: transform 0.2s;
}

.pba-diy-card:hover .arrow-icon {
    transform: translateX(4px);
}

/* ============ NO RESULTS ============ */
.pba-diy-no-results {
    text-align: center;
    padding: 60px 20px;
}

.pba-diy-no-results p {
    font-size: 1.1rem;
    color: var(--pba-diy-text-light);
}

/* ============ DISCLAIMER ============ */
.pba-diy-disclaimer {
    margin-top: 60px;
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    padding: 24px 28px;
    border-radius: 0 12px 12px 0;
}

.pba-diy-disclaimer h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 8px 0;
}

.pba-diy-disclaimer p {
    color: #1e40af;
    margin: 0;
    line-height: 1.6;
}

/* ============ GUIDE PAGE ============ */
.pba-diy-guide-page {
    min-height: 100vh;
    background: var(--pba-diy-bg);
}

/* Intro Card */
.pba-diy-intro-card {
    background: var(--pba-diy-white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid var(--pba-diy-border);
    padding: 32px;
    margin-bottom: 40px;
}

.pba-diy-intro-card .intro-text {
    font-size: 1.1rem;
    color: var(--pba-diy-text-light);
    line-height: 1.8;
    margin: 0 0 24px 0;
}

/* Warnings */
.pba-diy-warnings {
    background: #fefce8;
    border-left: 4px solid #eab308;
    padding: 20px 24px;
    border-radius: 0 12px 12px 0;
}

.pba-diy-warnings h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #854d0e;
    margin: 0 0 12px 0;
}

.pba-diy-warnings ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pba-diy-warnings li {
    color: #a16207;
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.pba-diy-warnings li::before {
    content: "•";
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

/* ============ STEPS SECTION ============ */
.pba-diy-steps-section {
    margin-bottom: 40px;
}

.pba-diy-steps-section h2 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--pba-diy-text);
    margin: 0 0 24px 0;
}

.pba-diy-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pba-diy-step {
    display: flex;
    background: var(--pba-diy-white);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid var(--pba-diy-border);
    padding: 24px;
    gap: 20px;
}

.pba-diy-step .step-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--pba-diy-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(30,58,95,0.3);
}

.pba-diy-step .step-content h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--pba-diy-text);
    margin: 0 0 8px 0;
}

.pba-diy-step .step-content p {
    color: var(--pba-diy-text-light);
    margin: 0;
    line-height: 1.7;
}

@media (max-width: 640px) {
    .pba-diy-step {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============ RESOURCES ============ */
.pba-diy-resources {
    background: var(--pba-diy-primary-dark);
    color: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.pba-diy-resources h2 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.1);
    padding: 16px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s;
}

.resource-link:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}

.resource-link .resource-icon {
    width: 20px;
    height: 20px;
    color: #60a5fa;
    flex-shrink: 0;
}

.resource-link span {
    flex: 1;
}

.resource-link .chevron-icon {
    width: 16px;
    height: 16px;
    color: rgba(255,255,255,0.5);
    flex-shrink: 0;
    transition: transform 0.2s, color 0.2s;
}

.resource-link:hover .chevron-icon {
    transform: translateX(4px);
    color: #fff;
}

/* ============ PRINT STYLES ============ */
@media print {
    .pba-diy-hero {
        background: #1e3a5f !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .pba-diy-card,
    .pba-diy-search-wrap {
        break-inside: avoid;
    }
    
    .pba-diy-step {
        break-inside: avoid;
    }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .pba-diy-hero {
        padding: 60px 20px;
    }
    
    .pba-diy-hero h1 {
        font-size: 2rem;
    }
    
    .pba-diy-container {
        padding: 30px 16px;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
}
