/*
Theme Name: BestSpot
Theme URI: https://bestspot.net
Author: BestSpot
Description: Custom WordPress theme for BestSpot app discovery and guides.
Version: 1.0
Text Domain: bestspot
*/

/* ===== Base ===== */

:root {
    --bg: #ffffff;
    --soft: #f7f9fc;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --card: #ffffff;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}


/* ===== Header ===== */

.site-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.site-brand a {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    color: #374151;
    font-weight: 600;
    font-size: 15px;
}

.main-nav a:hover {
    color: var(--primary);
}


/* ===== Hero ===== */

.hero-section {
    padding: 105px 0 95px;
    background:
        radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.10), transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.08), transparent 30%),
        #ffffff;
    text-align: center;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-section h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1.08;
    letter-spacing: -2.2px;
}

.hero-desc {
    max-width: 720px;
    margin: 22px auto 0;
    color: var(--muted);
    font-size: 19px;
}

.app-search {
    max-width: 680px;
    margin: 38px auto 0;
    display: flex;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 7px;
    box-shadow: var(--shadow);
}

.app-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 15px 17px;
    font-size: 16px;
    background: transparent;
}

.app-search button {
    border: 0;
    background: var(--primary);
    color: #ffffff;
    border-radius: 12px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.app-search button:hover {
    background: var(--primary-dark);
}


/* ===== Common section ===== */

.section {
    padding: 80px 0;
}

.section-soft {
    background: var(--soft);
}

.section-head {
    margin-bottom: 30px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.section-head h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1.2;
    letter-spacing: -1px;
}

.section-link {
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}


/* ===== App cards ===== */

.app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.app-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: var(--primary);
    font-size: 25px;
    font-weight: 800;
    margin-bottom: 20px;
}

.app-card h3 {
    margin: 0 0 8px;
    font-size: 21px;
}

.app-card h3 a:hover {
    color: var(--primary);
}

.app-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    min-height: 68px;
}

.app-meta {
    border-top: 1px solid var(--line);
    margin-top: 20px;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.app-meta span {
    color: var(--muted);
}

.app-meta strong {
    color: #16a34a;
}


/* ===== Categories ===== */

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-card {
    background: #ffffff;
    border: 1px solid var(--line);
    padding: 28px;
    border-radius: var(--radius);
    transition: 0.2s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: #c7d2fe;
    box-shadow: var(--shadow);
}

.category-card strong {
    display: block;
    font-size: 20px;
    margin-bottom: 7px;
}

.category-card span {
    color: var(--muted);
    font-size: 14px;
}


/* ===== Guides ===== */

.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.guide-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    background: #ffffff;
}

.guide-tag {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 15px;
}

.guide-card h3 {
    font-size: 22px;
    line-height: 1.35;
    margin: 0 0 12px;
}

.guide-card p {
    margin: 0;
    color: var(--muted);
}


/* ===== Footer ===== */

.site-footer {
    margin-top: 40px;
    background: #0f172a;
    color: #e5e7eb;
}

.footer-inner {
    padding: 55px 0;
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.footer-brand strong {
    font-size: 24px;
}

.footer-brand p {
    color: #94a3b8;
    margin: 7px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    align-items: flex-start;
}

.footer-links a {
    color: #cbd5e1;
    font-size: 14px;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.footer-bottom p {
    margin: 0;
    padding: 20px 0;
    color: #94a3b8;
    font-size: 13px;
}


/* ===== Responsive ===== */

@media (max-width: 980px) {
    .app-grid,
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .guide-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 28px, 1180px);
    }

    .header-inner {
        min-height: 64px;
    }

    .main-nav {
        gap: 15px;
    }

    .main-nav a {
        font-size: 13px;
    }

    .hero-section {
        padding: 75px 0 65px;
    }

    .hero-section h1 {
        font-size: 42px;
        letter-spacing: -1.5px;
    }

    .hero-desc {
        font-size: 16px;
    }

    .app-search {
        flex-direction: column;
    }

    .app-search button {
        min-height: 48px;
    }

    .section {
        padding: 58px 0;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-head h2 {
        font-size: 29px;
    }

    .app-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .app-card p {
        min-height: auto;
    }

    .footer-inner {
        flex-direction: column;
    }
}

/* ===== App detail ===== */

.app-detail-hero {
    padding: 60px 0 45px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.app-detail-top {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 28px;
    align-items: center;
}

.app-detail-icon img,
.app-placeholder-icon {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    object-fit: cover;
}

.app-placeholder-icon {
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: var(--primary);
    font-size: 38px;
    font-weight: 800;
}

.app-detail-title h1 {
    margin: 0;
    font-size: 42px;
    line-height: 1.1;
    letter-spacing: -1.5px;
}

.app-detail-excerpt {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.app-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.app-badges span {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.store-button {
    display: inline-block;
    background: var(--primary);
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.store-button:hover {
    background: var(--primary-dark);
}

.app-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 36px;
    align-items: start;
}

.app-main-content {
    min-width: 0;
}

.app-content-block {
    margin-bottom: 54px;
}

.app-content-block h2 {
    margin: 0 0 18px;
    font-size: 30px;
    line-height: 1.25;
    letter-spacing: -0.8px;
}

.app-description {
    color: #374151;
    font-size: 16px;
}

.app-description p:first-child {
    margin-top: 0;
}

.feature-list {
    display: grid;
    gap: 14px;
}

.feature-item {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
}

.feature-item strong {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
}

.feature-item span {
    color: var(--muted);
    font-size: 14px;
}

.ranking-table {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
}

.ranking-row {
    display: grid;
    grid-template-columns: 1fr 100px 100px;
    gap: 12px;
    align-items: center;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.ranking-row:last-child {
    border-bottom: 0;
}

.ranking-head {
    background: var(--soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.rank-up {
    color: #16a34a;
    font-weight: 700;
}

.app-sidebar {
    display: grid;
    gap: 22px;
}

.sidebar-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    padding: 22px;
}

.sidebar-card h3 {
    margin: 0 0 18px;
    font-size: 19px;
}

.app-info-list {
    margin: 0;
}

.app-info-list > div {
    display: grid;
    grid-template-columns: 105px 1fr;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.app-info-list > div:last-child {
    border-bottom: 0;
}

.app-info-list dt {
    color: var(--muted);
    font-size: 13px;
}

.app-info-list dd {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
}

.similar-apps {
    display: grid;
    gap: 10px;
}

.similar-apps a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.similar-apps a:last-child {
    border-bottom: 0;
}

.similar-apps strong {
    display: block;
    font-size: 14px;
}

.similar-apps span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}


/* ===== App detail responsive ===== */

@media (max-width: 900px) {
    .app-detail-top {
        grid-template-columns: 90px 1fr;
    }

    .app-detail-action {
        grid-column: 1 / -1;
    }

    .app-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .app-detail-hero {
        padding: 40px 0 30px;
    }

    .app-detail-top {
        grid-template-columns: 72px 1fr;
        gap: 18px;
    }

    .app-detail-icon img,
    .app-placeholder-icon {
        width: 72px;
        height: 72px;
        border-radius: 18px;
    }

    .app-placeholder-icon {
        font-size: 28px;
    }

    .app-detail-title h1 {
        font-size: 34px;
    }

    .app-detail-excerpt {
        font-size: 15px;
    }

    .ranking-row {
        grid-template-columns: 1fr 70px 70px;
        font-size: 13px;
        padding: 13px 14px;
    }
}

/* ===== Articles page ===== */

.articles-hero {
    padding: 70px 0 55px;
    background:
        radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.08), transparent 30%),
        #ffffff;
    border-bottom: 1px solid var(--line);
}

.articles-hero h1 {
    margin: 0;
    font-size: 46px;
    line-height: 1.15;
    letter-spacing: -1.5px;
}

.articles-hero p:last-child {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.article-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.article-image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--soft);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card-body {
    padding: 24px;
}

.article-category {
    display: inline-block;
    margin-bottom: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.article-card h3 {
    margin: 0 0 12px;
    font-size: 21px;
    line-height: 1.35;
}

.article-card h3 a:hover {
    color: var(--primary);
}

.article-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.article-meta {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
    color: #9ca3af;
    font-size: 12px;
}

.empty-content {
    grid-column: 1 / -1;
    padding: 45px;
    text-align: center;
    border: 1px dashed #d1d5db;
    border-radius: var(--radius);
    background: #ffffff;
}

.empty-content h3 {
    margin: 0 0 6px;
}

.empty-content p {
    margin: 0;
    color: var(--muted);
}


/* ===== Articles responsive ===== */

@media (max-width: 980px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .articles-hero {
        padding: 50px 0 40px;
    }

    .articles-hero h1 {
        font-size: 36px;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Article detail ===== */

.article-detail-hero {
    padding: 72px 0 58px;
    background:
        radial-gradient(circle at 18% 10%, rgba(37, 99, 235, 0.08), transparent 28%),
        #ffffff;
    border-bottom: 1px solid var(--line);
}

.article-narrow {
    max-width: 880px;
}

.article-detail-category {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 11px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.article-detail-hero h1 {
    margin: 0;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.12;
    letter-spacing: -1.8px;
}

.article-detail-excerpt {
    max-width: 760px;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

.article-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
    color: #9ca3af;
    font-size: 13px;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 46px;
    align-items: start;
}

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

.article-featured-image {
    margin-bottom: 32px;
    overflow: hidden;
    border-radius: 18px;
}

.article-featured-image img {
    width: 100%;
    height: auto;
}

.article-content {
    color: #374151;
    font-size: 17px;
    line-height: 1.85;
}

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

.article-content h2 {
    margin: 46px 0 18px;
    color: var(--text);
    font-size: 30px;
    line-height: 1.3;
    letter-spacing: -0.8px;
}

.article-content h3 {
    margin: 34px 0 14px;
    color: var(--text);
    font-size: 23px;
    line-height: 1.35;
}

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

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

.article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-content blockquote {
    margin: 30px 0;
    padding: 18px 22px;
    border-left: 4px solid var(--primary);
    background: var(--soft);
    border-radius: 10px;
}

.article-content blockquote p:last-child {
    margin-bottom: 0;
}

.article-sidebar {
    position: sticky;
    top: 100px;
}

.article-side-links {
    display: grid;
}

.article-side-links a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.article-side-links a:last-child {
    border-bottom: 0;
}

.article-side-links a:hover {
    color: var(--primary);
}


/* ===== Article detail responsive ===== */

@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .article-detail-hero {
        padding: 50px 0 42px;
    }

    .article-detail-hero h1 {
        font-size: 38px;
        letter-spacing: -1.2px;
    }

    .article-detail-excerpt {
        font-size: 16px;
    }

    .article-content {
        font-size: 16px;
        line-height: 1.8;
    }

    .article-content h2 {
        font-size: 26px;
    }

    .article-content h3 {
        font-size: 21px;
    }
}

.site-logo {
    display: block;
    width: 110px;
    height: auto;
}

@media (max-width: 640px) {
    .site-logo {
        width: 95px;
    }
}

/* ===== Trending page ===== */

.country-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 38px;
}

.country-tabs a {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
}

.country-tabs a:hover {
    border-color: #bfdbfe;
    color: var(--primary);
}

.country-tabs a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.trending-list {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
}

.trending-row {
    display: grid;
    grid-template-columns: 60px 58px 1fr 100px;
    gap: 18px;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.trending-row:last-child {
    border-bottom: 0;
}

.trending-row:hover {
    background: #fafcff;
}

.trend-rank {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
}

.trend-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 20px;
    font-weight: 800;
}

.trend-info {
    min-width: 0;
}

.trend-info strong {
    display: block;
    font-size: 17px;
}

.trend-info span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.trend-change {
    text-align: right;
    font-size: 14px;
    font-weight: 800;
}

.trend-up {
    color: #16a34a;
}

.trend-down {
    color: #dc2626;
}

.trend-new {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff7ed;
    color: #ea580c;
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 640px) {
    .trending-row {
        grid-template-columns: 36px 48px 1fr 70px;
        gap: 12px;
        padding: 14px;
    }

    .trend-rank {
        font-size: 18px;
    }

    .trend-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .trend-info strong {
        font-size: 15px;
    }

    .trend-change {
        font-size: 12px;
    }
}

/* ===== App screenshot gallery ===== */

.app-screenshot-gallery {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 2px 14px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.app-screenshot-item {
    flex: 0 0 220px;
    scroll-snap-align: start;
}

.app-screenshot-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

@media (max-width: 640px) {
    .app-screenshot-item {
        flex-basis: 180px;
    }
}

/* ===== App card icon fix ===== */
.app-card .app-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 18px;
    background: #eff6ff;
    flex-shrink: 0;
}

.app-card .app-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-card .app-card-body h3 {
    margin-top: 20px;
}

.footer-logo {
    display: block;
    width: 130px;
    height: auto;
    margin-bottom: 10px;
}

@media (max-width: 640px) {
    .footer-logo {
        width: 115px;
    }
}

/* ===== Light Footer Override ===== */

.site-footer {
    background: #f8fafc;
    color: #0f172a;
    border-top: 1px solid var(--line);
}

.footer-brand p {
    color: #64748b;
}

.footer-links a {
    color: #334155;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid #e2e8f0;
}

.footer-bottom p {
    color: #64748b;
}

/* ===== Standard Pages ===== */

.standard-page-content {
    max-width: 820px;
}

.standard-page-content p {
    margin-bottom: 22px;
}

.standard-page-content h2 {
    margin-top: 40px;
}


.trend-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

/* ===== Trending Rank Change ===== */

.trend-change {
    min-width: 64px;
    text-align: right;
    font-weight: 700;
    font-size: 14px;
}

.trend-change.up {
    color: #16a34a;
}

.trend-change.down {
    color: #dc2626;
}

.trend-change.new {
    color: #2563eb;
}

.trend-change.same {
    color: #94a3b8;
}

/* ===== Apps Grid Stable Layout ===== */

.apps-page .apps-grid,
.apps-page .app-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px !important;
    align-items: stretch !important;
}

.apps-page .app-card {
    width: 100% !important;
    min-width: 0 !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.apps-page .app-card .app-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.apps-page .app-card h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.45;
    min-height: 2.9em;
    overflow-wrap: anywhere;
}

.apps-page .app-card .app-card-body > p,
.apps-page .app-card .app-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
    max-height: 8em;
    overflow-wrap: anywhere;
}

.apps-page .app-card-footer,
.apps-page .app-card .card-footer {
    margin-top: auto;
}

@media (max-width: 1100px) {
    .apps-page .apps-grid,
    .apps-page .app-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 800px) {
    .apps-page .apps-grid,
    .apps-page .app-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 520px) {
    .apps-page .apps-grid,
    .apps-page .app-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===== Single App Overview Summary ===== */

.single-app .app-hero p,
.single-app .app-overview p,
.single-app .app-summary,
.single-app .app-excerpt,
.app-detail-hero p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;

    line-height: 1.7;
    max-height: 3.4em;
    min-height: 3.4em;

    overflow-wrap: anywhere;
}

/* Mobile */
@media (max-width: 768px) {
    .single-app .app-hero p,
    .single-app .app-overview p,
    .single-app .app-summary,
    .single-app .app-excerpt,
    .app-detail-hero p {
        -webkit-line-clamp: 2;
        line-height: 1.6;
        max-height: 3.2em;
        min-height: 3.2em;
    }
}

/* ===== Single App Live Rankings ===== */

.app-ranking-section {
    margin-top: 56px;
}

.app-ranking-table {
    margin-top: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
}

.app-ranking-head,
.app-ranking-row {
    display: grid;
    grid-template-columns: 1fr 120px 120px;
    align-items: center;
}

.app-ranking-head {
    padding: 16px 20px;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.app-ranking-row {
    padding: 17px 20px;
    border-top: 1px solid #e2e8f0;
}

.ranking-country {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ranking-rank {
    font-weight: 700;
}

.ranking-change {
    font-weight: 700;
}

.ranking-change.up {
    color: #16a34a;
}

.ranking-change.down {
    color: #dc2626;
}

.ranking-change.new {
    color: #2563eb;
}

.ranking-change.same,
.ranking-change.none {
    color: #94a3b8;
}

.ranking-note {
    margin-top: 10px;
    font-size: 12px;
    color: #94a3b8;
}

@media (max-width: 640px) {

    .app-ranking-head,
    .app-ranking-row {
        grid-template-columns: 1fr 90px 70px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .ranking-country {
        font-size: 13px;
    }

    .ranking-rank,
    .ranking-change {
        font-size: 13px;
    }
}

/* ===== Clickable Trending Rows ===== */

.trending-row.is-clickable {
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}

.trending-row.is-clickable:hover {
    background: #f8fafc;
}

.trending-row.is-clickable:active {
    transform: scale(.998);
}

/* ===== Live Similar Apps ===== */

.similar-app-list {
    margin-top: 18px;
}

.similar-app-item {
    display: block;
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
    text-decoration: none;
}

.similar-app-item:last-child {
    border-bottom: 0;
}

.similar-app-item strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    margin-bottom: 5px;
}

.similar-app-item span {
    display: block;
    color: #64748b;
    font-size: 13px;
}

.similar-app-item:hover strong {
    color: #2563eb;
}

/* ===== Similar Apps Icons ===== */

.similar-app-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.similar-app-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 11px;
    overflow: hidden;
    background: #f1f5f9;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 700;
    color: #64748b;
}

.similar-app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.similar-app-text {
    min-width: 0;
}

.similar-app-text strong {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.similar-app-text span {
    display: block;
    margin-top: 4px;
}

/* ===== App Screenshot Slider ===== */

.app-screenshot-slider {
    position: relative;
}

.app-screenshot-gallery {
    display: flex !important;
    gap: 18px;
    overflow-x: hidden !important;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;

    scrollbar-width: none;
    -ms-overflow-style: none;
}

.app-screenshot-gallery::-webkit-scrollbar {
    display: none;
}

.app-screenshot-gallery > * {
    flex: 0 0 calc((100% - 36px) / 3) !important;
    width: calc((100% - 36px) / 3) !important;
    max-width: none !important;
    scroll-snap-align: start;
}

.app-screenshot-gallery img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

/* arrows */

.screenshot-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;

    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;

    background: rgba(15, 23, 42, .88);
    color: #fff;

    font-size: 25px;
    line-height: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    box-shadow: 0 4px 16px rgba(15, 23, 42, .18);
}

.screenshot-slider-btn:hover {
    background: #2563eb;
}

.screenshot-slider-prev {
    left: 12px;
}

.screenshot-slider-next {
    right: 12px;
}

/* Tablet: 2 screenshots */

@media (max-width: 900px) {

    .app-screenshot-gallery > * {
        flex-basis: calc((100% - 18px) / 2) !important;
        width: calc((100% - 18px) / 2) !important;
    }
}

/* Mobile: 1 screenshot */

@media (max-width: 560px) {

    .app-screenshot-gallery > * {
        flex-basis: 100% !important;
        width: 100% !important;
    }

    .screenshot-slider-btn {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }
}

/* ===== Trending Apps / Games / Free / Paid Tabs ===== */

.trending-primary-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.trending-primary-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 110px;
    padding: 12px 24px;

    border-radius: 12px;
    border: 1px solid #e2e8f0;

    background: #fff;
    color: #334155;

    font-weight: 700;
    text-decoration: none;
}

.trending-primary-tabs a.active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}


.trending-secondary-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.trending-secondary-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 80px;
    padding: 9px 18px;

    border-radius: 999px;
    border: 1px solid #e2e8f0;

    background: #fff;
    color: #475569;

    font-size: 14px;
    font-weight: 700;

    text-decoration: none;
}

.trending-secondary-tabs a.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}


@media (max-width: 640px) {

    .trending-primary-tabs a {
        flex: 1;
        min-width: 0;
    }

    .trending-secondary-tabs a {
        flex: 1;
    }
}

/* ===== Trending UI Polish ===== */

.trending-page .section > .container {
    max-width: 1180px;
}

/* Filter panel */
.trending-primary-tabs,
.trending-secondary-tabs,
.country-tabs {
    margin: 0;
}

.trending-primary-tabs {
    display: inline-flex;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 14px;
    gap: 4px;
}

.trending-primary-tabs a {
    min-width: 120px;
    padding: 11px 22px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #475569;
    font-weight: 700;
    box-shadow: none;
}

.trending-primary-tabs a.active {
    background: #0f172a;
    color: #fff;
}

.trending-secondary-tabs {
    display: inline-flex;
    gap: 8px;
    margin-left: 18px;
}

.trending-secondary-tabs a,
.country-tabs a {
    min-width: auto;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid #dbe3ee;
    background: #fff;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.trending-secondary-tabs a.active,
.country-tabs a.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

/* Put all filters together */
.trending-page .section > .container {
    position: relative;
}

.trending-primary-tabs {
    margin-bottom: 18px;
}

.trending-secondary-tabs {
    margin-bottom: 18px;
}

.country-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

/* Heading area */
.trending-page .section-head {
    margin-top: 8px;
    margin-bottom: 18px;
    align-items: end;
}

.trending-page .section-head h2 {
    margin-top: 4px;
}

.trending-page .section-head .eyebrow {
    font-size: 12px;
    letter-spacing: .08em;
}

/* Ranking list */
.trending-list {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.trending-row {
    padding: 16px 20px;
    min-height: 76px;
}

.trend-rank {
    font-size: 20px;
    font-weight: 800;
}

.trend-icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    overflow: hidden;
}

.trend-info strong {
    font-size: 16px;
}

.trend-info span {
    margin-top: 4px;
    font-size: 13px;
    color: #64748b;
}

/* Mobile */
@media (max-width: 760px) {

    .trending-primary-tabs {
        display: flex;
        width: 100%;
    }

    .trending-primary-tabs a {
        flex: 1;
        min-width: 0;
    }

    .trending-secondary-tabs {
        display: flex;
        margin-left: 0;
        margin-top: 12px;
    }

    .country-tabs {
        margin-top: 12px;
    }
}

/* ===== Trending country flags ===== */

.country-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
}

.country-tabs .country-flag {
    font-size: 16px;
    line-height: 1;
}

.country-tabs .country-label {
    line-height: 1;
}

/* 탭들 높이 통일 */
.trending-primary-tabs a {
    height: 48px;
}

.trending-secondary-tabs a {
    height: 44px;
}

/* 제목 아래 여백 살짝 정리 */
.trending-primary-tabs {
    margin-bottom: 14px;
}

.trending-secondary-tabs {
    margin-bottom: 14px;
}

.country-tabs {
    margin-bottom: 26px;
}

/* ===== Trending Compact Final List ===== */

.trending-list {
    border-radius: 14px;
}

/* 행 높이 대폭 축소 */
.trending-row {
    min-height: 42px !important;
    padding: 7px 14px !important;
}

/* 순위 */
.trend-rank {
    width: 30px !important;
    height: 30px !important;

    font-size: 14px !important;
    font-weight: 800;

    border-radius: 8px !important;

    background: transparent !important;
    color: #0f172a !important;
}

/* 1~3위도 과한 박스 제거 */
.trend-rank.rank-1,
.trend-rank.rank-2,
.trend-rank.rank-3 {
    background: transparent !important;
}

.trend-rank.rank-1::before {
    content: none !important;
}

/* 앱 아이콘 */
.trend-icon {
    width: 34px !important;
    height: 34px !important;

    border-radius: 8px !important;

    box-shadow: none !important;
}

/* 앱명 */
.trend-info strong {
    font-size: 13px !important;
    line-height: 1.25;
}

/* 개발사 */
.trend-info span {
    margin-top: 2px !important;

    font-size: 11px !important;
    line-height: 1.2;
}

/* 변동 */
.trend-change {
    min-width: 52px !important;

    padding: 3px 7px !important;

    font-size: 11px !important;
    border-radius: 6px !important;
}

/* 클릭 hover */
.trending-row.is-clickable:hover {
    background: #f8fafc;
}

/* 모바일 */
@media (max-width: 640px) {

    .trending-row {
        min-height: 46px !important;
        padding: 8px 10px !important;
    }

    .trend-rank {
        width: 28px !important;
        height: 28px !important;
    }

    .trend-icon {
        width: 32px !important;
        height: 32px !important;
    }

    .trend-info strong {
        font-size: 12px !important;
    }

    .trend-info span {
        font-size: 10px !important;
    }
}

/* Trending icon size tweak */
.trend-icon {
    width: 38px !important;
    height: 38px !important;
}

@media (max-width: 640px) {
    .trend-icon {
        width: 36px !important;
        height: 36px !important;
    }
}

/* Trending row height tweak */
.trending-row {
    min-height: 46px !important;
    padding: 6px 14px !important;
}

@media (max-width: 640px) {
    .trending-row {
        min-height: 46px !important;
        padding: 6px 10px !important;
    }
}

/* ===== Trending Filter Final Layout ===== */

.trending-filter-panel {
    display: grid !important;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 18px;

    padding: 16px 18px !important;
    margin-bottom: 28px !important;

    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;

    box-shadow: none !important;
}

/* Apps / Games */
.trending-primary-tabs {
    margin: 0 !important;
    padding: 4px !important;

    background: #e9eef5 !important;
    border-radius: 11px !important;
}

.trending-primary-tabs a {
    height: 40px !important;
    min-width: 98px !important;
    padding: 0 18px !important;

    border-radius: 8px !important;
}

/* Free / Paid */
.trending-secondary-tabs {
    margin: 0 !important;
    padding: 4px !important;

    background: #e9eef5 !important;
    border-radius: 11px !important;
}

.trending-secondary-tabs a {
    height: 40px !important;
    min-width: 68px !important;
    padding: 0 14px !important;

    border-radius: 8px !important;
}

/* Countries on same line */
.country-tabs {
    width: auto !important;

    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap !important;

    gap: 8px !important;

    margin: 0 !important;
    padding: 0 !important;
}

.country-tabs a {
    height: 40px !important;
    padding: 0 14px !important;

    border-radius: 10px !important;
    background: #fff !important;
}

.country-tabs a.active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}

/* Title area spacing */
.trending-page .section-head {
    margin-top: 0 !important;
    margin-bottom: 14px !important;
}

/* Tablet */
@media (max-width: 900px) {

    .trending-filter-panel {
        grid-template-columns: auto auto;
    }

    .country-tabs {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

/* Mobile */
@media (max-width: 640px) {

    .trending-filter-panel {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .trending-primary-tabs,
    .trending-secondary-tabs {
        width: 100% !important;
    }

    .trending-primary-tabs a,
    .trending-secondary-tabs a {
        flex: 1;
    }

    .country-tabs {
        width: 100% !important;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px !important;
    }

    .country-tabs a {
        flex: 0 0 auto;
    }
}

/* ===== Trending Rich Data Table ===== */

.trending-list {
    overflow-x: auto;
}

.trending-table-head,
.trending-data-row {
    display: grid !important;

    grid-template-columns:
        52px
        minmax(230px, 1.7fr)
        minmax(150px, 1.15fr)
        110px
        82px
        78px
        68px;

    gap: 12px;
    align-items: center;

    min-width: 930px;
}

.trending-table-head {
    height: 38px;
    padding: 0 14px;

    background: #f8fafc;

    border-bottom: 1px solid #e2e8f0;

    color: #64748b;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
}

.trending-data-row {
    min-height: 46px !important;
    padding: 4px 14px !important;
}

.trending-data-row .trend-rank {
    width: auto !important;
    height: auto !important;

    justify-content: flex-start;

    background: transparent !important;

    font-size: 13px !important;
}

.trend-app-cell {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
}

.trending-data-row .trend-icon {
    width: 38px !important;
    height: 38px !important;

    flex: 0 0 38px;

    border-radius: 9px !important;
}

.trend-app-name {
    min-width: 0;
}

.trend-app-name strong {
    display: block;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    font-size: 13px;
    color: #0f172a;
}

.trend-developer,
.trend-category,
.trend-price,
.trend-rating {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    color: #475569;

    font-size: 11px;
}

.trend-price {
    font-weight: 700;
}

.trend-rating {
    color: #64748b;
}

.trending-data-row .trend-change {
    min-width: 0 !important;

    padding: 3px 5px !important;

    font-size: 10px !important;
}

@media (max-width: 900px) {

    .trending-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

}

/* ===== Trending Typography Up ===== */

.trending-table-head {
    font-size: 11px !important;
}

.trending-data-row .trend-rank {
    font-size: 14px !important;
}

.trend-app-name strong {
    font-size: 14px !important;
}

.trend-developer,
.trend-category,
.trend-price,
.trend-rating {
    font-size: 12.5px !important;
}

.trending-data-row .trend-change {
    font-size: 11px !important;
}

/* Slightly stronger readability */
.trend-developer,
.trend-category {
    color: #334155 !important;
}

.trend-price {
    font-size: 12.5px !important;
    font-weight: 700;
}

.trend-rating {
    font-size: 12.5px !important;
}

/* Trending row spacing final tweak */
.trending-data-row {
    min-height: 52px !important;
    padding: 6px 14px !important;
}

@media (max-width: 640px) {
    .trending-data-row {
        min-height: 50px !important;
        padding: 6px 10px !important;
    }
}

/* ===== Homepage cards final equal height ===== */

.home .app-grid,
.home .apps-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px;
    align-items: stretch;
}

.home .app-card {
    height: 100% !important;
    min-width: 0;
    display: flex !important;
    flex-direction: column;
}

.home .app-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.home .app-card h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;

    line-height: 1.45;
    min-height: 2.9em;
    max-height: 2.9em;
}

.home .app-card .app-card-body > p,
.home .app-card .app-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;

    line-height: 1.6;
    min-height: 6.4em;
    max-height: 6.4em;
}

.home .app-card-footer,
.home .app-card .card-footer {
    margin-top: auto !important;
}

@media (max-width: 1100px) {
    .home .app-grid,
    .home .apps-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 760px) {
    .home .app-grid,
    .home .apps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 520px) {
    .home .app-grid,
    .home .apps-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Search input IME safety */
.app-search input[type="text"] {
    text-transform: none !important;
    font-family: inherit;
    direction: ltr;
}

/* ===== Popular Category Icons ===== */

.category-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-card-icon {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 38px;

    border-radius: 10px;
    background: #f1f5f9;

    font-size: 20px;
    line-height: 1;
}

.category-card:hover .category-card-icon {
    background: #eff6ff;
}

/* ===== Popular Categories Visual Polish ===== */

.category-grid {
    gap: 20px;
}

.category-card {
    position: relative;
    overflow: hidden;

    min-height: 140px;

    padding: 26px 28px !important;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 18px;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

/* subtle top accent */
.category-card::before {
    content: "";
    position: absolute;

    left: 0;
    top: 0;

    width: 100%;
    height: 4px;

    background: linear-gradient(
        90deg,
        #2563eb,
        #60a5fa
    );

    opacity: .85;
}

.category-card:hover {
    transform: translateY(-4px);

    border-color: #bfdbfe;

    box-shadow:
        0 12px 30px rgba(15, 23, 42, .08);
}


/* title */
.category-card-title {
    display: flex;
    align-items: center;

    gap: 13px;

    margin-bottom: 16px;
}

.category-card-title > span:last-child {
    font-size: 17px;
    font-weight: 750;

    color: #0f172a;
}


/* icon */
.category-card-icon {
    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    border-radius: 13px;

    background: #eff6ff;

    font-size: 22px;

    transition:
        transform .18s ease,
        background .18s ease;
}

.category-card:hover .category-card-icon {
    transform: scale(1.06);

    background: #dbeafe;
}


/* app count */
.category-card > span {
    display: inline-flex;
    align-items: center;

    padding: 5px 10px;

    border-radius: 999px;

    background: #f8fafc;

    color: #64748b;

    font-size: 12px;
    font-weight: 600;
}


/* subtle arrow */
.category-card::after {
    content: "→";

    position: absolute;

    right: 24px;
    bottom: 23px;

    color: #94a3b8;

    font-size: 18px;
    font-weight: 700;

    transition:
        transform .18s ease,
        color .18s ease;
}

.category-card:hover::after {
    transform: translateX(4px);

    color: #2563eb;
}


/* mobile */
@media (max-width: 640px) {

    .category-card {
        min-height: 125px;
        padding: 22px !important;
    }

}

/* ===== Homepage Guides + Tech ===== */

.home-articles-section {
    padding-top: 72px;
    padding-bottom: 72px;
}

.home-tech-section {
    background: #f8fafc;
}

.article-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.home-article-card {
    display: flex;
    flex-direction: column;

    min-height: 240px;
    padding: 28px;

    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;

    text-decoration: none;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.home-article-card:hover {
    transform: translateY(-4px);
    border-color: #bfdbfe;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}

.article-card-badge {
    align-self: flex-start;

    margin-bottom: 18px;
    padding: 6px 10px;

    border-radius: 999px;

    background: #eff6ff;
    color: #2563eb;

    font-size: 12px;
    font-weight: 700;
}

.tech-card .article-card-badge {
    background: #eef2ff;
    color: #4f46e5;
}

.home-article-card h3 {
    margin: 0 0 14px;

    color: #0f172a;

    font-size: 20px;
    line-height: 1.4;
}

.home-article-card p {
    margin: 0;

    color: #64748b;

    font-size: 14px;
    line-height: 1.7;
}

.article-card-more {
    margin-top: auto;
    padding-top: 22px;

    color: #2563eb;

    font-size: 13px;
    font-weight: 700;
}

.home-article-empty {
    grid-column: 1 / -1;

    padding: 40px;

    border: 1px dashed #cbd5e1;
    border-radius: 16px;

    color: #64748b;
    text-align: center;
}

@media (max-width: 900px) {
    .article-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .article-card-grid {
        grid-template-columns: 1fr;
    }

    .home-article-card {
        min-height: 210px;
    }
}

/* ===== Articles full-card click ===== */

[data-card-clickable="1"] {
    cursor: pointer;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

[data-card-clickable="1"]:hover {
    transform: translateY(-4px);
    border-color: #bfdbfe;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}

[data-card-clickable="1"]:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 3px;
}


/* =====================================================
   Category Archive - Guides / Tech
   ===================================================== */

.category-archive {
    background: #ffffff;
}

.category-archive-hero {
    padding: 72px 0 54px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.category-archive-hero h1 {
    margin: 8px 0 12px;
    font-size: 42px;
    line-height: 1.15;
    color: #0f172a;
}

.category-archive-description {
    max-width: 680px;
    margin: 0;
    color: #64748b;
    font-size: 16px;
    line-height: 1.7;
}

.category-archive-content {
    padding: 64px 0 80px;
}

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

.category-article-card {
    display: flex;
    flex-direction: column;

    min-height: 280px;
    padding: 28px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 18px;

    text-decoration: none;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.category-article-card:hover {
    transform: translateY(-4px);

    border-color: #bfdbfe;

    box-shadow:
        0 12px 30px rgba(15, 23, 42, .07);
}

.category-article-badge {
    align-self: flex-start;

    margin-bottom: 20px;
    padding: 6px 11px;

    border-radius: 999px;

    background: #eff6ff;
    color: #2563eb;

    font-size: 12px;
    font-weight: 700;
}

.category-article-card h2 {
    margin: 0 0 14px;

    color: #0f172a;

    font-size: 21px;
    line-height: 1.4;
}

.category-article-card p {
    margin: 0;

    color: #64748b;

    font-size: 14px;
    line-height: 1.75;
}

.category-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-top: auto;
    padding-top: 24px;

    font-size: 12px;
}

.category-date {
    color: #94a3b8;
}

.category-read-more {
    color: #2563eb;
    font-weight: 700;
}

.category-pagination {
    margin-top: 50px;
}

.category-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.category-pagination a,
.category-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 40px;
    height: 40px;
    padding: 0 12px;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    text-decoration: none;

    color: #475569;
    background: #ffffff;
}

.category-pagination .current {
    color: #ffffff;
    background: #2563eb;
    border-color: #2563eb;
}

.category-empty {
    padding: 60px 20px;
    text-align: center;
}

.category-empty h2 {
    margin-bottom: 8px;
}

.category-empty p {
    color: #64748b;
}


@media (max-width: 900px) {

    .category-article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 600px) {

    .category-archive-hero {
        padding: 48px 0 38px;
    }

    .category-archive-hero h1 {
        font-size: 34px;
    }

    .category-article-grid {
        grid-template-columns: 1fr;
    }

    .category-article-card {
        min-height: 230px;
    }

}

/* ===== Trending country tabs mobile fix ===== */
@media (max-width: 640px) {

    .country-tabs {
        display: flex !important;
        width: 100% !important;
        overflow: visible !important;
        justify-content: stretch !important;
        gap: 6px !important;
    }

    .country-tabs a {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        text-align: center !important;
        white-space: nowrap;
    }

}

/* ==================================================
   BESTSPOT PAGINATION - HOTELFORU STYLE
================================================== */

.pagination,
.bestspot-pagination,
.page-pagination,
nav.pagination {
    width: 100%;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 38px auto 10px !important;
    clear: both;
}

/* paginate_links()가 ul을 만드는 경우 */
.pagination ul.page-numbers,
.bestspot-pagination ul.page-numbers,
.page-pagination ul.page-numbers,
nav.pagination ul.page-numbers {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pagination ul.page-numbers li,
.bestspot-pagination ul.page-numbers li,
.page-pagination ul.page-numbers li,
nav.pagination ul.page-numbers li {
    margin: 0 !important;
    padding: 0 !important;
}

/* paginate_links()가 링크를 직접 출력하는 경우도 대응 */
.pagination > .page-numbers,
.bestspot-pagination > .page-numbers,
.page-pagination > .page-numbers,
nav.pagination > .page-numbers,
.pagination ul.page-numbers a,
.pagination ul.page-numbers span,
.bestspot-pagination ul.page-numbers a,
.bestspot-pagination ul.page-numbers span,
.page-pagination ul.page-numbers a,
.page-pagination ul.page-numbers span,
nav.pagination ul.page-numbers a,
nav.pagination ul.page-numbers span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-width: 40px;
    height: 40px;
    padding: 0 13px;

    background: #fff;
    border: 1px solid #d9e0ea;
    border-radius: 8px;

    color: #0f172a;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;

    text-decoration: none !important;
    box-sizing: border-box;
    transition: all .18s ease;
}

/* 현재 페이지 */
.pagination .current,
.bestspot-pagination .current,
.page-pagination .current,
nav.pagination .current {
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #fff !important;
    font-weight: 700;
}

/* Hover */
.pagination a.page-numbers:hover,
.bestspot-pagination a.page-numbers:hover,
.page-pagination a.page-numbers:hover,
nav.pagination a.page-numbers:hover,
.pagination ul.page-numbers a:hover,
.bestspot-pagination ul.page-numbers a:hover {
    border-color: #0f172a;
    background: #f8fafc;
    color: #0f172a;
}

/* Prev / Next */
.pagination .prev,
.pagination .next,
.bestspot-pagination .prev,
.bestspot-pagination .next,
.page-pagination .prev,
.page-pagination .next,
nav.pagination .prev,
nav.pagination .next {
    width: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* ... */
.pagination .dots,
.bestspot-pagination .dots,
.page-pagination .dots,
nav.pagination .dots {
    background: #fff !important;
    color: #64748b !important;
}

@media (max-width: 640px) {
    .pagination,
    .bestspot-pagination,
    .page-pagination,
    nav.pagination {
        margin-top: 28px !important;
    }

    .pagination > .page-numbers,
    .bestspot-pagination > .page-numbers,
    .page-pagination > .page-numbers,
    nav.pagination > .page-numbers,
    .pagination ul.page-numbers a,
    .pagination ul.page-numbers span,
    .bestspot-pagination ul.page-numbers a,
    .bestspot-pagination ul.page-numbers span {
        min-width: 36px;
        height: 36px;
        padding: 0 11px;
        font-size: 13px;
    }
}


/* ===== BESTSPOT FINAL PAGINATION ===== */
.bestspot-pagination {
    width: 100%;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px;
    margin: 38px auto 12px !important;
    clear: both;
}

.bestspot-pagination .page-numbers {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 13px;
    box-sizing: border-box;

    background: #fff;
    border: 1px solid #d9e0ea;
    border-radius: 8px;

    color: #0f172a;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none !important;
}

.bestspot-pagination .page-numbers.current {
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #fff !important;
    font-weight: 700;
}

.bestspot-pagination a.page-numbers:hover {
    background: #f8fafc;
    border-color: #0f172a;
}

.bestspot-pagination .prev,
.bestspot-pagination .next {
    width: auto;
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 640px) {
    .bestspot-pagination {
        gap: 6px;
        margin-top: 28px !important;
    }

    .bestspot-pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 11px;
        font-size: 13px;
    }
}

/* ===== HOME GUIDE / TECH THUMBNAIL FINAL FIX ===== */
.home-latest-thumb {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
    border-radius: 14px !important;
    margin-bottom: 16px !important;
    background: #eef3f8;
}

.home-latest-thumb img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    display: block !important;
}


/* ==================================================
   CATEGORY GUIDES / TECH FEATURED IMAGE
================================================== */

.category-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
    margin-bottom: 22px;
    background: #eef3f8;
}

.category-card-thumb img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: cover !important;
    transition: transform .25s ease;
}

a:hover .category-card-thumb img {
    transform: scale(1.035);
}

.category-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        #eef3f8 0%,
        #dfe8f3 100%
    );
}

@media (max-width: 768px) {
    .category-card-thumb {
        border-radius: 12px;
        margin-bottom: 18px;
    }
}

