/* ==========================================================================
   RPI HOMES — LUXURY PRIVACY POLICY STYLES
   Harmonized with RPI Homes Brand Identity (Navy, Slate, Gold & Primary Coral)
   ========================================================================== */

:root {
    --rpi-thm-primary: #eb6753;
    --rpi-thm-dark: #181a20;
    --rpi-thm-navy: #0f1923;
    --rpi-thm-gold: #c9a84c;
    --rpi-thm-gold-bright: #e5a93c;
    --rpi-thm-gold-soft: #fcf8ee;
    --rpi-thm-gray-bg: #f8fafc;
    --rpi-thm-border: #e2e8f0;
    --rpi-thm-muted: #64748b;
    --rpi-thm-text: #334155;
    --rpi-thm-radius: 16px;
    --rpi-thm-shadow: 0 10px 30px rgba(15, 25, 35, 0.05);
    --rpi-thm-shadow-hover: 0 16px 40px rgba(15, 25, 35, 0.09);
}

/* 1. Reading Progress Bar */
#privacyProgressBar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3.5px;
    width: 0%;
    background: linear-gradient(90deg, #c9a84c 0%, #eb6753 100%);
    z-index: 99999;
    transition: width 0.1s ease-out;
}

/* 2. Hero Section */
.privacy-hero-section {
    position: relative;
    padding: 110px 0 75px 0;
    background-size: cover;
    background-position: center 35%;
    background-repeat: no-repeat;
    overflow: hidden;
}

.privacy-hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 22, 32, 0.72) 0%, rgba(10, 20, 28, 0.88) 100%);
    z-index: 1;
}

.privacy-hero-section .container {
    position: relative;
    z-index: 2;
}

.privacy-breadcrumb-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px;
    border-radius: 30px;
    background: rgba(15, 25, 35, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 18px;
}

.privacy-breadcrumb-pill a {
    color: #e2c875;
    text-decoration: none;
    transition: all 0.3s ease;
}

.privacy-breadcrumb-pill a:hover {
    color: #ffffff;
}

.privacy-hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.privacy-hero-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.08rem;
    max-width: 750px;
    margin: 0 auto 24px auto;
    line-height: 1.65;
}

/* Meta Badges Group */
.privacy-meta-group {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 26px;
}

.privacy-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.84rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.privacy-meta-badge i {
    color: #e2c875;
}

.privacy-meta-badge.gold {
    background: rgba(201, 168, 76, 0.22);
    border-color: rgba(201, 168, 76, 0.45);
    color: #f7e7b4;
}

/* Hero Action Buttons */
.privacy-hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.privacy-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.privacy-action-btn.btn-light-outline {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
}

.privacy-action-btn.btn-light-outline:hover {
    background: #ffffff;
    color: var(--rpi-thm-navy);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.privacy-action-btn.btn-gold {
    background: linear-gradient(135deg, #c9a84c 0%, #b38b30 100%);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(201, 168, 76, 0.35);
}

.privacy-action-btn.btn-gold:hover {
    background: linear-gradient(135deg, #d8b75b 0%, #c9a84c 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(201, 168, 76, 0.45);
    color: #ffffff;
}

/* 3. Main Content Section */
.privacy-main-section {
    background: var(--rpi-thm-gray-bg);
    padding: 60px 0 90px 0;
    position: relative;
}

/* 4. Sticky Sidebar (Desktop TOC) */
.privacy-sidebar-wrapper {
    position: sticky;
    top: 100px;
    margin-bottom: 30px;
}

.privacy-toc-card {
    background: #ffffff;
    border-radius: var(--rpi-thm-radius);
    border: 1px solid var(--rpi-thm-border);
    box-shadow: var(--rpi-thm-shadow);
    padding: 24px 20px;
    overflow: hidden;
}

.privacy-toc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.privacy-toc-header i {
    color: var(--rpi-thm-gold);
    font-size: 1.15rem;
}

.privacy-toc-header h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--rpi-thm-dark);
    margin: 0;
}

.privacy-toc-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - 380px);
    overflow-y: auto;
    padding-right: 4px;
}

/* Slim Scrollbar for TOC */
.privacy-toc-nav::-webkit-scrollbar {
    width: 4px;
}
.privacy-toc-nav::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}
.privacy-toc-nav::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.privacy-toc-nav::-webkit-scrollbar-thumb:hover {
    background: var(--rpi-thm-gold);
}

.privacy-toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--rpi-thm-muted);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}

.privacy-toc-link i {
    font-size: 0.8rem;
    color: #94a3b8;
    transition: color 0.25s ease;
    width: 14px;
    text-align: center;
}

.privacy-toc-link:hover {
    background: var(--rpi-thm-gold-soft);
    color: var(--rpi-thm-dark);
    border-left-color: var(--rpi-thm-gold);
}

.privacy-toc-link:hover i {
    color: var(--rpi-thm-gold);
}

.privacy-toc-link.active {
    background: var(--rpi-thm-gold-soft);
    color: #92400e;
    font-weight: 600;
    border-left-color: var(--rpi-thm-gold);
}

.privacy-toc-link.active i {
    color: var(--rpi-thm-gold);
}

/* Sidebar Grievance Box */
.privacy-sidebar-grievance {
    margin-top: 18px;
    padding: 20px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f1923 0%, #1a2838 100%);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(15, 25, 35, 0.12);
}

.privacy-sidebar-grievance h5 {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-sidebar-grievance h5 i {
    color: var(--rpi-thm-gold);
}

.privacy-sidebar-grievance p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 14px;
    line-height: 1.5;
}

.privacy-sidebar-contact-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.privacy-contact-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
}

.privacy-contact-pill i {
    color: var(--rpi-thm-gold);
    font-size: 0.85rem;
}

.privacy-contact-pill:hover {
    background: rgba(201, 168, 76, 0.2);
    border-color: rgba(201, 168, 76, 0.4);
    color: #ffffff;
    transform: translateX(4px);
}

/* 5. Mobile Horizontal Scroll Navigation */
.privacy-mobile-nav {
    display: none;
    position: sticky;
    top: 70px;
    z-index: 999;
    background: #ffffff;
    border-bottom: 1px solid var(--rpi-thm-border);
    padding: 10px 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.privacy-mobile-chips-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.privacy-mobile-chips-wrapper::-webkit-scrollbar {
    display: none;
}

.privacy-mobile-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: #f1f5f9;
    color: var(--rpi-thm-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.privacy-mobile-chip.active,
.privacy-mobile-chip:hover {
    background: var(--rpi-thm-navy);
    color: #ffffff;
}

.privacy-mobile-chip.active i,
.privacy-mobile-chip:hover i {
    color: var(--rpi-thm-gold);
}

/* 6. Legal Section Cards */
.privacy-card {
    background: #ffffff;
    border-radius: var(--rpi-thm-radius);
    border: 1px solid var(--rpi-thm-border);
    box-shadow: var(--rpi-thm-shadow);
    padding: 38px 36px;
    margin-bottom: 28px;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    scroll-margin-top: 100px;
    position: relative;
}

.privacy-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--rpi-thm-shadow-hover);
    border-color: rgba(201, 168, 76, 0.45);
}

.privacy-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 18px;
    margin-bottom: 24px;
    gap: 14px;
    flex-wrap: wrap;
}

.privacy-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.privacy-section-num {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f1923 0%, #1e293b 100%);
    color: var(--rpi-thm-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(15, 25, 35, 0.15);
}

.privacy-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--rpi-thm-dark);
    margin: 0;
    letter-spacing: -0.3px;
}

.privacy-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    background: var(--rpi-thm-gold-soft);
    color: #92400e;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(201, 168, 76, 0.25);
}

/* Card Body Typography */
.privacy-card-body p {
    color: var(--rpi-thm-text);
    font-size: 0.96rem;
    line-height: 1.78;
    margin-bottom: 16px;
}

.privacy-card-body h4 {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--rpi-thm-dark);
    margin: 26px 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-card-body h4::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--rpi-thm-gold);
    border-radius: 2px;
}

.privacy-card-body ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.privacy-card-body ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--rpi-thm-text);
    font-size: 0.95rem;
    line-height: 1.7;
}

.privacy-card-body ul li::before {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 4px;
    top: 2px;
    color: var(--rpi-thm-gold);
    font-size: 0.85rem;
}

/* Highlight Box */
.privacy-highlight-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--rpi-thm-navy);
    border-radius: 12px;
    padding: 20px 22px;
    margin: 20px 0;
}

.privacy-highlight-box.gold {
    background: var(--rpi-thm-gold-soft);
    border-color: rgba(201, 168, 76, 0.35);
    border-left-color: var(--rpi-thm-gold);
}

.privacy-highlight-box p:last-child {
    margin-bottom: 0;
}

/* 7. Definition Grid */
.privacy-def-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.privacy-def-card {
    background: #ffffff;
    border: 1px solid var(--rpi-thm-border);
    border-radius: 14px;
    padding: 18px 20px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.privacy-def-card:hover {
    border-color: var(--rpi-thm-gold);
    box-shadow: 0 8px 20px rgba(201, 168, 76, 0.12);
    transform: translateY(-2px);
}

.privacy-def-term {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--rpi-thm-navy);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-def-term i {
    color: var(--rpi-thm-gold);
    font-size: 0.85rem;
}

.privacy-def-desc {
    font-size: 0.88rem;
    color: var(--rpi-thm-muted);
    line-height: 1.62;
    margin: 0 !important;
}

/* 8. Cookie Cards Grid */
.privacy-cookie-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0;
}

.privacy-cookie-card {
    background: #ffffff;
    border: 1px solid var(--rpi-thm-border);
    border-left: 4px solid var(--rpi-thm-gold);
    border-radius: 12px;
    padding: 20px 22px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease;
}

.privacy-cookie-card:hover {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
    transform: translateX(4px);
}

.privacy-cookie-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.privacy-cookie-name {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--rpi-thm-navy);
    margin: 0;
}

.privacy-cookie-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 600;
}

/* 9. Data Use / Operational Purpose Grid */
.privacy-purpose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.privacy-purpose-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    transition: all 0.25s ease;
}

.privacy-purpose-card:hover {
    background: #ffffff;
    border-color: var(--rpi-thm-primary);
    box-shadow: 0 6px 18px rgba(235, 103, 83, 0.08);
    transform: translateY(-2px);
}

.privacy-purpose-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--rpi-thm-navy);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-purpose-title i {
    color: var(--rpi-thm-primary);
    font-size: 0.88rem;
}

.privacy-purpose-desc {
    font-size: 0.86rem;
    color: var(--rpi-thm-muted);
    line-height: 1.6;
    margin: 0 !important;
}

/* 10. Data Sharing Pills */
.privacy-sharing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.privacy-sharing-card {
    background: #ffffff;
    border: 1px solid var(--rpi-thm-border);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.privacy-sharing-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

/* 11. Official Contact Card */
.privacy-official-contact-card {
    background: linear-gradient(135deg, #0f1923 0%, #1e293b 100%);
    border-radius: var(--rpi-thm-radius);
    padding: 40px 36px;
    color: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 25, 35, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.privacy-official-contact-card::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.privacy-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.privacy-contact-channel-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 20px 22px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.privacy-contact-channel-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(201, 168, 76, 0.4);
    transform: translateY(-3px);
    color: #ffffff;
}

.privacy-channel-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(201, 168, 76, 0.2);
    color: #f7e7b4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.privacy-channel-title {
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
}

.privacy-channel-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    word-break: break-word;
}

/* 12. Toast Notification */
.privacy-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #0f1923;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--rpi-thm-gold);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 99999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: none;
}

.privacy-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* 13. Responsive Styles */
@media (max-width: 991px) {
    .privacy-hero-title {
        font-size: 2.3rem;
    }
    
    .privacy-sidebar-wrapper {
        display: none;
    }
    
    .privacy-mobile-nav {
        display: block;
    }
    
    .privacy-card {
        padding: 28px 24px;
    }
}

@media (max-width: 576px) {
    .privacy-hero-section {
        padding: 90px 0 50px 0;
    }
    
    .privacy-hero-title {
        font-size: 1.85rem;
    }
    
    .privacy-meta-badge {
        font-size: 0.78rem;
        padding: 5px 12px;
    }
    
    .privacy-card {
        padding: 22px 18px;
        border-radius: 12px;
    }
    
    .privacy-card-title {
        font-size: 1.15rem;
    }
    
    .privacy-section-num {
        width: 32px;
        height: 32px;
        font-size: 0.82rem;
    }
    
    .privacy-def-grid,
    .privacy-purpose-grid,
    .privacy-sharing-grid,
    .privacy-contact-grid {
        grid-template-columns: 1fr;
    }
}

/* 14. Print Optimization */
@media print {
    header,
    footer,
    .privacy-hero-section,
    .privacy-sidebar-wrapper,
    .privacy-mobile-nav,
    #privacyProgressBar,
    .privacy-toast,
    .btn,
    .privacy-hero-actions {
        display: none !important;
    }
    
    body, .privacy-main-section {
        background: #ffffff !important;
        padding: 0 !important;
    }
    
    .privacy-card {
        box-shadow: none !important;
        border: 1px solid #cccccc !important;
        page-break-inside: avoid;
        margin-bottom: 20px !important;
        padding: 20px !important;
    }
}
