/* ===== FORCE FULL WIDTH FOR MAIN CONTENT ONLY ===== */
body.post-type-archive-ai-tools .site-content,
body.post-type-archive-ai-tools .content-area,
body.post-type-archive-ai-tools .site-main,
body.post-type-archive-ai-tools .inside-article,
body.post-type-archive-ai-tools article,
body.post-type-archive-ai-tools .entry-content,

body.home .site-content,
body.home .content-area,
body.home .site-main,
body.home .inside-article,
body.home article,
body.home .entry-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===== REMOVE DEFAULT WRAPPING FOR MAIN CONTENT ONLY ===== */
body.post-type-archive-ai-tools .separate-containers .inside-article,
body.post-type-archive-ai-tools .separate-containers .comments-area,
body.post-type-archive-ai-tools .one-container .container,

body.home .separate-containers .inside-article,
body.home .separate-containers .comments-area,
body.home .one-container .container {
    padding: 0 !important;
    margin: 0 !important;
}

/* ===== PREVENT HORIZONTAL SCROLL ===== */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ===== AI TOOLS LISTING TEMPLATES ===== */
body.home .site-main,
body.home .content-area,
body.home .entry-content,
body.home article,
body.post-type-archive-ai-tools .site-main,
body.post-type-archive-ai-tools .content-area,
body.post-type-archive-ai-tools .entry-content,
body.post-type-archive-ai-tools article,
body.tax-ai_tool_category .site-main,
body.tax-ai_tool_category .content-area,
body.tax-ai_tool_category .entry-content,
body.tax-ai_tool_category article,
body.page-template-page-ai-app-builder .site-main,
body.page-template-page-ai-app-builder .content-area,
body.page-template-page-ai-app-builder .entry-content,
body.page-template-page-ai-app-builder article {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ===== MAIN WRAPPER ===== */
.ai-tools-wrap {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Inter', sans-serif;
}

/* ===== HERO ===== */
.ai-tools-hero {
    margin: 0 0 30px;
    background: #F5F0EA;
    padding: 34px 20px;
    border-radius: 0;
    border-left: 0;
}

.ai-tools-hero h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #111827;
    font-weight: 600;
}

.ai-tools-hero p {
    max-width: 760px;
    color: #374151;
    font-size: 15px;
    line-height: 1.65;
}

.last-updated {
    margin-top: 12px;
    font-size: 13px;
    color: #D97706;
    font-weight: 700;
}

/* ===== DEAL BADGE ===== */
.tool-deal {
    display: inline-block;
    background: #FFFBEB;
    border: 1px dashed #F59E0B;
    color: #111827;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    width: fit-content;
}

.tool-deal:hover {
    background: #FEF3C7;
    color: #111827;
}

/* ===== TOOL CARD ===== */
.tool-card {
    display: grid;
    grid-template-columns: 180px 1fr 120px 170px;
    align-items: center;
    gap: 24px;
    background: #fff;
    border-radius: 14px;
    padding: 26px 24px 22px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    margin-bottom: 18px;
    position: relative;
    overflow: visible;
}

.tool-card.is-featured {
    border-color: #F97316;
}

/* ===== RANK + BADGE ===== */
.tool-rank {
    position: absolute;
    top: -1px;
    left: 0;
    background: #DBEAFE;
    color: #111827;
    min-width: 48px;
    height: 22px;
    border-radius: 12px 0 0 0;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.editor-badge {
    position: absolute;
    top: -1px;
    left: 48px;
    height: 22px;
    padding: 0 18px;
    background: #EF233C;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 10px 0;
    z-index: 2;
}

/* ===== LEFT IMAGE ===== */
.tool-left {
    text-align: center;
}

.tool-logo-wrap {
    width: 172px;
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: transparent;
}

.tool-logo {
    max-width: 172px;
    max-height: 112px;
    width: auto;
    height: auto;
    object-fit: contain;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    display: block;
}

.tool-logo-placeholder {
    width: 172px;
    height: 112px;
    border-radius: 8px;
    background: #F1F5F9;
    border: none;
}

.tool-brand {
    margin-top: 8px;
    font-weight: 700;
    font-size: 14px;
    color: #111827;
}

/* ===== CONTENT ===== */
.tool-content {
    min-width: 0;
}

.tool-name {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.4;
}

.tool-pros {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pro-item {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.45;
}

.pro-item::before {
    content: "\2713";
    color: #22C55E;
    margin-right: 7px;
}

/* ===== SCORE CENTER ===== */
.tool-score-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tool-score-box {
    width: 102px;
    min-height: 98px;
    border: 1px solid #E5E7EB;
    border-radius: 9px;
    padding: 12px 10px;
    text-align: center;
    background: #fff;
}

.tool-score {
    font-size: 30px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
    margin-bottom: 8px;
}

.tool-score-label {
    font-size: 13px;
    color: #111827;
    margin-bottom: 4px;
}

.tool-stars {
    color: #FACC15;
    font-size: 13px;
    letter-spacing: 1px;
    line-height: 1;
}

.tool-review-link {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #3B5BDB;
    text-decoration: none;
}

.tool-review-link:hover {
    text-decoration: underline;
}

/* ===== CTA RIGHT ===== */
.tool-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.tool-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #3B4FA3;
    color: #fff;
    padding: 13px 18px;
    border-radius: 7px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 6px 12px rgba(59,79,163,0.25);
}

.tool-btn:hover {
    background: #2F4088;
    color: #fff;
}

.tool-free-quote {
    font-size: 15px;
    color: #3867FF;
    text-decoration: none;
}

.tool-free-quote:hover {
    text-decoration: underline;
}

/* ===== MOBILE ===== */
@media (max-width: 900px) {
    .tool-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 34px;
    }

    .tool-content {
        text-align: left;
    }

    .tool-actions {
        width: 100%;
    }

    .tool-btn {
        max-width: 240px;
    }
}

/* ===== FULL-WIDTH BEIGE HERO FOR HOME + ARCHIVE/LIST PAGES ===== */

.ai-tools-hero,
.review-archive-hero,
.article-archive-hero,
.comparison-archive-hero {
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    margin-top: 0 !important;
    margin-bottom: 30px !important;
    background: #F5F0EA !important;
    border-radius: 0 !important;
    border-left: 0 !important;
    padding: 34px max(20px, calc((100vw - 1100px) / 2 + 20px)) !important;
}

/* Keep inner content aligned with the 1100px homepage content column */
.review-archive-hero-inner,
.article-archive-hero-inner,
.comparison-archive-hero-inner {
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* Same title style as homepage */
.review-archive-hero h1,
.article-archive-hero h1,
.comparison-archive-hero h1 {
    margin: 0 0 10px !important;
    font-size: 28px !important;
    line-height: 1.25 !important;
    font-weight: 500 !important;
    color: #111827 !important;
}

/* Prevent horizontal scrollbar from full-width hero */
html,
body {
    overflow-x: hidden;
}

.home-seo-content-wrap {
    max-width: 1180px;
    margin: 56px auto 80px;
    padding: 0 20px;
}

.home-seo-content {
    max-width: 860px;
    font-size: 16px;
    line-height: 1.75;
    color: #374151;
}

.home-seo-content h2 {
    margin: 42px 0 14px;
    font-size: 26px;
    line-height: 1.3;
    font-weight: 800;
    color: #111827;
}

.home-seo-content h3 {
    margin: 30px 0 12px;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 800;
    color: #111827;
}

.home-seo-content h4 {
    margin: 24px 0 10px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
    color: #111827;
}

.home-seo-content p {
    margin: 0 0 18px;
}

.home-seo-content ul,
.home-seo-content ol {
    margin: 0 0 22px 24px;
    padding: 0;
}

.home-seo-content li {
    margin-bottom: 8px;
}

.home-seo-content strong {
    font-weight: 800;
    color: #111827;
}

.home-seo-content a {
    color: #3867FF;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.home-seo-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 20px 0;
}

.home-seo-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 26px 0;
    font-size: 15px;
    line-height: 1.5;
}

.home-seo-content th,
.home-seo-content td {
    border: 1px solid #e5e7eb;
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
}

.home-seo-content th {
    background: #26345f;
    color: #fff;
    font-weight: 800;
}

@media (max-width: 767px) {
    .home-seo-content-wrap {
        margin: 42px auto 60px;
        padding: 0 16px;
    }

    .home-seo-content {
        max-width: 100%;
        font-size: 15px;
        line-height: 1.75;
    }

    .home-seo-content h2 {
        font-size: 22px;
    }

    .home-seo-content h3 {
        font-size: 19px;
    }

    .home-seo-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}