/* --- My Diary Help Center --- */

:root {
    /* Paleta prevzata z /assets/css/style.css, aby FAQ sedelo s hlavnou strankou.
       Nazvy --md-* su ponechane, menia sa len hodnoty. */
    --md-accent: #e15c8a;        /* style.css --brand */
    --md-accent-dark: #c94873;   /* style.css --brand-strong */
    --md-accent-soft: #ffe4ec;   /* style.css --brand-soft */
    --md-text: #241e38;          /* style.css --ink */
    --md-text-muted: #5c5570;    /* style.css --ink-soft */
    --md-text-light: #8b8399;    /* style.css --muted */
    --md-heading: #241e38;       /* style.css --ink */
    --md-bg: #fff8f6;            /* style.css --bg */
    --md-bg-tint: #ffeef1;       /* style.css --bg-tint */
    --md-white: #ffffff;         /* style.css --surface */
    --md-surface-2: #fdf2ef;     /* style.css --surface-2 */
    --md-border: #f2e4e0;        /* style.css --border */
    --md-border-soft: #f2e4e0;   /* style.css --border */
    --md-radius: 16px;           /* style.css --radius */
    --md-shadow: 0 1px 2px rgba(36, 30, 56, .06), 0 2px 8px rgba(36, 30, 56, .04);      /* --shadow-sm */
    --md-shadow-lg: 0 4px 12px rgba(36, 30, 56, .07), 0 12px 32px rgba(36, 30, 56, .06); /* --shadow-md */
    --md-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--md-font);
    color: var(--md-text);
    line-height: 1.7;
    background: var(--md-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--md-accent-dark);
}

a:hover {
    color: var(--md-accent);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Hero --- */
/* Svetly hero ako na hlavnej stranke: podklad --bg + radialny --bg-tint zaziar. */
.faq-hero {
    position: relative;
    overflow: hidden;
    background: var(--md-bg);
    color: var(--md-heading);
    text-align: center;
    padding: 72px 0 56px;
}

.faq-hero::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -180px;
    width: 900px;
    height: 620px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, var(--md-bg-tint) 0%, transparent 66%);
    pointer-events: none;
}

.faq-hero .container {
    position: relative;
    z-index: 1;
}

.faq-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
}

.faq-hero p {
    font-size: 1.05rem;
    color: var(--md-text-muted);
    max-width: 560px;
    margin: 0 auto 32px;
}

.faq-hero .faq-home-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--md-text-light);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
}

.faq-hero .faq-home-link:hover {
    color: var(--md-accent-dark);
}

/* --- Search --- */
.faq-search-container {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
}

.faq-search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border-radius: 999px;
    border: 1px solid var(--md-border);
    background: var(--md-white);
    color: var(--md-heading);
    box-shadow: var(--md-shadow);
    font-family: inherit;
    font-size: 1rem;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-search-input::placeholder {
    color: var(--md-text-light);
}

.faq-search-input:focus {
    outline: none;
    border-color: var(--md-accent);
    background: var(--md-white);
    box-shadow: 0 0 0 4px rgba(225, 92, 138, .15);
}

.faq-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--md-text-light);
    pointer-events: none;
    display: flex;
}

/* --- Content --- */
.faq-content {
    padding: 56px 0 72px;
    min-height: 520px;
}

.faq-landing {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.faq-category-card {
    background: var(--md-white);
    border: 1px solid var(--md-border-soft);
    border-radius: var(--md-radius);
    padding: 24px;
    box-shadow: var(--md-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.faq-category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--md-shadow-lg);
    border-color: var(--md-accent);
}

.faq-category-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: -4px 0 16px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--md-border-soft);
}

.faq-category-asset {
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    object-fit: contain;
}

.faq-category-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--md-heading);
    margin: 0;
}

.faq-category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-category-link {
    color: var(--md-text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    line-height: 1.45;
    padding: 2px 0;
    transition: color 0.15s ease, padding-left 0.15s ease;
}

.faq-category-link:hover {
    color: var(--md-accent);
    padding-left: 4px;
}

.faq-placeholder {
    text-align: center;
    padding: 48px 24px;
    color: var(--md-text-muted);
}

.faq-placeholder h3 {
    color: var(--md-heading);
    margin: 0 0 6px;
}

.faq-empty-asset {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 12px;
}

/* --- Article view --- */
.faq-article-view {
    display: none;
}

.faq-actions {
    margin-bottom: 24px;
}

.faq-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--md-text-muted);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.faq-back-link:hover {
    color: var(--md-accent);
}

.faq-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

.faq-sidebar {
    position: sticky;
    top: 24px;
    background: var(--md-white);
    border: 1px solid var(--md-border-soft);
    border-radius: var(--md-radius);
    box-shadow: var(--md-shadow);
    padding: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.faq-sidebar h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--md-text-light);
    margin: 24px 0 10px;
}

.faq-sidebar h3:first-child {
    margin-top: 0;
}

.faq-menu-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.faq-link {
    display: block;
    padding: 7px 10px;
    color: var(--md-text-muted);
    border-radius: 8px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.faq-link:hover {
    background: var(--md-surface-2);
    color: var(--md-heading);
}

.faq-link.active {
    background: var(--md-accent-soft);
    color: var(--md-accent-dark);
    font-weight: 600;
}

.faq-main {
    background: var(--md-white);
    border: 1px solid var(--md-border-soft);
    border-radius: var(--md-radius);
    box-shadow: var(--md-shadow);
    padding: 40px;
    min-height: 420px;
}

.faq-article-heading {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--md-border-soft);
}

.faq-article-asset {
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    object-fit: contain;
}

.faq-article h2 {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--md-heading);
    margin: 0;
}

.faq-article-content {
    font-size: 1rem;
    color: var(--md-text-muted);
}

.faq-article-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--md-heading);
    margin: 32px 0 12px;
}

.faq-article-content p {
    margin: 0 0 16px;
}

.faq-article-content ul,
.faq-article-content ol {
    margin: 0 0 20px;
    padding-left: 22px;
}

.faq-article-content li {
    margin-bottom: 8px;
}

.faq-article-content a {
    color: var(--md-accent);
    font-weight: 500;
}

.faq-article-content mark {
    background: var(--md-accent-soft);
    color: inherit;
    padding: 0 3px;
    border-radius: 3px;
}

.faq-article-content hr {
    border: 0;
    border-top: 1px solid var(--md-border);
    margin: 32px 0;
}

.faq-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--md-border);
    box-shadow: var(--md-shadow);
    margin: 24px 0;
}

/* --- Still need help --- */
.faq-help {
    margin-top: 40px;
    background: var(--md-white);
    border: 1px solid var(--md-border-soft);
    border-radius: var(--md-radius);
    box-shadow: var(--md-shadow);
    padding: 28px;
    text-align: center;
}

.faq-help h3 {
    margin: 0 0 6px;
    color: var(--md-heading);
    font-size: 1.15rem;
}

.faq-help p {
    margin: 0;
    color: var(--md-text-muted);
    font-size: 0.95rem;
}

/* --- Footer --- */
.faq-footer {
    border-top: 1px solid var(--md-border);
    padding: 24px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--md-text-light);
}

.faq-footer a {
    color: var(--md-text-muted);
    text-decoration: none;
    margin: 0 8px;
}

.faq-footer a:hover {
    color: var(--md-accent);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .faq-landing { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .faq-hero {
        padding: 48px 0 40px;
    }

    .faq-hero h1 {
        font-size: 1.85rem;
    }

    .faq-landing,
    .faq-layout {
        grid-template-columns: 1fr;
    }

    .faq-sidebar {
        display: none;
    }

    .faq-main {
        padding: 24px;
    }

    .faq-article-heading {
        align-items: flex-start;
        gap: 12px;
    }

    .faq-article-asset {
        width: 56px;
        height: 56px;
    }

    .faq-article h2 {
        font-size: 1.45rem;
    }
}

@media (max-width: 560px) {
    .faq-category-asset {
        width: 56px;
        height: 56px;
    }
}
