/* ============================================
   KENES FOOD — STATIC PAGES (Privacy, T&C, About)
   Professional, structured, consistent with brand
   ============================================ */

/* ===== PAGE HERO / BANNER ===== */
.static-page-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
    padding: 56px 0 48px;
}

.static-page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(var(--primary-rgb, 255, 99, 71), 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(var(--primary-rgb, 255, 99, 71), 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.static-page-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb, 255, 99, 71), 0.3), transparent);
}

.static-page-hero .container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Breadcrumb */
.static-page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    list-style: none;
    padding: 0;
    font-size: 13px;
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-weight: 500;
}

.static-page-breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.static-page-breadcrumb a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.static-page-breadcrumb a:hover {
    color: var(--primary, #ff6347);
}

.static-page-breadcrumb .breadcrumb-separator {
    color: rgba(255, 255, 255, 0.25);
    font-size: 10px;
    user-select: none;
}

.static-page-breadcrumb .breadcrumb-current {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* Hero Content */
.static-page-hero-content {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.static-page-hero-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary, #ff6347), rgba(var(--primary-rgb, 255, 99, 71), 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(var(--primary-rgb, 255, 99, 71), 0.25);
}

.static-page-hero-icon svg {
    width: 28px;
    height: 28px;
    color: #fff;
}

.static-page-hero-text {
    flex: 1;
}

.static-page-hero-title {
    font-family: var(--font-heading, 'Barlow', sans-serif);
    font-weight: 800;
    font-size: 32px;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.static-page-hero-subtitle {
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 15px;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 16px;
    line-height: 1.5;
    font-weight: 400;
}

/* Meta info (last updated, reading time) */
.static-page-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.static-page-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.static-page-meta-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* ===== MAIN BODY LAYOUT ===== */
.static-page-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px 56px;
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

/* ===== TABLE OF CONTENTS (TOC) ===== */
.static-page-toc-wrapper {
    flex-shrink: 0;
    width: 240px;
    position: sticky;
    top: 100px;
}

.static-page-toc {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    font-family: var(--font-primary, 'Inter', sans-serif);
}

.static-page-toc-title {
    font-family: var(--font-heading, 'Barlow', sans-serif);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #999;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

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

.static-page-toc-list li {
    margin-bottom: 2px;
}

.static-page-toc-list a {
    display: block;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.static-page-toc-list a:hover {
    color: var(--primary, #ff6347);
    background: rgba(var(--primary-rgb, 255, 99, 71), 0.04);
}

.static-page-toc-list a.active {
    color: var(--primary, #ff6347);
    background: rgba(var(--primary-rgb, 255, 99, 71), 0.06);
    border-left-color: var(--primary, #ff6347);
    font-weight: 600;
}

.static-page-toc-list .toc-h3 {
    padding-left: 22px;
    font-size: 12px;
}

/* Hidden state when no headings */
.static-page-toc-wrapper.hidden {
    display: none;
}

/* ===== CONTENT AREA ===== */
.static-page-content {
    flex: 1;
    min-width: 0;
}

.static-page-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.03);
    border: 1px solid #f5f5f5;
    padding: 36px 40px;
    overflow: hidden;
}

/* ===== RICH CONTENT TYPOGRAPHY ===== */
.static-page-rich-content {
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 14.5px;
    line-height: 1.65;
    color: #374151;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Headings */
.static-page-rich-content h1 {
    font-family: var(--font-heading, 'Barlow', sans-serif);
    font-weight: 800;
    font-size: 24px;
    color: #111;
    margin: 24px 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

.static-page-rich-content h1:first-child {
    margin-top: 0;
}

.static-page-rich-content h2 {
    font-family: var(--font-heading, 'Barlow', sans-serif);
    font-weight: 700;
    font-size: 18px;
    color: #1a1a1a;
    margin: 22px 0 8px;
    padding-left: 12px;
    border-left: 3px solid var(--primary, #ff6347);
    line-height: 1.35;
    letter-spacing: 0.2px;
    scroll-margin-top: 100px;
}

.static-page-rich-content h2:first-child {
    margin-top: 0;
}

.static-page-rich-content h3 {
    font-family: var(--font-heading, 'Barlow', sans-serif);
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin: 18px 0 6px;
    line-height: 1.4;
    scroll-margin-top: 100px;
}

.static-page-rich-content h4 {
    font-family: var(--font-heading, 'Barlow', sans-serif);
    font-weight: 600;
    font-size: 15px;
    color: #444;
    margin: 14px 0 6px;
    line-height: 1.4;
}

/* Paragraphs */
.static-page-rich-content p {
    margin-bottom: 10px;
    color: #374151;
}

.static-page-rich-content p:last-child {
    margin-bottom: 0;
}

/* Collapse empty paragraphs from WYSIWYG editors */
.static-page-rich-content p:empty,
.static-page-rich-content p br:only-child {
    display: block;
}
.static-page-rich-content p:empty {
    margin: 0;
    padding: 0;
    line-height: 0;
    font-size: 0;
    height: 6px;
}
/* Paragraphs with only <br> inside */
.static-page-rich-content p:has(> br:only-child) {
    margin: 0;
    padding: 0;
    height: 6px;
    line-height: 0;
    font-size: 0;
}

/* Links */
.static-page-rich-content a {
    color: var(--primary, #ff6347);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(var(--primary-rgb, 255, 99, 71), 0.3);
    transition: all 0.2s ease;
}

.static-page-rich-content a:hover {
    color: var(--primary, #ff6347);
    text-decoration-color: var(--primary, #ff6347);
}

/* Lists */
.static-page-rich-content ul,
.static-page-rich-content ol {
    padding-left: 24px;
    margin-bottom: 10px;
}

.static-page-rich-content ul {
    list-style: none;
    padding-left: 0;
}

.static-page-rich-content ul > li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 4px;
}

.static-page-rich-content ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary, #ff6347);
    opacity: 0.6;
}

.static-page-rich-content ol > li {
    margin-bottom: 4px;
    padding-left: 4px;
}

.static-page-rich-content ol > li::marker {
    color: var(--primary, #ff6347);
    font-weight: 600;
}

/* Nested lists */
.static-page-rich-content ul ul,
.static-page-rich-content ol ol,
.static-page-rich-content ul ol,
.static-page-rich-content ol ul {
    margin-top: 4px;
    margin-bottom: 4px;
}

/* Blockquote */
.static-page-rich-content blockquote {
    margin: 14px 0;
    padding: 12px 16px;
    border-left: 4px solid var(--primary, #ff6347);
    background: rgba(var(--primary-rgb, 255, 99, 71), 0.03);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}

.static-page-rich-content blockquote p {
    margin-bottom: 0;
}

/* Strong & emphasis */
.static-page-rich-content strong,
.static-page-rich-content b {
    font-weight: 600;
    color: #1a1a1a;
}

.static-page-rich-content em,
.static-page-rich-content i {
    color: #555;
}

/* Tables */
.static-page-rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.static-page-rich-content th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid #e5e7eb;
}

.static-page-rich-content td {
    padding: 10px 16px;
    border-bottom: 1px solid #f3f4f6;
    color: #4b5563;
}

.static-page-rich-content tr:last-child td {
    border-bottom: none;
}

.static-page-rich-content tr:hover td {
    background: #fafbfc;
}

/* Images in content */
.static-page-rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

/* Horizontal rule */
.static-page-rich-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
    margin: 18px 0;
}

/* Code */
.static-page-rich-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--primary, #ff6347);
}

.static-page-rich-content pre {
    background: #1a1a1a;
    color: #e5e7eb;
    padding: 16px 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 13px;
    line-height: 1.6;
}

.static-page-rich-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ===== SECTION DIVIDERS ===== */
.static-page-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0 20%, #e0e0e0 80%, transparent);
    margin: 32px 0;
    border: none;
}

/* ===== BACK NAVIGATION ===== */
.static-page-back {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.static-page-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.static-page-back-link:hover {
    color: var(--primary, #ff6347);
    background: rgba(var(--primary-rgb, 255, 99, 71), 0.05);
    transform: translateX(-4px);
}

.static-page-back-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.25s ease;
}

.static-page-back-link:hover svg {
    transform: translateX(-3px);
}

/* ===== EMPTY STATE ===== */
.static-page-empty {
    text-align: center;
    padding: 72px 24px;
}

.static-page-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.static-page-empty-icon svg {
    width: 36px;
    height: 36px;
    color: #ccc;
}

.static-page-empty-title {
    font-family: var(--font-heading, 'Barlow', sans-serif);
    font-weight: 700;
    font-size: 18px;
    color: #999;
    margin: 0 0 8px;
}

.static-page-empty-desc {
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 14px;
    color: #bbb;
    margin: 0;
}

/* ===== FADE IN ANIMATION ===== */
.static-page-fade-in {
    opacity: 0;
    transform: translateY(12px);
    animation: staticPageFadeIn 0.5s ease forwards;
}

.static-page-fade-in-delay {
    animation-delay: 0.15s;
}

@keyframes staticPageFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 1024px) {
    .static-page-body {
        gap: 28px;
    }

    .static-page-toc-wrapper {
        width: 200px;
    }

    .static-page-card {
        padding: 28px 32px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .static-page-hero {
        padding: 36px 0 32px;
    }

    .static-page-hero-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .static-page-hero-icon svg {
        width: 22px;
        height: 22px;
    }

    .static-page-hero-title {
        font-size: 24px;
    }

    .static-page-hero-subtitle {
        font-size: 13px;
    }

    .static-page-meta {
        gap: 12px;
    }

    .static-page-meta-item {
        font-size: 11px;
    }

    /* Stack layout: hide TOC sidebar, go single column */
    .static-page-body {
        flex-direction: column;
        padding: 24px 16px 60px;
        gap: 0;
    }

    .static-page-toc-wrapper {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }

    .static-page-toc {
        padding: 16px;
    }

    .static-page-toc-list a {
        padding: 5px 8px;
        font-size: 12px;
    }

    .static-page-card {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .static-page-rich-content {
        font-size: 13.5px;
        line-height: 1.6;
    }

    .static-page-rich-content h1 {
        font-size: 20px;
        margin: 18px 0 8px;
    }

    .static-page-rich-content h2 {
        font-size: 16px;
        margin: 18px 0 6px;
        padding-left: 10px;
    }

    .static-page-rich-content h3 {
        font-size: 15px;
        margin: 14px 0 4px;
    }

    .static-page-rich-content h4 {
        font-size: 15px;
    }

    .static-page-rich-content p {
        margin-bottom: 8px;
    }

    .static-page-rich-content table {
        font-size: 13px;
    }

    .static-page-rich-content th,
    .static-page-rich-content td {
        padding: 8px 10px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .static-page-hero {
        padding: 28px 0 24px;
    }

    .static-page-hero .container {
        padding: 0 16px;
    }

    .static-page-hero-content {
        gap: 16px;
    }

    .static-page-hero-icon {
        width: 40px;
        height: 40px;
    }

    .static-page-hero-icon svg {
        width: 20px;
        height: 20px;
    }

    .static-page-hero-title {
        font-size: 21px;
    }

    .static-page-card {
        padding: 20px 16px;
    }

    .static-page-breadcrumb {
        font-size: 12px;
        margin-bottom: 14px;
    }
}

/* ===== PRINT ===== */
@media print {
    .static-page-hero {
        background: none !important;
        color: #000 !important;
        padding: 20px 0;
    }

    .static-page-hero-title {
        color: #000 !important;
    }

    .static-page-hero-subtitle,
    .static-page-breadcrumb,
    .static-page-meta,
    .static-page-hero-icon {
        display: none !important;
    }

    .static-page-toc-wrapper {
        display: none !important;
    }

    .static-page-body {
        display: block;
        padding: 0;
    }

    .static-page-card {
        box-shadow: none !important;
        border: none !important;
        padding: 0;
    }

    .static-page-back {
        display: none !important;
    }
}

/* ===== SMOOTH SCROLL ===== */
html {
    scroll-behavior: smooth;
}

/* ===== QUILL EDITOR CLEANUP ===== */
/* Clean up any Quill editor artifacts in the rich content */
.static-page-rich-content .ql-editor {
    padding: 0 !important;
    overflow: visible !important;
}

.static-page-rich-content .ql-toolbar {
    display: none !important;
}

.static-page-rich-content .ql-container {
    border: none !important;
    font-size: inherit !important;
    font-family: inherit !important;
}

.static-page-rich-content .ql-editor p,
.static-page-rich-content .ql-editor h1,
.static-page-rich-content .ql-editor h2,
.static-page-rich-content .ql-editor h3,
.static-page-rich-content .ql-editor h4,
.static-page-rich-content .ql-editor ul,
.static-page-rich-content .ql-editor ol {
    font-family: inherit;
}
