/* ==========================================================================
   CONTENT
   Shared styles for single.php and page.php
   ========================================================================== */


/* ==========================================================================
   PAGE BANNER
   ========================================================================== */

/* --- Base (Regular) --- */
.page-banner {
    background: #1f345c;
    width: 100%;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.page-banner__inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 1.25rem;
    padding-top: calc(95px + 2rem);
    text-align: center;
    position: relative;
    z-index: 2;
}

.page-banner__title {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.page-banner__subtitle {
    font-family: 'Cinzel', serif;
    font-size: 1.375rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 1.5rem 0 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* --- Full variant --- */
.page-banner--full {
    min-height: 100vh;
    background: #1a2544;
}

.page-banner--full .page-banner__inner {
    max-width: 1200px;
    padding: 6rem 1.25rem;
    padding-top: calc(95px + 4rem);
}

.page-banner--full .page-banner__title {
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.1;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.page-banner--full .page-banner__subtitle {
    font-size: 1.925rem;
    letter-spacing: 0.2em;
    margin-top: 2rem;
}

/* Background image */
.page-banner__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.page-banner__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Gradient overlay */
.page-banner__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to bottom right,
            rgba(33, 50, 91, 0.92),
            rgba(26, 37, 68, 0.87),
            rgba(0, 0, 0, 0.92));
}

/* --- Mobile --- */
@media (max-width: 768px) {

    .page-banner {
        min-height: 280px;
    }

    .page-banner__inner {
        padding-top: calc(130px + 1rem);
        padding-bottom: 2rem;
    }

    .page-banner__title {
        font-size: 2rem;
    }

    .page-banner--full {
        min-height: 100vh;
    }

    .page-banner--full .page-banner__inner {
        padding-top: calc(130px + 2rem);
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .page-banner--full .page-banner__title {
        font-size: 2.75rem;
    }

    .page-banner--full .page-banner__subtitle {
        font-size: 1.2rem;
        letter-spacing: 0.1em;
    }
}


/* ==========================================================================
   ENTRY META BAR
   ========================================================================== */

.entry-meta {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 20px 0;
    width: 100%;
}

.entry-meta__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem 1.25rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.entry-meta__item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.entry-meta__label {
    font-weight: 600;
    color: #1f345c;
}

.entry-meta__value {
    color: #4b5563;
}

/* Hidden on desktop, shown only on mobile */
.entry-meta__mobile {
    display: none;
}

@media (max-width: 768px) {
    .entry-meta {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .entry-meta__inner {
        flex-wrap: nowrap;
        justify-content: flex-start;
        white-space: nowrap;
        gap: 0;
        font-size: 0.85rem;
        padding: 0 1.25rem;
    }

    /* Hide all items and labels by default on mobile */
    .entry-meta__item,
    .entry-meta__label {
        display: none;
    }

    /* Show mobile-specific single line */
    .entry-meta__mobile {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        white-space: nowrap;
        color: #4b5563;
        font-size: 0.85rem;
    }

    .entry-meta__dot {
        color: #9ca3af;
    }
}


/* ==========================================================================
   LAYOUT
   ========================================================================== */

.entry {
    max-width: 900px;
    margin: 0 auto 3rem;
    padding: 2rem 1.25rem 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

.entry--wide {
    max-width: 1200px;
}

.entry--full {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}


/* ==========================================================================
   TITLE
   ========================================================================== */

.entry__title {
    font-size: 2.25rem;
    font-weight: 600;
    color: #1c2633;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 1rem 0;
}


/* ==========================================================================
   META
   ========================================================================== */

.entry__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}


/* ==========================================================================
   THUMBNAIL
   ========================================================================== */

.entry__thumbnail {
    margin-bottom: 2rem;
}

.entry__thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
}


/* ==========================================================================
   CONTENT
   ========================================================================== */

.entry__content {
    font-size: 1.22rem;
    font-weight: 400;
    line-height: 1.75;
    color: #394354;
    letter-spacing: 0.01em;
}

/* Headings */
.entry__content h1,
.entry__content h2,
.entry__content h3,
.entry__content h4,
.entry__content h5,
.entry__content h6 {
    font-weight: 500;
    color: #151c25;
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Cinzel', serif;
}

.entry__content h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.entry__content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.entry__content h4 {
    font-size: 1.25rem;
}

/* Paragraph & lists */
.entry__content p {
    margin-bottom: 1.5rem;
}

.entry__content ul,
.entry__content ol {
    margin: 0 0 1.5rem 1.5rem;
}

.entry__content ul {
    list-style: disc;
}

.entry__content ol {
    list-style: decimal;
}

.entry__content li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

/* Blockquote */
.entry__content blockquote {
    border-left: 4px solid #1f345c;
    margin: 2rem 0;
    padding: 0.5rem 0 0.5rem 1.5rem;
    color: #4b5563;
    font-style: italic;
}

/* Links */
.entry__content a {
    color: #d3621e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.entry__content a:hover {
    text-decoration: underline;
    color: #c75d1b;
}

/* Images */
.entry__content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
    margin: 1.5rem 0;
}

/* Tables */
.entry__content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.entry__content th {
    background: #1f345c;
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}

.entry__content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.entry__content tr:nth-child(even) td {
    background: #f9fafb;
}


/* ==========================================================================
   AUTHOR BOX
   ========================================================================== */

.author-box {
    margin: 3rem 0 0;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Toggle button — the always-visible header row */
.author-box__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.author-box__toggle:hover {
    background: #f0f2f5;
}

/* Left side — photo + text */
.author-box__header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-box__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e5e7eb;
}

.author-box__header-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.author-box__label {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f345c;
    line-height: 1.2;
}

.author-box__name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
}

/* +/- icon */
.author-box__icon {
    font-size: 1.75rem;
    font-weight: 300;
    color: #1f345c;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.author-box.is-open .author-box__icon {
    content: '-';
}

/* Body — hidden by default */
.author-box__body {
    display: none;
    padding: 1.25rem;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

.author-box.is-open .author-box__body {
    display: block;
}

.author-box__credentials {
    font-size: 0.875rem;
    font-weight: 600;
    color: #b85619;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem 0;
}

.author-box__bio {
    font-size: 1rem;
    line-height: 1.75;
    color: #374151;
}

.author-box__bio p {
    margin-bottom: 1rem;
}

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

@media (max-width: 768px) {
    .author-box {
        margin: 2rem 0;
    }

    .author-box__label {
        font-size: 0.95rem;
    }

    .author-box__avatar {
        width: 44px;
        height: 44px;
    }
}


/* ==========================================================================
   MEDIA QUERIES
   ========================================================================== */

@media (max-width: 768px) {

    .entry__title {
        font-size: 1.75rem;
    }

    .entry__content {
        font-size: 1.125rem;
    }

    .entry__content h2 {
        font-size: 1.5rem;
    }

    .entry__content h3 {
        font-size: 1.25rem;
    }
}


/* ==========================================================================
   YOUTUBE
   ========================================================================== */

.lite-youtube {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    cursor: pointer;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    display: block;
}

.lite-youtube iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.lite-youtube-playbtn {
    width: 68px;
    height: 48px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 0;
    background: transparent;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path fill="%23f00" fill-opacity="0.85" d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55C3.97 2.33 2.27 4.81 1.48 7.74.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z"/><path d="M45 24 27 14v20" fill="%23fff"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
}


/* ==========================================================================
   PAGE INTRO — used on custom page templates between banner and content
   ========================================================================== */

.page-intro {
    padding: 3rem 0;
}

.page-intro__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    font-size: 1rem;
    line-height: 1.75;
    color: #374151;
}

.page-intro__container p {
    margin-bottom: 1rem;
}

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

@media (max-width: 768px) {
    .page-intro {
        padding: 2rem 0;
    }
}


/* ==========================================================================
   LITE YOUTUBE — custom play button
   ========================================================================== */

.lite-youtube-playbtn {
    background-image: none !important;
    width: 68px;
    height: 48px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.lite-youtube-playbtn::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 9px 0 9px 18px;
    border-color: transparent transparent transparent #fff;
    margin-left: 3px;
}

.lite-youtube:hover .lite-youtube-playbtn {
    background-color: rgba(0, 0, 0, 0.8);
}


/* ==========================================================================
   TABLE OF CONTENTS
   ========================================================================== */

.toc {
    position: fixed;
    top: 140px;
    left: max(1.5rem, calc(50% - 600px - 280px));
    width: 32px;
    z-index: 50;
    max-height: calc(100vh - 160px);
    overflow: visible;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    background: none;
    border: none;
    padding: 0.5rem 0;
}

.toc.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.toc__title {
    display: none;
}

.toc__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
}

.toc__item {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0;
}

/* Vertical line connecting circles */
.toc__item::after {
    content: '';
    position: absolute;
    left: 4px;
    top: calc(50% + 6px);
    width: 2px;
    height: calc(100% - 4px);
    background: #e5e7eb;
}

.toc__item:last-child::after {
    display: none;
}

.toc__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    width: 100%;
}

.toc__circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 2px solid #d1d5db;
    flex-shrink: 0;
    z-index: 1;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.toc__link:hover .toc__circle,
.toc__item.is-active .toc__circle {
    background: #b85619;
    border-color: #9a4715;
    transform: scale(1.3);
    box-shadow: 0 0 0 3px rgba(184, 86, 25, 0.15);
}

.toc__text {
    font-size: 0.875rem;
    color: #1f345c;
    line-height: 1.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.4rem;
    padding: 0.25rem 0.6rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-6px);
    font-weight: 500;
    font-size: 0.8rem;
}

.toc__link:hover .toc__text {
    opacity: 1;
    transform: translateX(0);
}

.toc__item.is-active .toc__text {
    font-weight: 700;
    color: #b85619;
}

/* Hide on smaller screens where there's no room */
@media (max-width: 1300px) {
    .toc {
        display: none;
    }
}


/* ==========================================================================
   BANNER POST META — single.php
   ========================================================================== */

.page-banner__categories {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 0.15rem;
    margin-bottom: 1rem;
}

.page-banner__category {
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s ease;
}

.page-banner__category:hover {
    color: #fff;
}

.page-banner__cat-sep {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.72rem;
    margin-right: 0.3rem;
}

.page-banner__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
}

.page-banner__meta-author {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.page-banner__meta-sep {
    color: rgba(255, 255, 255, 0.3);
}

.page-banner__meta-date,
.page-banner__meta-time {
    color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 768px) {
    .page-banner__meta {
        font-size: 0.8rem;
        gap: 0.35rem 0.6rem;
    }
}


/* ==========================================================================
   READING PROGRESS BAR — single.php
   ========================================================================== */

.reading-progress-wrap {
    position: fixed;
    top: 95px;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reading-progress {
    height: 100%;
    width: 0%;
    background: #ff8702;
    transition: width 0.1s linear;
}

@media (max-width: 768px) {
    .reading-progress-wrap {
        top: 73px;
    }
}



/* ==========================================================================
   ATTORNEY PAGE
   ========================================================================== */

/* ── ATTORNEY TITLE BAR ── */
.attorney-title-bar {
    padding: calc(95px + 2rem) 0 2rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.attorney-title-bar__name {
    font-family: 'Cinzel', serif;
    font-size: 2.75rem;
    font-weight: 700;
    color: #1f345c;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── ATTORNEY LAYOUT ── */
.attorney-page {
    padding: 3rem 0 5rem;
}

.attorney-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 4rem;
    align-items: start;
}

.attorney-layout__img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    display: block;
    object-fit: cover;
    object-position: top;
    aspect-ratio: 17/20;
}

.attorney-layout__img-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #1f345c, #2a4a7f);
}

@media (max-width: 768px) {
    .attorney-title-bar {
        padding: calc(125px + 1.5rem) 0 1.5rem;
    }

    .attorney-title-bar__name {
        font-size: 1.75rem;
    }

    .attorney-page {
        padding: 1.5rem 0 4rem;
    }

    .attorney-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1.25rem;
    }
}