/*
Theme Name: RIWYB Child
Theme URI: https://yourdomain.com
Description: Child theme for RIWYB structured layout
Author: Mark Lefcowitz
Template: astra
Version: 1.0
*/

/* --------------------------
   GLOBAL STRUCTURE
--------------------------- */

.riwyb-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

.riwyb-narrow {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px;
}

.riwyb-title {
    text-align: center;
    margin-bottom: 1rem;
}

.riwyb-subtitle {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    opacity: 0.8;
}

.riwyb-body {
    margin-top: 3rem;
}

.riwyb-header {
    padding: 4rem 0 2rem 0;
}

/*
Theme Name: RIWYB Astra Child
Template: astra
Version: 1.0
*/

/* Existing custom rules above */


/* ==============================
   RIWYB Vertical Rhythm System
   ============================== */

:root {
    --space-sm: 16px;
    --space-md: 32px;
    --space-lg: 48px;
    --space-xl: 72px;
}

.entry-content p {
    margin-bottom: var(--space-md);
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.wp-block-group {
    margin-bottom: var(--space-lg);
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

/* Reduce spacing for headings inside columns */
.wp-block-column h1,
.wp-block-column h2,
.wp-block-column h3,
.wp-block-column h4 {
    margin-top: var(--space-sm);
}
/* Reduce spacing for headings inside columns */
.wp-block-column h1,
.wp-block-column h2,
.wp-block-column h3,
.wp-block-column h4 {
    margin-top: var(--space-sm);
}
/* Fine-tune column heading spacing */
.wp-block-column h1,
.wp-block-column h2,
.wp-block-column h3,
.wp-block-column h4 {
    margin-top: 8px;
    margin-bottom: 12px;
}
/* ==============================
   RIWYB Button Design System
   ============================== */

.wp-block-button__link,
.ast-button,
.button,
button,
input[type="button"],
input[type="submit"] {

    background-color: #1f3a5f;   /* deep restrained blue */
    color: #ffffff;
    border-radius: 0px;
    padding: 14px 28px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: none;
    transition: background-color 0.2s ease;
}

/* Hover state */
.wp-block-button__link:hover,
.ast-button:hover,
.button:hover,
button:hover,
input[type="submit"]:hover {

    background-color: #162c49;  /* darker controlled hover */
}
/* Tighten vertical spacing more aggressively */

.ast-single-post .entry-content p,
.page .entry-content p {
    margin-bottom: 0.6em !important;
}

.ast-single-post .entry-content h2,
.page .entry-content h2 {
    margin-top: 1.2em !important;
    margin-bottom: 0.5em !important;
}

.ast-single-post .entry-content ul,
.page .entry-content ul {
    margin-top: 0.4em !important;
    margin-bottom: 0.6em !important;
}
/* Tighten H2 spacing */
.entry-content h2 {
    margin-top: 1.2em;
    margin-bottom: 0.4em;
}
/* Tighten ALL paragraph spacing */
p {
    margin-bottom: 0.75em !important;
}

/* Tighten H2 spacing site-wide */
h2 {
    margin-top: 1.1em !important;
    margin-bottom: 0.5em !important;
}

/* Tighten H3 */
h3 {
    margin-top: 1em !important;
    margin-bottom: 0.4em !important;
}

/* Tighten list spacing */
ul, ol {
    margin-bottom: 0.75em !important;
}
/* Tighten H2 spacing sitewide */
.entry-content h2,
.wp-block-post-content h2 {
  margin-top: 1.0em !important;
  margin-bottom: 0.5em !important;
}
/* Optional: tighten paragraph spacing under headings */
.entry-content h2 + p,
.wp-block-post-content h2 + p {
  margin-top: 0.4em !important;
}
.entry-content > .wp-block-group {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 1em;
    padding-right: 1em;
    gap: 2px;
}

.ast-single-post .entry-content h2,
.page .entry-content h2 {
    margin-top: 0.2em !important;
}

.entry-content > .wp-block-columns {
    margin-top: 0.1em !important;
    padding-top: 5px !important;
}
/* Align Top for Table */
}
.wp-block-table td,
.wp-block-table th {
    vertical-align: top;
}