/* Guide Pages Modern Layout */
.guide-layout { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; display: flex; flex-direction: column; gap: 32px; }

/* Hero */
.guide-hero { display: flex; align-items: center; gap: 3rem; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 16px; padding: 56px 48px; margin: 120px auto 2rem; max-width: 1160px; }
.guide-hero-content { flex: 1; }
.guide-hero-visual { flex: 1; max-width: 480px; }
.guide-hero-visual img { width: 100%; height: auto; border-radius: 12px; object-fit: contain; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

.guide-hero h1 { font-size: 2.4rem; line-height: 1.25; margin-bottom: 1rem; color: var(--text-main); }
.guide-hero .hero-desc { font-size: 1.1rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1.5rem; }

.guide-chips { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2rem; }
.guide-chips span { font-size: 0.85rem; padding: 6px 14px; background: rgba(45,212,191,0.1); color: var(--primary); border-radius: 20px; font-weight: 600; }

.guide-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.guide-hero-actions a { padding: 0.8rem 1.5rem; border-radius: 8px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
.guide-hero-actions .btn-primary { background: var(--primary); color: var(--bg); }
.guide-hero-actions .btn-primary:hover { background: #14b8a6; }
.guide-hero-actions .btn-secondary { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.guide-hero-actions .btn-secondary:hover { background: rgba(45,212,191,0.1); }

/* Quick Summary */
.quick-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.summary-item { background: var(--bg-card); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.5rem; }
.summary-item strong { color: var(--primary); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
.summary-item span { color: var(--text-main); font-size: 1rem; line-height: 1.4; }

/* Main Content & TOC Layout */
.guide-body-wrapper { display: flex; gap: 32px; align-items: flex-start; margin-bottom: 4rem; }
.guide-toc { width: 250px; flex-shrink: 0; position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow-y: auto; background: rgba(255,255,255,0.02); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--border); }
.guide-toc h3 { margin: 0 0 1rem 0; font-size: 1.1rem; color: var(--text-main); font-weight: 600; }
.guide-toc ul { list-style: none; padding: 0; margin: 0; }
.guide-toc li { margin-bottom: 0.75rem; }
.guide-toc a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; display: block; line-height: 1.4; }
.guide-toc a:hover { color: var(--primary); }

.guide-main { flex: 1; min-width: 0; max-width: 780px; }
.guide-main h2 { scroll-margin-top: 100px; font-size: 1.7rem; color: var(--primary); margin: 3rem 0 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.75rem; }
.guide-main h2:first-child { margin-top: 0; }
.guide-main h3 { scroll-margin-top: 100px; font-size: 1.3rem; margin: 2rem 0 1rem; color: var(--text-main); }
.guide-main p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1.25rem; font-size: 1.05rem; }
.guide-main ul, .guide-main ol { color: var(--text-muted); line-height: 1.8; padding-left: 1.5rem; margin-bottom: 1.5rem; font-size: 1.05rem; }
.guide-main li { margin-bottom: 0.5rem; }
.guide-main a { color: var(--primary); text-decoration: none; font-weight: 600; }
.guide-main a:hover { text-decoration: underline; }
.guide-main img { max-width: 100%; border-radius: 12px; height: auto; }

/* Special Content Boxes */
.content-box { padding: 1.5rem; border-radius: 12px; margin: 2rem 0; background: var(--bg-card); border-left: 4px solid var(--border); }
.info-box { border-left-color: var(--primary); background: rgba(45,212,191,0.05); }
.warning-box { border-left-color: #f59e0b; background: rgba(245,158,11,0.05); }
.warning-box strong, .warning-box h4 { color: #f59e0b; }
.step-box { border-left-color: #8b5cf6; background: rgba(139,92,246,0.05); }
.step-box strong, .step-box h4 { color: #8b5cf6; }
.result-box { border-left-color: #10b981; background: rgba(16,185,129,0.05); }
.result-box strong, .result-box h4 { color: #10b981; }
.content-box h4 { margin-top: 0; margin-bottom: 0.75rem; font-size: 1.1rem; color: var(--text-main); }
.content-box p { margin-bottom: 0.5rem; font-size: 1rem; }
.content-box p:last-child { margin-bottom: 0; }

/* Mobile Details TOC */
.mobile-toc { display: none; margin-bottom: 2.5rem; background: rgba(255,255,255,0.02); border-radius: 12px; border: 1px solid var(--border); }
.mobile-toc summary { padding: 1.25rem 1.5rem; font-weight: 600; cursor: pointer; color: var(--text-main); user-select: none; font-size: 1.1rem; }
.mobile-toc summary::-webkit-details-marker { color: var(--primary); }
.mobile-toc ul { padding: 0 1.5rem 1.5rem; margin: 0; list-style: none; }
.mobile-toc li { margin-bottom: 0.75rem; }
.mobile-toc a { color: var(--text-muted); text-decoration: none; display: block; font-size: 1rem; line-height: 1.4; }

/* Tables */
.table-wrapper { overflow-x: auto; margin: 2rem 0; border: 1px solid var(--border); border-radius: 8px; }
.guide-main table { width: 100%; min-width: 600px; border-collapse: collapse; }
.guide-main th, .guide-main td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.guide-main th { background: rgba(255,255,255,0.05); font-weight: 600; color: var(--primary); white-space: nowrap; }
.guide-main tr:last-child td { border-bottom: none; }
.guide-main tr:hover td { background: rgba(255,255,255,0.02); }

/* Sponsor Cards */
.sponsor-card { display: flex; flex-direction: column; background: rgba(15,23,42,0.8); border-radius: 12px; margin: 3rem 0; padding: 2rem; border: 1px solid var(--border); position: relative; overflow: hidden; }
.sponsor-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.sponsor-brand { font-size: 0.8rem; color: var(--primary); font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }
.sponsor-label { font-size: 0.75rem; color: var(--text-muted); border: 1px solid var(--border); padding: 2px 6px; border-radius: 4px; }
.sponsor-card h3 { margin: 0 0 1rem 0 !important; color: var(--text-main) !important; font-size: 1.4rem !important; border: none !important; padding: 0 !important; }
.sponsor-card p { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 1.05rem; line-height: 1.6; }
.sponsor-actions { margin-top: auto; }
.sponsor-actions a { align-self: flex-start; background: transparent; color: var(--primary); border: 1px solid var(--primary); padding: 0.75rem 1.5rem; border-radius: 8px; font-weight: 600; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; text-decoration: none !important; }
.sponsor-actions a:hover { background: rgba(45,212,191,0.1); }

/* Download Box */
.download-box { background: rgba(255,255,255,0.02); border-radius: 16px; border: 1px solid var(--border); padding: 2.5rem; margin: 3rem 0; text-align: center; }
.download-box h3 { margin-top: 0; color: var(--text-main); font-size: 1.4rem; }
.download-box img { max-width: 100%; width: 720px; height: auto; display: block; margin: 1.5rem auto; border-radius: 8px; }
.download-box .btn-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.download-box .btn-primary, .download-box .btn-secondary { padding: 0.8rem 1.5rem; border-radius: 30px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
.download-box .btn-primary { background: var(--primary); color: var(--bg); }
.download-box .btn-primary:hover { background: #14b8a6; }
.download-box .btn-secondary { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.download-box .btn-secondary:hover { background: rgba(45,212,191,0.1); }

/* Internal link styles (like cross links) */
.guide-link-card { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; margin: 2rem 0; display: flex; align-items: flex-start; gap: 1rem; transition: background 0.3s ease; }
.guide-link-card:hover { background: rgba(255,255,255,0.06); }
.guide-link-card h4 { margin: 0 0 0.5rem 0; font-size: 1.15rem; color: var(--text-main); }
.guide-link-card p { margin: 0 0 1rem 0; font-size: 0.95rem; line-height: 1.5; color: var(--text-muted); }
.guide-link-card a { color: var(--primary); text-decoration: none; font-weight: 600; }
.guide-link-card a:hover { text-decoration: underline; }
.guide-link-img { flex-shrink: 0; width: 120px; }
.guide-link-img img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }

/* Responsive */
@media (max-width: 992px) {
    .guide-body-wrapper { flex-direction: column; gap: 24px; }
    .guide-toc { display: none; }
    .mobile-toc { display: block; }
    .guide-hero { flex-direction: column; padding: 2rem; text-align: center; margin-top: 100px; gap: 2rem; }
    .guide-hero-actions { justify-content: center; }
    .guide-chips { justify-content: center; }
    .guide-main { max-width: 100%; }
}
@media (max-width: 600px) {
    .quick-summary { grid-template-columns: 1fr; }
    .guide-hero h1 { font-size: 1.8rem; }
    .guide-main h2 { font-size: 1.4rem; }
    .download-box .btn-group { flex-direction: column; }
    .sponsor-actions a { justify-content: center; width: 100%; box-sizing: border-box; }
    .guide-link-card { flex-direction: column; align-items: center; text-align: center; }
    .guide-link-img { width: 160px; margin-bottom: 1rem; }
}

/* --- PREMIUM UI UPGRADES --- */

/* Glass Cards */
.guide-glass-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 2rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.guide-glass-card:hover {
    transform: translateY(-3px);
}

/* Asymmetric 8/4 Grid */
.guide-grid-8-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 3rem 0;
}
@media (min-width: 992px) {
    .guide-grid-8-4 {
        grid-template-columns: 8fr 4fr;
    }
}
.guide-grid-main {
    display: flex;
    flex-direction: column;
}
.guide-grid-highlight {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(45, 212, 191, 0.05); /* very subtle mint tint */
    border: 1px solid rgba(45, 212, 191, 0.2);
}

/* Icon Grid (2 or 3 cols) */
.guide-icon-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
}
@media (min-width: 600px) {
    .guide-icon-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}
.guide-icon-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.guide-icon-svg {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    color: var(--primary);
}

/* Premium Table */
.guide-premium-table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.guide-premium-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
}
.guide-premium-table th, .guide-premium-table td {
    padding: 1.25rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.guide-premium-table th:first-child, .guide-premium-table td:first-child {
    text-align: left;
    font-weight: 600;
}
.guide-premium-table th {
    background: rgba(0, 0, 0, 0.2);
    color: var(--primary);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.guide-premium-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}
/* Highlight 2026 column (typically 5th column) */
.guide-premium-table td:nth-child(5) {
    background: rgba(45, 212, 191, 0.05);
    font-weight: 700;
}

/* Mobile Sticky First Column (Optional, but safe approach) */
@media (max-width: 768px) {
    .guide-premium-table th:first-child,
    .guide-premium-table td:first-child {
        position: sticky;
        left: 0;
        background: #111a2d; /* Solid dark color to prevent overlap visibility */
        z-index: 10;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Mobile horizontal scroll hint */
.guide-scroll-hint {
    display: none;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
    margin-bottom: 0.5rem;
}
@media (max-width: 768px) {
    .guide-scroll-hint {
        display: block;
    }
}

/* App Showcase */
.guide-app-showcase {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
    margin: 4rem 0;
    padding: 3rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
@media (min-width: 768px) {
    .guide-app-showcase {
        flex-direction: row;
    }
}
.guide-app-visual {
    flex: 1;
    position: relative;
    max-width: 260px;
    margin: 0 auto;
}
.guide-app-visual-glow {
    position: absolute;
    inset: -2rem;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: 0;
    cursor: pointer; transition: transform 0.2s;
}
.guide-app-visual img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 6px solid rgba(255, 255, 255, 0.05);
}
.guide-app-content {
    flex: 1;
}

/* Resource Cards */
.guide-resource-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 4rem 0 2rem;
}
@media (min-width: 768px) {
    .guide-resource-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.guide-resource-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
}
.guide-resource-card:hover {
    border-color: rgba(45, 212, 191, 0.3);
    transform: translateY(-3px);
}
.guide-resource-img {
    background: #0f172a;
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 1rem;
}
.guide-resource-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}
.guide-resource-card:hover .guide-resource-img img {
    transform: scale(1.05);
}
.guide-resource-info {
    padding: 1.5rem;
}
.guide-resource-info h4 {
    color: var(--text-main);
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}
.guide-resource-info p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* Hero Upgrades */
.guide-hero {
    position: relative;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 32px;
}
.guide-hero-glow {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: rgba(45, 212, 191, 0.1);
    filter: blur(80px);
    z-index: 0;
    cursor: pointer; transition: transform 0.2s;
    border-radius: 50%;
}
.guide-hero-content {
    position: relative;
    z-index: 1;
}
.guide-hero-visual {
    position: relative;
    z-index: 1;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (min-width: 992px) {
    .guide-hero-visual {
        transform: rotate(1deg);
    }
    .guide-hero:hover .guide-hero-visual {
        transform: rotate(0deg);
    }
}
.guide-hero-visual-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: var(--bg);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer; transition: transform 0.2s;
}

/* Animations */
.guide-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.guide-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .guide-reveal {
        transition: none;
        opacity: 1;
        transform: none;
    }
    .guide-glass-card { transition: none; }
    .guide-glass-card:hover { transform: none; }
    .guide-resource-card { transition: none; }
    .guide-resource-card:hover { transform: none; }
    .guide-resource-img img { transition: none; }
    .guide-resource-card:hover .guide-resource-img img { transform: none; }
    .guide-hero-visual { transition: none; transform: none !important; }
}

/* Screenshot Gallery */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}
.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.gallery-item img {
    width: 100%;
    max-width: 260px;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.05);
}
.gallery-item span {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
}

/* Product / Sponsor Card */
.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 2rem;
    margin: 3rem 0;
}
@media (min-width: 768px) {
    .product-card {
        flex-direction: row;
        align-items: flex-start;
    }
}
.product-card-img {
    flex-shrink: 0;
    width: 100%;
    max-width: 200px;
    text-align: center;
}
.product-card-img img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.product-card-badge {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.guide-hero-visual-overlay:hover {
    transform: scale(1.1);
}

/* ========================================================
   SURGICAL MOBILE UX PATCHES (Guide Pages)
   ======================================================== */

/* Mobile Sticky CTA */
.mobile-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 2px solid var(--primary);
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

.mobile-sticky-cta-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
}

.mobile-sticky-cta-content svg {
    color: var(--primary);
}

.mobile-sticky-cta-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-sticky-cta-actions .btn {
    background: var(--primary);
    color: #0F172A;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
}

.mobile-sticky-cta-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
}

@media (max-width: 768px) {
    /* Show sticky CTA on mobile if visible class is added */
    .mobile-sticky-cta.visible {
        display: flex;
    }
    
    /* Ensure tables can scroll horizontally without breaking layout */
    .guide-content table, 
    .guide-premium-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
