/**
 * ============================================================================
 * Kheda Arts and Commerce College - College History Page Stylesheet
 * ============================================================================
 * Integrated Editorial Image-and-Text Continuous Canvas
 *
 * Palette:
 * - Primary Navy:       #01356F
 * - Secondary Burgundy: #792D43
 * - Section Background: #FAF7F8 / #F5E9EC
 * - Body Text:          #302B35
 * - Surface White:      #FFFFFF
 * - Neutral Border:     #E2D5D9
 * ============================================================================
 */

/* =========================================================================
   1. Section & Canvas Layout
   ========================================================================= */
.ch-page-section {
    background-color: #ffffff;
    padding-top: 100px;
    padding-bottom: 100px;
    color: #302B35;
}

.ch-container {
    max-width: 1140px;
    margin: 0 auto;
}

/* =========================================================================
   2. Single Integrated Editorial Article Surface
   ========================================================================= */
.ch-editorial-article {
    background-color: #FFFFFF;
    border: 1px solid #E2D5D9;
    box-shadow: 0 10px 32px rgba(1, 53, 111, 0.05);
    padding: 48px 52px;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.ch-editorial-article:hover {
    box-shadow: 0 14px 40px rgba(1, 53, 111, 0.08);
}

/* =========================================================================
   3. Editorial Article Header
   ========================================================================= */
.ch-editorial-header {
    margin-bottom: 30px;
    padding-bottom: 22px;
    border-bottom: 1px solid #F0E6E9;
}

.ch-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    color: #792D43;
    background-color: #F5E9EC;
    border: 1px solid #E2D5D9;
    padding: 5px 16px;
    margin-bottom: 14px;
}

.ch-badge i {
    font-size: 13.5px;
    color: #01356F;
}

.ch-editorial-title {
    font-size: 30px;
    font-weight: 700;
    color: #01356F;
    line-height: 1.3;
    margin: 0 0 14px 0;
}

.ch-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.ch-divider-line {
    width: 48px;
    height: 3.5px;
    background-color: #01356F;
}

.ch-divider-line-secondary {
    width: 22px;
    height: 3.5px;
    background-color: #792D43;
}

/* =========================================================================
   4. Integrated Editorial Body & Flow
   ========================================================================= */
.ch-editorial-body {
    display: flow-root; /* Creates a clean block formatting context */
    position: relative;
}

.ch-editorial-body::after {
    content: "";
    display: table;
    clear: both;
}

/* Naturally Embedded Floated Editorial Image */
.ch-editorial-figure {
    float: right;
    width: 44%;
    max-width: 470px;
    min-width: 320px;
    margin: 8px 0 24px 36px;
    shape-outside: margin-box;
    position: relative;
}

.ch-figure-img-wrap {
    overflow: hidden;
    border: 1px solid #E2D5D9;
    box-shadow: 0 8px 24px rgba(1, 53, 111, 0.07);
    background-color: #F5E9EC;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.ch-figure-img-wrap:hover {
    box-shadow: 0 12px 32px rgba(1, 53, 111, 0.12);
    transform: translateY(-2px);
}

.ch-editorial-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 3 / 2;
    transition: transform 0.45s ease;
}

.ch-figure-img-wrap:hover .ch-editorial-img {
    transform: scale(1.02);
}

/* =========================================================================
   5. Narrative Prose Typography & Continuous Wrapping
   ========================================================================= */
.ch-editorial-text {
    font-size: 15.5px;
    line-height: 1.88;
    color: #302B35;
    word-break: break-word;
}

.ch-editorial-text p {
    margin-bottom: 22px;
    color: #35303a;
    line-height: 1.88;
    text-align: justify;
    text-justify: inter-word;
}

.ch-editorial-text p:first-of-type {
    font-size: 16px;
    color: #27232b;
}

.ch-editorial-text p:last-child {
    margin-bottom: 0;
}

.ch-editorial-text h2,
.ch-editorial-text h3,
.ch-editorial-text h4 {
    clear: both;
    color: #01356F;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 36px;
    margin-bottom: 16px;
    position: relative;
    padding-left: 14px;
}

.ch-editorial-text h2::before,
.ch-editorial-text h3::before,
.ch-editorial-text h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background-color: #792D43;
}

.ch-editorial-text h2 {
    font-size: 24px;
}

.ch-editorial-text h3 {
    font-size: 20px;
}

.ch-editorial-text h4 {
    font-size: 18px;
}

.ch-editorial-text strong,
.ch-editorial-text b {
    color: #01356F;
    font-weight: 700;
}

.ch-editorial-text em,
.ch-editorial-text i {
    color: #5c5562;
}

.ch-editorial-text blockquote {
    margin: 28px 0;
    padding: 18px 24px;
    background-color: #F5E9EC;
    border-left: 4px solid #792D43;
    color: #302B35;
    font-style: italic;
    font-size: 16px;
    line-height: 1.7;
    clear: both;
}

.ch-editorial-text blockquote p:last-child {
    margin-bottom: 0;
}

.ch-editorial-text ul,
.ch-editorial-text ol {
    margin: 20px 0 24px 20px;
    padding-left: 12px;
}

.ch-editorial-text ul li,
.ch-editorial-text ol li {
    margin-bottom: 10px;
    line-height: 1.75;
}

.ch-editorial-text ul li::marker {
    color: #792D43;
}

.ch-editorial-text a {
    color: #01356F;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.ch-editorial-text a:hover,
.ch-editorial-text a:focus {
    color: #792D43;
}

/* Tables inside Prose */
.ch-table-wrap {
    width: 100%;
    margin: 26px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #E2D5D9;
    clear: both;
}

.ch-editorial-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14.5px;
}

.ch-editorial-text th {
    background-color: #01356F;
    color: #FFFFFF;
    font-weight: 700;
    padding: 11px 16px;
    border: 1px solid #002652;
    text-align: left;
    white-space: nowrap;
}

.ch-editorial-text td {
    padding: 10px 16px;
    border: 1px solid #E2D5D9;
    line-height: 1.6;
}

.ch-editorial-text tbody tr:nth-child(even) {
    background-color: #FAF5F7;
}

.ch-editorial-text tbody tr:hover {
    background-color: #F5E9EC;
}

/* =========================================================================
   6. Dignified Empty State Fallback
   ========================================================================= */
.ch-empty-card {
    background: #FFFFFF;
    border: 1px solid #E2D5D9;
    box-shadow: 0 10px 32px rgba(1, 53, 111, 0.05);
    padding: 60px 30px;
    text-align: center;
    max-width: 650px;
    margin: 0 auto;
}

.ch-empty-icon {
    width: 72px;
    height: 72px;
    background-color: #F5E9EC;
    color: #792D43;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
    border: 1px solid #E2D5D9;
}

.ch-empty-title {
    font-size: 22px;
    font-weight: 700;
    color: #01356F;
    margin-bottom: 10px;
}

.ch-empty-desc {
    font-size: 15px;
    color: #635d68;
    line-height: 1.6;
    margin-bottom: 26px;
}

/* =========================================================================
   7. Responsive Breakpoints
   ========================================================================= */
@media (max-width: 991px) {
    .ch-page-section {
        padding-top: 45px;
        padding-bottom: 65px;
    }

    .ch-editorial-article {
        padding: 36px 30px;
    }

    .ch-editorial-title {
        font-size: 26px;
    }

    .ch-editorial-figure {
        width: 42%;
        max-width: 360px;
        min-width: 260px;
        margin: 6px 0 20px 24px;
    }

    .ch-editorial-text p {
        text-align: left; /* Avoid uneven word spacing on smaller screens */
    }
}

@media (max-width: 767px) {
    /* Unfloat image on tablet portrait / mobile for natural linear reading */
    .ch-editorial-figure {
        float: none;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0 0 24px 0;
        shape-outside: none;
    }

    .ch-editorial-article {
        padding: 30px 22px;
    }
}

@media (max-width: 575px) {
    .ch-page-section {
        padding-top: 35px;
        padding-bottom: 45px;
    }

    .ch-editorial-article {
        padding: 22px 16px;
    }

    .ch-editorial-title {
        font-size: 22px;
    }

    .ch-editorial-text {
        font-size: 14.5px;
        line-height: 1.78;
    }

    .ch-editorial-text p {
        margin-bottom: 18px;
    }

    .ch-editorial-text h2 {
        font-size: 20px;
    }

    .ch-editorial-text h3 {
        font-size: 18px;
    }

    .ch-empty-card {
        padding: 40px 18px;
    }
}
