/*
 * single.css — Gets Hint Theme
 * Edit this file for single-specific styles.
 */

/* --- Single Article Page --- */
.single-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.article-header {
    padding: 6.5rem 0 1.5rem;
}

/* Single-column layout for static pages (Terms, Contact, etc.) — full width */
.page-layout {
    max-width: var(--max-width);
    padding-bottom: 4rem;
}

.page-layout .editorial-content h2 {
    margin-top: 2.5rem;
}

/* Contact form styling */
.tdc-contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 560px;
    margin-top: 1.5rem;
}

.tdc-contact-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-family: var(--font-label);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tdc-contact-form input[type="text"],
.tdc-contact-form input[type="email"],
.tdc-contact-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--on-background);
    background: var(--surface-container-low);
    border: 1.5px solid var(--outline-variant);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.tdc-contact-form input:focus,
.tdc-contact-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 96, 0, 0.08);
}

.tdc-contact-form textarea {
    min-height: 160px;
    resize: vertical;
}

.tdc-contact-form button {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-family: var(--font-label);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--on-primary);
    background: var(--primary);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.tdc-contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 96, 0, 0.25);
}

[data-theme="dark"] .tdc-contact-form input[type="text"],
[data-theme="dark"] .tdc-contact-form input[type="email"],
[data-theme="dark"] .tdc-contact-form textarea {
    background: var(--surface-container);
    border-color: var(--outline-variant);
}

[data-theme="dark"] .tdc-contact-form input:focus,
[data-theme="dark"] .tdc-contact-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(216, 210, 74, 0.12);
}

/* Two-Column Layout */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
    align-items: start;
}

.article-layout__content {
    min-width: 0;
}

.article-layout__sidebar {
    position: sticky;
    top: 5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-ad {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.ad-placeholder {
    background: var(--surface-container-low);
    border: 2px dashed var(--outline-variant);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    color: var(--on-surface-variant);
    opacity: 0.4;
    font-family: var(--font-label);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Breadcrumb Bubble */
.article-header__breadcrumb {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    background: var(--secondary-container);
    color: var(--on-secondary-container);
    font-family: var(--font-label);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
    gap: 0;
    line-height: 1.5;
}

.article-header__breadcrumb a {
    color: var(--on-secondary-container);
    font-weight: 600;
    transition: opacity var(--transition);
    white-space: nowrap;
}

.article-header__breadcrumb a:hover {
    opacity: 0.7;
}

.article-header__breadcrumb .breadcrumb-sep {
    color: var(--on-secondary-container);
    opacity: 0.5;
    margin: 0 0.35rem;
    font-size: 0.7rem;
}

.article-header__breadcrumb .breadcrumb-current {
    color: var(--on-secondary-container);
    font-weight: 500;
    opacity: 0.7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.article-header h1 {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--on-background);
    margin-bottom: 0.75rem;
}

.article-header__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-label);
    font-size: 0.85rem;
    color: var(--on-surface-variant);
    opacity: 0.7;
}

.article-header__meta .article-card__date {
    font-size: 0.85rem;
    opacity: 1;
}

@media (max-width: 768px) {
    .article-header {
        padding-top: 5rem;
    }

    .article-header__breadcrumb .breadcrumb-current {
        max-width: 150px;
    }

    .article-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .article-layout__sidebar {
        position: static;
    }
}

/* Featured Image */
.article-featured-image {
    margin: 0 0 2rem;
}

.article-featured-image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.article-featured-image figcaption {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--on-surface-variant);
    opacity: 0.6;
    font-style: italic;
    font-weight: 300;
}

/* Editorial Content */
.editorial-content {
    padding: 0 0 2rem;
}

.editorial-content .lead {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--on-surface-variant);
    line-height: 1.75;
    margin-bottom: 2.5rem;
    padding-left: 1.5rem;
    border-left: 4px solid var(--primary-container);
}

.editorial-content p {
    margin-bottom: 0.9rem;
    line-height: 1.7;
    font-size: 1.0625rem;
    color: var(--on-surface);
}

.editorial-content h2 {
    font-family: var(--font-headline);
    font-weight: 650;
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    color: var(--on-background);
}

.editorial-content strong {
    font-weight: 800;
}

/* Links inside article body — blue like a standard hyperlink */
.editorial-content a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.3s ease;
}

[data-theme="dark"] .editorial-content a {
    color: #60a5fa;
}

/* Gradient Link Hover Effect (Global) */
a:not(.navbar-logo):not(.article-card a):not(.article-list__item):not(.next-article__card):not(.btn-icon):not(.navbar-search *):not(.tag):not(.pagination a):not(.daily-hints__card):not(.category-card) {
    position: relative;
    transition: color 0.3s ease;
    --link-x: 50%;
    --link-y: 50%;
}

/* Fallback: static gradient (no cursor / mobile) */
a:not(.navbar-logo):not(.article-card a):not(.article-list__item):not(.next-article__card):not(.btn-icon):not(.navbar-search *):not(.tag):not(.pagination a):not(.daily-hints__card):not(.category-card):hover {
    background: linear-gradient(135deg, #666000, #fdef03, #d8d24a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 2s ease infinite;
}

/* PC with cursor: radial gradient follows mouse */
a.has-cursor:not(.navbar-logo):not(.article-card a):not(.article-list__item):not(.next-article__card):not(.btn-icon):not(.navbar-search *):not(.tag):not(.pagination a):not(.daily-hints__card):not(.category-card):hover {
    background: radial-gradient(circle at var(--link-x) var(--link-y),
            #fef3a0 0%,
            #fdef03 40%,
            #d8d24a 70%,
            #666000 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: none;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

[data-theme="dark"] a:not(.navbar-logo):not(.article-card a):not(.article-list__item):not(.next-article__card):not(.btn-icon):not(.navbar-search *):not(.tag):not(.pagination a):not(.daily-hints__card):not(.category-card) {
    color: var(--primary);
}

[data-theme="dark"] a:not(.navbar-logo):not(.article-card a):not(.article-list__item):not(.next-article__card):not(.btn-icon):not(.navbar-search *):not(.tag):not(.pagination a):not(.daily-hints__card):not(.category-card):hover {
    background: linear-gradient(135deg, #d8d24a, #f5ef66, #fdef03);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 2s ease infinite;
}

[data-theme="dark"] a.has-cursor:not(.navbar-logo):not(.article-card a):not(.article-list__item):not(.next-article__card):not(.btn-icon):not(.navbar-search *):not(.tag):not(.pagination a):not(.daily-hints__card):not(.category-card):hover {
    background: radial-gradient(circle at var(--link-x) var(--link-y),
            #f5ef7a 0%,
            #f5ef66 40%,
            #d8d24a 70%,
            #9a9400 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: none;
}

.editorial-content code {
    background: var(--surface-container-high);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.88em;
    color: var(--primary);
}

.editorial-content pre {
    background: #1a1b1e;
    color: #efedf1;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 2rem 0;
    font-size: 0.9rem;
    line-height: 1.7;
}

.editorial-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.editorial-content ul,
.editorial-content ol,
.editorial-content ul.wp-block-list,
.editorial-content ol.wp-block-list {
    margin-bottom: 1.75rem;
    padding-left: 1.5rem !important;
}

.editorial-content ul,
.editorial-content ul.wp-block-list {
    list-style: disc !important;
}

.editorial-content ol,
.editorial-content ol.wp-block-list {
    list-style: decimal !important;
}

.editorial-content ul li,
.editorial-content ol li,
.editorial-content .wp-block-list li {
    list-style: inherit !important;
    display: list-item !important;
    margin-bottom: 0.75rem;
    font-size: 1.0625rem;
    line-height: 1.6;
}

.editorial-content .check-list {
    padding-left: 0;
}

.editorial-content .check-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1.0625rem;
    line-height: 1.6;
}

.check-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: var(--primary-container);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 3px;
}

.check-icon svg {
    width: 12px;
    height: 12px;
    fill: var(--on-primary-container);
}

/* --- Custom Tables (Gutenberg & HTML) --- */
.editorial-content table,
.editorial-content .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 1.5rem 0;
    font-size: 0.92rem;
    line-height: 1.45;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* Header row — dark gold with white text */
.editorial-content table thead th,
.editorial-content .wp-block-table table thead th,
.editorial-content table tr:first-child th,
.editorial-content .wp-block-table table tr:first-child th {
    background: var(--primary);
    color: #ffffff;
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.6rem 1rem;
    text-align: left;
    border-bottom: 2px solid var(--primary);
}

/* Body cells — compact padding */
.editorial-content table td,
.editorial-content .wp-block-table table td,
.editorial-content table tbody th,
.editorial-content .wp-block-table table tbody th {
    padding: 0.45rem 1rem;
    border: 1px solid var(--outline-variant);
    color: var(--on-background);
    vertical-align: top;
}

/* First column bold styling (like the "Tier" column) */
.editorial-content table td:first-child,
.editorial-content .wp-block-table table td:first-child {
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

/* Alternating row stripes */
.editorial-content table tbody tr:nth-child(even),
.editorial-content .wp-block-table table tbody tr:nth-child(even) {
    background: var(--surface-container-low);
}

.editorial-content table tbody tr:nth-child(odd),
.editorial-content .wp-block-table table tbody tr:nth-child(odd) {
    background: var(--surface);
}

/* Row hover effect */
.editorial-content table tbody tr:hover,
.editorial-content .wp-block-table table tbody tr:hover {
    background: rgba(255, 243, 79, 0.08);
}

/* === Dark mode === */
[data-theme="dark"] .editorial-content table,
[data-theme="dark"] .editorial-content .wp-block-table table {
    border-color: var(--primary);
}

[data-theme="dark"] .editorial-content table thead th,
[data-theme="dark"] .editorial-content .wp-block-table table thead th,
[data-theme="dark"] .editorial-content table tr:first-child th,
[data-theme="dark"] .editorial-content .wp-block-table table tr:first-child th {
    background: #4e4900;
    color: #ffffff;
    border-bottom-color: var(--primary);
}

[data-theme="dark"] .editorial-content table td,
[data-theme="dark"] .editorial-content .wp-block-table table td {
    border-color: var(--outline-variant);
}

[data-theme="dark"] .editorial-content table tbody tr:nth-child(even),
[data-theme="dark"] .editorial-content .wp-block-table table tbody tr:nth-child(even) {
    background: var(--surface-container);
}

[data-theme="dark"] .editorial-content table tbody tr:nth-child(odd),
[data-theme="dark"] .editorial-content .wp-block-table table tbody tr:nth-child(odd) {
    background: var(--surface);
}

[data-theme="dark"] .editorial-content table tbody tr:hover,
[data-theme="dark"] .editorial-content .wp-block-table table tbody tr:hover {
    background: rgba(216, 210, 74, 0.08);
}

/* Responsive: horizontal scroll on small screens */
.editorial-content .wp-block-table,
.editorial-content figure.wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* --- FAQ Accordion --- */
.tdc-faq {
    border: 1.5px solid var(--outline-variant);
    border-radius: var(--radius-xl);
    padding: 1.5rem 1.75rem;
    margin: 2rem 0;
    background: var(--surface);
}

.tdc-faq__title {
    font-family: var(--font-headline);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--on-background);
    margin: 0 0 1.25rem 0;
    letter-spacing: -0.01em;
}

.tdc-faq__item {
    border-top: 1.5px solid var(--outline-variant);
}

.tdc-faq__item:first-of-type {
    border-top: none;
}

.tdc-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 1rem 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: var(--on-background);
    line-height: 1.45;
    transition: color var(--transition);
}

.tdc-faq__question:hover {
    color: var(--primary);
}

/* Circle arrow icon */
.tdc-faq__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--on-surface-variant);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition), transform 0.3s ease;
}

.tdc-faq__icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: var(--on-surface-variant);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke var(--transition), transform 0.3s ease;
}

/* Open state — rotate arrow up */
.tdc-faq__item.is-open .tdc-faq__icon {
    border-color: var(--primary);
}

.tdc-faq__item.is-open .tdc-faq__icon svg {
    stroke: var(--primary);
    transform: rotate(180deg);
}

/* Answer panel — smooth height animation */
.tdc-faq__answer {
    overflow: hidden;
    height: 0;
    transition: height 0.3s ease;
}

.tdc-faq__answer-inner {
    padding: 0 0 1.1rem 0;
    font-size: 0.97rem;
    line-height: 1.65;
    color: var(--on-surface-variant);
    border-bottom: 1px solid var(--outline-variant);
    margin-bottom: 0.1rem;
}

/* Last item: no bottom border on open answer */
.tdc-faq__item:last-child .tdc-faq__answer-inner {
    border-bottom: none;
}

/* Dark mode */
[data-theme="dark"] .tdc-faq {
    background: var(--surface-container);
    border-color: var(--outline-variant);
}

[data-theme="dark"] .tdc-faq__item.is-open .tdc-faq__icon {
    border-color: var(--primary);
}

[data-theme="dark"] .tdc-faq__icon svg {
    stroke: var(--on-surface-variant);
}

[data-theme="dark"] .tdc-faq__item.is-open .tdc-faq__icon svg {
    stroke: var(--primary);
}

/* Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--outline-variant);
}

.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--surface-container-low);
    color: var(--on-surface-variant);
    font-size: 0.85rem;
    border-radius: var(--radius-full);
    transition: background var(--transition);
    cursor: default;
}

.tag:hover {
    background: rgba(255, 243, 79, 0.2);
}

/* Next Article Teaser */
.next-article {
    margin: 3rem 0 0;
}

.next-article__card {
    padding: 2rem;
    border-radius: var(--radius-xl);
    background: var(--surface-container-low);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition);
    display: block;
    text-decoration: none;
    color: inherit;
}

.next-article__card:hover {
    transform: translateY(-2px);
}

.next-article__label {
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.next-article__title {
    font-family: var(--font-headline);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--on-background);
    transition: color var(--transition);
}

.next-article__card:hover .next-article__title {
    color: var(--primary);
}

.next-article__icon {
    position: absolute;
    right: -8px;
    bottom: -8px;
    font-size: 6rem;
    opacity: 0.08;
    transition: opacity var(--transition);
    color: var(--on-surface-variant);
}

.next-article__card:hover .next-article__icon {
    opacity: 0.15;
}

