/* ===========================================
   LEGAL PAGES - Page Header
   =========================================== */
.lm-legal__header {
    position: relative;
    padding: clamp(60px, 10vw, 120px) 0 clamp(48px, 8vw, 80px);
    overflow: hidden;
    background: linear-gradient(135deg, var(--logicmind-primary) 0%, #0a3250 40%, var(--logicmind-secondary) 100%);
}

.lm-legal__header-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(244, 151, 45, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(64, 123, 148, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.lm-legal__header-container {
    position: relative;
    z-index: 1;
}

.lm-legal__header-content {
    max-width: 680px;
}

.lm-legal__header-label {
    display: inline-block;
    color: var(--logicmind-accent2) !important;
    font-family: var(--lm-font-body) !important;
    font-weight: var(--lm-weight-semibold) !important;
    font-size: var(--lm-text-sm) !important;
    letter-spacing: var(--lm-tracking-wider) !important;
    text-transform: uppercase !important;
    margin-bottom: 16px !important;
    padding: 6px 16px;
    border: 1px solid rgba(244, 151, 45, 0.35);
    border-radius: 100px;
    background: rgba(244, 151, 45, 0.08);
}

.lm-legal__header-title {
    color: var(--logicmind-white) !important;
    font-size: clamp(2rem, 5vw, 3.5rem) !important;
    line-height: var(--lm-leading-snug) !important;
    margin-bottom: 16px !important;
}

.lm-legal__header-accent {
    color: var(--logicmind-accent2);
}

.lm-legal__header-description {
    color: rgba(255, 255, 255, 0.8) !important;
    font-family: var(--lm-font-body) !important;
    font-size: clamp(0.95rem, 1.5vw, 1.1rem) !important;
    line-height: var(--lm-leading-loose) !important;
    max-width: 540px;
}

/* ===========================================
   LEGAL PAGES - Content Section
   =========================================== */
.lm-legal__content {
    padding: 60px 0 80px;
    background: var(--logicmind-white);
}

.lm-legal__body {
    max-width: 800px;
    margin: 0 auto;
}

/* --- Clauses (numbered items for Terms & Conditions) --- */
.lm-legal__clause {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(13, 65, 103, 0.06);
}

.lm-legal__clause:last-child {
    border-bottom: none;
}

/* --- Sections (titled sections for Terms of Use / Software Support) --- */
.lm-legal__section {
    margin-bottom: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(13, 65, 103, 0.08);
}

.lm-legal__section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.lm-legal__section-title {
    color: var(--logicmind-primary) !important;
    font-size: clamp(1.15rem, 2vw, 1.4rem) !important;
    line-height: var(--lm-leading-snug) !important;
    margin-bottom: 16px !important;
}

/* --- Text --- */
.lm-legal__text {
    color: #444 !important;
    font-family: var(--lm-font-body) !important;
    font-size: clamp(0.92rem, 1.3vw, 1rem) !important;
    line-height: 1.8 !important;
    margin-bottom: 12px !important;
}

.lm-legal__text:last-child {
    margin-bottom: 0 !important;
}

.lm-legal__text--caps {
    font-size: clamp(0.85rem, 1.2vw, 0.92rem) !important;
    letter-spacing: 0.01em;
}

/* --- Lists --- */
.lm-legal__list {
    list-style: disc;
    padding-left: 28px;
    margin: 12px 0 16px;
    color: #444;
    font-family: var(--lm-font-body);
    font-size: clamp(0.92rem, 1.3vw, 1rem);
    line-height: 1.8;
}

.lm-legal__list li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.lm-legal__list li:last-child {
    margin-bottom: 0;
}

/* --- Related Links --- */
.lm-legal__related {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid rgba(13, 65, 103, 0.08);
}

.lm-legal__related-title {
    color: var(--logicmind-primary) !important;
    margin-bottom: 16px !important;
}

.lm-legal__related-links {
    flex-wrap: wrap;
}

button.lm-legal__related-btn.mud-button-root {
    color: var(--logicmind-primary) !important;
    border-color: rgba(13, 65, 103, 0.2) !important;
    text-transform: none !important;
    border-radius: 10px !important;
    padding: 10px 20px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

button.lm-legal__related-btn.mud-button-root:hover {
    background: rgba(13, 65, 103, 0.04) !important;
    border-color: var(--logicmind-primary) !important;
    transform: translateY(-2px) !important;
}

/* ===========================================
   ANIMATION
   =========================================== */
.lm-legal__header .animate-fade-up {
    animation: legalFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

@keyframes legalFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================================
   RESPONSIVE - Tablet (960px)
   =========================================== */
@media (max-width: 960px) {
    .lm-legal__header {
        padding: 80px 0 64px;
        text-align: center;
    }

    .lm-legal__header-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .lm-legal__header-description {
        max-width: 100%;
    }

    .lm-legal__content {
        padding: 40px 0 60px;
    }

    .lm-legal__related-links {
        justify-content: center;
    }
}

/* ===========================================
   RESPONSIVE - Mobile (600px)
   =========================================== */
@media (max-width: 600px) {
    .lm-legal__header {
        padding: 64px 0 56px;
    }

    .lm-legal__content {
        padding: 32px 0 48px;
    }

    .lm-legal__section {
        margin-bottom: 28px;
        padding-bottom: 28px;
    }

    .lm-legal__list {
        padding-left: 20px;
    }

    .lm-legal__related {
        margin-top: 36px;
        padding-top: 24px;
    }

    .lm-legal__related-links {
        flex-direction: column;
    }

    button.lm-legal__related-btn.mud-button-root {
        width: 100% !important;
    }
}
