/*------------------------------------*\
  #PAGES: ESSAY, FORGE, SPECIAL SECTIONS
\*------------------------------------*/

/*----------------------*/
/* Essay Page Structure */
/*----------------------*/

.essay {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--padding);
}

/* Essay Header (large image & overlay) */
.essay__header {
    margin-bottom: 3rem;
    text-align: center;
}

.essay__header figure {
    position: relative;
    margin: 0 0 2rem 0;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    aspect-ratio: 21 / 9;
    box-shadow: var(--shadow);
}

.essay__header .essay__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.essay__header figure figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.6) 60%,
        rgba(0, 0, 0, 0) 100%
    );
    color: #fff;
    transform: translateY(100%);
    transition: transform 0.5s ease;
    font-size: var(--font-size-base);
    line-height: 1.6;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.essay__header figure:hover .essay__image {
    transform: scale(1.03);
}

.essay__header figure:hover figcaption {
    transform: translateY(0);
}

.essay__header figure::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0) 50%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
}

.essay__header figure:hover::after {
    opacity: 1;
}

/*----------------------*/
/* Essay Meta & Titles  */
/*----------------------*/

.essay__meta {
    font-family: var(--font-secondary);
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.essay__subtitle {
    color: var(--color-text-light);
    font-size: var(--font-size-md);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.essay__title {
    /* Add custom title styles here if needed */
}

#readingTime {
    font-family: var(--font-secondary);
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin: 10px auto;
    text-align: center;
    width: 100%;
    display: block;
}

/*----------------------*/
/* Essay Content Styles */
/*----------------------*/

.essay__content {
    font-size: var(--font-size-lg);
}

.essay__content h2,
.essay__content h3,
.essay__content h4 {
    margin: 2rem 0 1rem;
}

.essay__content p {
    margin-bottom: 1.5rem;
}

.essay__content pre {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.essay__content figure {
    margin: 2rem 0;
}

.essay__content figcaption {
    text-align: center;
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    margin-top: 0.5rem;
}

/*----------------------*/
/* Disclaimer Section   */
/*----------------------*/

.essay__disclaimer {
    margin: 2rem 0;
}

.essay__disclaimer details {
    font-size: var(--font-size-sm);
    font-style: italic;
    color: var(--color-text-light);
}

.essay__disclaimer summary {
    cursor: pointer;
    margin-bottom: 0.5rem;
}
.essay__disclaimer summary:hover {
    color: var(--color-text);
}
.essay__disclaimer fieldset {
    border: 1px solid var(--color-text-light);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    margin-top: 0.5rem;
}
.essay__disclaimer p {
    margin-bottom: 1rem;
}
.essay__disclaimer p:last-child {
    margin-bottom: 0;
}
.essay__disclaimer mark {
    background: none;
    color: inherit;
}

/*----------------------*/
/* Author Bio           */
/*----------------------*/

.author-bio {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 2rem;
    border-top: 1px solid var(--color-border);
    background-color: var(--color-background);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow);
}

.author-bio__image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.author-bio__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.author-bio__text {
    flex: 1;
}

.author-bio__name {
    font-family: var(--font-secondary);
    font-size: var(--font-size-lg);
    margin-bottom: 0.25rem;
    color: var(--color-text);
}

.author-bio__description {
    font-size: var(--font-size-base);
    color: var(--color-text-light);
    line-height: 1.6;
    margin: 0;
}

.author-bio__social {
    all: unset;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.625rem !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin-top: 1rem !important;
}
.author-bio__social a {
    all: unset;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.25rem !important;
    border-radius: var(--border-radius-sm) !important;
    color: var(--color-text-light) !important;
    transition:
        color 0.2s ease,
        background-color 0.2s ease !important;
    cursor: pointer !important;
    width: 32px;
    height: 32px;
}
.author-bio__social a:hover {
    color: var(--color-accent, #007bff) !important;
    background-color: var(--color-background-muted, #f2f2f2) !important;
}
.author-bio__social svg {
    all: unset !important;
    display: inline-block !important;
    vertical-align: middle !important;
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor !important;
    fill: none !important;
    pointer-events: none !important;
}

/*----------------------*/
/* Article Footer       */
/*----------------------*/

.article-footer {
    max-width: var(--max-width);
    margin: 1rem auto 1rem auto;
    padding: 1.5rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: transparent;
    color: rgba(0, 0, 0, 0.4);
    font-size: 0.75rem;
    line-height: 1.5;
    font-weight: 400;
    opacity: 0.85;
}

.article-footer__disclaimer {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    font-style: italic;
    color: rgba(0, 0, 0, 0.4);
}

.article-footer__copyright {
    margin-top: 0.75rem;
    font-style: normal;
    font-size: 0.6875rem;
    color: rgba(0, 0, 0, 0.35);
    letter-spacing: 0.02em;
}

/*----------------------*/
/* Prayer Section       */
/*----------------------*/

.prayer-section {
    background-color: #fff;
    padding: 20px;
    border-left: 5px solid #8b0000;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 20px 0px;
}

.prayer {
    font-style: italic;
    font-weight: bold;
    color: #8b0000;
}

/*----------------------*/
/* Related Essays Block */
/*----------------------*/

.related-essays {
    max-width: var(--max-width);
    margin: 2.5rem auto 0 auto;
    padding: 1.25rem 0 0.5rem 0;
}

.related-essays h3 {
    font-family: var(--font-heading);
    font-size: 1.04rem;
    color: var(--color-text);
    font-weight: 700;
    margin-bottom: 1.2rem;
    letter-spacing: 0.01em;
    text-align: left;
    line-height: 1.23;
}

.related-essay-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.related-essay-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: var(--color-background);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.25s;
    min-height: 110px;
}

.related-essay-card:hover {
    box-shadow: var(--shadow-hover);
}

.related-essay-card > a {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    text-decoration: none;
    width: 100%;
    color: inherit;
}

.related-essay-card__image-wrap {
    flex: 0 0 110px;
    min-width: 90px;
    max-width: 140px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: #f4f6fa;
}

.related-essay-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.related-essay-card:hover .related-essay-card__image {
    transform: scale(1.03);
}

.related-essay-card__content {
    padding: 1.1rem 1.4rem 1.1rem 1.4rem;
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-essay-card__title {
    font-family: var(--font-heading);
    font-size: 1.04rem;
    color: var(--color-text);
    font-weight: 700;
    margin: 0 0 0.2em 0;
    line-height: 1.23;
}

.related-essay-card__subtitle {
    font-family: var(--font-secondary);
    font-size: 0.97rem;
    color: var(--color-text-light);
    margin-bottom: 0.22em;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.related-essay-card__preview {
    font-size: 0.93rem;
    color: var(--color-text-light);
    margin: 0;
    line-height: 1.5;
}

/*----------------------*/
/* Forge Header (special page) */
/*----------------------*/

.forge__header {
    margin-bottom: 3rem;
    text-align: center;
}

.forge__header figure {
    position: relative;
    margin: 0 0 2rem 0;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow);
}

.forge__header .essay__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.forge__header figure figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.6) 60%,
        rgba(0, 0, 0, 0) 100%
    );
    color: #fff;
    transform: translateY(100%);
    transition: transform 0.5s ease;
    font-size: var(--font-size-base);
    line-height: 1.6;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.forge__header figure:hover .essay__image {
    transform: scale(1.03);
}

.forge__header figure:hover figcaption {
    transform: translateY(0);
}

.forge__header figure::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0) 50%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
}

.forge__header figure:hover::after {
    opacity: 1;
}
