/* ============================================
   TERMS & CONDITIONS - FRÈRES CONGO
   STYLES COMPLETS AVEC ANIMATIONS
   ============================================ */

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Urbanist', sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   SCROLL PROGRESS INDICATOR
   ============================================ */
#scrollProgressIndicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #589bdd, #3a7bb5, #589bdd);
    background-size: 200% 100%;
    z-index: 10000;
    width: 0%;
    transition: width 0.1s linear;
    animation: progressShimmer 2s ease-in-out infinite;
}

@keyframes progressShimmer {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* ============================================
   HERO SECTION
   ============================================ */
.terms-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a2c4a 0%, #1a4a6e 50%, #0d4675 100%);
    overflow: hidden;
    padding: 100px 20px 80px;
    margin-top: 0;
    animation: heroFadeIn 1.2s ease forwards;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.terms-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: rgba(255, 255, 255, 0.03);
    transform: rotate(45deg);
    pointer-events: none;
}

.terms-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 150%;
    background: radial-gradient(ellipse at center, rgba(88, 155, 221, 0.08), transparent 70%);
    pointer-events: none;
}

.terms-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.terms-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(88, 155, 221, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 24px;
    border-radius: 50px;
    color: #589bdd;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 25px;
    animation: fadeInUp 1s ease;
}

.terms-hero-badge i {
    font-size: 18px;
}

.terms-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 58px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease 0.2s both;
}

.terms-hero h1 span {
    color: #589bdd;
}

.terms-hero p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.8;
    animation: fadeInUp 1s ease 0.4s both;
}

.terms-hero-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

.terms-hero-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.terms-hero-meta-item i {
    color: #589bdd;
    font-size: 16px;
}

.hero-shield {
    font-size: 80px;
    color: rgba(88, 155, 221, 0.15);
    position: absolute;
    right: 10%;
    top: 15%;
    animation: floatShield 6s ease-in-out infinite;
}

.hero-shield:nth-child(2) {
    left: 10%;
    top: 60%;
    font-size: 60px;
    animation-delay: 2s;
}

@keyframes floatShield {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   TOC SECTION
   ============================================ */
.toc-section {
    background: #ffffff;
    padding: 70px 20px 80px;
    position: relative;
    border-bottom: 1px solid #e8edf4;
    opacity: 0;
    transform: translateY(60px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.toc-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.toc-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #589bdd, #3a7bb5, #589bdd);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s ease;
}

.toc-section.animate-in::before {
    transform: scaleX(1);
}

.toc-container {
    max-width: 1100px;
    margin: 0 auto;
}

.toc-header {
    text-align: center;
    margin-bottom: 40px;
}

.toc-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #e8f0fe, #dbeafe);
    color: #589bdd;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.toc-badge i {
    font-size: 14px;
}

.toc-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 700;
    color: #0a2c4a;
    margin-bottom: 8px;
}

.toc-header p {
    font-size: 16px;
    color: #94a3b8;
    margin-bottom: 20px;
}

.toc-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #589bdd, #3a7bb5);
    margin: 0 auto;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.toc-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #589bdd, transparent);
    animation: lineShimmer 3s infinite;
}

@keyframes lineShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.toc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e8edf4;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    text-decoration: none;
    opacity: 0;
    transform: translateY(30px) rotateX(10deg);
    position: relative;
    overflow: hidden;
}

.toc-item::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(88, 155, 221, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.toc-item.animate-in {
    opacity: 1;
    transform: translateY(0) rotateX(0);
}

.toc-item:hover {
    background: #e8f0fe;
    border-color: #589bdd;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(88, 155, 221, 0.15);
}

.toc-item:hover::after {
    opacity: 1;
}

.toc-item .toc-num {
    font-weight: 700;
    color: #589bdd;
    margin-right: 10px;
    font-size: 13px;
}

.toc-item i {
    color: #589bdd;
    font-size: 13px;
    transition: transform 0.3s;
}

.toc-item:hover i {
    transform: translateX(5px);
}

/* TOC Staggered Delays */
.toc-item:nth-child(1).animate-in { transition-delay: 0.05s; }
.toc-item:nth-child(2).animate-in { transition-delay: 0.10s; }
.toc-item:nth-child(3).animate-in { transition-delay: 0.15s; }
.toc-item:nth-child(4).animate-in { transition-delay: 0.20s; }
.toc-item:nth-child(5).animate-in { transition-delay: 0.25s; }
.toc-item:nth-child(6).animate-in { transition-delay: 0.30s; }
.toc-item:nth-child(7).animate-in { transition-delay: 0.35s; }
.toc-item:nth-child(8).animate-in { transition-delay: 0.40s; }
.toc-item:nth-child(9).animate-in { transition-delay: 0.45s; }
.toc-item:nth-child(10).animate-in { transition-delay: 0.50s; }
.toc-item:nth-child(11).animate-in { transition-delay: 0.55s; }
.toc-item:nth-child(12).animate-in { transition-delay: 0.60s; }
.toc-item:nth-child(13).animate-in { transition-delay: 0.65s; }
.toc-item:nth-child(14).animate-in { transition-delay: 0.70s; }
.toc-item:nth-child(15).animate-in { transition-delay: 0.75s; }
.toc-item:nth-child(16).animate-in { transition-delay: 0.80s; }
.toc-item:nth-child(17).animate-in { transition-delay: 0.85s; }
.toc-item:nth-child(18).animate-in { transition-delay: 0.90s; }

/* ============================================
   MAIN CONTENT
   ============================================ */
.terms-content {
    padding: 80px 20px;
    background: #ffffff;
}

.terms-content .container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    align-items: start;
}

/* SIDEBAR */
.terms-sidebar {
    position: sticky;
    top: 30px;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.terms-sidebar.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-card {
    background: #f8fafc;
    border-radius: 20px;
    padding: 30px 25px;
    border: 1px solid #e8edf4;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.sidebar-card:first-child.animate-in { transition-delay: 0.1s; }
.sidebar-card:last-child.animate-in { transition-delay: 0.2s; }

.sidebar-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0a2c4a;
    margin-bottom: 20px;
    position: relative;
}

.sidebar-card h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background: #589bdd;
    border-radius: 3px;
}

.sidebar-nav {
    list-style: none;
    margin-top: 20px;
}

.sidebar-nav li {
    margin-bottom: 2px;
    opacity: 0;
    transform: translateX(-15px);
    transition: all 0.5s ease;
}

.sidebar-nav li.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* Sidebar nav staggered */
.sidebar-nav li:nth-child(1).animate-in { transition-delay: 0.05s; }
.sidebar-nav li:nth-child(2).animate-in { transition-delay: 0.10s; }
.sidebar-nav li:nth-child(3).animate-in { transition-delay: 0.15s; }
.sidebar-nav li:nth-child(4).animate-in { transition-delay: 0.20s; }
.sidebar-nav li:nth-child(5).animate-in { transition-delay: 0.25s; }
.sidebar-nav li:nth-child(6).animate-in { transition-delay: 0.30s; }
.sidebar-nav li:nth-child(7).animate-in { transition-delay: 0.35s; }
.sidebar-nav li:nth-child(8).animate-in { transition-delay: 0.40s; }
.sidebar-nav li:nth-child(9).animate-in { transition-delay: 0.45s; }
.sidebar-nav li:nth-child(10).animate-in { transition-delay: 0.50s; }
.sidebar-nav li:nth-child(11).animate-in { transition-delay: 0.55s; }
.sidebar-nav li:nth-child(12).animate-in { transition-delay: 0.60s; }
.sidebar-nav li:nth-child(13).animate-in { transition-delay: 0.65s; }
.sidebar-nav li:nth-child(14).animate-in { transition-delay: 0.70s; }
.sidebar-nav li:nth-child(15).animate-in { transition-delay: 0.75s; }
.sidebar-nav li:nth-child(16).animate-in { transition-delay: 0.80s; }
.sidebar-nav li:nth-child(17).animate-in { transition-delay: 0.85s; }
.sidebar-nav li:nth-child(18).animate-in { transition-delay: 0.90s; }

.sidebar-nav li a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-nav li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: #589bdd;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar-nav li a.active::before {
    transform: scaleY(1);
}

.sidebar-nav li a:hover::before {
    transform: scaleY(0.5);
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    color: #0a2c4a;
    background: #e8f0fe;
    border-left-color: #589bdd;
}

.sidebar-nav li a i {
    margin-right: 8px;
    width: 18px;
    color: #589bdd;
    font-size: 13px;
}

/* MAIN CONTENT */
.terms-main {
    min-width: 0;
}

.terms-article {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e8edf4;
    scroll-margin-top: 30px;
    opacity: 0;
    transform: translateX(-40px) scale(0.98);
    transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.terms-article::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #589bdd, transparent);
    transition: all 0.8s ease;
    transform: translateX(-50%);
}

.terms-article.animate-in {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.terms-article.animate-in::after {
    width: 80%;
}

.terms-article:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.terms-article:last-child::after {
    display: none;
}

.article-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.article-header.animate-in {
    opacity: 1;
    transform: scale(1);
}

.article-number {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #589bdd, #3a7bb5);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    flex-shrink: 0;
    font-family: 'Playfair Display', serif;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.article-header.animate-in .article-number {
    animation: numberPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes numberPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.article-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    color: #0a2c4a;
    margin-bottom: 4px;
}

.article-subtitle {
    font-size: 15px;
    color: #94a3b8;
    font-weight: 400;
}

.terms-article p {
    font-size: 16px;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.terms-article.animate-in p {
    opacity: 1;
    transform: translateY(0);
}

.terms-article.animate-in p:nth-child(1) { transition-delay: 0.1s; }
.terms-article.animate-in p:nth-child(2) { transition-delay: 0.15s; }
.terms-article.animate-in p:nth-child(3) { transition-delay: 0.20s; }
.terms-article.animate-in p:nth-child(4) { transition-delay: 0.25s; }
.terms-article.animate-in p:nth-child(5) { transition-delay: 0.30s; }

.terms-article ul {
    list-style: none;
    margin: 16px 0 20px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.7s ease;
}

.terms-article.animate-in ul {
    opacity: 1;
    transform: translateX(0);
}

.terms-article ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.5s ease;
}

.terms-article.animate-in ul li {
    opacity: 1;
    transform: translateX(0);
}

.terms-article.animate-in ul li:nth-child(1) { transition-delay: 0.05s; }
.terms-article.animate-in ul li:nth-child(2) { transition-delay: 0.10s; }
.terms-article.animate-in ul li:nth-child(3) { transition-delay: 0.15s; }
.terms-article.animate-in ul li:nth-child(4) { transition-delay: 0.20s; }
.terms-article.animate-in ul li:nth-child(5) { transition-delay: 0.25s; }
.terms-article.animate-in ul li:nth-child(6) { transition-delay: 0.30s; }
.terms-article.animate-in ul li:nth-child(7) { transition-delay: 0.35s; }
.terms-article.animate-in ul li:nth-child(8) { transition-delay: 0.40s; }

.terms-article ul li:last-child {
    border-bottom: none;
}

.terms-article ul li .check {
    color: #589bdd;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    display: inline-block;
    transition: all 0.3s ease;
}

.terms-article.animate-in ul li .check {
    animation: checkBounce 0.5s ease forwards;
}

.terms-article.animate-in ul li:nth-child(1) .check { animation-delay: 0.05s; }
.terms-article.animate-in ul li:nth-child(2) .check { animation-delay: 0.10s; }
.terms-article.animate-in ul li:nth-child(3) .check { animation-delay: 0.15s; }
.terms-article.animate-in ul li:nth-child(4) .check { animation-delay: 0.20s; }
.terms-article.animate-in ul li:nth-child(5) .check { animation-delay: 0.25s; }
.terms-article.animate-in ul li:nth-child(6) .check { animation-delay: 0.30s; }
.terms-article.animate-in ul li:nth-child(7) .check { animation-delay: 0.35s; }
.terms-article.animate-in ul li:nth-child(8) .check { animation-delay: 0.40s; }

@keyframes checkBounce {
    0% {
        transform: scale(0) rotate(-90deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.3) rotate(10deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.highlight-box {
    background: linear-gradient(135deg, #f0f7ff, #e8f0fe);
    border-radius: 16px;
    padding: 20px 25px;
    margin: 20px 0;
    border-left: 4px solid #589bdd;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.highlight-box.animate-in {
    opacity: 1;
    transform: scale(1);
    animation: glowPulse 1.5s ease;
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(88, 155, 221, 0);
    }
    50% {
        box-shadow: 0 0 30px 10px rgba(88, 155, 221, 0.15);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(88, 155, 221, 0);
    }
}

.highlight-box.warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left-color: #f59e0b;
}

.highlight-box.warning.animate-in {
    animation: glowPulseWarning 1.5s ease;
}

@keyframes glowPulseWarning {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
    50% {
        box-shadow: 0 0 30px 10px rgba(245, 158, 11, 0.15);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

.highlight-box p {
    margin-bottom: 0;
    font-weight: 500;
}

.highlight-box i {
    color: #589bdd;
    margin-right: 10px;
}

.highlight-box.warning i {
    color: #f59e0b;
}

/* ============================================
   SIGNATURE SECTION
   ============================================ */
.terms-signature {
    margin-top: 60px;
    padding: 40px;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px solid #e8edf4;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.terms-signature.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.terms-signature h3 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    color: #0a2c4a;
    margin-bottom: 25px;
    text-align: center;
}

.signature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.signature-grid p {
    padding: 8px 0;
    font-size: 15px;
    color: #475569;
    border-bottom: 1px solid #e8edf4;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.5s ease;
}

.terms-signature.animate-in .signature-grid p {
    opacity: 1;
    transform: translateX(0);
}

.terms-signature.animate-in .signature-grid p:nth-child(1) { transition-delay: 0.05s; }
.terms-signature.animate-in .signature-grid p:nth-child(2) { transition-delay: 0.10s; }
.terms-signature.animate-in .signature-grid p:nth-child(3) { transition-delay: 0.15s; }
.terms-signature.animate-in .signature-grid p:nth-child(4) { transition-delay: 0.20s; }
.terms-signature.animate-in .signature-grid p:nth-child(5) { transition-delay: 0.25s; }
.terms-signature.animate-in .signature-grid p:nth-child(6) { transition-delay: 0.30s; }

.signature-grid p:last-child {
    border-bottom: none;
}

.signature-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e8edf4;
}

.signature-footer p {
    font-size: 16px;
    color: #0a2c4a;
    font-weight: 600;
    line-height: 1.6;
}

.signature-footer p strong {
    color: #589bdd;
    font-size: 18px;
}

/* ============================================
   BACK TO TOP BUTTON (UNIFIED & RESPONSIVE)
   ============================================ */
.back-to-top-btn {
    position: fixed;
    bottom: 35px;
    right: 30px;
    width: 65px;
    height: 65px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #3b82f6);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.35);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.8);
    transition: all 0.4s ease;
    overflow: hidden;
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    animation: floating 2s infinite ease-in-out;
}

.back-to-top-btn .arrow {
    font-size: 28px;
    color: white;
    position: absolute;
    z-index: 2;
    transition: transform 0.3s ease;
}

.back-to-top-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 12px 35px rgba(13, 110, 253, 0.55);
}

.back-to-top-btn:hover .arrow {
    transform: translateY(-5px);
}

.back-to-top-btn .progress-ring {
    position: absolute;
    transform: rotate(-90deg);
    width: 65px;
    height: 65px;
    top: 0;
    left: 0;
    pointer-events: none;
}

.back-to-top-btn .progress-ring circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.35);
    stroke-width: 4;
    cx: 32.5;
    cy: 32.5;
    r: 28;
    stroke-dasharray: 175.93;
    stroke-dashoffset: 175.93;
    transition: stroke-dashoffset 0.2s linear;
}

.back-to-top-btn::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.3);
    animation: pulse 2s infinite;
    z-index: 1;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.7; }
    70% { transform: scale(1.5); opacity: 0; }
    100% { opacity: 0; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .terms-content .container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .terms-sidebar {
        position: relative;
        top: 0;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .sidebar-nav li {
        margin-bottom: 0;
    }

    .sidebar-nav li a {
        padding: 6px 12px;
        font-size: 12px;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .sidebar-nav li a::before {
        display: none;
    }

    .sidebar-nav li a:hover,
    .sidebar-nav li a.active {
        border-left: none;
        border-bottom-color: #589bdd;
    }

    .toc-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .terms-hero h1 {
        font-size: 40px;
    }

    .terms-hero p {
        font-size: 17px;
    }

    .hero-shield {
        display: none;
    }

    .signature-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .terms-article {
        transform: translateX(0) scale(0.98);
    }
    
    .terms-article.animate-in {
        transform: translateX(0) scale(1);
    }

    /* BACK TO TOP - TABLET */
    .back-to-top-btn {
        width: 58px;
        height: 58px;
        bottom: 30px;
        right: 25px;
    }

    .back-to-top-btn .arrow {
        font-size: 24px;
    }

    .back-to-top-btn .progress-ring {
        width: 58px;
        height: 58px;
    }

    .back-to-top-btn .progress-ring circle {
        stroke-width: 3.5;
        cx: 29;
        cy: 29;
        r: 25;
        stroke-dasharray: 157.08;
        stroke-dashoffset: 157.08;
    }
}

@media (max-width: 768px) {
    .terms-hero {
        min-height: 50vh;
        padding: 80px 15px 60px;
    }

    .terms-hero h1 {
        font-size: 32px;
    }

    .terms-hero p {
        font-size: 15px;
    }

    .terms-hero-meta {
        gap: 15px;
    }

    .terms-hero-meta-item {
        font-size: 12px;
    }

    .terms-content {
        padding: 40px 15px;
    }

    .article-number {
        width: 45px;
        height: 45px;
        font-size: 18px;
        animation: none !important;
    }

    .article-header.animate-in .article-number {
        animation: numberPopMobile 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes numberPopMobile {
        0% {
            transform: scale(0) rotate(-90deg);
            opacity: 0;
        }
        100% {
            transform: scale(1) rotate(0);
            opacity: 1;
        }
    }

    .article-header h2 {
        font-size: 22px;
    }

    .toc-section {
        padding: 50px 15px 60px;
    }

    .toc-header h2 {
        font-size: 28px;
    }

    .toc-header p {
        font-size: 14px;
    }

    .toc-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .toc-item {
        padding: 10px 14px;
        font-size: 13px;
        transform: translateY(20px) rotateX(5deg);
    }

    .terms-signature {
        padding: 25px 20px;
    }

    .terms-signature h3 {
        font-size: 22px;
    }

    /* BACK TO TOP - MOBILE */
    .back-to-top-btn {
        width: 52px;
        height: 52px;
        bottom: 25px;
        right: 20px;
    }

    .back-to-top-btn .arrow {
        font-size: 20px;
    }

    .back-to-top-btn .progress-ring {
        width: 52px;
        height: 52px;
    }

    .back-to-top-btn .progress-ring circle {
        stroke-width: 3;
        cx: 26;
        cy: 26;
        r: 22;
        stroke-dasharray: 138.23;
        stroke-dashoffset: 138.23;
    }
}

@media (max-width: 480px) {
    .terms-hero h1 {
        font-size: 26px;
    }

    .terms-hero p {
        font-size: 14px;
    }

    .terms-hero-badge {
        font-size: 11px;
        padding: 6px 16px;
    }

    .toc-section {
        padding: 40px 12px 50px;
    }

    .toc-header h2 {
        font-size: 22px;
    }

    .toc-header p {
        font-size: 13px;
    }

    .toc-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .toc-item {
        padding: 10px 14px;
        font-size: 13px;
        transform: translateY(15px);
    }

    .article-header h2 {
        font-size: 20px;
    }

    .article-number {
        width: 38px;
        height: 38px;
        font-size: 16px;
        border-radius: 10px;
    }

    .terms-article p {
        font-size: 14px;
    }

    .terms-article ul li {
        font-size: 14px;
    }

    .highlight-box {
        padding: 15px 18px;
        transform: scale(0.97);
    }

    .signature-grid p {
        font-size: 14px;
    }

    /* BACK TO TOP - SMALL MOBILE */
    .back-to-top-btn {
        width: 46px;
        height: 46px;
        bottom: 20px;
        right: 15px;
    }

    .back-to-top-btn .arrow {
        font-size: 18px;
    }

    .back-to-top-btn .progress-ring {
        width: 46px;
        height: 46px;
    }

    .back-to-top-btn .progress-ring circle {
        stroke-width: 2.5;
        cx: 23;
        cy: 23;
        r: 19;
        stroke-dasharray: 119.38;
        stroke-dashoffset: 119.38;
    }
}

/* ============================================
   REDUCED MOTION PREFERENCE
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .toc-item,
    .terms-article,
    .article-header,
    .highlight-box,
    .sidebar-card,
    .terms-signature,
    .sidebar-nav li,
    .terms-article p,
    .terms-article ul,
    .terms-article ul li {
        opacity: 1 !important;
        transform: none !important;
    }

    .toc-section {
        opacity: 1 !important;
        transform: none !important;
    }

    .terms-sidebar {
        opacity: 1 !important;
        transform: none !important;
    }

    #scrollProgressIndicator {
        display: none !important;
    }

    .toc-line::after {
        animation: none !important;
    }

    .toc-section::before {
        transform: scaleX(1) !important;
        transition: none !important;
    }

    .terms-article::after {
        width: 80% !important;
        transition: none !important;
    }

    .back-to-top-btn.show {
        animation: none !important;
    }

    .back-to-top-btn::before {
        animation: none !important;
    }

    .hero-shield {
        animation: none !important;
    }

    .terms-hero {
        animation: none !important;
    }

    .highlight-box.animate-in {
        animation: none !important;
    }

    .highlight-box.warning.animate-in {
        animation: none !important;
    }

    .article-header.animate-in .article-number {
        animation: none !important;
    }

    .terms-article.animate-in ul li .check {
        animation: none !important;
    }
}