/* ── Section Titles ───────────────────────── */
.section-title {
    font-size: clamp(1.3rem, 2vw, 1.5rem);
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--color-brand);
}

.section-subtitle {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-3);
}

.card-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.card-title-link:hover {
    color: var(--color-brand-strong);
}

.card-title-link:focus-visible {
    border-radius: var(--radius-sm);
    outline: 3px solid var(--color-focus);
    outline-offset: 3px;
}

section.content-section {
    padding: clamp(40px, 5vw, 56px) 0;
    scroll-margin-top: calc(var(--navbar-height, 60px) + 16px);
}

section.content-section:nth-child(even) {
    background: var(--color-surface);
}

/* Alternating section gradient backgrounds */
.bg-surface-subtle {
    background: var(--color-surface-subtle) !important;
}

section.content-section:nth-child(odd) {
    background: var(--color-surface);
}

/* Scroll-triggered fade-in for sections */
.section-animate {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease-out, transform 0.4s var(--transition-smooth);
}

.section-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Tool Card ────────────────────────────── */
.tool-card {
    background: var(--color-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 14px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-brand);
    opacity: 0.35;
    transition: opacity 0.35s;
}

.tool-card:hover {
    background: var(--color-surface-subtle);
    border-color: var(--color-brand-border);
    box-shadow: none;
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card .tool-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--gradient-card);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-2);
    font-size: 1.35rem;
    color: var(--color-brand);
    transition: transform 0.3s var(--transition-smooth);
}

.tool-card:hover .tool-logo {
    transform: none;
}

.tool-card .tool-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.tool-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.tool-card h3 a {
    color: var(--color-text);
}

.tool-card h3 a:hover {
    color: var(--color-brand-strong);
}

.tool-card p {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    flex: 1;
    margin-bottom: var(--space-2);
}

.tool-card .tool-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--color-border);
    padding-top: 14px;
}

.tool-card .views {
    font-size: var(--font-size-caption);
    color: var(--color-text-muted);
}

.tool-rating-summary {
    align-items: center;
    color: var(--color-text-secondary);
    display: inline-flex;
    font-size: var(--font-size-caption);
    gap: var(--space-0-5);
    white-space: nowrap;
}

.tool-rating-summary i {
    color: var(--color-warning);
}

.tool-rating-summary strong {
    color: var(--color-text);
}

/* ── Prompt Card ──────────────────────────── */
.prompt-card {
    background: var(--color-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 14px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    height: 100%;
    position: relative;
}

.prompt-card:hover {
    background: var(--color-surface-subtle);
    border-color: var(--color-brand-border);
    box-shadow: none;
    transform: none;
}

.prompt-card .prompt-tool {
    display: inline-block;
    font-size: var(--font-size-caption);
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--color-accent-vivid-soft);
    color: var(--color-accent);
    margin-bottom: 12px;
}

.prompt-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    margin-bottom: 12px;
}

.prompt-metadata span {
    align-items: center;
    background: var(--color-surface-muted);
    border-radius: var(--radius-pill);
    color: var(--color-text-secondary);
    display: inline-flex;
    font-size: var(--font-size-caption);
    gap: 5px;
    line-height: 1.35;
    max-width: 100%;
    padding: 4px 10px;
}

.prompt-metadata .prompt-purpose {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prompt-metadata--detail {
    margin: 0 0 var(--space-2);
}

.prompt-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.prompt-card h3 a {
    color: var(--color-text);
}

.prompt-card .prompt-text {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    background: var(--color-surface-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 14px;
    font-family: 'Courier New', monospace;
    max-height: 100px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.prompt-preview {
    background: var(--color-surface-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    overflow: hidden;
    position: relative;
}

.prompt-preview::after {
    background: linear-gradient(to bottom, transparent, var(--color-surface-subtle));
    bottom: 37px;
    content: '';
    height: 34px;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
}

.prompt-preview__text {
    color: var(--color-text-secondary);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    max-height: 104px;
    overflow: hidden;
    padding: 14px;
    white-space: pre-wrap;
}

.prompt-preview__detail {
    align-items: center;
    background: var(--color-surface-subtle);
    border-top: 1px solid var(--color-border);
    display: flex;
    font-size: var(--font-size-caption);
    font-weight: 700;
    gap: 5px;
    justify-content: flex-end;
    min-height: 38px;
    padding: 6px 12px;
    position: relative;
    text-decoration: underline;
    text-underline-offset: 2px;
    z-index: 1;
}

.prompt-card .prompt-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-copy {
    background: var(--color-brand-action);
    color: var(--color-on-brand);
    border: none;
    padding: 7px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
}

.btn-copy:hover {
    background: var(--color-brand-action-hover);
    transform: scale(1.03);
}

.btn-copy.copied {
    background: var(--color-success-action);
}

.copy-count {
    font-size: var(--font-size-caption);
    color: var(--color-text-muted);
}

/* ── Dictionary ───────────────────────────── */
.letter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 30px;
    justify-content: center;
}

.letter-nav a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    transition: all 0.2s;
}

.letter-nav a:hover,
.letter-nav a.active {
    background: var(--color-brand-action);
    color: var(--color-on-brand);
    border-color: var(--color-brand);
}

.term-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: var(--space-2);
    transition: all 0.2s;
}

.term-card:hover {
    border-color: var(--color-brand);
}

.term-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-brand-strong);
    margin-bottom: var(--space-1);
}

.term-card p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin: 0;
}

/* ── Badges ───────────────────────────────── */
.badge-free {
    background: var(--color-success-border-soft);
    color: var(--color-success);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-caption);
    font-weight: 600;
}

.badge-freemium {
    background: var(--color-warning-soft-strong);
    color: var(--color-warning);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-caption);
    font-weight: 600;
}

.badge-paid {
    background: var(--color-danger-soft-strong);
    color: var(--color-danger);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-caption);
    font-weight: 600;
}

.badge-tag {
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-caption);
    font-weight: 500;
    border: 1px solid var(--color-brand-border-soft);
    transition: all 0.2s;
}

.badge-tag:hover {
    background: var(--color-brand-border);
    color: var(--color-brand-strong);
}

/* ── Buttons ──────────────────────────────── */
.btn-yz {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.875rem;
    font-weight: 600;
    gap: var(--space-1);
    justify-content: center;
    min-height: 40px;
    padding: 0.5rem 1.125rem;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s, transform 0.2s;
}

.btn-yz--primary {
    background: var(--gradient-brand);
    box-shadow: var(--shadow-brand);
    color: var(--color-on-brand);
}

.btn-yz--primary:hover,
.btn-yz--primary:focus-visible {
    transform: translateY(-2px);
    color: var(--color-on-brand);
    box-shadow: var(--shadow-brand);
}

.btn-yz--secondary,
.btn-yz--neutral {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

.btn-yz--secondary:hover,
.btn-yz--secondary:focus-visible,
.btn-yz--secondary.active {
    background: var(--color-brand-soft);
    border-color: var(--color-border-strong);
    color: var(--color-brand-strong);
}

.btn-yz--neutral:hover,
.btn-yz--neutral:focus-visible {
    background: var(--color-surface-muted);
    color: var(--color-text);
}

.btn-yz--danger {
    background: var(--color-danger-action);
    color: var(--color-on-brand);
}

.btn-yz--danger:hover,
.btn-yz--danger:focus-visible {
    background: var(--color-danger-action-hover);
    color: var(--color-on-brand);
}

.btn-yz--soft {
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
}

.btn-yz--soft:hover,
.btn-yz--soft:focus-visible {
    background: var(--color-brand-soft-strong);
    color: var(--color-brand-strong);
}

.btn-yz--icon {
    border-radius: var(--radius-md);
    flex: 0 0 40px;
    padding: 0;
    width: 40px;
}

.btn-yz--block {
    width: 100%;
}

.btn-yz:disabled,
.btn-yz[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.62;
    pointer-events: none;
    transform: none;
}

/* ── Filter Bar (Dropdown Style) ──────────── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    align-items: center;
    margin-bottom: var(--space-3);
}

.filter-bar-sticky {
    /* wrapper for sticky bottom behavior on mobile */
}

.tool-filter-bar {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-2);
}

.tool-filter-label {
    align-items: center;
    color: var(--color-text);
    display: inline-flex;
    font-size: var(--font-size-caption);
    font-weight: 700;
    gap: 6px;
    margin-right: var(--space-1);
}

.tool-filter-count {
    align-items: center;
    background: var(--color-brand-action);
    border-radius: var(--radius-pill);
    color: var(--color-on-brand);
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 700;
    height: 22px;
    justify-content: center;
    min-width: 22px;
    padding: 0 6px;
}

.tool-filter-clear {
    align-items: center;
    display: inline-flex;
    font-size: var(--font-size-caption);
    gap: 6px;
    margin-left: auto;
    min-height: 44px;
    padding: 0 var(--space-1);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tool-results-summary {
    align-items: center;
    color: var(--color-text-secondary);
    display: flex;
    flex-wrap: wrap;
    font-size: var(--font-size-caption);
    gap: var(--space-1) var(--space-2);
    margin: 0 0 var(--space-3);
}

.tool-results-summary strong {
    color: var(--color-text);
}

.tool-results-summary span + span {
    border-left: 1px solid var(--color-border);
    padding-left: var(--space-2);
}

.tool-filter-mobile-bar {
    display: none;
}

.tool-filter-sheet {
    background: var(--color-surface);
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    color: var(--color-text);
    margin: auto;
    max-width: 560px;
    padding: 0;
    width: calc(100% - var(--space-4));
}

.tool-filter-sheet::backdrop {
    background: var(--color-backdrop-strong);
}

.tool-filter-sheet__form {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-3);
}

.tool-filter-sheet__header {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
}

.tool-filter-sheet__header h2 {
    font-size: var(--font-size-title-sm);
    margin: 0;
}

.tool-filter-sheet__header p {
    color: var(--color-text-muted);
    font-size: var(--font-size-caption);
    margin: var(--space-0-5) 0 0;
}

.tool-filter-fieldset {
    border: 0;
    display: grid;
    gap: var(--space-1);
    margin: 0;
    padding: 0;
}

.tool-filter-fieldset legend {
    font-size: var(--font-size-body);
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.tool-filter-fieldset label {
    align-items: center;
    background: var(--color-surface-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    gap: var(--space-1);
    min-height: 44px;
    padding: 8px 12px;
}

.tool-filter-fieldset label:has(input:checked) {
    background: var(--color-brand-soft);
    border-color: var(--color-brand);
    color: var(--color-brand-strong);
    font-weight: 600;
}

.tool-filter-fieldset input {
    accent-color: var(--color-brand);
    height: 20px;
    width: 20px;
}

.tool-filter-sheet__actions {
    display: grid;
    gap: var(--space-1);
    grid-template-columns: 1fr 2fr;
}

.filter-dropdown {
    position: relative;
    display: inline-block;
}

.filter-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    min-height: 44px;
    white-space: nowrap;
}

.filter-dropdown-toggle:hover {
    border-color: var(--color-brand);
    color: var(--color-brand);
    background: var(--color-brand-faint);
}

.filter-dropdown-toggle.has-active {
    border-color: var(--color-brand);
    color: var(--color-brand);
    background: var(--color-brand-soft);
}

.filter-dropdown-toggle .bi-chevron-down {
    font-size: var(--font-size-caption);
    transition: transform 0.2s;
}

.filter-dropdown.open .filter-dropdown-toggle .bi-chevron-down {
    transform: rotate(180deg);
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 180px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.filter-dropdown.open .filter-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: 8px 14px;
    font-size: 0.84rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    white-space: nowrap;
}

.filter-dropdown-item:hover {
    background: var(--color-brand-soft);
    color: var(--color-text);
}

.filter-dropdown-item.active {
    color: var(--color-brand);
    background: var(--color-brand-soft);
    font-weight: 600;
}

.filter-dropdown-item.active::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-brand-action);
    flex-shrink: 0;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.filter-pill:hover {
    color: var(--color-text);
    background: var(--color-brand-faint);
}

.filter-pill.active {
    color: var(--color-brand);
    background: var(--color-brand-soft);
    border-color: var(--color-brand-border);
    font-weight: 600;
}

/* ── Newsletter ───────────────────────────── */
.newsletter-privacy {
    color: var(--color-text-muted);
    font-size: var(--font-size-caption);
    line-height: 1.55;
    margin: calc(var(--space-2) * -1) auto var(--space-3);
    max-width: 620px;
}

.newsletter-privacy a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.newsletter-privacy--footer {
    margin: calc(var(--space-1) * -1) 0 var(--space-2);
}

.newsletter-form {
    display: flex;
    gap: 0;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
}

.newsletter-form input {
    flex: 1;
    background: var(--color-surface-subtle);
    border: 1px solid var(--color-control-border);
    color: var(--color-text);
    padding: 9px 16px;
    border-radius: var(--radius-pill) 0 0 var(--radius-pill);
    outline: none;
    font-size: 0.9rem;
    min-height: 42px;
    min-width: 0;
}

.newsletter-form .btn-yz {
    border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
    box-shadow: none;
    flex: 0 0 auto;
    min-height: 42px;
    padding-inline: 16px;
}

.newsletter-form input:focus {
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px var(--color-brand-soft);
    position: relative;
    z-index: 1;
}

/* ── Footer ─────────────────────────────── */
.footer-yz {
    background: var(--gradient-section-mesh), var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 40px 0 20px;
    position: relative;
}

.footer-brand {
    font-size: 1.3rem;
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-heading {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.footer-yz ul {
    list-style: none;
    padding: 0;
}

.footer-yz ul li {
    margin-bottom: var(--space-1);
}

.footer-yz ul li a {
    color: var(--color-text-secondary);
    font-size: 0.88rem;
    text-decoration: none;
    position: relative;
    transition: color 0.2s, transform 0.2s;
}

.footer-yz ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-brand);
    transition: width 0.3s ease;
}

.footer-yz ul li a:hover {
    color: var(--color-brand-strong);
    transform: translateX(3px);
}

.footer-yz ul li a:hover::after {
    width: 100%;
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-5);
    padding-top: 20px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

/* ── Page Header ──────────────────────────── */
.page-hero {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 28px 0 24px;
    text-align: left;
}

.page-header-component {
    overflow: hidden;
    position: relative;
}

.page-header-component > .container {
    position: relative;
}

.page-header-component > .container::after {
    background: var(--color-brand);
    bottom: -24px;
    content: '';
    height: 2px;
    left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    position: absolute;
    width: 72px;
}

.page-header-component__breadcrumb {
    margin-bottom: var(--space-2);
}

.page-header-component__main {
    align-items: flex-end;
    display: flex;
    gap: var(--space-3);
    justify-content: space-between;
}

.page-header-component__copy {
    max-width: 760px;
}

.page-header-component h1 {
    align-items: center;
    display: flex;
    font-family: var(--font-family-body);
    font-size: clamp(1.65rem, 2.7vw, 2.25rem);
    font-weight: 800;
    gap: 12px;
    letter-spacing: -0.035em;
    line-height: 1.15;
    margin: 0 0 7px;
}

.page-header-component h1 i {
    align-items: center;
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-brand);
    display: inline-flex;
    flex: 0 0 34px;
    font-size: 0.95rem;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.page-header-component p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0 0 10px;
}

.page-header-component__count {
    color: var(--color-text-secondary);
    display: inline-flex;
    font-size: var(--font-size-caption);
    font-weight: 600;
}

.page-header-component__action {
    flex: 0 0 auto;
}

/* ── Detail Page ──────────────────────────── */
.detail-header {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.detail-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--gradient-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-brand);
    flex-shrink: 0;
}

.detail-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.avatar-initials {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

/* ── Pagination ───────────────────────────── */
.yz-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 32px 0 0;
    flex-wrap: wrap;
}

.yz-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
}

.yz-page-link:hover {
    color: var(--color-brand);
    border-color: var(--color-brand);
    background: var(--color-brand-faint);
    transform: translateY(-1px);
}

.yz-page-link.active {
    color: var(--color-on-brand);
    background: var(--color-brand-action);
    border-color: var(--color-brand);
    box-shadow: var(--shadow-brand);
    font-weight: 600;
}

.yz-page-link.yz-page-edge {
    color: var(--color-text-muted);
    background: transparent;
    border-color: transparent;
    min-width: 44px;
    height: 44px;
    font-size: 0.8rem;
}

.yz-page-link.yz-page-edge:hover {
    color: var(--color-brand);
    background: var(--color-brand-faint);
    border-color: transparent;
}

/* Legacy Bootstrap pagination override (fallback) */
.pagination .page-link {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    margin: 0 2px;
    font-size: 0.85rem;
    padding: 6px 14px;
    transition: all 0.2s;
}

.pagination .page-link:hover {
    background: var(--color-brand-faint);
    color: var(--color-brand);
    border-color: var(--color-brand);
}

.pagination .page-item.active .page-link {
    background: var(--color-brand-action);
    border-color: var(--color-brand);
    color: var(--color-on-brand);
    box-shadow: var(--shadow-brand);
}

/* ── Form controls ────────────────────────── */
.form-control,
.form-select {
    background: var(--color-surface) !important;
    border: 1px solid var(--color-control-border) !important;
    border-radius: var(--radius-md);
    color: var(--color-text) !important;
    min-height: 44px;
    padding: 0.625rem 0.875rem;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.form-control:hover,
.form-select:hover {
    border-color: var(--color-control-border-hover) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-focus) !important;
    box-shadow: 0 0 0 3px var(--color-focus-ring) !important;
    color: var(--color-text) !important;
}

.form-control::placeholder {
    color: var(--color-text-muted) !important;
}

.form-label {
    color: var(--color-text) !important;
    font-size: var(--font-size-caption);
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.form-text,
.form-hint {
    color: var(--color-text-muted);
    font-size: var(--font-size-caption);
    margin-top: var(--space-1);
}

.invalid-feedback,
.form-error {
    color: var(--color-danger);
    font-size: var(--font-size-caption);
    margin-top: var(--space-1);
}

.field-error {
    align-items: flex-start;
    gap: var(--space-1);
}

.field-error--visible {
    display: flex !important;
}

.field-error__icon {
    flex: 0 0 auto;
    line-height: 1.4;
}

.field-error__message:empty {
    display: none;
}

.valid-feedback,
.form-success {
    color: var(--color-success);
    font-size: var(--font-size-caption);
    margin-top: var(--space-1);
}

.form-control.is-invalid,
.form-select.is-invalid,
.form-control[aria-invalid="true"],
.form-select[aria-invalid="true"] {
    border-color: var(--color-danger) !important;
}

.form-control:disabled,
.form-select:disabled {
    background: var(--color-surface-muted) !important;
    color: var(--color-text-muted) !important;
    cursor: not-allowed;
}

.alert {
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.alert-custom {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    margin-bottom: 20px;
    padding: 14px 20px;
}

.alert-success.alert-custom {
    border-left: 4px solid var(--color-success);
}

.alert-danger.alert-custom {
    border-left: 4px solid var(--color-danger);
}

.alert-success {
    background: var(--color-success-soft);
    border-color: var(--color-success-border);
    color: var(--color-success);
}

.alert-danger {
    background: var(--color-danger-soft);
    border-color: var(--color-danger-border);
    color: var(--color-danger);
}

.alert-warning {
    background: var(--color-warning-soft);
    border-color: var(--color-warning-border);
    color: var(--color-warning);
}

/* ── Shared alerts and toasts ────────────── */
.flash-messages {
    display: grid;
    gap: var(--space-1);
    margin: 0;
    max-width: none;
    padding: 0;
    width: 100%;
}

.app-alert {
    align-items: flex-start;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-brand);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    color: var(--color-text);
    display: flex;
    gap: 12px;
    padding: 14px 12px 14px 16px;
}

.app-alert--success { border-left-color: var(--color-success); }
.app-alert--warning { border-left-color: var(--color-warning); }
.app-alert--error { border-left-color: var(--color-danger); }
.app-alert--success .app-alert__icon { color: var(--color-success); }
.app-alert--warning .app-alert__icon { color: var(--color-warning); }
.app-alert--error .app-alert__icon { color: var(--color-danger); }

.app-alert__icon {
    color: var(--color-brand);
    flex: 0 0 auto;
    font-size: 1.15rem;
    margin-top: 2px;
}

.app-alert__content {
    flex: 1;
    line-height: 1.55;
}

.app-alert__title {
    font-weight: 700;
    margin: 0 0 4px;
}

.app-alert__list {
    margin: 0;
    padding-left: 20px;
}

.app-alert__action {
    align-self: center;
    color: var(--color-brand-strong);
    font-weight: 700;
    white-space: nowrap;
}

.app-alert__close {
    align-items: center;
    align-self: center;
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
}

.app-alert--toast {
    box-shadow: var(--shadow-lg);
    width: min(420px, calc(100vw - 32px));
}

.dropdown-menu {
    background: var(--color-surface) !important;
    border: 1px solid var(--color-border) !important;
}

.dropdown-item {
    color: var(--color-text-secondary) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--color-brand-soft) !important;
    color: var(--color-text) !important;
}

.nav-tabs {
    border-color: var(--color-border) !important;
}

.nav-tabs .nav-link {
    color: var(--color-text-secondary) !important;
    background: transparent !important;
    border-color: transparent !important;
    transition: all 0.2s;
}

.nav-tabs .nav-link:hover {
    border-color: var(--color-border) !important;
    color: var(--color-text) !important;
}

.nav-tabs .nav-link.active {
    color: var(--color-brand-strong) !important;
    background: var(--color-surface) !important;
    border-color: var(--color-border) var(--color-border) var(--color-surface) !important;
}

.badge {
    font-weight: 500;
}

.text-muted {
    color: var(--color-text-muted) !important;
}

.text-success {
    color: var(--color-success) !important;
}

.text-danger {
    color: var(--color-danger) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-text);
}

/* ── Modern Homepage Components ────────────── */

/* Section header enhancements */
.section-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-brand-strong);
    background: var(--color-brand-soft);
    border: 1px solid var(--color-brand-border-soft);
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-view-all:hover {
    background: var(--color-brand);
    color: var(--color-on-brand);
    border-color: var(--color-brand);
    transform: translateX(2px);
}

.btn-view-all i {
    transition: transform 0.25s ease;
}

.btn-view-all:hover i {
    transform: translateX(4px);
}

/* Blog Cards on Homepage */
.blog-home-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.blog-home-card:hover {
    background: var(--color-surface-subtle);
    border-color: var(--color-brand-border);
    box-shadow: none;
    transform: none;
}

.blog-home-image-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-dark-deep);
}

.blog-home-image-wrap picture {
    display: block;
    height: 100%;
    width: 100%;
}

.blog-home-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
}

.blog-home-card:hover .blog-home-image {
    transform: none;
}

.blog-home-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--color-brand-action);
    color: var(--color-on-brand);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(8px);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.blog-home-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-home-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.blog-home-title {
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text);
    margin-bottom: 8px;
    transition: color 0.2s;
}

.blog-home-card:hover .blog-home-title {
    color: var(--color-brand-strong);
}

.blog-home-excerpt {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.55;
    margin-bottom: 16px;
    flex: 1;
}

.blog-home-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    font-size: 0.8rem;
    color: var(--color-brand-strong);
    font-weight: 600;
}

/* Category Discover Cards */
.category-discover-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    height: 100%;
}

.category-discover-card:hover {
    transform: none;
    border-color: var(--color-brand-border);
    background: var(--color-surface-subtle);
    box-shadow: none;
}

.category-discover-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--color-brand-soft);
    border: 1px solid var(--color-brand-border-soft);
    color: var(--color-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.category-discover-card:hover .category-discover-icon {
    transform: none;
}

.category-discover-info {
    flex: 1;
}

.category-discover-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-tool-count {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--color-surface-muted);
    color: var(--color-text-muted);
}

.category-discover-desc {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.45;
}

/* Günün Terimi Showcase */
.daily-term-card {
    background: var(--color-surface);
    border: 1px solid var(--color-brand-border-soft);
    border-radius: var(--radius-lg);
    padding: clamp(18px, 3vw, 24px);
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

.daily-term-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--gradient-brand);
}

.daily-term-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-brand-strong);
    background: var(--color-brand-soft);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    margin-bottom: 12px;
}

.daily-term-title {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 6px;
}

.daily-term-en {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 14px;
}

.daily-term-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    max-width: 800px;
    margin-bottom: 20px;
}

/* Platform Stats Grid */
.stat-counter-card {
    background: var(--color-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    transition: all 0.35s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stat-counter-card::before {
    content: none;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
    background: var(--gradient-brand);
    border-radius: 0 0 4px 4px;
    opacity: 0;
    transition: opacity 0.35s, width 0.35s;
}

.stat-counter-card:hover {
    transform: none;
    border-color: var(--color-brand-border);
    box-shadow: none;
}

.stat-counter-card:hover::before {
    opacity: 1;
    width: 80%;
}

.stat-counter-icon {
    font-size: 2rem;
    color: var(--color-brand);
    margin-bottom: 12px;
    display: inline-block;
    transition: transform 0.3s var(--transition-bounce);
}

.stat-counter-card:hover .stat-counter-icon {
    transform: scale(1.15);
}

.stat-counter-number {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1;
    color: var(--color-text);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-brand) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-counter-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin: 0;
}

/* ── Sadeleştirilmiş ana sayfa modülleri ───── */
.home-tools-section,
.home-prompts-section {
    background: var(--color-surface) !important;
}

.home-learning-section,
.home-trust-section {
    background: var(--color-section-alt) !important;
}

.home-section-eyebrow {
    color: var(--color-brand-strong);
    display: block;
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.home-tool-grid .tool-card,
.home-prompts-section .prompt-card {
    backdrop-filter: none;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: none;
    margin-bottom: 0;
    padding: 18px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.home-tool-grid .tool-card::before,
.home-prompts-section .prompt-card::before {
    content: none;
}

.home-tool-grid .tool-card:hover,
.home-prompts-section .prompt-card:hover {
    background: var(--color-surface-subtle);
    border-color: var(--color-brand-border);
    box-shadow: none;
    transform: none;
}

.home-tool-grid .tool-card:hover .tool-logo {
    transform: none;
}

.home-tool-evidence {
    align-items: center;
    color: var(--color-text-muted);
    display: flex;
    font-size: 0.75rem;
    gap: 6px;
    line-height: 1.4;
    margin: 0 0 12px;
}

.home-tool-evidence > i {
    color: var(--color-success);
}

.home-category-block {
    border-top: 1px solid var(--color-border);
    margin-top: 28px;
    padding-top: 20px;
}

.home-subsection-heading {
    align-items: flex-end;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.home-subsection-heading h3 {
    font-size: 1.1rem;
    margin: 0 0 3px;
}

.home-subsection-heading p {
    color: var(--color-text-muted);
    font-size: 0.84rem;
    margin: 0;
}

.home-subsection-heading > a,
.daily-term-all-link {
    color: var(--color-brand-strong);
    font-size: 0.84rem;
    font-weight: 650;
    text-decoration: none;
}

.home-subsection-heading > a:hover,
.home-subsection-heading > a:focus-visible,
.daily-term-all-link:hover,
.daily-term-all-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.home-category-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-category-grid .category-discover-card {
    align-items: center;
    border-radius: var(--radius-md);
    gap: 12px;
    padding: 13px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.home-category-grid .category-discover-card:hover {
    background: var(--color-brand-faint);
    border-color: var(--color-brand-border);
    box-shadow: none;
    transform: none;
}

.home-category-grid .category-discover-icon {
    height: 40px;
    width: 40px;
}

.home-category-grid .category-discover-card:hover .category-discover-icon {
    background: var(--color-brand-soft);
    color: var(--color-brand);
    transform: none;
}

.home-learning-grid {
    align-items: stretch;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.home-article-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-article-grid > article,
.home-article-grid .blog-home-card {
    height: 100%;
    min-width: 0;
}

.home-learning-section .blog-home-card {
    border-radius: var(--radius-lg);
    box-shadow: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.home-learning-section .blog-home-card:hover {
    border-color: var(--color-brand-border);
    box-shadow: none;
    transform: none;
}

.home-learning-section .blog-home-card:hover .blog-home-image {
    transform: none;
}

.blog-home-image-placeholder {
    align-items: center;
    background: var(--color-surface-muted);
    color: var(--color-text-muted);
    display: flex;
    font-size: 2rem;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.home-learning-section .blog-home-body {
    padding: 16px;
}

.home-learning-section .blog-home-excerpt {
    margin-bottom: 12px;
}

.home-learning-section .daily-term-card {
    background: var(--color-surface);
    border-color: var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

.home-learning-section .daily-term-card::before {
    content: none;
}

.home-learning-section .daily-term-title {
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.home-learning-section .daily-term-desc {
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 18px;
}

.home-learning-section .daily-term-all-link {
    margin-top: 14px;
}

.home-trust-layout {
    align-items: stretch;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr);
}

.home-stats-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-trust-section .stat-counter-card {
    backdrop-filter: none;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: none;
    padding: 18px 14px;
    text-align: left;
    transition: border-color 0.2s ease;
}

.home-trust-section .stat-counter-card::before {
    content: none;
}

.home-trust-section .stat-counter-card:hover {
    border-color: var(--color-brand-border);
    box-shadow: none;
    transform: none;
}

.home-trust-section .stat-counter-number {
    background: none;
    color: var(--color-text);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    -webkit-text-fill-color: currentColor;
}

.home-editorial-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

.home-editorial-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.home-editorial-card p {
    color: var(--color-text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 18px;
}

.home-editorial-links {
    display: grid;
    gap: 8px;
}

.home-editorial-links a {
    align-items: center;
    border-top: 1px solid var(--color-border);
    color: var(--color-brand-strong);
    display: flex;
    font-size: 0.86rem;
    font-weight: 650;
    justify-content: space-between;
    min-height: 44px;
    text-decoration: none;
}

.home-editorial-links a:hover,
.home-editorial-links a:focus-visible {
    color: var(--color-brand);
}
