/**
 * KO4FUN Corporate Policy Pages
 * Version: 2026.1
 * Professional styling for Terms, Game Rules, Privacy & Refund pages
 * Dark theme matching site design
 */

/* ========================================
   Policy Page Base Styles
   ======================================== */

.policy-page {
    min-height: 100vh;
    background-color: #141416;
}

/* ========================================
   Navigation Tabs
   ======================================== */

.policy-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 25px 0;
    padding: 0 15px;
}

.policy-nav a {
    text-decoration: none;
    color: #ccc;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid #444;
    border-radius: 6px;
    background-color: #1d1d1d;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.policy-nav a:hover {
    color: #f8312f;
    border-color: #f8312f;
    background-color: #252525;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(248, 49, 47, 0.15);
}

.policy-nav a.active {
    background-color: #f8312f;
    color: #fff;
    border-color: #f8312f;
    box-shadow: 0 4px 12px rgba(248, 49, 47, 0.3);
}

.policy-nav a.active:hover {
    background-color: #d62a28;
    border-color: #d62a28;
    transform: translateY(-2px);
}

/* ========================================
   Main Container
   ======================================== */

.policy-container {
    font-family: 'Roboto', 'Open Sans', Arial, sans-serif;
    margin: 0 auto 40px;
    width: 90%;
    max-width: 1000px;
    background-color: #1d1d1d;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* ========================================
   Header Block
   ======================================== */

.policy-header {
    background: linear-gradient(135deg, #f8312f 0%, #31a2a6 100%);
    color: #fff;
    padding: 30px 40px;
    position: relative;
}

.policy-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.policy-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.policy-header .version-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

/* ========================================
   Content Area
   ======================================== */

.policy-content {
    padding: 40px;
    color: #ccc;
    line-height: 1.9;
    font-size: 15px;
}

/* Section Styling */
.policy-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #333;
}

.policy-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.policy-section h4 {
    color: #eee;
    font-family: 'Roboto Condensed', 'Roboto', Arial, sans-serif;
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 15px 0;
    padding-left: 15px;
    border-left: 4px solid #f8312f;
    letter-spacing: 0.5px;
}

.policy-section h4 .section-number {
    color: #f8312f;
    margin-right: 8px;
}

.policy-section p {
    margin: 0 0 12px 0;
    color: #bbb;
    font-size: 15px;
}

.policy-section p:last-child {
    margin-bottom: 0;
}

.policy-section ul,
.policy-section ol {
    margin: 12px 0;
    padding-left: 25px;
}

.policy-section li {
    margin-bottom: 8px;
    color: #bbb;
    font-size: 15px;
}

/* Highlighted box for important info */
.policy-highlight {
    background-color: rgba(49, 162, 166, 0.1);
    border-left: 4px solid #31a2a6;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.policy-highlight p {
    color: #ccc;
}

.policy-warning {
    background-color: rgba(255, 152, 0, 0.15);
    border-left: 4px solid #ff9800;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.policy-warning p {
    color: #e0c080;
}

.policy-danger {
    background-color: rgba(248, 49, 47, 0.15);
    border-left: 4px solid #f8312f;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.policy-danger p {
    color: #e0a0a0;
}

/* ========================================
   Footer
   ======================================== */

.policy-footer {
    background-color: #1a1a1a;
    padding: 25px 40px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.policy-footer .company-info {
    font-size: 14px;
    color: #999;
    font-weight: 500;
}

.policy-footer .last-updated {
    font-size: 13px;
    color: #777;
}

.policy-footer .last-updated strong {
    color: #999;
}

/* ========================================
   Table of Contents
   ======================================== */

.policy-toc {
    background-color: #252525;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 30px;
}

.policy-toc h5 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 700;
    color: #eee;
}

.policy-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.policy-toc li {
    margin-bottom: 8px;
}

.policy-toc a {
    color: #31a2a6;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.policy-toc a:hover {
    color: #f8312f;
    text-decoration: underline;
}

/* ========================================
   Links
   ======================================== */

.policy-content a {
    color: #31a2a6;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.policy-content a:hover {
    color: #f8312f;
    border-bottom-color: #f8312f;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 992px) {
    .policy-container {
        width: 95%;
    }

    .policy-content {
        padding: 30px;
    }

    .policy-header {
        padding: 25px 30px;
    }

    .policy-footer {
        padding: 20px 30px;
    }
}

@media (max-width: 768px) {
    .policy-nav {
        flex-direction: column;
        align-items: center;
    }

    .policy-nav a {
        width: 100%;
        max-width: 280px;
        text-align: center;
        padding: 14px 20px;
    }

    .policy-container {
        width: 100%;
        border-radius: 0;
        margin-bottom: 0;
    }

    .policy-header h1 {
        font-size: 22px;
    }

    .policy-content {
        padding: 25px 20px;
    }

    .policy-section h4 {
        font-size: 16px;
    }

    .policy-footer {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .policy-header {
        padding: 20px;
    }

    .policy-header h1 {
        font-size: 20px;
    }

    .policy-content {
        padding: 20px 15px;
    }

    .policy-section h4 {
        font-size: 15px;
        padding-left: 12px;
    }

    .policy-section p,
    .policy-section li {
        font-size: 14px;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .policy-page {
        background-color: #fff;
    }

    .policy-nav {
        display: none;
    }

    .policy-container {
        width: 100%;
        max-width: none;
        box-shadow: none;
        border-radius: 0;
        background-color: #fff;
    }

    .policy-header {
        background: #f8312f !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .policy-content {
        padding: 20px 0;
        color: #333;
    }

    .policy-section {
        page-break-inside: avoid;
    }

    .policy-section h4 {
        color: #1a1a1a;
    }

    .policy-section p,
    .policy-section li {
        color: #444;
    }

    .policy-footer {
        background-color: #f8f9fa !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .policy-footer .company-info,
    .policy-footer .last-updated {
        color: #666;
    }

    a {
        text-decoration: none;
    }

    a[href]::after {
        content: none;
    }
}

/* ========================================
   Language Toggle Support
   ======================================== */

.lang-content {
    display: block;
}

.lang-content.hidden {
    display: none;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.policy-container {
    animation: fadeIn 0.4s ease-out;
}

/* ========================================
   Penalty Table (for Game Rules)
   ======================================== */

.penalty-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 14px;
}

.penalty-table th,
.penalty-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.penalty-table th {
    background-color: #2a2a2a;
    font-weight: 600;
    color: #eee;
}

.penalty-table td {
    color: #bbb;
}

.penalty-table tr:hover {
    background-color: #2a2a2a;
}

.penalty-table .severity-low {
    color: #4caf50;
    font-weight: 600;
}

.penalty-table .severity-medium {
    color: #ff9800;
    font-weight: 600;
}

.penalty-table .severity-high {
    color: #f44336;
    font-weight: 600;
}

.penalty-table .severity-allowed {
    color: #4caf50;
    font-weight: 600;
}

/* ========================================
   FAQ Section (for Game Rules)
   ======================================== */

.faq-item {
    background-color: #252525;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 12px;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item .faq-q {
    color: #eee;
    font-size: 15px;
    margin: 0 0 8px 0;
}

.faq-item .faq-a {
    color: #bbb;
    font-size: 14px;
    margin: 0;
    padding-left: 20px;
    border-left: 3px solid #31a2a6;
}

/* Sub-headings in sections */
.policy-section h5 {
    color: #ddd;
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 12px 0;
    padding-left: 10px;
    border-left: 3px solid #31a2a6;
}

/* Responsive penalty table */
@media (max-width: 768px) {
    .penalty-table {
        font-size: 13px;
    }

    .penalty-table th,
    .penalty-table td {
        padding: 10px 12px;
    }

    .faq-item {
        padding: 12px 15px;
    }

    .faq-item .faq-q,
    .faq-item .faq-a {
        font-size: 13px;
    }
}
