/* ============================================================
   inner.css — Shared inner page styles for rural.ie
   ============================================================ */

/* ---- Page hero variants ---- */
.page-hero {
    padding: 60px 0 50px;
    color: var(--white);
    position: relative;
}
.page-hero--green { background: linear-gradient(135deg, var(--green) 0%, #1a3d1c 100%); }
.page-hero--slate { background: linear-gradient(135deg, var(--slate) 0%, #2a3d5c 100%); }
.page-hero--stone { background: linear-gradient(135deg, #8B6914 0%, #5c4410 100%); }
.page-hero--dark  { background: linear-gradient(135deg, #1a2a1b 0%, #0e1a0f 100%); }

.breadcrumb {
    font-size: 0.8rem;
    opacity: 0.65;
    margin-bottom: 1rem;
}
.breadcrumb a { color: inherit; opacity: 0.8; }
.breadcrumb a:hover { opacity: 1; }
.breadcrumb a::after { content: ' / '; margin: 0 0.3rem; }

.page-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 4px 12px;
    color: var(--stone);
    margin-bottom: 1rem;
}
.page-hero h1 {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
.page-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    opacity: 0.75;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

/* ---- Content layout (TOC + article) ---- */
.content-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 60px 24px 80px;
    align-items: start;
}
.toc {
    position: sticky;
    top: 88px;
}
.toc-inner {
    background: var(--cream);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
}
.toc-inner > strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    margin-bottom: 0.85rem;
}
.toc ul { list-style: none; display: flex; flex-direction: column; gap: 0.2rem; }
.toc a {
    display: block;
    font-size: 0.85rem;
    color: var(--text-mid);
    padding: 5px 8px;
    border-radius: 5px;
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
}
.toc a:hover { background: var(--cream-dark); color: var(--green); }

/* ---- Content body ---- */
.content-body {
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--text);
    min-width: 0;
}
.content-body h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--green);
    margin: 2.5rem 0 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--stone);
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.content-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 1.75rem 0 0.75rem;
}
.content-body p { margin: 0 0 1.2rem; }
.content-body ul, .content-body ol { margin: 0 0 1.2rem 1.5rem; }
.content-body li { margin-bottom: 0.5rem; }
.content-body strong { color: var(--green); }
.content-body a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.content-body a:hover { color: var(--stone); }

.intro-lead {
    font-size: 1.15rem;
    line-height: 1.75;
    color: #333;
    border-left: 4px solid var(--stone);
    padding-left: 1.25rem;
    margin-bottom: 2rem;
}

/* ---- Callout boxes ---- */
.callout {
    border-radius: var(--radius-sm);
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
    font-size: 0.97rem;
    line-height: 1.65;
}
.callout strong { display: block; margin-bottom: 0.5rem; font-size: 1rem; }
.callout p { margin: 0; }
.callout--stone  { background: #fdf6e9; border-left: 4px solid var(--stone); color: #5c3d00; }
.callout--green  { background: #f0faf1; border-left: 4px solid var(--green); color: #0d2e18; }
.callout--slate  { background: #edf2fa; border-left: 4px solid var(--slate); color: #1a2a45; }
.callout--red    { background: #fff2f2; border-left: 4px solid #d63031; color: #4a0000; }

/* ---- Info cards grid ---- */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0 2rem;
}
.info-card {
    background: var(--cream);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    border: 1px solid var(--border);
}
.info-card strong { display: block; font-size: 0.97rem; color: var(--green); margin-bottom: 0.5rem; }
.info-card p { font-size: 0.88rem; color: var(--text-mid); margin: 0; line-height: 1.55; }
.info-card-val { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.3rem; }
.info-card-label { font-size: 0.8rem; color: var(--text-mid); }

/* ---- Grant cards ---- */
.grant-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}
.grant-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.grant-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--green); margin: 0; }
.grant-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
}
.grant-badge.open   { background: #d4edda; color: #155724; }
.grant-badge.closed { background: #f8d7da; color: #721c24; }
.grant-badge.check  { background: #fff3cd; color: #856404; }

.grant-spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}
.grant-spec {
    background: var(--cream);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
}
.grant-spec span { display: block; font-size: 0.75rem; color: var(--text-light); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.05em; }
.grant-spec strong { font-size: 0.92rem; color: var(--text); }

/* ---- Data table ---- */
.data-table-wrap {
    overflow-x: auto;
    margin: 1.5rem 0 2rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: var(--white);
    min-width: 500px;
}
.data-table thead { background: var(--green); color: var(--white); }
.data-table th { text-align: left; padding: 12px 16px; font-weight: 600; letter-spacing: 0.02em; }
.data-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table tbody tr:nth-child(even) { background: var(--cream); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #fdf6e9; transition: background 0.15s; }

/* ---- Summary box ---- */
.summary-box {
    background: #f0faf1;
    border: 1px solid #b2dbbf;
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}
.summary-item { display: flex; gap: 1.25rem; align-items: flex-start; margin-bottom: 1.5rem; }
.summary-item:last-child { margin-bottom: 0; }
.summary-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--green);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}
.summary-item > div strong { display: block; margin-bottom: 0.4rem; font-size: 1rem; color: var(--green); }
.summary-item > div p { margin: 0; font-size: 0.95rem; color: var(--text-mid); }

/* ---- CTA box ---- */
.cta-box {
    background: var(--green);
    color: var(--white);
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
    margin: 3rem 0 2rem;
    text-align: center;
}
.cta-box h3 { color: var(--stone); font-size: 1.3rem; margin: 0 0 0.75rem; }
.cta-box p { margin: 0 0 1.25rem; font-size: 0.97rem; opacity: 0.92; }
.inline-form { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.inline-form input[type="email"] {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 1rem;
    min-width: 240px;
    flex: 1;
    max-width: 320px;
    outline: none;
}
.inline-form input[type="email"]:focus { box-shadow: 0 0 0 3px rgba(200,169,110,0.5); }

/* ---- Related links ---- */
.related-links { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--border); }
.related-links h3 { font-size: 1.1rem; color: var(--green); margin: 0 0 1rem; }
.related-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--cream);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    margin-bottom: 0.75rem;
    transition: background 0.15s, transform 0.15s;
    border: 1px solid transparent;
}
.related-link:hover { background: #fdf6e9; border-color: var(--stone); transform: translateX(4px); }
.related-link span { font-size: 1.75rem; flex-shrink: 0; }
.related-link strong { display: block; color: var(--green); font-size: 0.97rem; margin-bottom: 0.2rem; }

/* ---- Responsive for inner pages ---- */
@media (max-width: 900px) {
    .content-layout { grid-template-columns: 1fr; gap: 1.5rem; }
    .toc { position: static; }
}
@media (max-width: 600px) {
    .content-layout { padding: 40px 16px 60px; }
    .page-hero { padding: 50px 0 40px; }
    .cta-box { padding: 1.5rem 1.25rem; }
}
