/*
|--------------------------------------------------------------------------
| FILE PATH:
| /home/mahaupsi/public_html/assets/public/css/clauses.css
|
| FILE PURPOSE:
| Page-specific styling for the public Maha Shikshan Awaaz
| Draft Clauses page.
|
| Improves readability of long Marathi/English draft clauses using
| clearly separated content sections, larger text and responsive spacing.
|
| Only Active clauses are shown publicly.
|--------------------------------------------------------------------------
*/


/* =========================================================
   CLAUSE LIST
   ========================================================= */

.public-clause-list {
    display: grid;

    grid-template-columns: 1fr;

    gap: var(--space-5);
}


/* =========================================================
   CLAUSE CARD
   ========================================================= */

.public-clause-card {
    background: var(--card-bg);

    border:
        1px solid
        var(--card-border);

    border-radius: var(--radius-lg);

    box-shadow: var(--card-shadow);

    overflow: hidden;
}


/* =========================================================
   CLAUSE HEADER
   ========================================================= */

.public-clause-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: var(--space-4);

    padding:
        var(--space-5)
        var(--space-5);

    background: var(--bg-surface);

    border-bottom:
        1px solid
        var(--border-color);
}


.public-clause-body {
    padding: var(--space-5);

    background: var(--bg-surface-2);
}


/* =========================================================
   CLAUSE HEADING
   ========================================================= */

.public-clause-number {
    color: var(--color-primary);

    font-size: 0.95rem;
    font-weight: 800;

    line-height: 1.3;
}


.public-clause-title {
    margin-top: var(--space-2);

    color: var(--text-primary);

    font-size: 1.65rem;
    font-weight: 750;

    line-height: 1.4;
}


/* =========================================================
   LANGUAGE
   ========================================================= */

.public-clause-language {
    flex: 0 0 auto;
}


/* =========================================================
   CONTENT SECTIONS
   ========================================================= */

.public-clause-section {
    margin-top: var(--space-4);

    padding:
        var(--space-4)
        var(--space-4);

    background: var(--bg-surface);

    border:
        1px solid
        var(--border-color);

    border-left:
        4px solid
        var(--color-primary);

    border-radius: var(--radius-md);

    box-shadow: var(--shadow-xs);
}


.public-clause-section:first-child {
    margin-top: 0;
}


/* =========================================================
   SECTION — DRAFT TEXT
   ========================================================= */

.public-clause-section:nth-of-type(1) {
    background:
        rgba(100, 116, 139, 0.06);

    border-left-color:
        #64748b;
}


/* =========================================================
   SECTION — SIMPLE EXPLANATION
   ========================================================= */

.public-clause-section:nth-of-type(2) {
    background:
        rgba(59, 130, 246, 0.07);

    border-left-color:
        #3b82f6;
}


/* =========================================================
   SECTION — CONCERN
   ========================================================= */

.public-clause-section:nth-of-type(3) {
    background:
        rgba(245, 158, 11, 0.08);

    border-left-color:
        #f59e0b;
}


/* =========================================================
   SECTION — SUGGESTED CHANGE
   ========================================================= */

.public-clause-section:nth-of-type(4) {
    background:
        rgba(34, 197, 94, 0.07);

    border-left-color:
        #22c55e;
}


/* =========================================================
   SECTION TITLES
   ========================================================= */

.public-clause-section-title {
    margin-bottom: var(--space-3);

    color: var(--text-primary);

    font-size: 1rem;
    font-weight: 800;

    line-height: 1.4;
}


/* =========================================================
   SECTION TEXT
   ========================================================= */

.public-clause-section-text {
    margin: 0;
    padding: 0;

    color: var(--text-secondary);

    font-size: 1rem;

    line-height: 1.85;

    white-space: normal;

    overflow-wrap: anywhere;
}


/* =========================================================
   RAISE OBJECTION ACTION
   ========================================================= */

.public-clause-actions {
    margin-top: var(--space-5);

    padding-top: var(--space-4);

    border-top:
        1px solid
        var(--border-color);
}


/* =========================================================
   DARK THEME
   ========================================================= */

:root[data-theme="dark"]
.public-clause-section:nth-of-type(1) {
    background:
        rgba(148, 163, 184, 0.08);
}


:root[data-theme="dark"]
.public-clause-section:nth-of-type(2) {
    background:
        rgba(59, 130, 246, 0.10);
}


:root[data-theme="dark"]
.public-clause-section:nth-of-type(3) {
    background:
        rgba(245, 158, 11, 0.10);
}


:root[data-theme="dark"]
.public-clause-section:nth-of-type(4) {
    background:
        rgba(34, 197, 94, 0.09);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (min-width: 600px) and (max-width: 1023px) {

    .public-clause-title {
        font-size: 1.45rem;
    }


    .public-clause-section-text {
        font-size: 1rem;

        line-height: 1.8;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 599px) {

    .public-clause-list {
        gap: var(--space-4);
    }


    .public-clause-header {
        flex-direction: column;

        gap: var(--space-3);

        padding:
            var(--space-4)
            var(--space-4);
    }


    .public-clause-body {
        padding:
            var(--space-3);
    }


    .public-clause-number {
        font-size: 1rem;
    }


    .public-clause-title {
        margin-top: var(--space-2);

        font-size: 1.45rem;

        line-height: 1.45;
    }


    .public-clause-section {
        margin-top: var(--space-3);

        padding:
            16px
            16px;
    }


    .public-clause-section-title {
        margin-bottom: 10px;

        font-size: 1.05rem;
    }


    .public-clause-section-text {
        font-size: 1.05rem;

        line-height: 1.9;
    }


    .public-clause-actions {
        margin-top: var(--space-4);
    }


    .public-clause-actions .btn {
        width: 100%;

        justify-content: center;
    }
}


/* =========================================================
   VERY SMALL DEVICES
   ========================================================= */

@media (max-width: 380px) {

    .public-clause-title {
        font-size: 1.3rem;
    }


    .public-clause-section-text {
        font-size: 1rem;
    }
}