/**
* Buyer's Guide Page Styles
* Comprehensive buyer's guide for software categories
* URL: /{vertical}/{category-slug}/buyers-guide/
*/

/* ==========================================================================
Page Color Override
========================================================================== */

body.light-theme {
    color: var(--color-primary);
}

/* Force light-theme styles on AI search via body class */
body.light-theme .ai-input-outer .modal-form .ai-input-form-inner,
body.light-theme .ai-input-outer .modal-form,
body.light-theme .ai-input-outer .ai-input-form {
    background-color: rgb(242 243 232) !important;
}

body.light-theme .ai-input-outer .ai-input::placeholder {
    color: rgba(190, 189, 170, 0.8) !important;
}

.ai-search-outer:not(.light-theme) .ai-input-voice-button.idle .sound-bars .bar {
    box-shadow: none !important;
    background-color: var(--color-primary) !important;
}

#header-outer.at-top a#logo:before,
#header-outer a#logo:before {
    content: none !important;
}

#header-outer.at-top a#logo img,
#header-outer a#logo img {
    display: block !important;
}

/* ==========================================================================
Article Container
========================================================================== */

.buyers-guide-article {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0 10rem;
    color: var(--text-primary);
}

/* ==========================================================================
Top Bar (Breadcrumbs)
========================================================================== */

.buyers-guide-top-bar {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.buyers-guide-breadcrumbs {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.buyers-guide-breadcrumbs a {
    color: var(--text-gray);
    text-decoration: none;
}

.buyers-guide-breadcrumbs a:hover {
    color: var(--text-primary);
}

.buyers-guide-breadcrumbs .separator {
    margin: 0 0.5rem;
    opacity: 0.5;
}

.buyers-guide-breadcrumbs .current {
    color: var(--text-primary);
}

.icon-left.icon-document>*:before {
    filter: invert(1);
    opacity: 0.8;
}
.icon-left.icon-document>*:hover:before {
    opacity: 1;
}

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

.buyers-guide-header {
    margin: 4rem 0;
    border-bottom: 1px solid var(--border-light);
}

.buyers-guide-header h1 {
    font-size: 4.5rem;
    line-height: 5.5rem;
    margin-bottom: 1rem;
}

.buyers-guide-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    color: var(--text-gray);
}

.buyers-guide-meta .reading-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.buyers-guide-meta .reading-time::before {
    content: '';
    width: 1rem;
    height: 1rem;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23252827" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg>') no-repeat center;
    background-size: contain;
    opacity: 0.3;
}

.buyers-guide-meta .meta-separator {
    opacity: 0.3;
}

.buyers-guide-meta .guide-year {
    font-weight: 600;
    color: var(--accent-color);
}

/* ==========================================================================
Section Base Styles
========================================================================== */

.buyers-guide-section {
    margin-bottom: 2rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-light);
}

.buyers-guide-section.buyers-guide-implementation,
.buyers-guide-section.buyers-guide-hidden-costs {
    margin-bottom: 4rem;
}

.buyers-guide-section:last-of-type {
    border-bottom: none;
}

.buyers-guide-section h2 {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.buyers-guide-section h3 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin: 3rem 0 1.5rem;;
    color: var(--text-primary);
}

.buyers-guide-section .section-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.buyers-guide-section .section-content p {
    margin-bottom: 1.5rem;
}

.buyers-guide-section .section-content p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
Evaluation Checklist
========================================================================== */

.evaluation-checklist,
.red-flags-callout {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: var(--border-radius-p-2);
    background: white;
    box-shadow: 0 3px 32px 0 #c4c3b647;
}

.evaluation-checklist h3 {
    margin: 0 0 1.5rem;
}

.checklist-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-light);
}

.checklist-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

span.priority-badge-container {
    min-width: 5.5rem;
    display: flex;
}

.priority-badge {
    flex-shrink: 0;
    padding: 0.3rem 0.5rem;
    border-radius: 1rem 1rem 1rem 0;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    line-height: 1rem;
}

.priority-critical .priority-badge {
    background: #abe8d6;
    color: #0e4535;
}

.priority-important .priority-badge {
    background: #cef2d2;
    color: #55825a;
}

.priority-nice-to-have .priority-badge {
    background: #e5f9db;
    color: #809774;
}

.checklist-item .item-text {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
}

/* ==========================================================================
Red Flags Callout
========================================================================== */

.red-flags-callout h3 {
    margin-top: 0;
    color: #991b1b;
}

.red-flags-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.red-flags-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.red-flags-list li:last-child {
    margin-bottom: 0;
}

.red-flags-list li::before {
    content: '';
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.2rem;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23991b1b"><path d="M4 5v16h2V5H4zm4 0v9h12l-3-4.5L20 5H8z"/></svg>') no-repeat center;
    background-size: contain;
    opacity: 0.3;
}

/* Red flag items with title: description pattern */
.red-flags-list li.has-title {
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 1.85rem;
    position: relative;
    margin-bottom: 1.25rem;
}

.red-flags-list li.has-title::before {
    position: absolute;
    left: 0;
    top: 0.1rem;
    margin-top: 0;
}

.red-flags-list li.has-title h4 {
    font-size: 1rem;
    margin: 0;
    color: #991b1b;
}

.red-flags-list li.has-title p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-body);
    margin: 0;
}

/* ==========================================================================
Implementation Timeline
========================================================================== */

.implementation-timeline {
    margin-top: 2rem;
}

.timeline-phases {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5rem;
}

.timeline-phase {
    display: flex;
    gap: 1.5rem;
}

.phase-number {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.3rem;
    opacity: 0.15;
}

.phase-content {
    flex: 1;
}

.phase-content-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.phase-content h4 {
    font-size: 1.1rem;
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
}

.phase-duration {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    background: var(--color-light-2);
    border-radius: 100px;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
    line-height: 1rem;
}

.phase-focus {
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* ==========================================================================
Hidden Costs Grid
========================================================================== */

.hidden-costs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5rem;
    margin-top: 2rem;
}

.hidden-cost-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hidden-cost-card .cost-name {
    font-size: 1.3rem;
    line-height: 1.4;
}

.hidden-cost-card .cost-typical {
    color: var(--text-link);
    font-size: 0.95rem;
}

.hidden-cost-card .cost-watch {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-top: 0.6rem;
}

/* ==========================================================================
Category-Specific Considerations
========================================================================== */

.buyers-guide-category-specific .category-specific-item {
    margin-bottom: 6rem;
}

.buyers-guide-category-specific .category-specific-item:last-child {
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .buyers-guide-category-specific .category-specific-item {
        margin-bottom: 3rem;
    }
}

/* ==========================================================================
Milestones Roadmap
========================================================================== */

.milestones-roadmap {
    margin-top: 2rem;
}

.milestones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
}

.milestone-card {
    padding: 1.5rem 2rem;
    background: var(--color-light-2);
    border-radius: var(--border-radius-p);
    border-top: 3px solid var(--accent-color);
}

.milestone-timeframe {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.milestone-goals {
    margin: 0;
    padding-left: 0;
    list-style: none !important;
}

.milestone-goals li {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-primary);
    list-style: none !important;
}

.milestone-goals li::before {
    display: none !important;
}

.milestone-goals li::marker {
    display: none !important;
    content: none !important;
}

.milestone-goals li:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
KPI Cards
========================================================================== */

.kpi-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-top: 2rem;
}

.kpi-card {
    padding: 1.5rem;
    border-radius: var(--border-radius-p);
    background: white;
    box-shadow: 0 3px 32px 0 #c4c3b647;
}

.kpi-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.kpi-header h4 {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.kpi-badge {
    flex-shrink: 0;
    padding: 0.2rem 0.5rem;
    background: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 100px;
}

.kpi-row {
    display: flex;
    align-items: center;
    padding: 0.5rem 0 0;
    border-top: 1px solid var(--border-light);
}

.kpi-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    min-width: 4rem;
}

.kpi-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

/* ==========================================================================
Promo Section
========================================================================== */

.buyers-guide-promo-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-light);
}

.buyers-guide-promo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.buyers-guide-promo-card {
    display: flex;
    flex-direction: column;
    padding: 3rem 4rem 4rem;
    background: var(--color-light-2);
    border-radius: var(--border-radius-p-2);
}

.buyers-guide-promo-card.coming-soon {
    opacity: 0.7;
}

.buyers-guide-promo-card .promo-card-content {
    flex: 1;
    margin-bottom: 1.5rem;
}

.buyers-guide-promo-card .promo-card-content h3 {
    font-size: 2.25rem;
    line-height: 2.5rem;
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
}

.buyers-guide-promo-card .promo-card-content p {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-dark);
    margin: 0;
}

.buyers-guide-promo-card .promo-card-cta {
    align-self: flex-start;
    text-decoration: none;
    width: auto !important;
    min-width: 18rem;
}

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

.before-footer {
    background: var(--bg-dark) !important;
}

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

@media (max-width: 1024px) {
    
    .milestones-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hidden-costs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    
    .buyers-guide-article {
        padding: 1.5rem 1rem 5rem;
    }
    
    .buyers-guide-section {
        margin-bottom: 1rem;
        padding-bottom: 2rem;
    }
    
    .checklist-item {
        gap: 0.5rem;
    }
    
    .hidden-costs-grid {
        grid-template-columns: 1fr;
    }
    
    .milestones-grid {
        grid-template-columns: 1fr;
    }
    
    .kpi-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .buyers-guide-promo-grid {
        grid-template-columns: 1fr;
    }
    
    .buyers-guide-promo-card {
        padding: 2rem;
    }
    
    .buyers-guide-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .buyers-guide-breadcrumbs {
        font-size: 0.8rem;
    }
    
    .buyers-guide-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .timeline-phases {
        gap: 2rem;
        grid-template-columns: 1fr;
    }
    
    .timeline-phase {
        gap: 1rem;
    }
    
    .evaluation-checklist,
    .red-flags-callout {
        padding: 1.5rem;
    }
}
