/**
 * Policy Pages Stylesheet
 * Styles for Privacy Policy, Refund Policy, and Terms & Conditions pages
 * 
 * @package PriceWise Pro
 */

/* ==================== CUSTOMIZATION SETTINGS ==================== */
/* 
   ADJUST STICKY SIDEBAR POSITION:
   Change the value below to control how far from the top the sidebar sticks
   
   - 80px  = Closer to top (less space)
   - 100px = Balanced position
   - 120px = More space from top (default)
   - 140px = Further from top
   - 160px = Maximum space from top
*/
:root {
    --policy-sticky-top: 100px;           /* Adjust this value to move sidebar up/down */
    --policy-sticky-max-height: calc(100vh - 140px);  /* Auto-adjusts based on top position */
}

/* ==================== POLICY HERO SECTION ==================== */
.policy-hero {
    background: linear-gradient(135deg, #001429 0%, #0a1929 50%, #001429 100%);
    padding: 180px 20px 80px;  /* Increased top padding from 120px to 180px */
    position: relative;
    overflow: hidden;
}

.policy-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 102, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 102, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 163, 255, 0.08) 0%, transparent 40%);
    animation: backgroundPulse 15s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.policy-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(0, 102, 255, 0.4), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(2px 2px at 80% 10%, rgba(0, 163, 255, 0.3), transparent);
    background-size: 200% 200%;
    animation: particleFloat 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes particleFloat {
    0%, 100% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 100% 0%;
    }
    50% {
        background-position: 100% 100%, 0% 0%, 80% 20%, 20% 80%;
    }
}

.policy-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.policy-hero-content {
    text-align: center;
}

.policy-hero .section-label {
    display: inline-block;
    background: rgba(0, 102, 255, 0.2);
    color: #00A3FF;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 102, 255, 0.3);
}

.policy-hero-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
}

.policy-hero-title .gradient-text {
    background: linear-gradient(135deg, #00A3FF 0%, #0066FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.policy-hero-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* ==================== POLICY CONTENT SECTION ==================== */
.policy-content {
    background: #ffffff;
    padding: 80px 20px;
}

.policy-content-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
    align-items: start;
}

/* ==================== SIDEBAR NAVIGATION ==================== */
.policy-sidebar {
    position: sticky;
    top: 170px;
    max-height: var(--policy-sticky-max-height); 
    overflow: visible;
}

.policy-nav-sticky {
    background: linear-gradient(135deg, #F0F7FF 0%, #ffffff 100%);
    border: 1px solid rgba(0, 102, 255, 0.15);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.08);
}

.policy-nav-title {
    font-size: 14px;
    font-weight: 700;
    color: #0a1929;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(0, 102, 255, 0.2);
}

.policy-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.policy-nav-link {
    display: block;
    padding: 10px 16px;
    color: #4a5a6a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.policy-nav-link:hover {
    background: rgba(0, 102, 255, 0.08);
    color: #0066FF;
    transform: translateX(4px);
}

.policy-nav-link.active {
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: white;
    font-weight: 600;
}

/* ==================== MAIN CONTENT ==================== */
.policy-main {
    background: white;
}

.policy-section {
    margin-bottom: 60px;
    scroll-margin-top: 120px;
}

.policy-section:last-child {
    margin-bottom: 0;
}

.policy-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: #0a1929;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid #0066FF;
    position: relative;
}

.policy-section h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #00A3FF 0%, transparent 100%);
}

.policy-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a2d4e;
    margin-bottom: 12px;
}

.policy-section p {
    font-size: 16px;
    line-height: 1.8;
    color: #4a4a5e;
    margin-bottom: 20px;
}

.policy-section p:last-child {
    margin-bottom: 0;
}

.policy-section a {
    color: #0066FF;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.policy-section a:hover {
    color: #0052CC;
    text-decoration: underline;
}

/* ==================== POLICY CARDS ==================== */
.policy-card {
    background: linear-gradient(135deg, #F0F7FF 0%, #ffffff 100%);
    border: 1px solid rgba(0, 102, 255, 0.15);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.policy-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.12);
    border-color: rgba(0, 102, 255, 0.3);
}

.policy-card h3 {
    color: #0066FF;
    margin-bottom: 12px;
    font-size: 18px;
}

.policy-card p {
    margin-bottom: 12px;
}

.policy-card p:last-child {
    margin-bottom: 0;
}

.policy-card-warning {
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    border-color: rgba(239, 68, 68, 0.2);
}

.policy-card-warning h3 {
    color: #dc2626;
}

/* ==================== POLICY HIGHLIGHT BOX ==================== */
.policy-highlight {
    background: linear-gradient(135deg, #E6F2FF 0%, #F0F7FF 100%);
    border-left: 4px solid #0066FF;
    padding: 20px 24px;
    border-radius: 8px;
    margin: 24px 0;
}

.policy-highlight strong {
    color: #0066FF;
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
}

.policy-highlight p,
.policy-highlight ul {
    margin-bottom: 12px;
}

.policy-highlight p:last-child,
.policy-highlight ul:last-child {
    margin-bottom: 0;
}

/* ==================== POLICY LISTS ==================== */
.policy-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.policy-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    line-height: 1.8;
    color: #4a4a5e;
}

.policy-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #0066FF;
    font-weight: 700;
    font-size: 16px;
}

/* ==================== POLICY STEPS ==================== */
.policy-steps {
    margin: 32px 0;
}

.policy-step {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #F0F7FF 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 102, 255, 0.15);
    transition: all 0.3s ease;
}

.policy-step:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.12);
}

.policy-step:last-child {
    margin-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.step-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a2d4e;
    margin-bottom: 8px;
}

.step-content p {
    margin-bottom: 0;
    color: #4a4a5e;
}

/* ==================== POLICY CONTACT - SIMPLE & CLEAN ==================== */
.policy-contact-simple {
    background: #f8f9fa;
    border-left: 4px solid #0066FF;
    padding: 24px 32px;
    border-radius: 8px;
    margin-top: 24px;
}

.policy-contact-simple p {
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 1.6;
}

.policy-contact-simple p:last-child {
    margin-bottom: 0;
}

.policy-contact-simple strong {
    color: #1a2d4e;
    font-weight: 600;
    display: inline-block;
    min-width: 140px;
}

.policy-contact-simple a {
    color: #0066FF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.policy-contact-simple a:hover {
    color: #0052CC;
    text-decoration: underline;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1024px) {
    .policy-content-container {
        grid-template-columns: 240px 1fr;
        gap: 40px;
    }

    .policy-nav-link {
        font-size: 13px;
        padding: 8px 12px;
    }
}

@media (max-width: 768px) {
    .policy-hero {
        padding: 140px 20px 60px;  /* Increased from 100px to 140px */
    }

    .policy-hero-title {
        font-size: 36px;
    }

    .policy-content {
        padding: 60px 20px;
    }

    .policy-content-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .policy-sidebar {
        position: relative;
        top: 0;
        max-height: none;
        order: 2;
    }

    .policy-main {
        order: 1;
    }

    .policy-nav-sticky {
        padding: 20px;
    }

    .policy-section {
        margin-bottom: 50px;
    }

    .policy-section h2 {
        font-size: 28px;
    }

    .policy-step {
        flex-direction: column;
        gap: 16px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .policy-hero {
        padding: 120px 15px 50px;  /* Increased from 80px to 120px */
    }

    .policy-hero-title {
        font-size: 30px;
    }

    .policy-content {
        padding: 40px 15px;
    }

    .policy-section h2 {
        font-size: 24px;
    }

    .policy-card {
        padding: 20px;
    }

    .policy-highlight {
        padding: 16px 20px;
    }

    .policy-contact-card {
        padding: 24px;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.policy-section {
    animation: fadeInUp 0.6s ease-out;
}

.policy-card {
    animation: fadeInUp 0.6s ease-out;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .policy-hero {
        background: white;
        padding: 20px;
    }

    .policy-hero-title .gradient-text {
        -webkit-text-fill-color: #0066FF;
        color: #0066FF;
    }

    .policy-sidebar {
        display: none;
    }

    .policy-content-container {
        grid-template-columns: 1fr;
    }

    .policy-card,
    .policy-highlight {
        page-break-inside: avoid;
    }

    .policy-section {
        page-break-before: auto;
    }

    .policy-section h2 {
        page-break-after: avoid;
    }

    a {
        text-decoration: underline;
        color: #0066FF !important;
    }
}

/* ==================== ACCESSIBILITY ==================== */
.policy-nav-link:focus,
.policy-section a:focus {
    outline: 2px solid #0066FF;
    outline-offset: 2px;
}

/* ==================== SMOOTH SCROLLING ==================== */
html {
    scroll-behavior: smooth;
}

/* Hide scrollbars for policy sidebar */
.policy-sidebar,
.policy-nav-sticky,
.policy-nav,
.policy-nav-list {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.policy-sidebar::-webkit-scrollbar,
.policy-nav-sticky::-webkit-scrollbar,
.policy-nav::-webkit-scrollbar,
.policy-nav-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}