﻿/* =========================================================
   LegalIndiaCC CMS Frontend Renderer
   ========================================================= */

.cms-page-renderer,
.cms-page {
    width: 100%;
}

.cms-section {
    position: relative;
    width: 100%;
    padding: 60px 20px;
}

.cms-container {
    width: 100%;
    margin: 0 auto;
}

.cms-container-default {
    max-width: 1200px;
}

.cms-container-narrow {
    max-width: 900px;
}

.cms-container-fluid {
    max-width: 100%;
}

.cms-container-full {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

.cms-section-header {
    max-width: 850px;
    margin: 0 auto 32px;
    text-align: center;
}

.cms-section-title {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.15;
    font-weight: 800;
    color: inherit;
}

.cms-section-subtitle {
    margin: 0;
    font-size: 19px;
    line-height: 1.7;
    color: inherit;
    opacity: 0.82;
}

.cms-section-html,
.cms-section-text {
    margin-bottom: 28px;
    font-size: 17px;
    line-height: 1.75;
}

.cms-items {
    display: grid;
    gap: 24px;
    align-items: stretch;
}

.cms-items-columns-1 {
    grid-template-columns: 1fr;
}

.cms-items-columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cms-items-columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cms-items-columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cms-item {
    padding: 26px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .cms-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
    }

.cms-item-title {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.3;
}

.cms-item-subtitle {
    margin: 0 0 14px;
    font-size: 16px;
    opacity: 0.75;
}

.cms-item-description,
.cms-item-text,
.cms-item-html {
    font-size: 16px;
    line-height: 1.7;
}

.cms-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 25px;
}

.cms-item-image-wrapper {
    margin: -26px -26px 22px;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
}

.cms-item-image {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.cms-section-actions,
.cms-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.cms-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

    .cms-button:hover {
        transform: translateY(-2px);
        text-decoration: none;
    }

.cms-button-primary,
.cms-item-primary-link {
    background: #2563eb;
    color: #ffffff;
}

.cms-button-secondary,
.cms-item-secondary-link {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
}

.cms-item-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.cms-item-value-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cms-item-value {
    font-size: 38px;
    line-height: 1;
    font-weight: 800;
}

.cms-item-label {
    font-size: 14px;
    opacity: 0.75;
}

.cms-item-featured {
    border-color: #f59e0b;
    box-shadow: 0 14px 35px rgba(245, 158, 11, 0.15);
}

.cms-child-sections,
.cms-child-items {
    margin-top: 24px;
}

.cms-empty-content {
    padding: 30px;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
}

@media (max-width: 991px) {
    .cms-items-columns-3,
    .cms-items-columns-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .cms-section {
        padding: 40px 16px;
    }

    .cms-items-columns-2,
    .cms-items-columns-3,
    .cms-items-columns-4 {
        grid-template-columns: 1fr;
    }

    .cms-section-header {
        text-align: left;
    }

    .cms-section-title {
        font-size: 34px;
    }

    .cms-item {
        padding: 22px;
    }
}

/* =========================================================
   HOME SERVICES – PRODUCTION STYLING
   ========================================================= */

.home-services-section {
    width: 100%;
    padding: 72px 20px;
    background: #ffffff;
}

    /*
 * Renderer container:
 * <div class="cms-container cms-container-default">
 */
    .home-services-section > .cms-container {
        width: 100%;
        max-width: 1280px;
        margin: 0 auto;
        padding-left: 24px;
        padding-right: 24px;
        box-sizing: border-box;
    }

    /* Section heading */

    .home-services-section .cms-section-header {
        max-width: 850px;
        margin: 0 auto 38px;
        text-align: center;
    }

    .home-services-section .cms-section-title {
        margin: 0 0 12px;
        font-size: clamp(2rem, 4vw, 3rem);
        line-height: 1.2;
        font-weight: 700;
        color: #0f172a;
    }

    .home-services-section .cms-section-subtitle {
        margin: 0;
        font-size: 1.05rem;
        line-height: 1.7;
        color: #64748b;
    }

    /* Three-column services layout */

    .home-services-section .cms-items {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
        width: 100%;
        align-items: stretch;
    }

/* HOME TOOLS – Equal Height Cards */

.home-tools-section .cms-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.home-tools-section .cms-item-actions {
    margin-top: auto;
}


/* HOME SERVICES – Professional Card */

.home-services-section .cms-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    padding: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #ffffff;
    box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

    .home-services-section .cms-item:hover {
        transform: translateY(-5px);
        border-color: #f59e0b;
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    }

/* HOME SERVICES – Professional Card */


.home-services-section .cms-item-header {
    margin: 0;
}

    .home-services-section .cms-item-title {
        margin: 0 0 10px;
        font-size: 1.25rem;
        line-height: 1.35;
        font-weight: 700;
        color: #0f172a;
    }

    .home-services-section .cms-item-subtitle {
        margin: 0 0 12px;
        font-size: 0.95rem;
        line-height: 1.6;
        color: #64748b;
    }

    .home-services-section .cms-item-description,
    .home-services-section .cms-item-text,
    .home-services-section .cms-item-html {
        margin: 0 0 20px;
        font-size: 0.96rem;
        line-height: 1.7;
        color: #334155;
    }

    /* Card button हमेशा नीचे align होगा */

    .home-services-section .cms-item-actions {
        margin-top: auto;
        padding-top: 8px;
    }

    /* Service icon */

    .home-services-section .cms-item-icon {
        display: inline-flex;
        width: 56px;
        height: 56px;
        flex: 0 0 56px;
        margin: 0 0 20px;
        align-items: center;
        justify-content: center;
        border-radius: 15px;
        background: #eff6ff;
        color: #2563eb;
        font-size: 1.45rem;
        line-height: 1;
    }

        .home-services-section .cms-item-icon::before {
            line-height: 1;
        }

    /* Section-level button */

    .home-services-section .cms-section-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 12px;
        margin-top: 36px;
        text-align: center;
    }

        .home-services-section .cms-section-actions .cms-button {
            display: inline-flex;
            min-height: 46px;
            padding: 11px 22px;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
            font-weight: 600;
            text-decoration: none;
            transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
        }

        .home-services-section .cms-section-actions .cms-button-primary {
            background: #2563eb;
            color: #ffffff;
            box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
        }

            .home-services-section .cms-section-actions .cms-button-primary:hover {
                background: #1d4ed8;
                color: #ffffff;
                transform: translateY(-2px);
                text-decoration: none;
            }

/* Tablet */

@media (max-width: 991px) {

    .home-services-section {
        padding: 58px 20px;
    }

        .home-services-section .cms-items {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
}

/* Mobile */

@media (max-width: 640px) {

    .home-services-section {
        padding: 44px 16px;
    }

        .home-services-section > .cms-container {
            padding-left: 0;
            padding-right: 0;
        }

        .home-services-section .cms-items {
            grid-template-columns: 1fr;
            gap: 18px;
        }

        .home-services-section .cms-item {
            padding: 22px;
        }

        .home-services-section .cms-section-title {
            font-size: 2rem;
        }
}

/* =========================================================
   HOME FAQ – ACCESSIBLE ACCORDION
   ========================================================= */

.home-faq-section {
    width: 100%;
    padding: 72px 20px;
    background: #f8fafc;
}

.home-faq-section > .cms-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

.home-faq-section .cms-section-header {
    max-width: 820px;
    margin: 0 auto 36px;
    text-align: center;
}

.home-faq-section .cms-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

/*
 * Native details element
 */
.home-faq-section .cms-faq-item {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.home-faq-section .cms-faq-item:hover {
    border-color: #93c5fd;
}

.home-faq-section .cms-faq-item[open] {
    border-color: #2563eb;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.10);
}

/*
 * Browser का default triangle हटाएँ
 */
.home-faq-section .cms-faq-question {
    display: flex;
    min-height: 78px;
    padding: 18px 22px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}


.home-faq-section .cms-faq-question::marker {
    display: none;
    content: "";
}

.home-faq-section .cms-faq-question-main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 16px;
}

/* Question icon */

.home-faq-section .cms-faq-icon {
    display: inline-flex;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.1rem;
}

.home-faq-section .cms-faq-title {
    font-size: 1.08rem;
    line-height: 1.5;
    font-weight: 700;
    color: #0f172a;
}

/*
 * Plus / minus indicator
 */
.home-faq-section .cms-faq-toggle {
    position: relative;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: #eff6ff;
}

.home-faq-section .cms-faq-toggle::before,
.home-faq-section .cms-faq-toggle::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: #2563eb;
    content: "";
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
}

.home-faq-section .cms-faq-toggle::after {
    transform:
        translate(-50%, -50%)
        rotate(90deg);
}

.home-faq-section
.cms-faq-item[open]
.cms-faq-toggle::after {
    transform:
        translate(-50%, -50%)
        rotate(0deg);
}

/* Answer */

.home-faq-section .cms-faq-answer {
    padding: 0 22px 22px 84px;
    border-top: 1px solid #f1f5f9;
    color: #334155;
}

.home-faq-section .cms-faq-subtitle {
    margin: 18px 0 8px;
    font-weight: 600;
    color: #475569;
}

.home-faq-section .cms-faq-description,
.home-faq-section .cms-faq-text,
.home-faq-section .cms-faq-html {
    margin-top: 18px;
    font-size: 1rem;
    line-height: 1.8;
    color: #334155;
}

.home-faq-section .cms-faq-answer .cms-item-actions {
    margin-top: 18px;
}

/* Keyboard accessibility */

.home-faq-section .cms-faq-question:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: -3px;
}

/* Mobile */

@media (max-width: 640px) {

    .home-faq-section {
        padding: 48px 16px;
    }

    .home-faq-section .cms-section-header {
        text-align: left;
    }

    .home-faq-section .cms-faq-question {
        min-height: 68px;
        padding: 16px;
        gap: 12px;
    }

    .home-faq-section .cms-faq-question-main {
        gap: 12px;
    }

    .home-faq-section .cms-faq-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .home-faq-section .cms-faq-title {
        font-size: 1rem;
    }

    .home-faq-section .cms-faq-toggle {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .home-faq-section .cms-faq-answer {
        padding: 0 16px 18px;
    }
}

/* =========================================================
   HOME CTA – FINAL CALL TO ACTION
   ========================================================= */

.home-cta-section {
    position: relative;
    overflow: hidden;
    padding: 78px 20px;
    background: radial-gradient( circle at top right, rgba(37, 99, 235, 0.32), transparent 38% ), linear-gradient( 135deg, #0f172a 0%, #172554 100% );
    color: #ffffff;
}

    .home-cta-section::before {
        position: absolute;
        top: -90px;
        left: -90px;
        width: 240px;
        height: 240px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 50%;
        content: "";
    }

    .home-cta-section > .cms-container {
        position: relative;
        z-index: 1;
        max-width: 1050px;
    }

    .home-cta-section .cms-section-header {
        max-width: 900px;
        margin: 0 auto 22px;
        text-align: center;
    }

    .home-cta-section .cms-section-icon {
        display: inline-flex;
        width: 64px;
        height: 64px;
        margin-bottom: 20px;
        align-items: center;
        justify-content: center;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.12);
        color: #fbbf24;
        font-size: 1.7rem;
    }

    .home-cta-section .cms-section-title {
        margin-bottom: 16px;
        font-size: clamp(2.1rem, 4.5vw, 3.7rem);
        line-height: 1.18;
        color: #ffffff;
    }

    .home-cta-section .cms-section-subtitle {
        max-width: 850px;
        margin: 0 auto;
        font-size: 1.1rem;
        line-height: 1.8;
        color: #e2e8f0;
        opacity: 1;
    }

    .home-cta-section .cms-section-text,
    .home-cta-section .cms-section-html {
        max-width: 800px;
        margin: 0 auto 28px;
        text-align: center;
        font-size: 1rem;
        line-height: 1.8;
        color: #cbd5e1;
    }

    .home-cta-section .cms-section-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
        margin-top: 30px;
    }

    .home-cta-section .cms-button {
        min-height: 50px;
        padding: 13px 26px;
        border-radius: 12px;
    }

    .home-cta-section .cms-button-primary {
        background: #2563eb;
        color: #ffffff;
        box-shadow: 0 12px 28px rgba(37, 99, 235, 0.34);
    }

        .home-cta-section .cms-button-primary:hover {
            background: #1d4ed8;
            color: #ffffff;
        }

    .home-cta-section .cms-button-secondary {
        border: 1px solid rgba(255, 255, 255, 0.42);
        background: rgba(255, 255, 255, 0.08);
        color: #ffffff;
    }

        .home-cta-section .cms-button-secondary:hover {
            background: #ffffff;
            color: #0f172a;
        }

@media (max-width: 640px) {

    .home-cta-section {
        padding: 56px 16px;
    }

        .home-cta-section .cms-section-header {
            text-align: center;
        }

        .home-cta-section .cms-section-actions {
            flex-direction: column;
        }

        .home-cta-section .cms-button {
            width: 100%;
        }
}
.cms-section {
    scroll-margin-top: 130px;
}

.home-latest-articles-section .cms-section-actions {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

/* =========================================================
   HOME LATEST ARTICLES
   ========================================================= */

.home-latest-articles-section {
    width: 100%;
    padding: 72px 20px;
    background: #f8fafc;
}

    .home-latest-articles-section > .cms-container {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
    }

    .home-latest-articles-section .cms-section-header {
        max-width: 850px;
        margin: 0 auto 38px;
        text-align: center;
    }

    /*
 * एक article हो तो center में रहेगा।
 * तीन articles होने पर तीन समान cards बनेंगे।
 */
    .home-latest-articles-section .cms-items {
        display: grid;
        grid-template-columns: repeat( auto-fit, minmax(280px, 360px) );
        justify-content: center;
        gap: 24px;
        width: 100%;
    }

    .home-latest-articles-section .cms-item {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-width: 0;
        overflow: hidden;
        padding: 0;
        border: 1px solid #e2e8f0;
        border-radius: 18px;
        background: #ffffff;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
        transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    }

        .home-latest-articles-section .cms-item:hover {
            transform: translateY(-5px);
            border-color: #93c5fd;
            box-shadow: 0 18px 42px rgba(15, 23, 42, 0.13);
        }

    /* Article image */

    .home-latest-articles-section .cms-item-image-wrapper {
        width: 100%;
        height: 205px;
        margin: 0;
        overflow: hidden;
        background: #e2e8f0;
    }

    .home-latest-articles-section .cms-item-image {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Card content spacing */

    .home-latest-articles-section .cms-item-icon {
        display: none;
    }

    .home-latest-articles-section .cms-item-badge {
        margin: 20px 22px 8px;
        align-self: flex-start;
    }

    .home-latest-articles-section .cms-item-header,
    .home-latest-articles-section .cms-item-description,
    .home-latest-articles-section .cms-item-text,
    .home-latest-articles-section .cms-item-html {
        margin-left: 22px;
        margin-right: 22px;
    }

    .home-latest-articles-section .cms-item-title {
        margin-bottom: 8px;
        font-size: 1.28rem;
        line-height: 1.45;
        font-weight: 700;
        color: #0f172a;
    }

    .home-latest-articles-section .cms-item-subtitle {
        margin-bottom: 14px;
        font-size: 0.9rem;
        color: #64748b;
    }

    .home-latest-articles-section .cms-item-description {
        margin-bottom: 22px;
        font-size: 0.96rem;
        line-height: 1.7;
        color: #334155;
    }

    .home-latest-articles-section .cms-item-actions {
        margin-top: auto;
        padding: 0 22px 22px;
    }

    .home-latest-articles-section .cms-section-actions {
        display: flex;
        justify-content: center;
        margin-top: 36px;
    }

@media (max-width: 640px) {

    .home-latest-articles-section {
        padding: 48px 16px;
    }

        .home-latest-articles-section .cms-items {
            grid-template-columns: 1fr;
        }

        .home-latest-articles-section .cms-item-image-wrapper {
            height: 190px;
        }
}

/* =========================================================
   ACCESSIBILITY – TEXT CONTRAST FIX
   ========================================================= */

.home-services-section .cms-section-subtitle {
    color: #475569;
    opacity: 1;
}

.home-services-section .cms-item-subtitle {
    color: #475569;
    opacity: 1;
}

.home-services-section .cms-item-description,
.home-services-section .cms-item-text,
.home-services-section .cms-item-html {
    color: #334155;
    opacity: 1;
}
