/* =========================================================
   MODULE SYSTEM
   The alternating image/content split from the original
   single-pager, generalized into reusable classes instead of
   hardcoded #hero / #conflict / #friends IDs.

   Usage in the block editor or template files:
     <section class="module module--split module--tint-space-blue">
       <div class="module-inner">
         <div class="content-side"> ... </div>
         <div class="image-side"> ... </div>
       </div>
     </section>

   Add "module--reverse" to flip image/content order.
   Add "module--center" for the vertical/centered CTA layout.
   ========================================================= */

.module {
    position: relative;
    padding: 5rem 2rem;
    background-image: url("../../images/spreadsc.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Tint overlay sits as a pseudo-element so background-image
   and color-tint can vary independently per module */
.module::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--module-tint, var(--tint-space-blue));
    box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.6);
}

.module--tint-space-blue   { --module-tint: var(--tint-space-blue); }
.module--tint-blood-red    { --module-tint: var(--tint-blood-red); }
.module--tint-forest-green { --module-tint: var(--tint-forest-green); }
.module--tint-dark-gold    { --module-tint: var(--tint-dark-gold); }
.module--tint-void-purple  { --module-tint: var(--tint-void-purple); }

.module-inner {
    position: relative;
    z-index: 10;
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.module--split .module-inner { flex-direction: row; }
.module--split.module--reverse .module-inner { flex-direction: row-reverse; }
.module--center .module-inner { flex-direction: column; text-align: center; align-items: center; }

.content-side {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.module--split:not(.module--reverse) .content-side { align-items: flex-start; text-align: left; }
.module--split.module--reverse .content-side { align-items: flex-end; text-align: right; }

.image-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comic-asset {
    border-radius: 15px;
    border: 1px solid white;
    max-width: 100%;
    height: auto;
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
.module h1,
.module h2,
.module .display-heading {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--color-display);
    text-shadow: 4px 4px 0px var(--color-display-shadow);
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 1rem;
}

.module p {
    color: var(--color-text);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    max-width: 500px;
    padding-top: 0.5em;
}

.module--center p {
    max-width: 600px;
}

/* Links inside module body copy — scoped, not blanket.
   Reuses the display yellow so it reads as part of the same
   system rather than introducing a new color. */
.module .content-side a:not(.cta-button):not(.chip) {
    color: var(--color-link);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.module .content-side a:not(.cta-button):not(.chip):hover,
.module .content-side a:not(.cta-button):not(.chip):focus-visible {
    color: var(--color-link-hover);
}

/* =========================================================
   CHIPS & CTA BUTTON
   ========================================================= */
.data-container {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.module--center .data-container,
.module--reverse .data-container {
    justify-content: center;
}

.chip {
    background: rgba(255, 204, 0, 0.15);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--color-link);
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid rgba(255, 204, 0, 0.3);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.chip:hover,
.chip:focus-visible {
    background: rgba(255, 204, 0, 0.3);
}

.cta-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 1.2rem 3.5rem;
    background-color: var(--color-cta-bg);
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.5rem;
    border-radius: 8px;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.cta-button:hover,
.cta-button:focus-visible {
    transform: scale(1.08) rotate(-2deg);
    background-color: var(--color-cta-hover-bg);
    color: var(--color-cta-hover-text);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    .module { padding: 3.5rem 1.5rem; }

    .module--split .module-inner,
    .module--split.module--reverse .module-inner {
        flex-direction: column;
        text-align: center;
    }

    .module--split .content-side,
    .module--split.module--reverse .content-side {
        align-items: center;
        text-align: center;
    }

    .data-container {
        justify-content: center;
    }
}
