@media (max-width: 767.98px) {
    .doc-visual {
        background: #312e81 !important; /* deep indigo for strong contrast */
        border: 3px solid #fff !important;
        box-shadow: 0 6px 20px rgba(49,46,129,0.22), 0 2px 8px rgba(6,182,212,0.15) !important;
        border-radius: 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 auto 22px auto !important;
        width: 62px !important;
        height: 62px !important;
        min-width: 62px !important;
        min-height: 62px !important;
        position: static !important;
        z-index: 1 !important;
        left: 0 !important;
        top: 0 !important;
        float: none !important;
        clear: both !important;
        order: 0 !important;
        opacity: 1 !important;
    }
    .doc-acronym {
        font-size: 1.45rem !important;
        font-weight: 900 !important;
        color: #fff !important;
        letter-spacing: 0.04em !important;
        text-shadow: 0 2px 8px rgba(30,64,175,0.22), 0 1px 0 #222 !important;
        z-index: 2 !important;
        position: relative !important;
        text-align: center !important;
        width: 100%;
        line-height: 1.1 !important;
        opacity: 1 !important;
    }
    .doc-actions {
        width: 100% !important;
        margin: 24px 0 0 0 !important;
        order: 3 !important;
        text-align: center !important;
        display: flex !important;
        justify-content: center !important;
    }
    .btn-download {
        width: 120px !important;
        min-width: 0 !important;
        font-size: 0.95rem !important;
        padding: 8px 0 !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        border-radius: 8px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 5 !important;
        position: static !important;
    }
}
/* ==================================================
   FINAL SAFEGUARD: Highest-precedence tablet override
   Appended at file end so it wins over earlier declarations
   ================================================== */
@media (min-width: 768px) and (max-width: 1199.98px) {
    /* Tablet layout: position action button at top-right of the card (like desktop) */
    section.rio-document-section .rio-document-card {
        position: relative !important; /* fallback positioning */
        overflow: visible !important;
    }

    /* Position actions relative to the header so we can center them vertically with the heading */
    section.rio-document-section .rio-document-card .doc-card-header {
        position: relative !important;
    }

    /* Place the actions in the top-right corner */
    /* target actions when placed inside the header and center vertically */
    section.rio-document-section .rio-document-card .doc-card-header > .doc-actions,
    section.rio-document-section .rio-document-card .doc-card-header .doc-actions {
        display: flex !important;
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important; /* vertical center against header */
        right: 20px !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 10000 !important;
        pointer-events: auto !important;
        margin: 0 !important;
        justify-content: flex-end !important;
        width: auto !important;
        gap: 12px !important;
    }

    /* Keep the download button visible and sized appropriately for tablet */
    section.rio-document-section .rio-document-card .btn-download,
    section.rio-document-section .rio-document-card .doc-actions > a.btn-download {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 10001 !important;
        pointer-events: auto !important;
        min-width: 140px !important;
        width: auto !important;
        padding: 10px 18px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* Reduce decorative interference: visuals stay visible but don't intercept clicks */
    section.rio-document-section .rio-document-card .doc-visual,
    section.rio-document-section .rio-document-card .doc-orbit,
    section.rio-document-section .rio-document-card .doc-visual::before,
    section.rio-document-section .rio-document-card .doc-visual::after {
        pointer-events: none !important;
        z-index: 1 !important;
    }

    /* Make room for the absolute button so header text doesn't flow under it */
    section.rio-document-section .rio-document-card .doc-card-header {
        padding-right: 160px !important; /* reserve space on the right for the button (reduced for alignment) */
    }
}
@media (max-width: 767.98px) {
    .doc-visual {
        margin-bottom: 22px !important;
    }
    .doc-card-header {
        margin-top: 8px !important;
        position: relative !important;
        z-index: 1 !important;
    }
}
@media (max-width: 767.98px) {
    .doc-card-body {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
    }
    .doc-visual {
        width: 54px !important;
        height: 54px !important;
        min-width: 54px !important;
        min-height: 54px !important;
        margin: 0 auto 14px auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: static !important;
        z-index: 1 !important;
        background: #fff !important;
        box-shadow: 0 2px 8px rgba(99,102,241,0.10) !important;
        border-radius: 10px !important;
        left: 0 !important;
        top: 0 !important;
        float: none !important;
        clear: both !important;
        order: 0 !important;
    }
    .doc-card-header {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        order: 1 !important;
        text-align: left !important;
    }
    .doc-actions {
        width: 100% !important;
        margin: 10px 0 0 0 !important;
        order: 2 !important;
        text-align: left !important;
    }
}
@media (max-width: 767.98px) {
    .doc-card-body {
        display: flex !important;
        flex-direction: row-reverse !important;
        align-items: flex-start !important;
        gap: 14px !important;
    }
    .doc-visual {
        width: 54px !important;
        height: 54px !important;
        min-width: 54px !important;
        min-height: 54px !important;
        margin: 0 0 0 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: static !important;
        z-index: 1 !important;
        background: #fff !important;
        box-shadow: 0 2px 8px rgba(99,102,241,0.10) !important;
        border-radius: 10px !important;
        left: 0 !important;
        top: 0 !important;
        float: none !important;
        clear: both !important;
        order: 2 !important;
    }
    .doc-card-header {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        order: 1 !important;
        text-align: left !important;
    }
    .doc-actions {
        width: 100% !important;
        margin: 10px 0 0 0 !important;
        order: 3 !important;
        text-align: left !important;
    }
}
@media (max-width: 767.98px) {
    .doc-card-body {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 14px !important;
    }
    .doc-visual {
        width: 54px !important;
        height: 54px !important;
        min-width: 54px !important;
        min-height: 54px !important;
        margin: 0 8px 0 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: static !important;
        z-index: 1 !important;
        background: #fff !important;
        box-shadow: 0 2px 8px rgba(99,102,241,0.10) !important;
        border-radius: 10px !important;
        left: 0 !important;
        top: 0 !important;
        float: none !important;
        clear: both !important;
        order: 0 !important;
    }
    .doc-card-header {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        order: 1 !important;
    }
    .doc-actions {
        width: 100% !important;
        margin: 10px 0 0 0 !important;
        order: 2 !important;
    }
}
@media (max-width: 767.98px) {
    .rio-document-card {
        position: relative !important;
        padding-bottom: 18px !important;
    }
    .doc-card-body {
        position: relative !important;
        z-index: 2 !important;
    }
    .doc-visual {
        width: 64px !important;
        height: 64px !important;
        margin: 18px 0 12px 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        position: relative !important;
        z-index: 3 !important;
        background: #fff !important;
        box-shadow: 0 2px 8px rgba(99,102,241,0.10) !important;
        border-radius: 12px !important;
        left: 0 !important;
        top: 0 !important;
        float: none !important;
        clear: both !important;
    }
    .doc-acronym {
        font-size: 1.1rem !important;
        z-index: 4 !important;
        position: relative !important;
    }
    .doc-actions {
        position: relative !important;
        margin: 12px 0 0 0 !important;
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        clear: both !important;
        z-index: 2 !important;
    }
    .btn-download {
        width: 100% !important;
        min-width: 0 !important;
        font-size: 1rem !important;
        padding: 12px 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        border-radius: 8px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 5 !important;
    }
}
/* --- STRONGER MOBILE FIX FOR RIO AGREEMENT PAGE --- */
@media (max-width: 767.98px) {
    .rio-document-card {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 18px 8px 18px 8px !important;
        margin-bottom: 18px !important;
        overflow: visible !important;
        position: relative !important;
        background: #fff !important;
        border-radius: 14px !important;
        box-shadow: 0 2px 8px rgba(15,23,42,0.06) !important;
        clear: both !important;
        grid-template-columns: none !important;
        gap: 0 !important;
    }
    .doc-card-body {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        position: static !important;
        gap: 0 !important;
    }
    .doc-card-header {
        padding: 0 !important;
        margin-bottom: 10px !important;
        width: 100% !important;
        gap: 8px !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        order: unset !important;
    }
    .doc-card-header h3 {
        font-size: 1.1rem !important;
        padding-bottom: 6px !important;
        line-height: 1.2 !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }
    .doc-card-header p {
        font-size: 0.98rem !important;
        line-height: 1.5 !important;
        margin: 0 !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }
    .doc-visual {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 12px 0 8px 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: static !important;
        order: unset !important;
        float: none !important;
        clear: both !important;
        border-radius: 0 0 12px 12px !important;
    }
    .doc-acronym {
        font-size: 1.2rem !important;
        line-height: 1 !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }
    .doc-actions {
        position: static !important;
        margin: 10px 0 0 0 !important;
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        clear: both !important;
        z-index: auto !important;
    }
    .btn-download {
        width: 100% !important;
        min-width: 0 !important;
        font-size: 1rem !important;
        padding: 10px 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        border-radius: 8px !important;
    }
}
/* --- MOBILE FIXES FOR RIO AGREEMENT PAGE --- */
@media (max-width: 767.98px) {
    .rio-document-section {
        padding-left: 0;
        padding-right: 0;
    }
    .rio-document-card {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        min-width: 0;
        width: 100%;
        margin-bottom: 24px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06);
        position: relative;
        z-index: 1;
    }
    .doc-card-body {
        width: 100%;
        padding: 18px 12px 12px 12px;
        box-sizing: border-box;
        order: 2;
    }
    .doc-visual {
        width: 100%;
        min-height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 0 0 12px;
        order: 1;
        border-radius: 0 0 12px 12px;
    }
    .doc-actions {
        margin-top: 16px;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        gap: 10px;
    }
    .btn-download {
        display: inline-block !important;
        width: auto;
        min-width: 120px;
        font-size: 1rem;
        padding: 10px 18px;
        margin: 0;
        position: relative;
        z-index: 2;
    }
    .rio-download-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .summary-links {
        flex-wrap: wrap;
        gap: 8px;
    }
    .summary-link {
        font-size: 0.98rem;
        padding: 6px 10px;
    }
    .rio-overhaul-tiles {
        flex-direction: column;
        gap: 18px;
    }
    .rio-tile {
        width: 100%;
        min-width: 0;
        margin-bottom: 0;
        position: relative;
    }
}

@media (max-width: 575.98px) {
    .rio-document-card {
        margin-bottom: 18px;
        border-radius: 10px;
    }
    .doc-card-header h3 {
        font-size: 1.08rem;
        line-height: 1.3;
    }
    .doc-card-header p {
        font-size: 0.98rem;
    }
    .btn-download {
        font-size: 0.98rem;
        padding: 9px 12px;
    }
}
/* === RIO OVERHAUL AREA: Modern, Interactive, Dynamic === */
.rio-overhaul-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 56px;
    align-items: stretch;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 12px;
}
.rio-overhaul-intro {
    min-width: 320px;
    max-width: 420px;
    width: 100%;
    margin: 0;
}

.rio-overhaul-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    min-width: 340px;
    width: 100%;
    align-items: stretch;
}
.rio-overhaul-info {
    background: linear-gradient(135deg, #f1f5f9 70%, #e0e7ff 100%);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 12px rgba(59,130,246,0.07);
    padding: 32px 28px;
    min-width: 0;
    max-width: 420px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: fadeInRight 1.1s cubic-bezier(.4,0,.2,1);
    align-self: stretch;
}
.rio-overhaul-info h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--primary-dark);
}
.rio-overhaul-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rio-overhaul-info li {
    font-size: 15px;
    color: var(--text-muted);
    padding-left: 0;
    position: relative;
}
.rio-overhaul-info li strong {
    color: var(--primary-color);
    font-weight: 700;
}

.rio-overhaul-stepper {
    background: linear-gradient(135deg, #eef2ff 60%, #f8fafc 100%);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 12px rgba(99,102,241,0.09);
    padding: 32px 28px;
    min-width: 0;
    max-width: 420px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: fadeInUp 1.1s cubic-bezier(.4,0,.2,1);
    align-self: stretch;
}
.rio-overhaul-stepper h3 {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--primary-dark);
}
.rio-stepper-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
}
.rio-stepper-list li {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .7s, transform .7s;
}
.rio-stepper-list li.visible {
    opacity: 1;
    transform: translateY(0);
}
.rio-stepper-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 60%, #38bdf8 100%);
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(99,102,241,0.13);
    position: relative;
    z-index: 2;
    transition: background .3s, transform .3s;
}
.rio-stepper-list li.visible .rio-stepper-dot {
    animation: stepperPulse 1.2s cubic-bezier(.4,0,.2,1);
}
@keyframes stepperPulse {
    0% { box-shadow: 0 0 0 0 rgba(99,102,241,0.18); }
    70% { box-shadow: 0 0 0 16px rgba(99,102,241,0.08); }
    100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.18); }
}
.rio-stepper-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rio-stepper-content strong {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 700;
}
.rio-stepper-content p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 1200px) {
    .rio-overhaul-wrapper {
        grid-template-columns: 1fr;
        gap: 38px;
        max-width: 98vw;
    }

    /* --- Robust fix for RIO document cards on mobile --- */
    .rio-document-card {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box;
        padding: 18px 6px !important;
        margin-bottom: 18px !important;
        overflow: visible !important;
        position: relative !important;
        background: #fff !important;
        border-radius: 16px !important;
        box-shadow: 0 2px 8px rgba(15,23,42,0.06) !important;
        clear: both !important;
    }
    .doc-card-body {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }
    .doc-card-header {
        padding: 0 !important;
        margin-bottom: 10px !important;
        width: 100% !important;
        gap: 8px !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }
    .doc-card-header h3 {
        font-size: 18px !important;
        padding-bottom: 6px !important;
        line-height: 1.2 !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }
    .doc-card-header p {
        font-size: 13px !important;
        line-height: 1.5 !important;
        margin: 0 !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }
    .doc-visual {
        width: 90px !important;
        height: 90px !important;
        margin: 12px auto 8px auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: static !important;
        order: 2 !important;
        float: none !important;
        clear: both !important;
    }
    .doc-acronym {
        font-size: 22px !important;
        line-height: 1 !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        text-align: center !important;
    }
    .doc-actions {
        position: static !important;
        margin: 10px 0 0 0 !important;
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        clear: both !important;
    }
    .btn-download {
        width: 100% !important;
        min-width: 0 !important;
        font-size: 12px !important;
        padding: 0 6px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }
    /* --- End robust fix --- */
    
    .rio-agreement-page {
        --shadow-md: 0 16px 48px rgba(15, 23, 42, 0.10);
        --shadow-lg: 0 24px 64px rgba(15, 23, 42, 0.14);
        --shadow-xl: 0 32px 80px rgba(15, 23, 42, 0.18);
        --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        --transition-smooth: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
}

.rio-agreement-page {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-page);
    color: var(--text-dark);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ========================================
   Hero Banner - Enhanced with Particles
   ======================================== */
.rio-hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding: 110px 0 90px;
    background: radial-gradient(circle at 15% 30%, rgba(99, 102, 241, 0.25), transparent 55%),
                radial-gradient(circle at 85% 50%, rgba(14, 165, 233, 0.2), transparent 60%),
                linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #312e81 100%);
    overflow: hidden;
}

.rio-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/banner-menu_bg.svg') center/cover no-repeat;
    opacity: 0.16;
    mix-blend-mode: screen;
    animation: heroTexture 18s linear infinite;
}

.rio-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.65) 0%, rgba(15, 23, 42, 0.1) 100%);
}

@keyframes heroTexture {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.05) rotate(2deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.rio-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.rio-hero-copy {
    position: relative;
    z-index: 2;
    color: #f8fafc;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 26px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 28px;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.hero-title {
    font-size: clamp(42px, 5.5vw, 68px);
    font-weight: 900;
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    color: #00ffff;
}

.hero-description {
    font-size: 19px;
    line-height: 1.75;
    max-width: 580px;
    margin-bottom: 32px;
    color: rgba(226, 232, 240, 0.95);
    font-weight: 400;
}

.hero-highlights {
    list-style: none;
    padding: 0;
    margin: 0 0 34px;
}

.hero-highlights li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 14px;
    font-size: 15px;
    color: rgba(241, 245, 249, 0.88);
}

.hero-highlights li::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8, #a855f7);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn-primary-custom,
.btn-outline-custom {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary-custom {
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    color: #0f172a;
    box-shadow: 0 18px 35px rgba(99, 102, 241, 0.35);
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 48px rgba(99, 102, 241, 0.45);
    color: #0f172a;
}

.btn-outline-custom {
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: rgba(226, 232, 240, 0.9);
    background: transparent;
}

.btn-outline-custom:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.7);
    color: #ffffff;
    transform: translateY(-3px);
}

.rio-hero-visual {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
}

.rio-hero-visual img {
    max-width: 100%;
    height: auto;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.3), rgba(168, 85, 247, 0.3));
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 15px rgba(99, 102, 241, 0.5);
    animation: float-hero-image 12s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes float-hero-image {
    0% {
        transform: translateY(0px) rotateX(5deg) rotateY(-10deg) rotateZ(2deg);
    }
    50% {
        transform: translateY(-20px) rotateX(0deg) rotateY(10deg) rotateZ(-2deg);
    }
    100% {
        transform: translateY(0px) rotateX(5deg) rotateY(-10deg) rotateZ(2deg);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
}

.scroll-indicator span {
    width: 7px;
    height: 7px;
    background: rgba(248, 250, 252, 0.85);
    border-radius: 50%;
    display: block;
    margin: 4px auto;
    animation: scrollBounce 1.5s infinite;
}

.scroll-indicator span:nth-child(2) { animation-delay: 0.18s; }
.scroll-indicator span:nth-child(3) { animation-delay: 0.36s; }

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(10px); opacity: 1; }
}

/* ========================================
   Section Basics - Enterprise Typography
   ======================================== */
.rio-overview-section,
.rio-downloads-overview,
.rio-document-section,
.rio-partners-section,
.rio-cta-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.section-header {
    margin-bottom: 72px;
    text-align: center;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.08));
    color: #1e40af;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.section-title {
    font-size: clamp(32px, 3.6vw, 52px);
    font-weight: 900;
    margin: 24px 0 16px;
    line-height: 1.15;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto;
    font-weight: 400;
}

/* ========================================
   Overview Grid
   ======================================== */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
    align-items: start;
}

.overview-intro {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.overview-context {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-muted);
}

.overview-checklist ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.overview-checklist li {
    position: relative;
    padding-left: 26px;
    color: var(--text-muted);
    font-size: 15px;
}

.overview-checklist li::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22d3ee, #6366f1);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
}

.overview-stack {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.overview-pipeline {
    padding: 28px 30px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 64, 175, 0.92));
    color: #f8fafc;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.overview-pipeline h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 18px;
}

.pipeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.pipeline-list li {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.pipeline-list strong {
    display: block;
    font-size: 16px;
    margin-bottom: 6px;
    color: #e0e7ff;
}

.pipeline-list p {
    margin: 0;
    color: rgba(226, 232, 240, 0.8);
    font-size: 14px;
    line-height: 1.6;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(99, 102, 241, 0.25));
    border: 1px solid rgba(148, 163, 184, 0.4);
    font-weight: 700;
    color: #bfdbfe;
}

/* ========================================
   Overview Feature Cards
   ======================================== */
.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 34px;
    height: 100%;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(148, 163, 184, 0.15);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #ffffff;
}

.icon-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.icon-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.icon-green { background: linear-gradient(135deg, #22d3ee, #14b8a6); }

.feature-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* ========================================
   Downloads Overview - Premium Experience
   ======================================== */
.rio-downloads-overview {
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
    position: relative;
}

.rio-downloads-overview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.08), transparent 70%);
    pointer-events: none;
}

.download-shell {
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    z-index: 1;
}

.rio-download-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    padding: 36px 44px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.12), 0 2px 8px rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.rio-download-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 50%, rgba(99, 102, 241, 0.05), transparent 60%);
    pointer-events: none;
}

.summary-highlight {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    padding: 22px 34px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.summary-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmerSummary 3s ease-in-out infinite;
}

@keyframes shimmerSummary {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

.summary-count {
    font-size: 48px;
    font-weight: 900;
    color: #1e40af;
    line-height: 1;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(30, 64, 175, 0.15);
    animation: countPulse 2.5s ease-in-out infinite;
}

@keyframes countPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.summary-label {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.summary-caption {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

.summary-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.summary-link {
    padding: 14px 26px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 130, 246, 0.2);
    background: rgba(59, 130, 246, 0.06);
    color: #1e40af;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.summary-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.summary-link:hover {
    background: rgba(59, 130, 246, 0.12);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.4);
}

.summary-link:hover::before {
    opacity: 1;
}

.summary-link:active {
    transform: translateY(-1px);
}

/* ========================================
   Filter Command Bar - Enhanced
   ======================================== */
.rio-command-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 26px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 58, 138, 0.75));
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
}

.rio-command-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), transparent 60%);
    opacity: 0.5;
    pointer-events: none;
}

.command-reset {
    border: 1px solid rgba(191, 219, 254, 0.5);
    background: rgba(99, 102, 241, 0.2);
    color: #e2e8f0;
    padding: 11px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.command-reset::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.command-reset:hover::before {
    width: 100%;
    height: 100%;
}

.command-reset:hover {
    background: rgba(99, 102, 241, 0.45);
    border-color: rgba(191, 219, 254, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.35);
}

.filter-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.filter-chip {
    border: 1px solid rgba(191, 219, 254, 0.5);
    background: rgba(99, 102, 241, 0.2);
    color: #e2e8f0;
    padding: 11px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.filter-chip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.filter-chip:hover::before {
    width: 100%;
    height: 100%;
}

.filter-chip:hover,
.filter-chip.is-active {
    background: rgba(99, 102, 241, 0.45);
    border-color: rgba(191, 219, 254, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.35);
}

.filter-chip.is-active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.6), rgba(99, 102, 241, 0.6));
    color: #ffffff;
    font-weight: 700;
}

.filter-chip:active {
    transform: translateY(-1px);
}

/* ========================================
   Document Sections - Enterprise Level Layout
   ======================================== */
.rio-document-section {
    /* remove debug background so layout is clean */
    background: transparent;
    position: relative;
    display: block;
}

.rio-document-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.2), transparent);
}

.rio-document-section.section-alt {
    background: #ffffff;
}

.rio-document-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 56px;
    /* align items to the top so headings appear near the top of the card */
    align-items: start;
    padding: 56px 64px;
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: visible;
    transition: var(--transition-smooth);
}

.rio-document-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 50%, rgba(99, 102, 241, 0.03), transparent 70%);
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.rio-document-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #3b82f6, #6366f1);
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.rio-document-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.3);
}

.rio-document-card:hover::before {
    opacity: 1;
}

.rio-document-card:hover::after {
    height: 100%;
}

.section-alt .rio-document-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-color: rgba(148, 163, 184, 0.15);
}

.doc-card-body {
    display: flex;
    flex-direction: column;
    gap: 36px;
    min-width: 0;
    /* keep content above decorative visual */
    z-index: 3;
    position: relative;
}

.doc-card-header {
    display: flex;
    flex-direction: column;
    gap: 28px;
    order: -2;
    /* Make room for the absolute-positioned action button on wide viewports */
    padding-right: 180px;
}

.doc-card-header h3 {
    font-size: clamp(30px, 2.6vw, 40px);
    font-weight: 800;
    margin: 0;
    padding-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    border-bottom: 3px solid rgba(147, 197, 253, 0.25);
}

.doc-card-header h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 72px;
    height: 3px;
    background: linear-gradient(90deg, #60a5fa, #93c5fd);
    border-radius: 2px;
}

.doc-card-header p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-muted);
    margin: 0;
    padding-top: 4px;
    max-width: 720px;
    font-weight: 400;
}

.doc-actions {
    /* Place the action button inside the card (top-right) so it's visually connected
       to the agreement content while remaining compact. Use absolute positioning
       on larger screens and fall back to static flow on narrow viewports. */
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 999; /* Increased z-index */
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Enhanced Download Button - Properly Sized */
.btn-download {
    /* Compact enterprise-style primary button */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 140px;
    height: 40px;
    padding: 0 14px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
    color: #ffffff !important;
    font-size: 14px;
    line-height: 1;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.16), 0 2px 8px rgba(79, 70, 229, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow: hidden;
    /* safety to keep it interactive */
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.btn-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-download:hover::before {
    left: 100%;
}

.btn-download svg { 
    color: #fff; 
    width: 16px; 
    height: 16px; 
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.btn-download:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.22), 0 4px 12px rgba(79, 70, 229, 0.12);
    background: linear-gradient(135deg, #1d4ed8 0%, #3730a3 50%, #581c87 100%);
}

.btn-download:active { 
    transform: translateY(-1px); 
    box-shadow: 0 6px 12px rgba(79, 70, 229, 0.14), 0 2px 6px rgba(79, 70, 229, 0.08);
}

.btn-download:focus { 
    outline: 3px solid rgba(99,102,241,0.18); 
    outline-offset: 3px; 
}

.btn-download:hover svg {
    transform: translateX(2px);
}

@keyframes downloadBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* Download button status variations */
.btn-download.is-downloading {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    pointer-events: none;
}

.btn-download.is-downloading::before {
    animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.doc-visual {
    flex-shrink: 0;
    width: 240px;
    height: 240px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 50%;
    overflow: visible;
    transition: var(--transition-smooth);
    z-index: 1;
}

/* --- NEW ANIMATION STYLES --- */
/* Base transition for animated elements */
.doc-card-body, .doc-visual {
    transition: transform 0.6s ease;
}

/* Initial state: moved down */
.rio-document-card.is-not-visible .doc-card-body,
.rio-document-card.is-not-visible .doc-visual {
     transform: translateY(30px);
}

/* Final state: in place */
.rio-document-card.is-visible .doc-card-body,
.rio-document-card.is-visible .doc-visual {
    transform: translateY(0);
}

/* Stagger the visual element's animation */
.rio-document-card.is-visible .doc-visual {
    transition-delay: 0.1s;
}
/* --- END NEW ANIMATION STYLES --- */


/* REMOVED previous fix rule that forced opacity */
/*
.rio-document-card .doc-card-body,
.rio-document-card .doc-visual {
    opacity: 1 !important;
}
*/

.doc-visual::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.15;
    filter: blur(20px);
    transition: var(--transition-smooth);
}

.rio-document-card:hover .doc-visual::before {
    opacity: 0.3;
    filter: blur(30px);
}

.doc-visual::after {
    content: '';
    position: absolute;
    width: 160%;
    height: 160%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 65%);
    animation: pulseGlow 5s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.08); opacity: 0.7; }
}

.theme-blue { 
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%); 
    box-shadow: 0 28px 56px rgba(59, 130, 246, 0.35);
}
.theme-purple { 
    background: linear-gradient(135deg, #6b21a8 0%, #8b5cf6 50%, #a78bfa 100%); 
    box-shadow: 0 28px 56px rgba(139, 92, 246, 0.35);
}
.theme-green { 
    background: linear-gradient(135deg, #047857 0%, #10b981 50%, #34d399 100%); 
    box-shadow: 0 28px 56px rgba(16, 185, 129, 0.35);
}
.theme-indigo { 
    background: linear-gradient(135deg, #3730a3 0%, #6366f1 50%, #818cf8 100%); 
    box-shadow: 0 28px 56px rgba(99, 102, 241, 0.35);
}
.theme-orange { 
    background: linear-gradient(135deg, #c2410c 0%, #f97316 50%, #fb923c 100%); 
    box-shadow: 0 28px 56px rgba(249, 115, 22, 0.35);
}

.doc-acronym {
    position: relative;
    font-size: 56px;
    font-weight: 900;
    letter-spacing: 4px;
    z-index: 2;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    animation: floatAcronym 4s ease-in-out infinite;
}

@keyframes floatAcronym {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-12px) scale(1.02); }
}

.doc-orbit {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.doc-orbit span {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    animation: docOrbit 20s linear infinite;
}

.doc-orbit span:nth-child(1) { 
    width: 180px; 
    height: 180px; 
    animation-delay: 0s;
    border-style: dashed;
    border-width: 2px;
}
.doc-orbit span:nth-child(2) { 
    width: 220px; 
    height: 220px; 
    animation-delay: 7s;
    opacity: 0.5;
    border-width: 1.5px;
}
.doc-orbit span:nth-child(3) { 
    width: 260px; 
    height: 260px; 
    animation-delay: 14s;
    opacity: 0.3;
    border-width: 1px;
}

@keyframes docOrbit {
    0% { transform: rotate(0deg) scale(1); opacity: 0.5; }
    50% { transform: rotate(180deg) scale(1.03); opacity: 0.25; }
    100% { transform: rotate(360deg) scale(1); opacity: 0.5; }
}

/* ========================================
   Tablet and Mobile Download Button Fixes
   ======================================== */

/* Tablet screens (768px to 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .doc-actions {
        position: static !important;
        width: 100% !important;
        margin-top: 32px !important;
        display: flex !important;
        justify-content: flex-start !important;
        order: 2 !important;
        z-index: auto !important;
    }
    /* === FIX START: Increased specificity and added !important tags for tablet visibility === */
    section.rio-document-section .rio-document-card .btn-download {
        display: inline-block !important;
        width: auto !important;
        min-width: 140px !important;
        font-size: 14px !important;
        padding: 10px 18px !important;
        margin: 0 !important;
        position: static !important;
        z-index: 2 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    /* === FIX END === */
    .doc-card-header {
        padding-right: 0 !important; /* Remove padding since button is not absolute */
    }
    .rio-document-card .doc-actions {
        position: static !important;
    }
}

/* Final tablet safeguard to ensure button visibility on mid-size screens */
@media (min-width: 768px) and (max-width: 1199.98px) {
    section.rio-document-section .rio-document-card .doc-card-body .doc-actions {
        position: static !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-top: 32px !important;
        z-index: 10 !important;
    }
    section.rio-document-section .rio-document-card .doc-card-body .btn-download {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        min-width: 160px !important;
        padding: 10px 18px !important;
        z-index: 10 !important;
    }
}

/* Strong override: ensure download button is visible and clickable on tablets
   This prevents decorative visuals or layout differences from covering the action.
*/
@media (min-width: 768px) and (max-width: 1199.98px) {
    /* Prevent the visual from intercepting clicks */
    .rio-document-card .doc-visual {
        pointer-events: none !important;
        z-index: 1 !important;
    }

    /* Ensure card body, actions and button sit above visuals and remain interactive */
    .rio-document-card .doc-card-body,
    .rio-document-card .doc-actions,
    .rio-document-card .btn-download {
        position: relative !important;
        z-index: 9999 !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .rio-document-card .doc-actions {
        display: flex !important;
        justify-content: flex-start !important;
    }

    .rio-document-card .btn-download {
        display: inline-flex !important;
        align-items: center !important;
        gap: 10px !important;
    }
}

/* Mobile screens (max-width: 767.98px) - Ensure button is below description */
@media (max-width: 767.98px) {
    /* Strong, final overrides to push the download button further down on phones */
    section.rio-document-section .rio-document-card .doc-card-body {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    section.rio-document-section .rio-document-card .doc-card-body .doc-actions {
        position: static !important;
        width: 100% !important;
        margin-top: 100px !important; /* Push way lower on mobile as requested */
        display: flex !important;
        justify-content: flex-start !important;
        order: 2 !important;
        text-align: left !important;
        z-index: auto !important;
    }
    section.rio-document-section .rio-document-card .doc-card-body .btn-download {
        display: block !important;
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 !important;
        font-size: 16px !important;
        padding: 12px 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        z-index: auto !important;
    }
    section.rio-document-section .rio-document-card .doc-card-header {
        padding-right: 0 !important; /* Remove padding since button is not absolute */
        margin-bottom: 16px !important;
        text-align: center !important; /* Center the download agreement text */
    }
}
.consumer-hub {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 34px;
    align-items: stretch;
}

.consumer-hub__panel {
    padding: 32px;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, rgba(30, 64, 175, 0.92), rgba(17, 24, 39, 0.88));
    color: #f8fafc;
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.consumer-hub__panel h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.consumer-hub__panel p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(226, 232, 240, 0.85);
}

.consumer-hub__note {
    margin: 0;
    font-size: 14px;
    color: rgba(226, 232, 240, 0.8);
}

.consumer-hub__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 26px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-secondary {
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    color: #0f172a;
    border: none;
    box-shadow: 0 18px 32px rgba(99, 102, 241, 0.32);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 42px rgba(99, 102, 241, 0.4);
    color: #0f172a;
}

.btn-ghost {
    border: 1px solid rgba(226, 232, 240, 0.4);
    color: #e0e7ff;
    background: transparent;
}

.btn-ghost:hover {
    background: rgba(226, 232, 240, 0.12);
    border-color: rgba(226, 232, 240, 0.7);
}

.consumer-hub__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
}

.consumer-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 26px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: #f8fafc;
    overflow: hidden;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(148, 163, 184, 0.25);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.consumer-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 65%);
    opacity: 0;
    transition: var(--transition);
}

.consumer-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 28px 54px rgba(15, 23, 42, 0.35);
}

.consumer-card:hover::before {
    opacity: 1;
}

.consumer-card__eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: 0.8;
}

.consumer-card__title {
    font-size: 20px;
    font-weight: 700;
}

.consumer-card__meta {
    font-size: 13px;
    color: rgba(248, 250, 252, 0.85);
}

.consumer-card__indicator {
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(248, 250, 252, 0.12);
    filter: blur(0);
    transition: var(--transition);
}

.consumer-card:hover .consumer-card__indicator {
    transform: scale(1.1);
    background: rgba(248, 250, 252, 0.2);
}

.consumer-card--primary { background: linear-gradient(135deg, rgba(14, 165, 233, 0.9), rgba(59, 130, 246, 0.85)); }
.consumer-card--magikdigi { background: linear-gradient(135deg, rgba(236, 72, 153, 0.85), rgba(168, 85, 247, 0.85)); }
.consumer-card--broadband { background: linear-gradient(135deg, rgba(34, 211, 238, 0.85), rgba(59, 130, 246, 0.75)); }
.consumer-card--sms { background: linear-gradient(135deg, rgba(99, 102, 241, 0.85), rgba(139, 92, 246, 0.75)); }
/* --- Mobile alignment tweak: center text in the visual cube and raise the cube slightly --- */
@media (max-width: 767.98px) {
    /* Keep selector specific and mobile-only so desktop is unaffected */
    .rio-document-card .doc-visual {
        display: flex !important;
        align-items: center !important;    /* vertical center inside the cube */
        justify-content: center !important; /* horizontal center inside the cube */
        /* Nudge the visual upward so it lines up horizontally with the download button */
        margin-top: -48px !important; /* moved further up per request */
        margin-bottom: 6px !important;
        padding-top: 4px !important;
        width: 110px !important;   /* slightly smaller box on mobile */
        height: 110px !important;  /* slightly smaller box on mobile */
    }

    .rio-document-card .doc-acronym {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        line-height: 1 !important;
        font-size: 24px !important; /* slightly smaller to match the reduced box */
        transform: translateY(-4px) !important; /* tiny upward nudge for optical alignment */
    }
}
.consumer-card--pay { background: linear-gradient(135deg, rgba(251, 146, 60, 0.9), rgba(249, 115, 22, 0.85)); }
.consumer-card--coa { background: linear-gradient(135deg, rgba(22, 163, 74, 0.85), rgba(34, 197, 94, 0.8)); }
.consumer-card--investor { background: linear-gradient(135deg, rgba(15, 118, 110, 0.9), rgba(6, 95, 70, 0.85)); }
.consumer-card--rio { background: linear-gradient(135deg, rgba(79, 70, 229, 0.85), rgba(99, 102, 241, 0.75)); }

.partners-note {
    text-align: center;
    margin-top: 36px;
}

.partners-note p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ========================================
   CTA Section
   ======================================== */
.rio-cta-section {
    background: linear-gradient(135deg, #1e40af, #312e81);
}

.cta-box {
    background: rgba(15, 23, 42, 0.55);
    border-radius: var(--radius-lg);
    padding: 46px;
    color: #f8fafc;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
}

.cta-box h2 {
    font-size: clamp(28px, 3vw, 34px);
    font-weight: 800;
    margin-bottom: 12px;
}

.cta-box p {
    font-size: 16px;
    color: rgba(226, 232, 240, 0.85);
}

.btn-cta,
.btn-cta-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    margin-top: 16px;
}

.btn-cta {
    background: #ffffff;
    color: #1e3a8a;
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-cta-outline {
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    margin-left: 12px;
}

.btn-cta-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   Animations
   ======================================== */
.fade-in-up,
.fade-in-right {
    /* Keep content visible by default; animation will override to start at 0 */
    opacity: 1;
    animation-fill-mode: both;
}

.fade-in-up { animation: fadeInUp 0.9s ease-out; }
.fade-in-right { animation: fadeInRight 0.9s ease-out; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(32px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(32px); }
    to { opacity: 1; transform: translateX(0); }
}

.reveal-left,
.reveal-right {
    /* Ensure visibility if animations fail or are disabled */
    opacity: 1;
    animation-fill-mode: both;
}

.reveal-left { animation: slideInLeft 1s ease-out; }
.reveal-right { animation: slideInRight 1s ease-out; }

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-42px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(42px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 991px) {
    .rio-hero { padding: 90px 0 70px; text-align: center; }
    .hero-title { font-size: 42px; }
    .hero-description { font-size: 17px; margin-left: auto; margin-right: auto; }
    .hero-highlights { display: inline-block; text-align: left; }
    .rio-hero-visual { margin-top: 60px; }
    .overview-grid { grid-template-columns: 1fr; }
    .overview-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    
    .rio-document-card { 
        grid-template-columns: 1fr; 
        padding: 40px 32px;
        gap: 32px;
        display: flex;
        flex-direction: column;
    }
    
    .doc-visual { 
        margin: 0 auto; 
        width: 180px;
        height: 180px;
        order: 1;
    }

    .doc-card-body {
        order: -1;
    }
    /* On narrower viewports keep the button in flow below the header */
    .doc-actions { position: static; top: auto; right: auto; margin-top: 12px; }
    .doc-card-header { padding-right: 0; }
    
    .doc-acronym {
        font-size: 42px;
    }
    
    .consumer-hub { grid-template-columns: 1fr; }
    .consumer-hub__panel { order: 2; }
}

@media (max-width: 767px) {
    .rio-hero { min-height: auto; padding: 70px 0; }
    .hero-title { font-size: 34px; }
    .hero-highlights li { font-size: 14px; }
    .hero-cta { flex-direction: column; }
    .btn-primary-custom, .btn-outline-custom { width: 100%; justify-content: center; }
    .overview-cards { grid-template-columns: minmax(0, 1fr); }
    .overview-pipeline { padding: 24px; }
    .summary-links { width: 100%; }
    .rio-download-summary { padding: 20px; flex-direction: column; align-items: stretch; }
    .summary-highlight { width: 100%; justify-content: space-between; }
    .rio-command-bar { padding: 18px 20px; }
    .command-reset { height: 44px; }

    /* --- Improved fix for RIO document cards on mobile --- */
    .rio-document-card {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 24px 16px 18px 16px !important;
        gap: 16px !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box;
        position: relative;
    }
    .doc-card-body {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        z-index: 2 !important;
        display: block !important;
    }
    .doc-card-header {
        padding-right: 0 !important;
        gap: 12px !important;
        order: 1;
        width: 100% !important;
        margin-bottom: 60px !important; /* Increased from 55px to push button/box down further */
        display: block !important;
    }
    .doc-card-header h3 {
        font-size: 20px !important;
        padding-bottom: 10px !important;
        margin: 0 !important;
        line-height: 1.3 !important;
    }
    .doc-card-header p {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin: 0 !important;
    }
    .doc-actions {
        position: static !important;
        margin-top: 0 !important;
        justify-content: flex-start !important;
        gap: 16px !important;
        z-index: 2 !important;
        background: none !important;
        order: 2;
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }
    .btn-download {
        width: auto !important;
        min-width: 140px !important;
        max-width: 100% !important;
        justify-content: center !important;
        font-size: 13px !important;
        padding: 10px 16px !important;
        margin-top: 0 !important;
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 3 !important;
        flex-shrink: 0;
        order: 1;
    }
    .doc-visual {
        width: 110px !important;
        height: 110px !important;
        min-width: 110px !important;
        min-height: 110px !important;
        margin: 0 auto !important;
        order: 2;
        position: static !important;
        z-index: 1;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0;
        background: #312e81 !important;
        border: 2px solid #ffffff !important;
        box-shadow: 0 4px 12px rgba(49, 46, 129, 0.3) !important;
        border-radius: 12px !important;
    }
    .doc-acronym {
        font-size: 28px !important;
        font-weight: 900 !important;
        color: #ffffff !important;
        text-shadow: 0 2px 6px rgba(30, 64, 175, 0.2) !important;
        opacity: 1 !important;
        z-index: 2 !important;
        position: relative !important;
        line-height: 1 !important;
    }
    .doc-visual, .doc-visual * {
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }
    /* --- End improved fix --- */

    .consumer-card { padding: 22px; }
}

@media (max-width: 575px) {
    .rio-hero { padding: 60px 0; }
    .hero-title { font-size: 30px; }
    .hero-description { font-size: 15px; }
    .summary-highlight { width: 100%; justify-content: center; }
    .summary-links { gap: 10px; }
    .summary-link { width: 100%; text-align: center; }
    .rio-command-bar { padding: 16px; }
    .filter-chip { width: 100%; text-align: center; }
    
    .rio-document-card { padding: 26px 20px; }
    .doc-card-header h3 { font-size: 22px; }
    
    .doc-visual { 
        width: 140px;
        height: 140px;
    }
    
    .doc-acronym {
        font-size: 32px;
        letter-spacing: 2px;
    }
    
    .consumer-card { padding: 20px; }
    .consumer-card__title { font-size: 18px; }
    .consumer-card__indicator { width: 120px; height: 120px; }
    .cta-box { padding: 32px 24px; text-align: center; }
    .btn-cta-outline { margin-left: 0; }
}

/* Global container styling for rounded corners and hover glow */
.container {
    border-radius: 12px;
    transition: box-shadow 0.3s ease;
}

.container:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

/* New RIO Overview Section Styles */
.rio-overview-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 80px;
    padding: 40px 0;
}

.rio-overview-content {
    flex: 1;
    max-width: 600px;
}

.rio-overview-visual {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rio-central-icon {
    animation: floatIcon 6s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.rio-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

.rio-feature-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.rio-feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.2);
}

.rio-feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.rio-feature-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1e293b;
}

.rio-feature-card p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.rio-benefits-section {
    margin-bottom: 80px;
}

.rio-benefits-section h3 {
    font-size: 32px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rio-benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.rio-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.rio-benefit-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
}

.rio-benefit-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.rio-benefit-item div {
    flex: 1;
}

.rio-benefit-item strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.rio-benefit-item p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.rio-lifecycle-section h3 {
    font-size: 32px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rio-timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.rio-timeline::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #6366f1);
    border-radius: 2px;
}

.rio-timeline-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.rio-timeline-dot {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    border: 4px solid #fff;
    transition: all 0.3s ease;
}

.rio-timeline-item:hover .rio-timeline-dot {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

.rio-timeline-content {
    max-width: 250px;
    margin: 0 auto;
}

.rio-timeline-content strong {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.rio-timeline-content p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rio-overview-hero {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .rio-features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .rio-benefits-list {
        grid-template-columns: 1fr;
    }

    .rio-timeline {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .rio-timeline::before {
        width: 4px;
        height: 100%;
        left: 25px;
        top: 0;
        background: linear-gradient(180deg, #6366f1, #8b5cf6, #6366f1);
    }

    .rio-timeline-item {
        text-align: left;
        display: flex;
        align-items: flex-start;
        gap: 20px;
    }

    .rio-timeline-dot {
        flex-shrink: 0;
        margin: 0;
    }

    .rio-timeline-content {
        max-width: none;
        margin: 0;
    }
}



/* =============================
     Tablet (iPad) targeted fixes
     ============================= */
@media (min-width: 768px) and (max-width: 1024.98px) {
    /* Ensure hero is readable and not cramped under header */
    .rio-hero {
        min-height: auto;
        padding: 90px 0 70px;
        text-align: center;
    }
    .hero-title {
        font-size: 42px; /* keep strong but controlled */
    }
    .hero-description {
        font-size: 17px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Make document card a clean vertical stack on iPad */
    .rio-document-card {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
        grid-template-columns: 1fr !important;
        padding: 44px 32px !important;
    }
    .doc-card-header {
        padding-right: 0 !important; /* remove reserved space from desktop */
        order: 1;
    }
    .doc-actions {
        position: static !important;
        top: auto !important;
        right: auto !important;
        margin-top: 8px !important;
        order: 2;
        justify-content: flex-start !important;
    }
    .btn-download {
        display: inline-flex !important;
        min-width: 150px;
        width: auto !important;
        padding: 10px 18px !important;
    }
    .doc-visual {
        width: 150px !important;
        height: 150px !important;
        margin: 0 auto !important; /* keep to the right to avoid crowding */
        order: 3;
        position: relative !important;
    }
    .doc-card-body { order: 1; }
}

/* =============================
     Mobile final safety overrides
     ============================= */
@media (max-width: 767.98px) {
    /* Remove any negative nudges that cause overlap */
    .rio-document-card .doc-visual {
        margin-top: 0 !important;
    }
    /* Keep stacking predictable */
    .rio-document-card {
        display: flex !important;
        flex-direction: column !important;
    }
    .doc-card-header { margin-bottom: 8px !important; }
    .doc-actions {
        position: static !important;
        width: 100% !important;
        margin-top: 10px !important;
    }
}

/* =============================
     Z-index and stacking safety
     ============================= */
.rio-document-card .doc-card-body {
    position: relative;
    z-index: 2; /* content above decorative visual */
}
.rio-document-card .doc-visual {
    position: relative;
    z-index: 1; /* behind text and buttons */
}

/* =============================================
     Strengthened iPad layout and visual alignment
     ============================================= */
@media (min-width: 768px) and (max-width: 1024.98px) {
    /* Keep a predictable vertical flow */
    section.rio-document-section .rio-document-card {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }
        section.rio-document-section .rio-document-card .doc-card-header {
        order: 1 !important;
        padding-right: 0 !important;
            margin-bottom: 6px !important; /* create room before actions */
    }
        section.rio-document-section .rio-document-card .doc-actions {
        position: static !important;
        order: 2 !important;
            margin-top: 10px !important;
            margin-bottom: 8px !important; /* give space before visual */
            display: block !important; /* block for predictable wrapping */
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
            width: 100% !important;
            z-index: 3 !important; /* above visual */
            position: relative !important;
    }
    section.rio-document-section .rio-document-card .btn-download {
        visibility: visible !important;
        opacity: 1 !important;
            display: inline-block !important;
            min-width: 140px !important;
            width: auto !important;
            max-width: 100% !important;
            padding: 10px 16px !important;
            font-size: 13px !important;
            line-height: 1.2 !important;
            justify-content: center !important;
    }
    /* Visual circle consistently centered and sized */
    section.rio-document-section .rio-document-card .doc-visual {
        order: 3 !important;
        align-self: center !important;
        width: 180px !important;
        height: 180px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 12px 0 0 0 !important;
        overflow: hidden !important;
    }
    /* Keep acronym inside the circle */
    section.rio-document-section .rio-document-card .doc-acronym {
        font-size: 36px !important;
        line-height: 1 !important;
        letter-spacing: 2px !important;
        transform: none !important;
        text-align: center !important;
        width: 100% !important;
    }
    /* Disable decorative orbits/glow on tablet to avoid visual bleed */
    section.rio-document-section .rio-document-card .doc-orbit,
    section.rio-document-section .rio-document-card .doc-visual::before,
    section.rio-document-section .rio-document-card .doc-visual::after {
        display: none !important;
        content: none !important;
    }
}

/* =============================================
     Strong mobile stack — no overlaps, no bleed
     ============================================= */
@media (max-width: 767.98px) {
    /* Enforce single column flow and containment */
    section.rio-document-section .rio-document-card {
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important; /* contain decorative layers */
    }
    /* Header first, no large bottom gap */
        section.rio-document-section .rio-document-card .doc-card-header {
        order: 1 !important;
            margin-bottom: 6px !important; /* ensure spacing above actions */
        padding-right: 0 !important;
    }
        section.rio-document-section .rio-document-card .doc-card-header p {
            margin-bottom: 8px !important; /* explicit spacing before button */
        }
    /* Actions second, visible and inline */
        section.rio-document-section .rio-document-card .doc-actions {
        order: 2 !important;
        position: static !important;
            margin-top: 14px !important;
            margin-bottom: 10px !important;
        width: 100% !important;
            display: block !important; /* avoid flex causing side-by-side crowding */
        flex-wrap: wrap !important;
        gap: 10px !important;
            z-index: 4 !important;
            /* --- FIX: Center the download button --- */
            text-align: center !important;
    }
    section.rio-document-section .rio-document-card .btn-download {
            display: inline-block !important;
            width: auto !important; /* smaller button as requested */
            min-width: 120px !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
            z-index: 5 !important; /* above visual */
            font-size: 12.5px !important;
            padding: 8px 14px !important;
            line-height: 1.25 !important;
    }
    /* Visual last — smaller and centered to avoid overlap */
    section.rio-document-section .rio-document-card .doc-visual {
        order: 3 !important;
        align-self: center !important;
            margin: 18px auto 0 auto !important; /* extra space from button */
        width: 110px !important;
        height: 110px !important;
        border-radius: 12px !important; /* square look preserved, but no overlap */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    /* Keep acronym fully inside the square */
    section.rio-document-section .rio-document-card .doc-acronym {
        font-size: 26px !important;
        line-height: 1 !important;
        transform: none !important;
        /* --- FIX: Remove width to allow parent flex to center --- */
        /* width: 100% !important; */
        text-align: center !important;
    }
    /* Turn off orbits/glow on small screens to prevent bleed over text/buttons */
    section.rio-document-section .rio-document-card .doc-orbit,
    section.rio-document-section .rio-document-card .doc-visual::before,
    section.rio-document-section .rio-document-card .doc-visual::after {
        display: none !important;
        content: none !important;
    }
}

/* === FIX START: Adjust download button placement for mobile screens === */
@media (max-width: 767.98px) {
    .doc-card-body {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }
    .doc-card-header {
        order: 1 !important;
    }
    .doc-actions {
        order: 3 !important;
        margin-top: 120px !important; /* Increased from 80px to move it "way lower" */
        width: 100% !important;
        display: flex !important;
        justify-content: flex-start !important;
        position: static !important;
        z-index: auto !important;
        /* --- FIX: Also center this instance of doc-actions --- */
        text-align: center !important;
    }
    .btn-download {
        display: block !important;
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 !important;
        font-size: 16px !important;
        padding: 12px 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        z-index: auto !important;
        /* --- FIX: Make this an inline-block to respect text-align --- */
        display: inline-block !important;
    }
}
/* === FIX END === */

/* === MOBILE PRECISION FIX: center acronym and download button exactly === */
@media (max-width: 767.98px) {
    /* Target the section-scoped selectors to avoid global side-effects */
    section.rio-document-section .rio-document-card .doc-visual {
        /* remove any lateral padding that can nudge text to the right */
        padding-left: 0 !important;
        padding-right: 0 !important;
        justify-content: center !important; /* horizontal center */
        align-items: center !important; /* vertical center */
        margin-left: auto !important;
        margin-right: auto !important;
    }

    section.rio-document-section .rio-document-card .doc-acronym {
        display: block !important;
        width: auto !important;
        margin: 0 auto !important; /* exact horizontal centering */
        padding: 0 !important;
        transform: none !important; /* remove small optical nudges */
        left: auto !important;
        right: auto !important;
        text-align: center !important;
    }

    /* Center the action area and the download button */
    section.rio-document-section .rio-document-card .doc-actions {
        display: flex !important;
        justify-content: center !important; /* center the button container */
        align-items: center !important;
        text-align: center !important;
        margin-top: 12px !important;
        width: 100% !important;
    }

    section.rio-document-section .rio-document-card .btn-download {
        display: inline-flex !important;
        justify-content: center !important; /* ensure icon + label centered inside */
        align-items: center !important;
        margin: 0 auto !important; /* center the button itself */
        padding: 10px 16px !important;
        max-width: 320px !important;
        box-sizing: border-box !important;
    }

    /* Ensure SVG icon sits to the left of the label and doesn't push the text off-center */
    section.rio-document-section .rio-document-card .btn-download svg {
        margin: 0 8px 0 0 !important; /* small gap to the right of the icon */
        display: inline-block !important;
        vertical-align: middle !important;
        transform: none !important;
    }
}

/* === END MOBILE PRECISION FIX === */

/* Stronger override for stubborn cases where other rules force left alignment */
@media (max-width: 767.98px) {
    /* highest specificity: direct child selector + section scope */
    section.rio-document-section .rio-document-card .doc-actions > a.btn-download,
    section.rio-document-section .rio-document-card .doc-actions > .btn-download {
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: auto !important;
        min-width: 120px !important;
        max-width: 320px !important;
        box-sizing: border-box !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    /* make sure the icon doesn't introduce asymmetric spacing */
    section.rio-document-section .rio-document-card .doc-actions > a.btn-download svg,
    section.rio-document-section .rio-document-card .doc-actions > .btn-download svg {
        margin-left: 0 !important;
        margin-right: 8px !important;
        display: inline-block !important;
        vertical-align: middle !important;
    }

    /* fallback: if the button is wrapped in a block container, center that too */
    section.rio-document-section .rio-document-card .doc-actions > div {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
}

/* ==============================
   Tablet: align download to heading
   ============================== */
@media (min-width: 768px) and (max-width: 1199.98px) {
    /* Make the heading row a positioning context so we can center the action to the heading */
    .doc-card-header .heading-row {
        position: relative !important;
        display: block !important;
        padding-right: 56px !important; /* reserve space so long headings don't overlap the button */
    }

    /* Position the actions absolutely within the heading row and vertically center to the heading */
    .doc-card-header .heading-row .doc-actions {
        position: absolute !important;
        right: 12px !important;
        top: 50% !important;
        transform: translateY(calc(-50% - 6px)) !important; /* nudge a few px upwards to match visual centre */
        z-index: 50 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        pointer-events: auto !important;
    }

    /* Ensure the download button keeps its size and is visible */
    .doc-card-header .heading-row .doc-actions .btn-download {
        display: inline-flex !important;
        min-width: 140px !important;
        padding: 8px 14px !important;
        font-size: 14px !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    /* Defensive: make decorative visuals non-interactive and behind actions */
    section.rio-document-section .rio-document-card .doc-visual,
    section.rio-document-section .rio-document-card .doc-orbit {
        pointer-events: none !important;
        z-index: 1 !important;
    }
}

