/**
 * Visual Guide Page Styles - Thai Criminal Code
 * URL: /thai-criminal-code/visual-guide/
 *
 * Color Scheme — matched to the Civil & Commercial Code page
 * (thailawonline.com/thai-civil-commercial-code.html):
 *
 *   Heading navy ............. #1e3a5f
 *   Feature-card blue ........ #2d5a87   on #f0f4f8
 *   Feature-card green ....... #2e7d32   on #f0fff4
 *   Feature-card purple ...... #6a1b9a   on #f5f0ff
 *   Feature-card orange ...... #f6ad55   on #fff8f0
 *   CTA orange button ........ #c05621
 *   Card border .............. #e0e0e0
 *   Thai text block bg ....... #f8f9fa
 *   Body font (EN) ........... Roboto
 *   Body font (TH) ........... Sarabun
 */

/* ─── Layout ─── */

.tcc-visual-guide-page .tcc-layout-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

/* ─── Hero Section ─── */

.tcc-vg-hero {
    background: linear-gradient(135deg, #0f1f3d 0%, #1e3a5f 50%, #2d5a87 100%);
    color: #fff;
    padding: 3.5rem 2rem 3rem;
    text-align: center;
    border-radius: 0 0 12px 12px;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.tcc-vg-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 0%, rgba(255, 255, 255, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.tcc-vg-hero-title {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    position: relative;
}

.tcc-vg-hero-title .tcc-text-en {
    display: block;
    color: #fff;
}

.tcc-vg-hero-title .tcc-text-th {
    display: block;
    font-family: 'Sarabun', sans-serif;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.6em;
    margin-top: 0.5rem;
}

.tcc-vg-hero-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.9;
    margin: 0 0 1.5rem;
    position: relative;
}

.tcc-vg-hero-subtitle .tcc-text-th {
    display: block;
    font-family: 'Sarabun', sans-serif;
    font-size: 0.95em;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.tcc-vg-hero-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.tcc-vg-hero-pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

/* ─── Card Base (matches CCC card pattern) ─── */

.tcc-vg-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    transition: box-shadow 0.2s ease;
}

.tcc-vg-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* ─── Section Headings (CCC style: #1e3a5f) ─── */

.tcc-vg-heading {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.5em;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.tcc-vg-heading .tcc-text-th {
    display: block;
    font-family: 'Sarabun', sans-serif;
    font-size: 0.75em;
    color: #4a5568;
    margin-top: 0.25rem;
    font-weight: 600;
}

.tcc-vg-desc {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* ─── Intro Card (Dark navy, like CCC hero) ─── */

.tcc-vg-intro {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f1f3d 100%);
    color: #fff;
    border: none;
}

.tcc-vg-intro .tcc-vg-heading {
    color: #fff;
}

.tcc-vg-intro .tcc-vg-heading .tcc-text-th {
    color: rgba(255, 255, 255, 0.8);
}

.tcc-vg-intro .tcc-vg-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
}

.tcc-vg-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.tcc-vg-stat-item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tcc-vg-stat-num {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #f6ad55;
    line-height: 1.2;
}

.tcc-vg-stat-lbl {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
}

/* ─── Split Layout (Text + Chart) ─── */

.tcc-vg-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.tcc-vg-split-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tcc-vg-legend {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.tcc-vg-legend li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: #2c3e50;
    line-height: 1.5;
}

.tcc-vg-legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.tcc-vg-chart-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    height: 320px;
}

.tcc-vg-chart-caption {
    text-align: center;
    font-size: 0.8rem;
    color: #adb5bd;
    font-style: italic;
    margin-top: 0.75rem;
}

/* ─── Callout / Insight Box (CCC feature card style) ─── */

.tcc-vg-callout {
    padding: 20px;
    background: #f0f4f8;
    border-radius: 8px;
    border-left: 4px solid #2d5a87;
    margin-top: 1.25rem;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #2c3e50;
}

.tcc-vg-callout-label {
    display: inline-block;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2d5a87;
    margin-bottom: 0.25rem;
}

/* ─── Flow Diagram ─── */

.tcc-vg-flow-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    margin: 1.5rem 0;
    position: relative;
}

.tcc-vg-flow-step {
    text-align: center;
    padding: 1.25rem 0.75rem;
    border-radius: 8px;
    position: relative;
    transition: transform 0.2s ease;
}

.tcc-vg-flow-step:hover {
    transform: translateY(-3px);
}

/* Feature-card color palette from CCC */
.tcc-vg-flow-step-1 { background: #f0f4f8; border-left: 4px solid #2d5a87; }
.tcc-vg-flow-step-2 { background: #f0fff4; border-left: 4px solid #2e7d32; }
.tcc-vg-flow-step-3 { background: #f5f0ff; border-left: 4px solid #6a1b9a; }
.tcc-vg-flow-step-4 { background: #fff8f0; border-left: 4px solid #f6ad55; }
.tcc-vg-flow-step-5 { background: #f0f4f8; border-left: 4px solid #1e3a5f; }

.tcc-vg-flow-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.tcc-vg-flow-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #1e3a5f;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.tcc-vg-flow-title .tcc-text-th {
    display: block;
    font-family: 'Sarabun', sans-serif;
    font-size: 0.9em;
    color: #4a5568;
    font-weight: 600;
}

.tcc-vg-flow-desc {
    font-size: 0.72rem;
    color: #6c757d;
    line-height: 1.4;
}

/* Flow connectors */
.tcc-vg-flow-step:not(:last-child)::after {
    content: '\2192'; /* right arrow */
    position: absolute;
    right: -0.6rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d5a87;
    z-index: 1;
}

/* ─── Punishment Detail Cards ─── */

.tcc-vg-punishment-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.tcc-vg-punishment-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    border-top: 3px solid #e0e0e0;
    transition: transform 0.2s ease;
}

.tcc-vg-punishment-card:hover {
    transform: translateY(-2px);
}

/* CCC-style color coding */
.tcc-vg-punishment-card:nth-child(1) { border-top-color: #2d5a87; }
.tcc-vg-punishment-card:nth-child(2) { border-top-color: #2e7d32; }
.tcc-vg-punishment-card:nth-child(3) { border-top-color: #f6ad55; }
.tcc-vg-punishment-card:nth-child(4) { border-top-color: #6a1b9a; }
.tcc-vg-punishment-card:nth-child(5) { border-top-color: #1e3a5f; }

.tcc-vg-punishment-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1e3a5f;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tcc-vg-punishment-name {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #1e3a5f;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.tcc-vg-punishment-name .tcc-text-th {
    display: block;
    font-family: 'Sarabun', sans-serif;
    color: #4a5568;
    font-size: 0.9em;
    font-weight: 600;
}

.tcc-vg-punishment-desc {
    font-size: 0.72rem;
    color: #6c757d;
    line-height: 1.4;
}

/* ─── Insight Card (Dark, for limitations) ─── */

.tcc-vg-insight {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f1f3d 100%);
    border-radius: 12px;
    padding: 1.5rem;
    color: #fff;
}

.tcc-vg-insight-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #f6ad55;
    margin-bottom: 0.75rem;
}

.tcc-vg-insight p {
    font-size: 0.88rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* ─── Principles Card (Dark — CCC dark section style) ─── */

.tcc-vg-principles {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f1f3d 100%);
    color: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
}

.tcc-vg-principles .tcc-vg-heading {
    color: #fff;
    margin-bottom: 1.5rem;
}

.tcc-vg-principles .tcc-vg-heading .tcc-text-th {
    color: rgba(255, 255, 255, 0.75);
}

.tcc-vg-principles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.tcc-vg-principle-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.25rem;
    transition: background 0.2s ease;
}

.tcc-vg-principle-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tcc-vg-principle-badge {
    display: inline-block;
    background: #f6ad55;
    color: #1e3a5f;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tcc-vg-principle-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.tcc-vg-principle-title .tcc-text-th {
    display: block;
    font-family: 'Sarabun', sans-serif;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    font-weight: 600;
    margin-top: 0.1rem;
}

.tcc-vg-principle-desc {
    font-size: 0.8rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

/* ─── CTA Section (CCC style: orange button + navy bg) ─── */

.tcc-vg-cta {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: #fff;
    text-align: center;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    margin-bottom: 40px;
}

.tcc-vg-cta .tcc-vg-heading {
    color: #fff;
    margin-bottom: 0.75rem;
}

.tcc-vg-cta .tcc-vg-heading .tcc-text-th {
    color: rgba(255, 255, 255, 0.75);
}

.tcc-vg-cta-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.tcc-vg-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.tcc-vg-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 8px 20px;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

/* Primary = CCC orange button */
.tcc-vg-btn-primary {
    background: #c05621;
    color: #fff;
}

.tcc-vg-btn-primary:hover {
    background: #a84b1c;
    transform: translateY(-1px);
}

/* Secondary = CCC "Read Book" navy button */
.tcc-vg-btn-secondary {
    background: #1e3a5f;
    color: #fff;
}

.tcc-vg-btn-secondary:hover {
    background: #2d5a87;
    transform: translateY(-1px);
}

/* Tertiary = outline on dark bg */
.tcc-vg-btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.tcc-vg-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* ─── Disclaimer ─── */

.tcc-vg-disclaimer {
    text-align: center;
    font-size: 0.78rem;
    color: #adb5bd;
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
    margin-top: 1rem;
    line-height: 1.5;
}

/* ─── Grid helpers ─── */

.tcc-vg-full {
    grid-column: 1 / -1;
}

.tcc-vg-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 40px;
}

/* ─── Feature-card accent variants (CCC palette) ─── */

.tcc-vg-card-blue    { border-left: 4px solid #2d5a87; }
.tcc-vg-card-green   { border-left: 4px solid #2e7d32; }
.tcc-vg-card-purple  { border-left: 4px solid #6a1b9a; }
.tcc-vg-card-orange  { border-left: 4px solid #f6ad55; }

/* ─── Thai text block (CCC quote/highlight style) ─── */

.tcc-vg-thai-block {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #1e3a5f;
    margin-top: 0.75rem;
    font-family: 'Sarabun', sans-serif;
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.6;
}

/* ─── Responsive ─── */

@media (max-width: 1023px) {
    .tcc-vg-split {
        grid-template-columns: 1fr;
    }

    .tcc-vg-chart-container {
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .tcc-vg-hero {
        padding: 2.5rem 1.25rem 2rem;
    }

    .tcc-vg-hero-title {
        font-size: 1.75rem;
    }

    .tcc-vg-hero-subtitle {
        font-size: 1rem;
    }

    .tcc-vg-card {
        padding: 20px;
    }

    .tcc-vg-heading {
        font-size: 1.3em;
    }

    .tcc-vg-flow-steps {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .tcc-vg-flow-step {
        text-align: left;
        padding: 1rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .tcc-vg-flow-icon {
        font-size: 1.5rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .tcc-vg-flow-step:not(:last-child)::after {
        content: none;
    }

    .tcc-vg-punishment-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tcc-vg-punishment-grid .tcc-vg-punishment-card:last-child {
        grid-column: 1 / -1;
        max-width: 50%;
        margin: 0 auto;
    }

    .tcc-vg-principles {
        padding: 20px;
    }

    .tcc-vg-principles-grid {
        grid-template-columns: 1fr;
    }

    .tcc-vg-stats-row {
        gap: 0.5rem;
    }

    .tcc-vg-stat-item {
        min-width: 100px;
    }

    .tcc-vg-grid-2 {
        grid-template-columns: 1fr;
    }

    .tcc-vg-chart-container {
        height: 280px;
    }

    .tcc-vg-cta {
        padding: 2rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .tcc-vg-hero {
        padding: 2rem 1rem 1.5rem;
    }

    .tcc-vg-hero-title {
        font-size: 1.4rem;
    }

    .tcc-vg-hero-pill {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
    }

    .tcc-vg-punishment-grid {
        grid-template-columns: 1fr;
    }

    .tcc-vg-punishment-grid .tcc-vg-punishment-card:last-child {
        max-width: 100%;
    }

    .tcc-vg-chart-container {
        height: 250px;
    }

    .tcc-vg-stat-num {
        font-size: 1.4rem;
    }
}
