/* ==========================================
   Shared Page Styles — Appalachian Editorial
   Used by: the_problem.html, openangus.html,
   income_trends.html, and other content pages
   ========================================== */

/* ==========================================
   Page Heroes
   ========================================== */

.page-hero {
    padding: 90px 24px 80px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--white);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.section-alt + .content-section .page-hero::after,
.page-hero + .section-alt::before {
    background: var(--cream);
}

.page-hero-red {
    background: linear-gradient(160deg, var(--ohio-red) 0%, var(--ohio-red-dark) 100%);
}

.page-hero-green {
    background: linear-gradient(160deg, var(--forest-green) 0%, var(--forest-green-dark) 100%);
}

.page-hero-blue {
    background: linear-gradient(160deg, var(--deep-blue) 0%, var(--deep-blue-dark) 100%);
}

.page-hero-content {
    max-width: 780px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    color: var(--white);
    margin-bottom: 18px;
    font-variation-settings: 'opsz' 72;
    animation: fadeInUp 0.9s var(--ease-out) 0.1s both;
}

.page-hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.85;
    opacity: 0.92;
    font-weight: 300;
    animation: fadeInUp 0.9s var(--ease-out) 0.3s both;
}

/* ==========================================
   Content Sections
   ========================================== */

.content-section {
    padding: 90px 24px;
    background: var(--white);
}

.section-alt {
    background: var(--cream);
}

.prose {
    max-width: 780px;
    margin: 0 auto;
}

.prose p {
    font-size: 1.02rem;
    line-height: 1.9;
    margin-bottom: 22px;
    color: var(--charcoal-light);
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose strong {
    color: var(--charcoal);
    font-weight: 600;
}

.lead-text {
    font-size: 1.15rem !important;
    line-height: 1.85 !important;
    color: var(--charcoal) !important;
    font-weight: 400;
}

/* ==========================================
   Section Headings
   ========================================== */

.section-heading {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    margin-bottom: 28px;
    text-align: center;
    font-variation-settings: 'opsz' 72;
    position: relative;
    padding-bottom: 16px;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    border-radius: 2px;
}

.heading-red { color: var(--ohio-red); }
.heading-red::after { background: var(--ohio-red); }

.heading-green { color: var(--forest-green); }
.heading-green::after { background: var(--forest-green); }

.heading-blue { color: var(--deep-blue); }
.heading-blue::after { background: var(--deep-blue); }

/* ==========================================
   Numbers Grid (3-column variant)
   ========================================== */

.numbers-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1000px;
    margin: 40px auto 0;
    background: linear-gradient(160deg, var(--deep-blue) 0%, var(--deep-blue-dark) 100%);
    border-radius: var(--radius-md);
    padding: 48px 32px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.numbers-grid-3::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
}

.the-numbers .numbers-grid-3 {
    background: none;
    border-radius: 0;
    padding: 0;
    margin-top: 0;
}

.the-numbers .numbers-grid-3::before {
    display: none;
}

/* ==========================================
   Cost Breakdown Table
   ========================================== */

.cost-breakdown {
    max-width: 700px;
    margin: 40px auto 0;
}

.cost-table {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.section-alt .cost-table {
    background: var(--white);
}

.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s ease;
}

.cost-row:hover {
    background: rgba(0, 0, 0, 0.015);
}

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

.cost-item {
    font-size: 0.95rem;
    color: var(--charcoal-light);
}

.cost-amount {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--charcoal);
    white-space: nowrap;
    margin-left: 20px;
}

.cost-total-row {
    background: #fef2f2;
    border-top: 2px solid var(--ohio-red);
}

.cost-total-row:hover {
    background: #fde8e8;
}

.cost-total-row .cost-item {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--charcoal);
}

.cost-total {
    color: var(--ohio-red) !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
}

/* ==========================================
   Impact Cards
   ========================================== */

.impact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1000px;
    margin: 44px auto 0;
}

.impact-card {
    text-align: center;
    padding: 44px 28px;
    background: var(--cream);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.35s var(--ease-out);
}

.impact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.impact-number {
    display: block;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2rem, 3vw, 2.6rem);
    color: var(--ohio-red);
    margin-bottom: 16px;
    font-variation-settings: 'opsz' 72;
    line-height: 1;
}

.impact-card:last-child .impact-number {
    color: var(--forest-green);
}

.impact-text {
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--charcoal-light);
}

/* ==========================================
   Feature Grid (OpenAngus)
   ========================================== */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 50px auto 0;
}

.feature-card {
    padding: 36px 30px;
    background: var(--cream);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--forest-green);
    box-shadow: var(--shadow-sm);
    transition: all 0.35s var(--ease-out);
}

.feature-card:hover {
    transform: translateY(-4px) translateX(4px);
    box-shadow: var(--shadow-md);
    border-left-width: 6px;
}

.feature-icon {
    color: var(--forest-green);
    margin-bottom: 16px;
    transition: transform 0.4s var(--ease-spring);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--forest-green);
    font-variation-settings: 'opsz' 48;
}

.feature-card p {
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--charcoal-light);
}

/* ==========================================
   How It Works Steps
   ========================================== */

.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 50px auto 0;
}

.how-step {
    text-align: center;
    padding: 32px 20px;
    position: relative;
    transition: transform 0.3s var(--ease-out);
}

.how-step:hover {
    transform: translateY(-4px);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--forest-green);
    color: var(--white);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.3);
    transition: transform 0.4s var(--ease-spring);
}

.how-step:hover .step-number {
    transform: scale(1.1);
}

.how-step h3 {
    font-size: 1.05rem;
    margin-bottom: 12px;
    color: var(--forest-green);
    font-variation-settings: 'opsz' 48;
}

.how-step p {
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--charcoal-light);
}

/* ==========================================
   Tech Details
   ========================================== */

.tech-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 40px auto 0;
}

.tech-item {
    padding: 32px 28px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.35s var(--ease-out);
    border-bottom: 3px solid transparent;
}

.tech-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--deep-blue);
}

.section-alt .tech-item {
    background: var(--white);
}

.tech-item h4 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--deep-blue);
    margin-bottom: 10px;
}

.tech-item p {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--charcoal-light);
}

/* ==========================================
   Developer Info
   ========================================== */

.dev-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    max-width: 900px;
    margin: 40px auto 0;
}

.dev-card {
    padding: 36px 30px;
    background: var(--cream);
    border-radius: var(--radius-md);
    border-top: 4px solid var(--forest-green);
    box-shadow: var(--shadow-sm);
    transition: all 0.35s var(--ease-out);
}

.dev-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.dev-card h4 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--forest-green);
    margin-bottom: 12px;
}

.dev-card p {
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--charcoal-light);
}

/* ==========================================
   Knowledge Grid
   ========================================== */

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 50px auto 0;
}

.knowledge-card {
    padding: 40px 28px 36px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.35s var(--ease-out);
    border-bottom: 3px solid transparent;
}

.knowledge-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--sage-green);
}

.knowledge-icon {
    color: var(--sage-green);
    margin-bottom: 18px;
    transition: transform 0.4s var(--ease-spring);
}

.knowledge-card:hover .knowledge-icon {
    transform: scale(1.15);
}

.knowledge-card h3 {
    font-size: 1.1rem;
    margin-bottom: 14px;
    color: var(--forest-green);
    font-variation-settings: 'opsz' 48;
}

.knowledge-card p {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--charcoal-light);
    text-align: left;
}

/* ==========================================
   Additional Button Styles
   ========================================== */

.btn-primary-blue {
    background: var(--white);
    color: var(--deep-blue);
    border: 2px solid var(--white);
    padding: 14px 36px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    transition: all 0.35s var(--ease-out);
    display: inline-block;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.btn-primary-blue:hover {
    background: transparent;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.btn-green {
    background: var(--forest-green);
    color: var(--white);
    border: 2px solid var(--forest-green);
    padding: 14px 36px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    transition: all 0.35s var(--ease-out);
    display: inline-block;
    box-shadow: 0 4px 16px rgba(45, 80, 22, 0.3);
}

.btn-green:hover {
    background: var(--forest-green-dark);
    border-color: var(--forest-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 80, 22, 0.4);
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 1024px) {
    .how-it-works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 70px 20px 60px;
    }

    .page-hero::after {
        height: 30px;
    }

    .numbers-grid-3 {
        grid-template-columns: 1fr;
        padding: 36px 24px;
    }

    .impact-cards {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .how-it-works-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
    }

    .tech-details {
        grid-template-columns: 1fr;
    }

    .dev-info {
        grid-template-columns: 1fr;
    }

    .knowledge-grid {
        grid-template-columns: 1fr;
    }

    .cost-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .cost-amount {
        margin-left: 0;
    }

    .content-section {
        padding: 70px 20px;
    }

    .section-heading {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .page-hero {
        padding: 55px 16px 50px;
    }

    .page-hero-subtitle {
        font-size: 1rem;
    }

    .content-section {
        padding: 55px 16px;
    }

    .feature-card {
        padding: 28px 22px;
    }
}
