/* =================================================
   POLICY PAGES - RESPONSIVE STYLESHEET
   For Privacy & Policy and Terms & Conditions pages
   ================================================= */

/* CSS Variables */
:root {
    --primary-red: #c8191e;
    --primary-black: #1a1a1a;
    --accent-red: #a01216;
    --primary-beige: #f5e6d3;
    --text-dark: #333;
    --text-medium: #666;
    --text-light: #999;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --transition-speed: 0.3s;
}

/* =================================================
   GLOBAL STYLES
   ================================================= */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* =================================================
   HEADER BANNER SECTION
   ================================================= */

.policy-header-banner {
    position: relative;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--accent-red) 100%);
    padding: 8rem 0 5rem;
    margin-top: 60px;
    overflow: hidden;
}

.policy-header-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,149.3C960,160,1056,160,1152,138.7C1248,117,1344,75,1392,53.3L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom center;
    background-size: cover;
    opacity: 0.3;
}

.policy-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.policy-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.policy-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--bg-white);
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.policy-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
}

/* =================================================
   MAIN CONTENT LAYOUT
   ================================================= */

.policy-content-section {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.policy-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* =================================================
   TABLE OF CONTENTS SIDEBAR
   ================================================= */

.policy-toc {
    position: relative;
}

.toc-sticky {
    position: sticky;
    top: 100px;
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.toc-sticky::-webkit-scrollbar {
    width: 6px;
}

.toc-sticky::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 10px;
}

.toc-sticky::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 10px;
}

.toc-sticky::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}

.toc-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-red);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-list a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-medium);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.toc-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-red);
    transform: scaleY(0);
    transition: transform var(--transition-speed);
}

.toc-list a:hover,
.toc-list a.active {
    background-color: rgba(200, 25, 30, 0.08);
    color: var(--primary-red);
    transform: translateX(5px);
}

.toc-list a:hover::before,
.toc-list a.active::before {
    transform: scaleY(1);
}

/* =================================================
   POLICY MAIN CONTENT
   ================================================= */

.policy-main {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* =================================================
   POLICY SECTIONS
   ================================================= */

.policy-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

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

.section-heading {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    line-height: 1.3;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--accent-red) 100%);
    color: var(--bg-white);
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(200, 25, 30, 0.3);
}

.policy-section h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 600;
    color: var(--primary-red);
    margin: 2rem 0 1rem;
    line-height: 1.4;
}

.policy-section p {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
}

.policy-section p:last-child {
    margin-bottom: 0;
}

.policy-section a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed);
    border-bottom: 1px solid transparent;
}

.policy-section a:hover {
    color: var(--accent-red);
    border-bottom-color: var(--accent-red);
}

/* =================================================
   POLICY LISTS
   ================================================= */

.policy-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.policy-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.7;
    color: var(--text-dark);
}

.policy-list li::before {
    content: '■';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-red);
    font-size: 0.75rem;
    line-height: 1.7;
}

.policy-list li strong {
    color: var(--primary-black);
    font-weight: 600;
}

/* =================================================
   HIGHLIGHT BOXES
   ================================================= */

.policy-highlight {
    background: linear-gradient(135deg, #fff9f0 0%, #ffe8cc 100%);
    border-left: 5px solid var(--primary-beige);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
}

.policy-highlight p {
    margin-bottom: 0.8rem;
    color: var(--text-medium);
    font-size: clamp(1rem, 1.5vw, 1.0625rem);
}

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

.policy-highlight strong {
    color: var(--primary-red);
    font-weight: 600;
}

/* =================================================
   CONTACT CARDS
   ================================================= */

.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.contact-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all var(--transition-speed);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-red);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--accent-red) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--bg-white);
    box-shadow: 0 4px 12px rgba(200, 25, 30, 0.3);
}

.contact-icon svg {
    width: 28px;
    height: 28px;
}

.contact-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 0.75rem;
}

.contact-card p {
    font-size: 1rem;
    color: var(--text-medium);
    margin: 0;
}

.contact-card a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-speed);
}

.contact-card a:hover {
    color: var(--accent-red);
    text-decoration: underline;
}
/* =================================================
   RTL SUPPORT
   ================================================= */

html[dir="rtl"] .policy-wrapper {
    grid-template-columns: 1fr 280px;
}

html[dir="rtl"] .policy-toc {
    order: 2;
}

html[dir="rtl"] .policy-main {
    order: 1;
}

html[dir="rtl"] .policy-main,
html[dir="rtl"] .policy-toc,
html[dir="rtl"] .policy-section,
html[dir="rtl"] .toc-title {
    text-align: right;
}

html[dir="rtl"] .toc-list a::before {
    left: auto;
    right: 0;
}

html[dir="rtl"] .toc-list a:hover,
html[dir="rtl"] .toc-list a.active {
    transform: translateX(-5px);
}

html[dir="rtl"] .section-heading,
html[dir="rtl"] .section-title {
    flex-direction: row-reverse;
}

html[dir="rtl"] .policy-list li {
    padding-left: 0;
    padding-right: 2rem;
}

html[dir="rtl"] .policy-list li::before {
    left: auto;
    right: 0;
}

html[dir="rtl"] .policy-highlight {
    border-left: none;
    border-right: 5px solid var(--primary-beige);
}

/* =================================================
   RESPONSIVE - TABLET (768px - 1023px)
   ================================================= */

@media (max-width: 1023px) {
    .policy-header-banner {
        padding: 6rem 0 4rem;
        margin-top: 50px;
    }

    .policy-content-section {
        padding: 3rem 0;
    }

    .policy-wrapper {
        grid-template-columns: 240px 1fr;
        gap: 2rem;
        padding: 0 1.5rem;
    }

    .toc-sticky {
        padding: 1.5rem 1rem;
        top: 80px;
    }

    .policy-main {
        padding: 2.5rem;
    }

    .contact-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* =================================================
   RESPONSIVE - MOBILE (< 768px)
   ================================================= */

@media (max-width: 767px) {
    .policy-header-banner {
        padding: 5rem 0 3rem;
        margin-top: 60px;
    }

    .policy-title {
        font-size: 2rem;
    }

    .policy-subtitle {
        font-size: 1rem;
    }

    .policy-content-section {
        padding: 2rem 0;
    }

    .policy-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    /* Table of Contents - Mobile Toggle */
    .policy-toc {
        order: -1;
    }

    .toc-sticky {
        position: relative;
        top: 0;
        padding: 1.5rem;
        max-height: none;
    }

    .toc-title {
        font-size: 1.125rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        cursor: pointer;
        position: relative;
    }

    .toc-title::after {
        content: '▼';
        position: absolute;
        right: 0;
        top: 0;
        font-size: 0.875rem;
        color: var(--primary-red);
        transition: transform var(--transition-speed);
    }

    html[dir="rtl"] .toc-title::after {
        right: auto;
        left: 0;
    }

    .toc-sticky.collapsed .toc-title::after {
        transform: rotate(-90deg);
    }

    .toc-sticky.collapsed .toc-list {
        display: none;
    }

    .toc-list a {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }

    /* Main Content */
    .policy-main {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .policy-section {
        margin-bottom: 3rem;
        scroll-margin-top: 80px;
    }

    .section-heading {
        font-size: 1.5rem;
        gap: 0.75rem;
    }

    .section-number {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        border-radius: 10px;
    }

    .policy-section h3 {
        font-size: 1.25rem;
        margin: 1.5rem 0 0.75rem;
    }

    .policy-section p {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 1rem;
    }

    .policy-list li {
        padding-left: 1.5rem;
        margin-bottom: 0.875rem;
        font-size: 1rem;
    }

    html[dir="rtl"] .policy-list li {
        padding-left: 0;
        padding-right: 1.5rem;
    }

    .policy-highlight {
        padding: 1.5rem;
        margin: 1.5rem 0;
        border-radius: 10px;
    }

    .policy-highlight p {
        font-size: 0.9375rem;
    }

    /* Contact Cards */
    .contact-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1.5rem 0;
    }

    .contact-card {
        padding: 1.5rem;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }

    .contact-icon svg {
        width: 24px;
        height: 24px;
    }

    .contact-card h4 {
        font-size: 1.125rem;
    }

    .contact-card p {
        font-size: 0.9375rem;
    }
}

/* =================================================
   RESPONSIVE - EXTRA SMALL MOBILE (< 480px)
   ================================================= */

@media (max-width: 479px) {
    .policy-header-banner {
        padding: 4rem 0 2.5rem;
    }

    .policy-title {
        font-size: 1.75rem;
    }

    .policy-subtitle {
        font-size: 0.9375rem;
    }

    .policy-wrapper {
        padding: 0 0.75rem;
    }

    .policy-main {
        padding: 1.5rem 1rem;
    }

    .section-heading {
        font-size: 1.375rem;
        gap: 0.625rem;
    }

    .section-number {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }

    .policy-section h3 {
        font-size: 1.125rem;
    }

    .toc-sticky {
        padding: 1.25rem;
    }

    .contact-card {
        padding: 1.25rem;
    }
}

/* =================================================
   PRINT STYLES
   ================================================= */

@media print {
    .policy-header-banner {
        background: none;
        padding: 2rem 0 1rem;
        margin-top: 0;
    }

    .policy-header-overlay,
    .policy-header-banner::before {
        display: none;
    }

    .policy-title {
        color: var(--primary-black);
        text-shadow: none;
    }

    .policy-subtitle {
        color: var(--text-medium);
        text-shadow: none;
    }

    .policy-toc {
        display: none;
    }

    .policy-wrapper {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .policy-main {
        box-shadow: none;
        border: none;
        padding: 1rem 0;
    }

    .section-number {
        box-shadow: none;
    }

    .contact-card {
        break-inside: avoid;
    }
}

/* =================================================
   ACCESSIBILITY
   ================================================= */

/* Focus Styles */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary-red);
    outline-offset: 2px;
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .policy-header-banner {
        background: var(--primary-black);
    }

    .section-number {
        border: 2px solid var(--bg-white);
    }

    .toc-list a {
        border: 1px solid var(--border-color);
    }

    .contact-card {
        border-width: 3px;
    }
}