/**
 * _policy-page.css
 * HunAviation — Cookie & Privacy Policy Pages
 *
 * Design tokens: Inherits from css_shared.css (:root)
 * Naming: BEM (Block__Element--Modifier)
 * Scope: .policy-page (body class) + legacy .policy-content selectors
 *
 * @depends css_shared.css  (--primary-blue, --secondary-gold, fonts, shadows)
 * @affects cerez-politikasi.html, en/cookie-policy.html
 */

/* ─────────────────────────────────────────
   0. PAGE-ENTRY CLOUD KEYFRAMES
   Mirrors page-loader.css gathering/dispersing lifecycle.
   Content "sweeps in through the clouds."
   ───────────────────────────────────────── */

@keyframes policy-sweep-in {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
        filter: blur(6px);
    }

    60% {
        opacity: 1;
        filter: blur(0);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes policy-cloud-left {
    0% {
        transform: translateX(-60px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes policy-cloud-right {
    0% {
        transform: translateX(60px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes policy-fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes policy-shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes policy-gold-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.15);
    }
}

/* ─────────────────────────────────────────
   1. GLOBAL PAGE OVERRIDE
   Overrides html,body { background-color: #001529; } in shared.css
   ───────────────────────────────────────── */

body.policy-page {
    background: linear-gradient(180deg, #f4f7fb 0%, #e2e8f0 100%);
    color: var(--dark-gray, #1f2937);
    min-height: 100vh;
}

/* Ensure navbar always has background on policy pages */
body.policy-page .navbar {
    background: var(--primary-blue-dark);
}

/* ─────────────────────────────────────────
   2. POLICY PAGE — HERO BANNER
   .policy-hero  (Block)
   ───────────────────────────────────────── */

.policy-hero {
    position: relative;
    min-height: 38vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    background:
        linear-gradient(160deg, var(--primary-blue-dark) 0%, var(--primary-blue) 55%, #0a2a50 100%);
    padding: calc(var(--header-height, 80px) + 3rem) 1.5rem 3.5rem;
}

/* Subtle star-field / altitude texture */
.policy-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, .18) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 20%, rgba(255, 255, 255, .12) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 70%, rgba(255, 255, 255, .10) 0%, transparent 100%),
        radial-gradient(1px 1px at 40% 80%, rgba(255, 255, 255, .08) 0%, transparent 100%);
    pointer-events: none;
}

/* Gold horizon line */
.policy-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--secondary-gold) 30%,
            var(--secondary-gold-light) 50%,
            var(--secondary-gold) 70%,
            transparent 100%);
}

.policy-hero__container {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: policy-sweep-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.policy-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 9999px;
    padding: 0.35rem 1rem;
    font-family: var(--font-primary, 'Rajdhani', sans-serif);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--secondary-gold-light, #e6c966);
    margin-bottom: 1.25rem;
    animation: policy-cloud-left 0.6s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.policy-hero__badge i {
    font-size: 0.75rem;
}

.policy-hero__title {
    font-family: var(--font-primary, 'Rajdhani', sans-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: policy-sweep-in 0.9s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}


.policy-hero__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    animation: policy-cloud-right 0.6s 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.policy-hero__meta i {
    color: var(--secondary-gold);
    font-size: 0.75rem;
}

/* ─────────────────────────────────────────
   2. POLICY LAYOUT WRAPPER
   .policy-layout  (Block)
   ───────────────────────────────────────── */

.policy-layout {
    max-width: 860px;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

/* ─────────────────────────────────────────
   3. GLASSMORPHISM SECTIONS
   .policy-section  (Block)
   Each <h2> block wraps into a glass card via JS (or manually)
   ───────────────────────────────────────── */

.policy-section {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 16px;
    padding: 2rem 2.25rem;
    margin-bottom: 1.75rem;
    box-shadow:
        0 4px 24px rgba(0, 31, 63, 0.06),
        0 1px 4px rgba(0, 31, 63, 0.04);
    position: relative;
    overflow: hidden;
    animation: policy-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

@supports (backdrop-filter: blur(12px)) {
    .policy-section {
        background: rgba(255, 255, 255, 0.58);
        backdrop-filter: blur(12px) saturate(160%);
        -webkit-backdrop-filter: blur(12px) saturate(160%);
    }
}

.policy-section:hover {
    box-shadow:
        0 8px 36px rgba(0, 31, 63, 0.10),
        0 2px 8px rgba(212, 175, 55, 0.08);
    transform: translateY(-2px);
}

/* Section number accent strip */
.policy-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--secondary-gold) 0%, transparent 100%);
    border-radius: 16px 0 0 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.policy-section:hover::before {
    opacity: 1;
}

/* Staggered animation delays for sections 1-8 */
.policy-section:nth-child(1) {
    animation-delay: 0.10s;
}

.policy-section:nth-child(2) {
    animation-delay: 0.18s;
}

.policy-section:nth-child(3) {
    animation-delay: 0.26s;
}

.policy-section:nth-child(4) {
    animation-delay: 0.34s;
}

.policy-section:nth-child(5) {
    animation-delay: 0.42s;
}

.policy-section:nth-child(6) {
    animation-delay: 0.50s;
}

.policy-section:nth-child(7) {
    animation-delay: 0.58s;
}

.policy-section:nth-child(8) {
    animation-delay: 0.66s;
}

/* ─────────────────────────────────────────
   4. TYPOGRAPHY INSIDE POLICY PAGES
   Override the inlined styles in the HTML
   ───────────────────────────────────────── */

.policy-content h1 {
    font-family: var(--font-primary, 'Rajdhani', sans-serif);
    font-size: clamp(1.875rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--primary-blue);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    animation: policy-sweep-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.policy-content .last-updated {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--gray-500, #6b7280);
    font-size: 0.82rem;
    margin-bottom: 2.5rem;
    padding: 0.3rem 0.9rem;
    background: var(--light-gray, #f3f4f6);
    border-radius: 9999px;
    animation: policy-cloud-left 0.5s 0.15s both;
}

.policy-content h2 {
    font-family: var(--font-primary, 'Rajdhani', sans-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    position: relative;
}

/* Animated underline reveal */
.policy-content h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-gold), transparent);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.policy-section:hover .policy-content h2::after,
.policy-section:nth-child(n) h2::after {
    width: 60%;
}

.policy-content h3 {
    font-family: var(--font-primary, 'Rajdhani', sans-serif);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.policy-content h3::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary-gold);
    flex-shrink: 0;
}

.policy-content p {
    color: var(--gray-600, #4b5563);
    line-height: 1.85;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.policy-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.policy-content ul li {
    position: relative;
    padding: 0.5rem 0.75rem 0.5rem 1.75rem;
    color: var(--gray-600, #4b5563);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.6rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.policy-content ul li:hover {
    background: rgba(212, 175, 55, 0.06);
}

.policy-content ul li::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 1.05rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--secondary-gold);
}

.policy-content a {
    color: var(--primary-blue);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
    font-weight: 500;
}

.policy-content a:hover {
    color: var(--secondary-gold-dark, #b8941f);
    border-bottom-color: var(--secondary-gold);
}

/* ─────────────────────────────────────────
   5. COOKIE TABLE — RESPONSIVE
   .cookie-table  (Block)
   ───────────────────────────────────────── */

.cookie-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 31, 63, 0.08);
    font-size: 0.875rem;
}

.cookie-table thead {
    background: var(--primary-blue);
    color: #fff;
}

.cookie-table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-family: var(--font-primary, 'Rajdhani', sans-serif);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--secondary-gold);
    white-space: nowrap;
}

.cookie-table th:first-child {
    border-radius: 12px 0 0 0;
}

.cookie-table th:last-child {
    border-radius: 0 12px 0 0;
}

.cookie-table td {
    padding: 0.75rem 1rem;
    color: var(--gray-600, #4b5563);
    border-bottom: 1px solid rgba(0, 31, 63, 0.07);
    vertical-align: middle;
    transition: background 0.2s ease;
}

.cookie-table tbody tr:last-child td {
    border-bottom: none;
}

.cookie-table tbody tr:hover td {
    background: rgba(212, 175, 55, 0.06);
}

/* Cookie name — monospace badge */
.cookie-table td:first-child {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-blue);
    background: rgba(0, 31, 63, 0.04);
}

/* Duration badge */
.cookie-table td:last-child {
    white-space: nowrap;
    font-weight: 600;
    color: var(--gray-600);
}

/* ── Mobile: block-style table ── */
@media (max-width: 640px) {

    .cookie-table,
    .cookie-table thead,
    .cookie-table tbody,
    .cookie-table th,
    .cookie-table td,
    .cookie-table tr {
        display: block;
    }

    .cookie-table thead {
        display: none;
        /* hide column headers on mobile */
    }

    .cookie-table tbody tr {
        background: rgba(255, 255, 255, 0.8);
        border: 1px solid rgba(0, 31, 63, 0.1);
        border-radius: 10px;
        margin-bottom: 0.75rem;
        padding: 0.75rem;
        box-shadow: 0 2px 8px rgba(0, 31, 63, 0.05);
    }

    .cookie-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        padding: 0.45rem 0.25rem;
        border-bottom: 1px solid rgba(0, 31, 63, 0.06);
        font-size: 0.85rem;
        background: transparent;
    }

    .cookie-table td:last-child {
        border-bottom: none;
    }

    /* Data-label pseudo-header on mobile */
    .cookie-table td::before {
        content: attr(data-label);
        font-family: var(--font-primary, 'Rajdhani', sans-serif);
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--primary-blue);
        min-width: 80px;
        flex-shrink: 0;
    }
}

/* ─────────────────────────────────────────
   6. BROWSER GRID
   .browser-list  (Block)
   .browser-item  (Element)
   ───────────────────────────────────────── */

.browser-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.browser-item {
    background: rgba(0, 31, 63, 0.04);
    border: 1px solid rgba(0, 31, 63, 0.09);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.browser-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(212, 175, 55, 0.08) 0%,
            transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.browser-item:hover {
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 31, 63, 0.10);
    animation: policy-gold-pulse 1.5s ease infinite;
}

.browser-item:hover::before {
    opacity: 1;
}

.browser-item h4 {
    font-family: var(--font-primary, 'Rajdhani', sans-serif);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    position: relative;
}

.browser-item a {
    font-size: 0.82rem;
    color: var(--secondary-gold-dark, #b8941f);
    font-weight: 500;
    position: relative;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.browser-item a::after {
    content: '→';
    font-size: 0.75rem;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s, transform 0.2s;
}

.browser-item a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* ─────────────────────────────────────────
   7. CONTACT BOX (Glassmorphism card)
   .contact-box  (Block)
   ───────────────────────────────────────── */

.contact-box {
    position: relative;
    background: linear-gradient(135deg,
            var(--primary-blue) 0%,
            var(--primary-blue-dark) 100%);
    border-radius: 16px;
    padding: 2rem 2.25rem;
    margin-top: 2rem;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(0, 31, 63, 0.25);
}

/* Decorative cockpit-glow */
.contact-box::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

/* Gold accent strip */
.contact-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            var(--secondary-gold) 0%,
            var(--secondary-gold-light) 50%,
            var(--secondary-gold) 100%);
}

.contact-box h4 {
    font-family: var(--font-primary, 'Rajdhani', sans-serif);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    position: relative;
}

.contact-box p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    position: relative;
}

.contact-box p:last-child {
    margin-bottom: 0;
}

.contact-box strong {
    color: rgba(255, 255, 255, 0.95);
}

.contact-box a {
    color: var(--secondary-gold-light);
    border-bottom-color: transparent;
    font-weight: 600;
    transition: color 0.2s ease;
    position: relative;
}

.contact-box a:hover {
    color: #ffffff;
    border-bottom: none;
}

/* ─────────────────────────────────────────
   8. LEGACY .policy-content OVERRIDES
   Target the existing HTML without class changes
   ───────────────────────────────────────── */

/* Wrap page in subtle gradient background */
.policy-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

/* ─────────────────────────────────────────
   9. RESPONSIVE
   ───────────────────────────────────────── */

@media (max-width: 768px) {
    .policy-hero {
        min-height: 30vh;
        padding-bottom: 2.5rem;
    }

    .policy-section {
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
    }

    .policy-content {
        padding: 2.5rem 1rem 4rem;
    }

    .contact-box {
        padding: 1.5rem 1.25rem;
    }

    .browser-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .browser-list {
        grid-template-columns: 1fr;
    }

    .policy-hero__title {
        font-size: 1.75rem;
    }
}

/* ─────────────────────────────────────────
   10. REDUCED MOTION — accessibility
   ───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {

    .policy-hero__container,
    .policy-hero__badge,
    .policy-hero__title,
    .policy-hero__meta,
    .policy-section,
    .policy-content h1,
    .policy-content .last-updated {
        animation: none;
        opacity: 1;
        transform: none;
        filter: none;
    }

    .browser-item:hover,
    .policy-section:hover {
        transform: none;
    }
}