/* ============================================
   Responsive Enhancements & Mobile UX
   Targets: CLS prevention, touch targets, mobile CTAs,
   category/tool card grids, tables, sticky elements.
   ============================================ */

/* ---- Tool Cards (used in category.php) ---- */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tool-tile {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}

.tool-tile:hover {
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
    transform: translateY(-2px);
}

.tool-tile-header {
    padding: 1.25rem 1.25rem .75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.tool-tile-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: .5rem;
    border: 1px solid #e2e8f0;
    padding: .25rem;
    background: #fff;
    flex-shrink: 0;
}

.tool-tile-logo-fallback {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    border-radius: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
}

.tool-tile-meta {
    min-width: 0;
    flex: 1;
}

.tool-tile-badges {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .2rem;
}

.tool-tile-badge {
    font-size: .7rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 1rem;
}

.tool-tile-badge--rank {
    background: #eff6ff;
    color: #1e40af;
}

.tool-tile-badge--arabic {
    background: #f0fdf4;
    color: #166534;
}

.tool-tile-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-tile-body {
    padding: 1rem 1.25rem;
    flex: 1;
    min-width: 0;
}

.tool-tile-tagline {
    font-size: .875rem;
    color: #475569;
    margin: 0 0 .75rem;
    line-height: 1.5;
}

.tool-tile-rating {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .75rem;
}

.tool-tile-rating-score {
    font-size: .8rem;
    color: #64748b;
}

.tool-tile-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .75rem;
}

.tool-tile-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: .75rem;
    color: #475569;
    padding: .2rem .6rem;
    border-radius: 1rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-tile-pros {
    margin: 0 0 .75rem;
    padding-left: 1.1rem;
    font-size: .8rem;
    color: #374151;
}

.tool-tile-pros li {
    margin-bottom: .2rem;
}

.tool-tile-footer {
    padding: .75rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: .5rem;
}

.tool-tile-footer a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .6rem 1rem;
    border-radius: .5rem;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .15s, transform .15s;
}

.tool-tile-footer a:hover {
    opacity: .92;
}

.tool-tile-cta--primary {
    flex: 1;
    background: #1e40af;
    color: #fff;
}

.tool-tile-cta--secondary {
    background: #f0f4ff;
    color: #1e40af;
    white-space: nowrap;
}

/* ---- Mobile Sticky CTA Bar (Review pages) ---- */
.mobile-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .08);
    padding: .65rem .75rem;
    z-index: 100;
    gap: .5rem;
    align-items: center;
}

.mobile-sticky-cta-info {
    flex: 1;
    min-width: 0;
}

.mobile-sticky-cta-name {
    font-size: .8rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-sticky-cta-meta {
    font-size: .7rem;
    color: #64748b;
}

.mobile-sticky-cta-btn {
    background: #1e40af;
    color: #fff !important;
    text-decoration: none;
    padding: .75rem 1.1rem;
    border-radius: .5rem;
    font-size: .85rem;
    font-weight: 700;
    white-space: nowrap;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* ---- Guide Breadcrumb Banner ---- */
.guide-breadcrumb-banner {
    background: #f0f4ff;
    border-bottom: 1px solid #dbe4ff;
    padding: .75rem 0;
}

.guide-breadcrumb-inner {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .875rem;
    flex-wrap: wrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.guide-breadcrumb-inner a {
    color: #4f6ef7;
    text-decoration: none;
    white-space: nowrap;
}

.guide-breadcrumb-inner a:hover {
    text-decoration: underline;
}

.guide-breadcrumb-sep {
    color: #94a3b8;
    flex-shrink: 0;
}

.guide-breadcrumb-current {
    color: #334155;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .guide-breadcrumb-inner {
        font-size: .8rem;
        flex-wrap: nowrap;
    }
    .guide-breadcrumb-inner a {
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 30vw;
    }
}

/* ---- Category Hero adjustments ---- */
.cat-hero-icon {
    background: rgba(255, 255, 255, .15);
    border-radius: .75rem;
    padding: .6rem;
    display: flex;
    flex-shrink: 0;
}

.cat-hero-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.cat-guide-pills {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.cat-guide-pill {
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    text-decoration: none;
    padding: .5rem 1.1rem;
    border-radius: 2rem;
    font-size: .85rem;
    font-weight: 600;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
}

/* ---- Stats Bar ---- */
.stats-bar {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    flex-wrap: wrap;
}

.stats-bar-item-num {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e40af;
    display: block;
    line-height: 1.1;
}

.stats-bar-item-num--green {
    color: #059669;
}

.stats-bar-item-label {
    font-size: .75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ============================================
   Responsive — Tablet (max 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }

    .stats-bar {
        gap: 1.25rem;
        padding: .875rem 1rem;
    }
}

/* ============================================
   Responsive — Mobile (max 768px)
   ============================================ */
@media (max-width: 768px) {
    .tool-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tool-tile-header {
        padding: 1rem;
    }

    .tool-tile-body,
    .tool-tile-footer {
        padding: .875rem 1rem;
    }

    .tool-tile-name {
        white-space: normal;
    }

    /* Show sticky CTA on review pages */
    body.review-page .mobile-sticky-cta {
        display: flex;
    }

    /* Add bottom padding so sticky CTA doesn't cover footer */
    body.review-page {
        padding-bottom: 76px;
    }

    /* Stats bar — wrap to 2 cols */
    .stats-bar {
        gap: 1rem;
        padding: .875rem;
    }

    .stats-bar > div {
        flex: 1 1 calc(50% - .5rem);
        min-width: 0;
    }

    .stats-bar-item-num {
        font-size: 1.4rem;
    }

    /* Hide jump-nav on mobile (too crowded) */
    .jump-nav-links {
        max-height: 140px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Touch targets ≥ 44px */
    .cta-primary,
    .cta-secondary,
    .nav a,
    .footer a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Pricing cards stack vertically on mobile */
    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .pricing-card {
        text-align: left;
    }

    /* Hero buttons full-width */
    .review-hero .cta-primary,
    .hero .cta-primary {
        width: 100%;
        justify-content: center;
    }

    /* Sidebar cards full-width */
    .sidebar-card {
        margin-bottom: 1rem;
    }

    /* Article hero clean */
    .article-hero h1 {
        font-size: 1.5rem;
        line-height: 1.25;
    }

    .article-hero .meta {
        font-size: .8rem;
    }

    /* Pros/cons stack */
    .pros, .cons {
        padding: 1rem;
    }

    /* FAQ items full-width tap area */
    .faq-question {
        min-height: 48px;
    }

    /* Container padding tighter */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ============================================
   Responsive — Small phones (max 480px)
   ============================================ */
@media (max-width: 480px) {
    /* Tool tile compactness */
    .tool-tile-logo,
    .tool-tile-logo-fallback {
        width: 40px;
        height: 40px;
    }

    .tool-tile-name {
        font-size: .95rem;
    }

    .tool-tile-footer {
        flex-direction: column;
        gap: .5rem;
    }

    .tool-tile-cta--secondary {
        width: 100%;
    }

    /* Stats: full single column */
    .stats-bar > div {
        flex: 1 1 100%;
    }

    /* Mobile sticky bar — tighter */
    .mobile-sticky-cta {
        padding: .5rem;
    }

    .mobile-sticky-cta-btn {
        padding: .65rem .85rem;
        font-size: .8rem;
    }

    /* Review hero tighter */
    .review-hero h1 {
        font-size: 1.4rem;
    }

    .review-logo {
        max-width: 72px;
        max-height: 72px;
    }

    /* Tighter comparison table */
    .comparison-table th:nth-child(4),
    .comparison-table td:nth-child(4) {
        display: none;
    }
}

/* ============================================
   PROSE TYPOGRAPHY — markdown-rendered content
   ============================================ */

/* The article H1 from markdown was using browser default 2em — too large for mobile */
.prose h1 {
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 1.25rem;
    color: var(--color-text);
}

/* Prevent horizontal overflow from anything in prose */
.prose,
.prose * {
    max-width: 100%;
}

.prose img,
.prose iframe,
.prose video {
    height: auto;
}

.prose pre,
.prose code {
    overflow-x: auto;
    word-break: normal;
    white-space: pre-wrap;
}

/* Prose tables (rendered from markdown pipes) */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.prose table thead {
    background: #f8fafc;
}

.prose table th,
.prose table td {
    padding: .75rem 1rem;
    border: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.prose table th {
    font-weight: 700;
    color: #0f172a;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.prose table tbody tr:nth-child(even) {
    background: #fafbfc;
}

/* ============================================
   COMPARISON TABLE — polished SaaS-style
   ============================================ */

.table-wrapper {
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(15, 23, 42, 0.04);
    background: #fff;
    overflow: hidden;
}

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.comparison-table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #475569;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1.1rem 1.25rem;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
}

.comparison-table tbody td {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    color: #334155;
    vertical-align: middle;
    line-height: 1.5;
}

.comparison-table tbody tr {
    transition: background 0.15s ease;
}

.comparison-table tbody tr:hover {
    background: #f8fafc;
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

/* First-column tool name styling */
.comparison-table tbody td:first-child {
    font-weight: 600;
}

.comparison-table tbody td:first-child a {
    color: #1e40af;
    text-decoration: none;
    font-weight: 700;
}

.comparison-table tbody td:first-child a:hover {
    text-decoration: underline;
}

.comparison-table img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 0.4rem;
    border: 1px solid #e2e8f0;
    padding: 2px;
    background: #fff;
    vertical-align: middle;
    margin-right: 0.6rem;
}

/* Star rating cell tighter */
.comparison-table .star-rating {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

/* Action cell — stack buttons cleanly */
.comparison-table td:last-child {
    white-space: nowrap;
    text-align: right;
}

.comparison-table td:last-child .cta-primary,
.comparison-table td:last-child .cta-secondary {
    display: inline-flex;
    align-items: center;
    padding: .55rem 1rem;
    font-size: .82rem;
    font-weight: 600;
    border-radius: .5rem;
    text-decoration: none;
    transition: opacity .15s, transform .15s;
    min-height: 36px;
    margin: .15rem .2rem;
}

.comparison-table td:last-child .cta-primary {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: #fff;
    box-shadow: 0 1px 3px rgba(15, 118, 110, .25);
}

.comparison-table td:last-child .cta-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 118, 110, .35);
}

.comparison-table td:last-child .cta-secondary {
    background: #fff;
    color: #1e40af;
    border: 1px solid #c7d2fe;
}

.comparison-table td:last-child .cta-secondary:hover {
    background: #eff6ff;
}

/* Arabic support badge polish */
.comparison-table .support-badge {
    display: inline-flex;
    align-items: center;
    padding: .25rem .75rem;
    border-radius: 1rem;
    font-size: .75rem;
    font-weight: 700;
}

.comparison-table .support-badge--yes {
    background: #ecfdf5;
    color: #047857;
}

.comparison-table .support-badge--no {
    background: #fef2f2;
    color: #b91c1c;
}

@media (max-width: 768px) {
    .table-wrapper {
        border-radius: .75rem;
        overflow-x: auto;
    }
    .comparison-table {
        min-width: 720px;
    }
    .comparison-table thead th,
    .comparison-table tbody td {
        padding: .75rem .8rem;
        font-size: .8rem;
    }
    .comparison-table img {
        width: 26px;
        height: 26px;
        margin-right: .35rem;
    }
    .comparison-table td:last-child .cta-primary,
    .comparison-table td:last-child .cta-secondary {
        padding: .45rem .65rem;
        font-size: .72rem;
        margin: .1rem;
    }
}

/* ============================================
   BUG FIXES — list bullets, heading overflow, menu
   ============================================ */

/* Fix: pricing-list inherits .tool-content li::before teal dots */
.pricing-list li {
    padding-left: 0 !important;
}

.pricing-list li::before,
.related-list li::before,
.info-list li::before,
.faq-list li::before {
    display: none !important;
    content: none !important;
}

.pricing-list li {
    align-items: baseline;
    gap: 1rem;
}

.pricing-list li strong {
    color: var(--color-text);
    font-weight: 700;
    flex-shrink: 0;
}

.pricing-list li span {
    text-align: right;
    color: var(--color-text);
    font-weight: 600;
}

/* Fix: long words breaking layout on mobile (Checkout.com, 2026:, URLs) */
h1, h2, h3, h4, h5, h6 {
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.prose,
.prose p,
.prose li,
.article-content,
.review-main,
.tool-content {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Prevent any element from forcing horizontal overflow */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Fix: body scroll-lock when mobile menu open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Container never wider than viewport */
.container {
    max-width: 100%;
    box-sizing: border-box;
}

/* Article hero h1 — tighter on mobile so it doesn't clip */
@media (max-width: 768px) {
    .article-hero {
        padding: 2.5rem 0;
    }
    .article-hero h1 {
        font-size: 1.5rem;
        line-height: 1.25;
        margin: .75rem 0;
    }
    .article-hero .badge {
        font-size: .7rem;
    }
    .prose {
        font-size: 1rem;
        line-height: 1.75;
    }
    .prose h2 {
        font-size: 1.35rem;
        margin-top: 2rem;
        margin-bottom: .75rem;
    }
    .prose h3 {
        font-size: 1.1rem;
    }
    /* Pricing list responsive */
    .pricing-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: .15rem;
        padding: .6rem 0;
    }
    .pricing-list li span {
        text-align: left;
    }
    /* Tool card section h3 alignment */
    .tool-content-section h3 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .article-hero h1 {
        font-size: 1.25rem;
    }
    .prose h2 {
        font-size: 1.2rem;
    }
    .prose h3 {
        font-size: 1.05rem;
    }
    .review-hero h1 {
        font-size: 1.3rem;
        line-height: 1.25;
    }
    /* Smaller container gutters on tiny screens */
    .container {
        padding-left: .875rem;
        padding-right: .875rem;
    }
}

/* ============================================
   Reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ============================================
   Print-friendly review pages
   ============================================ */
@media print {
    .mobile-sticky-cta,
    .header,
    .footer,
    .sidebar,
    .cta-banner,
    .subscribe-box {
        display: none !important;
    }
}
/* ============================================
   GulfSaasReview — Homepage (compact directory style)
   Inspired by G2, Wirecutter, The Verge — density over whitespace
   ============================================ */

.home-page {
    background: #f7f9fc;
}

.home-page .container {
    max-width: 1240px;
}

/* ════════════════════════════════════════════════════════════
   1. SLIM HERO — ~220px tall, dense
   ════════════════════════════════════════════════════════════ */
.hp-hero {
    background:
        radial-gradient(ellipse 600px 250px at 80% 0%, rgba(20, 184, 166, 0.15), transparent 60%),
        linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #fff;
    padding: 1.75rem 0 1.5rem;
}

.hp-hero-row {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: center;
}

.hp-hero-text {
    min-width: 0;
}

.hp-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hp-pulse-dot {
    width: 6px;
    height: 6px;
    background: #14b8a6;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(20, 184, 166, 0.7);
    animation: hpPulse 2s ease-in-out infinite;
}
@keyframes hpPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.hp-hero h1 {
    font-size: clamp(1.05rem, 2vw, 1.5rem);
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    letter-spacing: -0.01em;
    color: #fff;
    max-width: 640px;
}

.hp-hl {
    color: #5eead4;
    font-weight: 600;
}

.hp-hero-search {
    display: flex;
    background: #fff;
    border-radius: 0.5rem;
    padding: 0.2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    height: 44px;
}

.hp-hero-search input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 0 0.85rem;
    font-size: 0.88rem;
    color: #0f172a;
    outline: none;
}

.hp-hero-search button {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
    border: none;
    border-radius: 0.4rem;
    padding: 0 1.1rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.hp-trust-pills {
    display: flex;
    gap: 0;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    color: #cbd5e1;
    flex-wrap: wrap;
}

.hp-trust-pills span {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    padding: 0 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.hp-trust-pills span:first-child { padding-left: 0; }
.hp-trust-pills span:last-child { border-right: none; }

.hp-trust-pills strong {
    color: #fff;
    font-weight: 700;
}

/* ════════════════════════════════════════════════════════════
   GENERIC SECTION STRUCTURE — tight
   ════════════════════════════════════════════════════════════ */
.hp-section {
    padding: 2rem 0 2.25rem;
    background: #fff;
}

.hp-section--alt {
    background: #f7f9fc;
}

.hp-sec-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.hp-sec-head h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}

.hp-sec-sub {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0.25rem 0 0;
    width: 100%;
}

.hp-sec-link {
    color: #1e40af;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.hp-sec-link:hover { text-decoration: underline; }
.hp-sec-link--small { font-size: 0.76rem; }

/* ════════════════════════════════════════════════════════════
   2. TWO-COLUMN: TABLE + SIDEBAR
   ════════════════════════════════════════════════════════════ */
.hp-twocol {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

.hp-twocol-main { min-width: 0; }

/* Top picks table */
.hp-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.hp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.hp-table thead th {
    background: #f8fafc;
    text-align: left;
    padding: 0.65rem 0.9rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.hp-table tbody td {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #334155;
}

.hp-table tbody td.hp-td-action { text-align: right; }

.hp-table tbody tr:hover { background: #fafbfc; }
.hp-table tbody tr:last-child td { border-bottom: none; }

.hp-td-cat a {
    color: #4f6ef7;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.78rem;
}
.hp-td-cat a:hover { text-decoration: underline; }

.hp-td-tool {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.hp-td-tool img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    border-radius: 0.3rem;
    border: 1px solid #e2e8f0;
    padding: 2px;
    background: #fff;
    flex-shrink: 0;
}

.hp-logo-fallback {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #1e40af, #4f6ef7);
    color: #fff;
    font-weight: 800;
    font-size: 0.78rem;
    border-radius: 0.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hp-td-tool a {
    color: #0f172a;
    text-decoration: none;
    font-weight: 700;
}
.hp-td-tool a:hover { color: #1e40af; }

.hp-rating-pill {
    display: inline-block;
    background: #ecfdf5;
    color: #047857;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.hp-td-price {
    color: #64748b;
    font-size: 0.78rem;
    white-space: nowrap;
}

.hp-btn-cta {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
    text-decoration: none;
    padding: 0.4rem 0.85rem;
    border-radius: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    transition: transform .12s;
    display: inline-block;
}
.hp-btn-cta:hover { transform: translateY(-1px); }

/* Sidebar cards */
.hp-twocol-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hp-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    overflow: hidden;
}

.hp-card-head {
    padding: 0.7rem 0.9rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.hp-card-head h3 {
    font-size: 0.85rem;
    font-weight: 800;
    margin: 0;
    color: #0f172a;
}

.hp-list-tight {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hp-list-tight li {
    border-bottom: 1px solid #f1f5f9;
}

.hp-list-tight li:last-child { border-bottom: none; }

.hp-list-tight a {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    text-decoration: none;
    transition: background .12s;
}

.hp-list-tight a:hover { background: #f8fafc; }

.hp-list-cat {
    font-size: 0.68rem;
    font-weight: 700;
    color: #4f6ef7;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    min-width: 50px;
}

.hp-list-title {
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
}

/* ════════════════════════════════════════════════════════════
   3. CATEGORY STRIP
   ════════════════════════════════════════════════════════════ */
.hp-strip-section {
    padding: 1.25rem 0;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.hp-strip-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.hp-strip-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hp-cat-strip {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.hp-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    text-decoration: none;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color .12s, color .12s, background .12s;
}

.hp-cat-pill:hover {
    background: #eff6ff;
    border-color: #4f6ef7;
    color: #1e40af;
}

.hp-cat-pill-icon {
    display: inline-flex;
    align-items: center;
    color: #4f6ef7;
}

.hp-cat-pill-icon svg {
    width: 14px;
    height: 14px;
}

/* ════════════════════════════════════════════════════════════
   4. COUNTRY TABS
   ════════════════════════════════════════════════════════════ */
.hp-country-tabs {
    display: flex;
    gap: 0.4rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hp-country-tab {
    background: transparent;
    border: none;
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .12s, border-color .12s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    margin-bottom: -1px;
}

.hp-country-tab:hover { color: #1e40af; }

.hp-country-tab.active {
    color: #1e40af;
    border-bottom-color: #4f6ef7;
}

.hp-country-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.hp-country-panel {
    display: none;
}

.hp-country-panel.active {
    display: block;
}

.hp-country-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.9rem;
    font-size: 0.82rem;
}

.hp-country-meta strong { color: #0f172a; }
.hp-country-meta span { color: #64748b; }

.hp-country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}

.hp-country-card {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    transition: border-color .12s, box-shadow .12s, transform .12s;
}

.hp-country-card:hover {
    border-color: #4f6ef7;
    box-shadow: 0 4px 14px rgba(79, 110, 247, 0.1);
    transform: translateY(-1px);
}

.hp-country-card-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    color: #4f6ef7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hp-country-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0.25rem 0 0.45rem;
    line-height: 1.3;
}

.hp-country-card-meta {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

.hp-country-empty {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0;
}

/* ════════════════════════════════════════════════════════════
   5. LATEST GUIDES — compact 4-up cards
   ════════════════════════════════════════════════════════════ */
.hp-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.85rem;
}

.hp-guide-mini {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    overflow: hidden;
    text-decoration: none;
    transition: border-color .12s, box-shadow .12s, transform .12s;
}

.hp-guide-mini:hover {
    border-color: #4f6ef7;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.hp-guide-mini-bar {
    display: flex;
    justify-content: space-between;
    background: linear-gradient(90deg, #1e40af 0%, #4f6ef7 100%);
    padding: 0.5rem 0.85rem;
    color: #fff;
}

.hp-guide-mini-cat {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.hp-guide-mini-count {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}

.hp-guide-mini h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0.75rem 0.9rem 0.4rem;
    line-height: 1.3;
}

.hp-guide-mini p {
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.5;
    margin: 0 0.9rem 0.75rem;
    flex: 1;
}

.hp-guide-mini-date {
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 600;
    margin: 0 0.9rem 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ════════════════════════════════════════════════════════════
   6. COMBINED FOOTER STRIP
   ════════════════════════════════════════════════════════════ */
.hp-foot-strip {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #fff;
    padding: 2rem 0 2.5rem;
}

.hp-foot-row {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2rem;
    align-items: start;
}

.hp-foot-trust {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.hp-foot-trust-row {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.5;
}

.hp-foot-trust-row strong {
    color: #fff;
    font-weight: 700;
}

.hp-foot-trust-icon {
    width: 28px;
    height: 28px;
    background: rgba(20, 184, 166, 0.15);
    border-radius: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #5eead4;
}

.hp-foot-trust-icon svg {
    width: 16px;
    height: 16px;
}

.hp-foot-news h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
    color: #fff;
    line-height: 1.3;
}

.hp-foot-news p {
    color: #cbd5e1;
    font-size: 0.78rem;
    margin: 0 0 0.65rem;
}

.hp-foot-news form {
    display: flex;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.45rem;
    padding: 0.25rem;
}

.hp-foot-news input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 0.5rem 0.7rem;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
}

.hp-foot-news input::placeholder { color: #94a3b8; }

.hp-foot-news button {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
    border: none;
    border-radius: 0.35rem;
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .hp-twocol {
        grid-template-columns: 1fr;
    }
    .hp-hero-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .hp-hero-search {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .hp-hero {
        padding: 1.4rem 0 1.25rem;
    }

    .hp-hero h1 {
        font-size: 1.05rem;
        line-height: 1.35;
    }

    .hp-hero-search {
        height: 42px;
    }

    /* Trust pills — wrap to 2 columns cleanly */
    .hp-trust-pills {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem 1rem;
        margin-top: 0.85rem;
        font-size: 0.72rem;
    }
    .hp-trust-pills span {
        display: flex;
        align-items: baseline;
        gap: 0.35rem;
    }

    .hp-section {
        padding: 1.5rem 0;
    }

    .hp-sec-head {
        margin-bottom: 0.75rem;
    }

    .hp-sec-head h2 {
        font-size: 1.05rem;
    }

    /* ════ Top picks table → CARD list on mobile ════ */
    .hp-table-wrap {
        background: transparent;
        border: none;
        box-shadow: none;
        overflow: visible;
    }

    .hp-table,
    .hp-table tbody,
    .hp-table tr,
    .hp-table td {
        display: block;
        width: 100%;
    }

    .hp-table thead {
        display: none;
    }

    .hp-table tbody tr {
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 0.6rem;
        padding: 0.85rem 1rem;
        margin-bottom: 0.6rem;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "cat    rating"
            "tool   tool"
            "price  action";
        gap: 0.5rem;
        align-items: center;
    }

    .hp-table tbody tr:hover {
        background: #fff;
    }

    .hp-table tbody td {
        padding: 0;
        border: none;
    }

    .hp-table tbody .hp-td-cat    { grid-area: cat; }
    .hp-table tbody .hp-td-tool   { grid-area: tool; }
    .hp-table tbody .hp-td-rating { grid-area: rating; text-align: right; }
    .hp-table tbody .hp-td-price  { grid-area: price; font-size: 0.78rem; color: #64748b; }
    .hp-table tbody .hp-td-action { grid-area: action; text-align: right; }

    .hp-table .hp-td-cat a {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #4f6ef7;
        font-weight: 700;
    }

    .hp-table .hp-td-tool {
        gap: 0.65rem;
    }

    .hp-table .hp-td-tool a {
        font-size: 0.95rem;
    }

    .hp-table .hp-td-tool img,
    .hp-table .hp-logo-fallback {
        width: 30px;
        height: 30px;
    }

    .hp-btn-cta {
        padding: 0.45rem 0.85rem;
        font-size: 0.8rem;
    }

    /* ════ Two-column layout collapses cleanly ════ */
    .hp-twocol-side {
        gap: 0.75rem;
    }

    /* ════ Footer + guides ════ */
    .hp-foot-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .hp-foot-news form {
        flex-direction: column;
    }

    .hp-foot-news button {
        width: 100%;
    }

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

    /* ════ Country tabs — only first 4 visible without scroll ════ */
    .hp-country-tab {
        font-size: 0.78rem;
        padding: 0.45rem 0.65rem;
    }

    .hp-country-name { display: none; }
    .hp-country-tab.active .hp-country-name { display: inline; }

    /* ════ Category strip — tighter ════ */
    .hp-cat-pill {
        padding: 0.4rem 0.75rem;
        font-size: 0.74rem;
    }

    /* ════ Sidebar list items — single column readable ════ */
    .hp-list-tight a {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
        padding: 0.55rem 0.85rem;
    }

    .hp-list-cat {
        min-width: 0;
    }

    .hp-list-title {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hp-trust-pills {
        font-size: 0.68rem;
    }

    .hp-country-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .hp-country-grid {
        grid-template-columns: 1fr;
    }

    .hp-foot-trust-row {
        font-size: 0.78rem;
    }
}

