/**
 * Policy/Regulamin Page - Ultra Hyper Premium Design
 * Kontomistrz Theme
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
.policy {
    --policy-primary: #493EFB;
    --policy-secondary: #7C3AED;
    --policy-accent: #FFA135;
    --policy-gradient: linear-gradient(135deg, #493EFB 0%, #7C3AED 50%, #A855F7 100%);
    --policy-glass: rgba(255, 255, 255, 0.9);
    --policy-shadow: 0 25px 50px -12px rgba(73, 62, 251, 0.2);
    --policy-glow: 0 0 40px rgba(73, 62, 251, 0.15);
}

/* ============================================
   HERO SECTION - Ultra Premium Background
   ============================================ */
.policy {
    position: relative;
    padding-top: 60px !important;
    padding-bottom: 100px !important;
    background: linear-gradient(180deg, #F0F4FF 0%, #E8EEFF 30%, #FFFFFF 100%) !important;
    background-image: none !important;
    overflow: hidden;
}

/* Animated gradient orbs */
.policy::before {
    content: "";
    position: absolute;
    top: -150px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(73, 62, 251, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: policyOrb 18s ease-in-out infinite;
    pointer-events: none;
}

.policy::after {
    content: "";
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: policyOrb 15s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes policyOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 20px) scale(0.9); }
}

/* Floating decorative shapes */
.policy__body::before {
    content: "";
    position: absolute;
    top: 100px;
    left: -80px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(73, 62, 251, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
    border-radius: 12px;
    transform: rotate(20deg);
    animation: floatDecor 8s ease-in-out infinite;
}

.policy__body::after {
    content: "";
    position: absolute;
    bottom: 200px;
    right: -60px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(255, 161, 53, 0.12) 0%, rgba(251, 191, 36, 0.08) 100%);
    border-radius: 50%;
    animation: floatDecor 6s ease-in-out infinite reverse;
}

@keyframes floatDecor {
    0%, 100% { transform: translateY(0) rotate(20deg); }
    50% { transform: translateY(-25px) rotate(25deg); }
}

/* ============================================
   BODY CONTAINER
   ============================================ */
.policy__body {
    position: relative;
    z-index: 1;
    max-width: 900px !important;
}

/* ============================================
   TITLE - Ultra Premium
   ============================================ */
.policy__title {
    text-align: center;
    font-size: var(--text-5xl, 48px) !important;
    font-family: var(--font-heading, 'Manrope', sans-serif) !important;
    font-weight: var(--font-extrabold, 800) !important;
    background: var(--policy-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    position: relative;
    display: block;
    animation: titleFadeIn 0.8s ease-out;
    letter-spacing: -0.02em;
}

@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.policy__title::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--policy-gradient);
    border-radius: 4px;
    animation: lineExpand 1s ease-out 0.3s forwards;
    opacity: 0;
}

@keyframes lineExpand {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100px;
        opacity: 1;
    }
}

/* ============================================
   CONTENT WRAPPER - Glass Card
   ============================================ */
.policy__content {
    margin-top: 48px !important;
    background: var(--policy-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--policy-shadow),
                inset 0 1px 0 rgba(255, 255, 255, 0.9),
                0 0 0 1px rgba(73, 62, 251, 0.08);
    position: relative;
    overflow: hidden;
}

/* Gradient top line */
.policy__content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--policy-gradient);
    background-size: 200% 100%;
    animation: gradientSlide 5s ease infinite;
}

@keyframes gradientSlide {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Corner glow */
.policy__content::after {
    content: "";
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(73, 62, 251, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ============================================
   HEADINGS - Premium Styling
   ============================================ */
.policy__content h2 {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #1F2937 !important;
    margin: 40px 0 24px 0 !important;
    padding: 16px 20px 16px 56px !important;
    background: linear-gradient(135deg, #F8FAFF 0%, #EEF2FF 100%) !important;
    background-image: none !important;
    border-radius: 12px;
    border-left: 4px solid var(--policy-primary);
    position: relative;
    transition: all 0.3s ease;
}

.policy__content h2::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: var(--policy-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.policy__content h2::after {
    content: "§";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    z-index: 1;
}

.policy__content h2:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(73, 62, 251, 0.12);
}

.policy__content h3 {
    font-size: 24px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin: 32px 0 20px 0 !important;
    padding-left: 16px;
    border-left: 3px solid var(--policy-secondary);
    position: relative;
}

.policy__content h4 {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #4B5563 !important;
    margin: 28px 0 16px 0 !important;
}

.policy__content h5 {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #6B7280 !important;
    margin: 24px 0 14px 0 !important;
}

.policy__content h6 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #9CA3AF !important;
    margin: 20px 0 12px 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   PARAGRAPHS
   ============================================ */
.policy__content p {
    font-size: var(--text-base, 16px) !important;
    line-height: var(--leading-relaxed, 1.65) !important;
    color: var(--color-text-secondary, #4B5563) !important;
    margin: 0 0 16px 0 !important;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-weight: var(--font-normal, 400) !important;
}

.policy__content p:first-of-type {
    font-size: var(--text-lg, 18px) !important;
    color: var(--color-text-primary, #374151) !important;
}

/* Links in content */
.policy__content a {
    color: var(--policy-primary);
    font-weight: var(--font-normal, 400);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

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

/* ============================================
   TABLES - Premium Design
   ============================================ */
.policy__content .wp-block-table {
    margin: 32px 0;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(73, 62, 251, 0.08);
}

.policy__content .wp-block-table table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.policy__content .wp-block-table tbody tr {
    transition: all 0.3s ease;
}

.policy__content .wp-block-table tbody tr:nth-child(even) {
    background: linear-gradient(135deg, #F8FAFF 0%, #EEF2FF 100%) !important;
}

.policy__content .wp-block-table tbody tr:nth-child(odd) {
    background: #FFFFFF !important;
}

.policy__content .wp-block-table tbody tr:hover {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%) !important;
    transform: scale(1.005);
}

.policy__content .wp-block-table td {
    padding: 18px 24px !important;
    font-size: 15px !important;
    color: #374151 !important;
    border-color: rgba(73, 62, 251, 0.15) !important;
    vertical-align: middle;
}

.policy__content .wp-block-table td:first-child {
    font-weight: 600;
    color: #1F2937;
}

/* ============================================
   LISTS
   ============================================ */
.policy__content ul,
.policy__content ol {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-weight: var(--font-normal, 400);
}

.policy__content li {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-weight: var(--font-normal, 400);
    color: var(--color-text-secondary, #4B5563);
}

/* ============================================
   BLOCKQUOTES
   ============================================ */
.policy__content blockquote {
    margin: 32px 0;
    padding: 24px 28px;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-radius: 12px;
    border-left: 4px solid var(--policy-accent);
    position: relative;
}

.policy__content blockquote::before {
    content: """;
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 60px;
    font-family: Georgia, serif;
    color: rgba(255, 161, 53, 0.3);
    line-height: 1;
}

.policy__content blockquote p {
    color: #92400E !important;
    font-style: italic;
    margin: 0 !important;
}

/* ============================================
   CODE / PRE BLOCKS
   ============================================ */
.policy__content code {
    background: #F3F4F6;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: var(--policy-primary);
}

.policy__content pre {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    overflow-x: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.policy__content pre code {
    background: transparent;
    color: #E5E7EB;
    padding: 0;
}

/* ============================================
   HORIZONTAL RULE
   ============================================ */
.policy__content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--policy-primary), transparent);
    margin: 40px 0;
    opacity: 0.3;
}

/* ============================================
   IMAGES IN CONTENT
   ============================================ */
.policy__content img {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.policy__content img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(73, 62, 251, 0.15);
}

/* ============================================
   STRONG / BOLD TEXT
   ============================================ */
.policy__content strong {
    color: #1F2937;
    font-weight: 700;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .policy__title {
        font-size: 40px !important;
    }

    .policy__content {
        padding: 36px 28px;
        border-radius: 20px;
    }

    .policy__content h2 {
        font-size: 24px !important;
        padding: 14px 16px 14px 48px !important;
    }

    .policy__content h2::before,
    .policy__content h2::after {
        left: 12px;
        width: 24px;
        height: 24px;
    }

    .policy__content h2::after {
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .policy {
        padding-top: 40px !important;
        padding-bottom: 60px !important;
    }

    .policy__title {
        font-size: 32px !important;
    }

    .policy__content {
        padding: 24px 20px;
        border-radius: 16px;
        margin-top: 32px !important;
    }

    .policy__content h2 {
        font-size: 20px !important;
        padding: 12px 14px 12px 44px !important;
        margin: 28px 0 16px 0 !important;
    }

    .policy__content h3 {
        font-size: 18px !important;
    }

    .policy__content h4 {
        font-size: 16px !important;
    }

    .policy__content p {
        font-size: 15px !important;
    }

    .policy__content p:first-of-type {
        font-size: 16px !important;
    }

    .policy__content .wp-block-table td {
        padding: 12px 16px !important;
        font-size: 14px !important;
    }

    .policy__body::before,
    .policy__body::after {
        display: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .policy {
        background: #FFFFFF !important;
    }

    .policy::before,
    .policy::after,
    .policy__body::before,
    .policy__body::after {
        display: none !important;
    }

    .policy__content {
        box-shadow: none;
        border: 1px solid #E5E7EB;
    }

    .policy__title {
        -webkit-text-fill-color: #1F2937;
        color: #1F2937 !important;
    }
}
