/* =========================================================
   eLocal Info Network | Terms & Conditions
   File: public/assets/css/terms.css
========================================================= */

.skn-terms-page {
    --terms-green: #008b35;
    --terms-green-dark: #006b29;
    --terms-green-soft: #eaf9e9;
    --terms-green-border: #b9e6bd;
    --terms-text: #171c18;
    --terms-muted: #68736d;
    --terms-border: #e1e8e2;
    width: 100%;
    color: var(--terms-text);
    background: #fff;
}

.terms-container {
    width: min(1520px, calc(100% - 80px));
    margin: 0 auto;
}

.terms-breadcrumb-section {
    padding: 9px 0;
    background: #f0faf4;
}

.terms-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    min-height: 27px;
    color: #68736d;
    font-size: 13px;
}

.terms-breadcrumb a {
    color: var(--terms-green-dark);
    font-weight: 650;
    text-decoration: underline;
}

.terms-breadcrumb a:hover { color: var(--terms-green); }
.terms-breadcrumb span:last-child { color: #333b35; }

.terms-heading-section { padding: 14px 0 20px; }

.terms-heading {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
}

.terms-heading__icon {
    display: flex;
    width: 76px;
    height: 76px;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #e4f8e3;
    color: var(--terms-green-dark);
    font-size: 42px;
}

.terms-heading__copy {
    min-width: 0;
    padding-left: 20px;
    border-left: 2px solid #9bb99f;
}

.terms-heading__copy h1 {
    margin: 0 0 4px;
    color: var(--terms-green-dark);
    font-size: clamp(27px, 2.2vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.7px;
}

.terms-heading__copy p {
    margin: 0;
    color: #252b26;
    font-size: 15px;
    line-height: 1.5;
}

.terms-dates {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    padding: 12px 16px;
    border: 1px solid #d5ead8;
    border-radius: 15px;
    background: #fbfffb;
    box-shadow: 0 2px 5px rgba(0, 80, 30, .05);
    font-size: 13px;
    white-space: nowrap;
}

.terms-dates span { display: inline-flex; align-items: center; gap: 7px; }
.terms-dates span + span { padding-left: 18px; border-left: 1px solid #cbd8ce; }
.terms-dates i { color: var(--terms-green-dark); font-size: 17px; }

.terms-main-section { padding: 0 0 150px; }

.terms-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, .95fr);
    align-items: start;
    gap: 18px;
}

.terms-content-card,
.terms-toc-card {
    min-width: 0;
    border: 1px solid #dfe6e1;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .06);
}

.terms-content-card { padding: 12px 16px 16px; }
.terms-item { border-bottom: 1px solid #e5eae6; scroll-margin-top: 24px; }
.terms-item:last-child { border-bottom: 0; }
.terms-item--extra { display: none; }
.terms-sections.is-expanded .terms-item--extra { display: block; }

.terms-item__toggle {
    display: grid;
    width: 100%;
    grid-template-columns: 54px minmax(0, 1fr) 25px;
    align-items: center;
    gap: 16px;
    padding: 14px 10px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.terms-item__number {
    display: flex;
    width: 44px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #e1f8df;
    color: #075b20;
    font-size: 22px;
    font-weight: 800;
}

.terms-item__heading { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.terms-item__title { color: #07551e; font-size: 19px; font-weight: 800; line-height: 1.35; }
.terms-item__preview {
    overflow: hidden;
    color: #202720;
    font-size: 13px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.terms-item__chevron { color: var(--terms-green); font-size: 16px; transition: transform .2s ease; }
.terms-item.is-open .terms-item__chevron { transform: rotate(180deg); }
.terms-item__panel { padding: 0 45px 18px 80px; }
.terms-item__body { color: #303832; font-size: 14px; line-height: 1.75; }
.terms-item__body p { margin: 0 0 12px; }
.terms-item__body p:last-child { margin-bottom: 0; }
.terms-item__body h3 { margin: 18px 0 8px; color: var(--terms-green-dark); font-size: 15px; font-weight: 800; }
.terms-item__body ul { margin: 0 0 14px; padding-left: 22px; }
.terms-item__body li { margin: 0 0 7px; padding-left: 3px; }

.terms-view-all {
    display: flex;
    width: 100%;
    min-height: 45px;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 8px 14px;
    border: 1px solid #c9edc6;
    border-radius: 14px;
    background: #efffed;
    color: var(--terms-green-dark);
    text-align: left;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.terms-view-all:hover { border-color: var(--terms-green); background: #e5fbe2; }
.terms-view-all__icon {
    display: flex;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid #a9dba9;
    border-radius: 50%;
    background: #fff;
    font-size: 12px;
}
.terms-view-all__icon i { transition: transform .2s ease; }
.terms-view-all[aria-expanded="true"] .terms-view-all__icon i { transform: rotate(180deg); }
.terms-view-all strong { font-size: 16px; font-weight: 800; white-space: nowrap; }
.terms-view-all__divider { width: 1px; height: 23px; margin: 0 5px; background: #a8c8aa; }
.terms-view-all__hint { color: #303a32; font-size: 13px; }

.terms-sidebar { display: flex; flex-direction: column; gap: 15px; }
.terms-toc-card { padding: 14px 16px; }
.terms-toc-card h2 {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 9px;
    padding-bottom: 9px;
    border-bottom: 1px solid #e2e9e3;
    color: #07551e;
    font-size: 20px;
    font-weight: 800;
}
.terms-toc-card h2 i { color: var(--terms-green); font-size: 22px; }
.terms-toc-card ol { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.terms-toc-card a { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: 9px; padding: 1px 4px; border-radius: 7px; color: #202820; font-size: 12px; line-height: 1.4; text-decoration: none; }
.terms-toc-card a:hover,
.terms-toc-card a.is-active { background: #f0faef; color: var(--terms-green-dark); }
.terms-toc-card a > span:first-child { display: inline-flex; min-width: 27px; min-height: 17px; align-items: center; justify-content: center; border-radius: 8px; background: #def7dc; color: #075b20; font-size: 11px; font-weight: 800; }

.terms-important-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 15px;
    padding: 16px;
    border: 1px solid #c9efc6;
    border-radius: 14px;
    background: #eafbe8;
}
.terms-important-card > i { color: var(--terms-green-dark); font-size: 42px; text-align: center; }
.terms-important-card > div { padding-left: 15px; border-left: 1px solid #9bc49e; }
.terms-important-card h2 { margin: 0 0 5px; color: #07551e; font-size: 18px; font-weight: 800; }
.terms-important-card p { margin: 0; color: #202820; font-size: 12px; line-height: 1.55; }

.terms-back-top { display: flex; justify-content: flex-end; padding: 18px 0 0; }
.terms-back-top a { display: inline-flex; align-items: center; gap: 7px; color: var(--terms-green-dark); font-size: 13px; font-weight: 700; text-decoration: none; }
.terms-back-top a:hover { text-decoration: underline; }

.skn-terms-page button:focus-visible,
.skn-terms-page a:focus-visible { outline: 2px solid var(--terms-green); outline-offset: 3px; }

@media (max-width: 1100px) {
    .terms-container { width: min(100% - 40px, 1000px); }
    .terms-heading { grid-template-columns: 75px minmax(0, 1fr); }
    .terms-dates { grid-column: 2; justify-self: start; }
    .terms-layout { grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; }
    .terms-item__title { font-size: 17px; }
    .terms-toc-card { padding: 13px; }
}

@media (max-width: 767px) {
    .terms-container { width: calc(100% - 28px); }
    .terms-breadcrumb-section { padding: 8px 0; }
    .terms-breadcrumb { gap: 7px; font-size: 11px; }
    .terms-heading-section { padding: 14px 0 16px; }
    .terms-heading { grid-template-columns: 54px minmax(0, 1fr); gap: 12px; }
    .terms-heading__icon { width: 52px; height: 52px; border-radius: 13px; font-size: 29px; }
    .terms-heading__copy { padding-left: 12px; }
    .terms-heading__copy h1 { font-size: 23px; letter-spacing: -.4px; }
    .terms-heading__copy p { font-size: 12px; }
    .terms-dates { grid-column: 1 / -1; width: 100%; gap: 8px; padding: 10px 11px; font-size: 11px; white-space: normal; }
    .terms-dates span { gap: 5px; }
    .terms-dates span + span { padding-left: 9px; }
    .terms-dates i { font-size: 14px; }
    .terms-main-section { padding-bottom: 110px; }
    .terms-layout { grid-template-columns: minmax(0, 1fr); gap: 15px; }
    .terms-content-card { padding: 8px 10px 12px; }
    .terms-item__toggle { grid-template-columns: 38px minmax(0, 1fr) 17px; gap: 9px; padding: 12px 2px; }
    .terms-item__number { width: 34px; height: 34px; border-radius: 8px; font-size: 17px; }
    .terms-item__title { font-size: 14px; line-height: 1.35; }
    .terms-item__preview { font-size: 11px; }
    .terms-item__chevron { font-size: 13px; }
    .terms-item__panel { padding: 0 8px 14px 47px; }
    .terms-item__body { font-size: 12px; line-height: 1.7; }
    .terms-item__body h3 { font-size: 13px; }
    .terms-view-all { gap: 8px; padding: 8px; }
    .terms-view-all strong { font-size: 13px; }
    .terms-view-all__hint { font-size: 10px; }
    .terms-view-all__divider { margin: 0 1px; }
    .terms-sidebar { gap: 12px; }
    .terms-toc-card h2 { font-size: 18px; }
    .terms-toc-card a { font-size: 11px; }
    .terms-important-card { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; padding: 13px; }
    .terms-important-card > i { font-size: 32px; }
    .terms-important-card > div { padding-left: 10px; }
    .terms-important-card h2 { font-size: 15px; }
    .terms-important-card p { font-size: 11px; }
}

@media (max-width: 400px) {
    .terms-dates { flex-direction: column; align-items: flex-start; }
    .terms-dates span + span { padding: 0; border: 0; }
    .terms-view-all { flex-wrap: wrap; }
    .terms-view-all__hint { flex-basis: 100%; padding-left: 36px; }
    .terms-view-all__divider { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .skn-terms-page *,
    .skn-terms-page *::before,
    .skn-terms-page *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
