/* ==========================================================================
   Squinal Legal, Trust & Compliance Design System
   Inspired by Zoho Trust & Security Center (Clean, Modern, Structured)
   ========================================================================== */

.sq-legal-page {
    background-color: #ffffff;
    color: #1e293b;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    padding-top: 0 !important;
}

/* ==========================================================================
   Hero Header with Ample Navigation Bar Clearance
   ========================================================================== */
.sq-legal-hero {
    position: relative;
    background: radial-gradient(80% 120% at 50% 0%, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
    padding-top: 145px !important; /* Generous clearance below fixed navigation */
    padding-bottom: 55px;
    overflow: hidden;
}

.sq-legal-hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 15%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(226, 26, 34, 0.04) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.sq-legal-hero .container {
    position: relative;
    z-index: 1;
}

/* Polished Top Badge */
.sq-legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--base-color, #e21a22);
    background: #ffffff;
    border: 1px solid rgba(226, 26, 34, 0.2);
    padding: 6px 14px 6px 8px;
    border-radius: 30px;
    margin-bottom: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.sq-legal-badge-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(226, 26, 34, 0.1);
    color: var(--base-color, #e21a22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.sq-legal-title {
    font-size: 46px;
    line-height: 1.18;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -1.2px;
    margin-bottom: 14px;
}

@media (max-width: 991px) {
    .sq-legal-hero {
        padding-top: 120px !important;
        padding-bottom: 40px;
    }
    .sq-legal-title {
        font-size: 34px;
        letter-spacing: -0.8px;
    }
}

@media (max-width: 575px) {
    .sq-legal-hero {
        padding-top: 110px !important;
        padding-bottom: 35px;
    }
    .sq-legal-title {
        font-size: 28px;
        letter-spacing: -0.5px;
    }
}

.sq-legal-subtitle {
    font-size: 17.5px;
    line-height: 1.65;
    color: #64748b;
    max-width: 800px;
    margin-bottom: 20px;
    font-weight: 400;
}

.sq-legal-meta {
    font-size: 13.5px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.sq-legal-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 5px 12px;
    border-radius: 6px;
    color: #475569;
    font-weight: 500;
}

.sq-legal-meta span i {
    color: var(--base-color, #e21a22);
    font-size: 13px;
}

/* ==========================================================================
   Sidebar & Table of Contents Navigation
   ========================================================================== */
.sq-legal-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 110px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
    margin-bottom: 30px;
}

.sq-legal-sidebar-title {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 14px;
    padding-left: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sq-legal-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sq-legal-nav li {
    margin-bottom: 4px;
}

.sq-legal-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 3px solid transparent;
    cursor: pointer;
}

.sq-legal-nav a i {
    font-size: 12px;
    color: #cbd5e1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.sq-legal-nav a:hover {
    color: #0f172a;
    background: #f8fafc;
    transform: translateX(3px);
}

.sq-legal-nav a:hover i {
    color: #64748b;
    transform: translateX(2px);
}

.sq-legal-nav a.active {
    color: var(--base-color, #e21a22) !important;
    background: rgba(226, 26, 34, 0.08) !important;
    font-weight: 600 !important;
    border-left-color: var(--base-color, #e21a22) !important;
    padding-left: 12px !important;
}

.sq-legal-nav a.active i {
    color: var(--base-color, #e21a22) !important;
    transform: translateX(2px);
}

/* Related Trust Box in Sidebar */
.sq-legal-related-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 16px;
    margin-top: 24px;
}

.sq-legal-related-box h5 {
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin-bottom: 12px;
    padding-left: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sq-legal-related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sq-legal-related-list li {
    margin-bottom: 4px;
}

.sq-legal-related-list a {
    font-size: 13.5px;
    color: #475569;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 500;
}

.sq-legal-related-list a:hover {
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateX(3px);
}

/* Elegant Micro-Icon Badges for Related Links */
.sq-rel-icon {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11.5px;
    transition: transform 0.2s ease;
}

.sq-rel-icon.blue { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.sq-rel-icon.emerald { background: rgba(16, 185, 129, 0.12); color: #059669; }
.sq-rel-icon.purple { background: rgba(147, 51, 234, 0.12); color: #7c3aed; }
.sq-rel-icon.amber { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.sq-rel-icon.rose { background: rgba(225, 29, 72, 0.12); color: #e11d48; }
.sq-rel-icon.indigo { background: rgba(79, 70, 229, 0.12); color: #4f46e5; }
.sq-rel-icon.cyan { background: rgba(6, 182, 212, 0.12); color: #0891b2; }

.sq-legal-related-list a:hover .sq-rel-icon {
    transform: scale(1.1);
}

/* ==========================================================================
   Content Body & Typography
   ========================================================================== */
.sq-legal-body {
    padding-left: 20px;
}

@media (max-width: 991px) {
    .sq-legal-body {
        padding-left: 0;
    }
}

.sq-legal-section {
    margin-bottom: 45px;
    scroll-margin-top: 130px;
}

.sq-legal-section:last-child {
    margin-bottom: 0;
}

.sq-legal-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    letter-spacing: -0.4px;
}

.sq-legal-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-top: 24px;
    margin-bottom: 10px;
}

.sq-legal-section p {
    font-size: 15.5px;
    line-height: 1.82;
    color: #334155;
    margin-bottom: 16px;
}

.sq-legal-section ul, 
.sq-legal-section ol {
    margin-bottom: 22px;
    padding-left: 22px;
}

.sq-legal-section ul li,
.sq-legal-section ol li {
    font-size: 15px;
    line-height: 1.78;
    color: #334155;
    margin-bottom: 9px;
}

.sq-legal-section strong {
    color: #0f172a;
    font-weight: 600;
}

/* ==========================================================================
   Callout Container
   ========================================================================== */
.sq-legal-callout {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--base-color, #e21a22);
    border-radius: 10px;
    padding: 22px 26px;
    margin: 26px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.sq-legal-callout p {
    font-size: 15px;
    line-height: 1.72;
    color: #334155;
    margin-bottom: 0;
}

.sq-legal-callout-title {
    font-size: 15.5px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

/* Table styling for policies */
.sq-legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    font-size: 14.5px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.sq-legal-table th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    text-align: left;
    padding: 13px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.sq-legal-table td {
    padding: 13px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.sq-legal-table tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   Footer Legal Links Bar (Zoho Style)
   ========================================================================== */
.sq-footer-legal-bar {
    padding-top: 25px;
    padding-bottom: 15px;
    text-align: center;
    border-top: 1px solid #f1f5f9;
    width: 100%;
}

.sq-footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
    margin: 0 0 15px 0;
    padding: 0;
    list-style: none;
}

.sq-footer-legal-links li {
    display: inline-flex;
    align-items: center;
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.6;
}

.sq-footer-legal-links li:not(:last-child)::after {
    content: "|";
    margin-left: 14px;
    color: #cbd5e1;
    font-weight: 300;
}

.sq-footer-legal-links a {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.sq-footer-legal-links a:hover {
    color: var(--base-color, #e21a22);
    text-decoration: underline;
}

@media (max-width: 767px) {
    .sq-footer-legal-links {
        gap: 6px 10px;
    }
    .sq-footer-legal-links li {
        font-size: 12.5px;
    }
    .sq-footer-legal-links li:not(:last-child)::after {
        margin-left: 10px;
    }
}
