/* =====================================================
   MOTORS365 — Buying Guides
   Matches the navy/gold design system from styles.css
   ===================================================== */

/* =========================
   GUIDE LISTING PAGE
   ========================= */
.guides-hero {
    padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
    text-align: center;
}
.guides-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem;
}
.guides-hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}
.guides-count {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.4rem 1rem;
    background: var(--gold-muted);
    color: var(--gold);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Guide Grid */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    padding-bottom: var(--section-padding);
}
@media (max-width: 768px) {
    .guides-grid {
        grid-template-columns: 1fr;
    }
}

/* Guide Card */
.guide-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-gold);
}
.guide-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}
.guide-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.guide-card:hover .guide-card-image img {
    transform: scale(1.05);
}
.guide-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(8px);
    color: var(--gold);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.guide-card-score {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--navy-950);
}
.guide-card-score.score-high { background: var(--success); }
.guide-card-score.score-mid { background: var(--gold); }
.guide-card-score.score-low { background: var(--warning); }

.guide-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.guide-card-body h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}
.guide-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.guide-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.guide-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.guide-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--gold);
    font-size: 0.875rem;
    font-weight: 600;
    transition: gap var(--transition-fast);
}
.guide-card:hover .guide-card-cta {
    gap: 0.7rem;
}

/* =========================
   INDIVIDUAL GUIDE PAGE
   ========================= */

/* Hero */
.guide-hero {
    position: relative;
    height: clamp(320px, 50vh, 480px);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}
.guide-hero-image {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.guide-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.guide-hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--navy-950) 0%, rgba(10, 22, 40, 0.6) 50%, rgba(10, 22, 40, 0.3) 100%);
}
.guide-hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 2rem clamp(1rem, 4vw, 2rem);
}
.guide-hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
    line-height: 1.2;
}
.guide-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.guide-hero-tags span {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    color: var(--text-secondary);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}
.guide-hero-tags .tag-score {
    background: var(--gold-muted);
    color: var(--gold);
    font-weight: 700;
}

/* Breadcrumbs */
.guide-breadcrumbs {
    padding: 1rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.guide-breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.guide-breadcrumbs a:hover { color: var(--gold); }
.guide-breadcrumbs span { margin: 0 0.4rem; }

/* Layout */
.guide-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    padding-bottom: var(--section-padding);
}
@media (max-width: 1024px) {
    .guide-layout {
        grid-template-columns: 1fr;
    }
}

/* Content Sections */
.guide-content section {
    margin-bottom: 3rem;
}
.guide-content h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}
.guide-content h2 .section-icon {
    margin-right: 0.5rem;
    color: var(--gold);
}
.guide-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}
.guide-content p:last-child {
    margin-bottom: 0;
}

/* Verdict Card */
.guide-verdict {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(212, 168, 85, 0.05) 100%);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.guide-verdict-score {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.guide-verdict-score .score-number {
    font-size: 1.5rem;
    line-height: 1;
}
.guide-verdict-score .score-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}
.guide-verdict-score.score-high { background: var(--success); color: var(--navy-950); }
.guide-verdict-score.score-mid { background: var(--gold); color: var(--navy-950); }
.guide-verdict-score.score-low { background: var(--warning); color: var(--navy-950); }
.guide-verdict-text {
    flex: 1;
}
.guide-verdict-text h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}
.guide-verdict-text p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}
@media (max-width: 640px) {
    .guide-verdict { flex-direction: column; align-items: center; text-align: center; }
}

/* Pros & Cons */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 640px) {
    .pros-cons { grid-template-columns: 1fr; }
}
.pros-list, .cons-list {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
}
.pros-list { border: 1px solid rgba(34, 197, 94, 0.2); }
.cons-list { border: 1px solid rgba(239, 68, 68, 0.2); }
.pros-list h3, .cons-list h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pros-list h3 { color: var(--success); }
.cons-list h3 { color: var(--danger); }
.pros-list ul, .cons-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pros-list li, .cons-list li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 0.4rem 0 0.4rem 1.5rem;
    position: relative;
}
.pros-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}
.cons-list li::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: var(--danger);
    font-weight: 700;
}

/* Known Issues */
.issues-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.issue-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    border-left: 4px solid;
}
.issue-card.severity-high { border-left-color: var(--danger); }
.issue-card.severity-medium { border-left-color: var(--warning); }
.issue-card.severity-low { border-left-color: var(--info); }
.issue-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.issue-card-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.issue-severity {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
}
.issue-severity.high { background: var(--danger-muted); color: var(--danger); }
.issue-severity.medium { background: var(--warning-muted); color: var(--warning); }
.issue-severity.low { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.issue-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 0.5rem;
}
.issue-card .check-at {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* MOT Insights */
.mot-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.mot-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    text-align: center;
}
.mot-stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gold);
    display: block;
}
.mot-stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.mot-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 640px) {
    .mot-lists { grid-template-columns: 1fr; }
}
.mot-list {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}
.mot-list h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
}
.mot-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mot-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.3rem 0;
    padding-left: 1rem;
    position: relative;
}
.mot-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--gold);
}

/* Running Costs Table */
.costs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.costs-table tr:not(:last-child) {
    border-bottom: 1px solid var(--border-subtle);
}
.costs-table td {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
}
.costs-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
    width: 40%;
    background: rgba(15, 39, 68, 0.3);
}
.costs-table td:last-child {
    color: var(--text-secondary);
}

/* Price Range */
.price-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
@media (max-width: 768px) {
    .price-cards { grid-template-columns: 1fr; }
}
.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    text-align: center;
}
.price-card.price-mid {
    border-color: var(--border-gold);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(212, 168, 85, 0.05) 100%);
}
.price-card-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.price-card-range {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.5rem;
}
.price-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.faq-question {
    width: 100%;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-family: inherit;
    transition: color var(--transition-fast);
}
.faq-question:hover { color: var(--gold); }
.faq-question .faq-chevron {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    transition: transform var(--transition-base);
    color: var(--text-muted);
}
.faq-item.open .faq-chevron {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
}
.faq-answer-inner {
    padding: 0 1.25rem 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Sidebar */
.guide-sidebar {
    position: sticky;
    top: 5rem;
    align-self: start;
}
@media (max-width: 1024px) {
    .guide-sidebar { display: none; }
}
.sidebar-toc {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.sidebar-toc h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 0 0 1rem;
}
.sidebar-toc a {
    display: block;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
}
.sidebar-toc a:hover,
.sidebar-toc a.active {
    color: var(--gold);
    border-left-color: var(--gold);
}

/* CTA Card */
.guide-cta {
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 100%);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
}
.guide-cta h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
}
.guide-cta p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 1.25rem;
    line-height: 1.6;
}
.guide-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gold);
    color: var(--navy-950);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background var(--transition-fast), transform var(--transition-fast);
}
.guide-cta .btn:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
}

/* Related Guides */
.related-guides {
    padding: 3rem 0;
    border-top: 1px solid var(--border-subtle);
}
.related-guides h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0 0 1.5rem;
    text-align: center;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* Image credit */
.image-credit {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: right;
    padding: 0.25rem 0.5rem;
    opacity: 0.6;
}
