.blog-post-container {
    max-width: min(90%, 900px);
    margin: clamp(1.5rem, 4vw, 2rem) auto;
    padding: clamp(1.5rem, 4vw, 2rem);
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.6s ease;
    overflow: hidden;
}

.blog-post {
    color: var(--text-color);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.post-meta {
    display: flex;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    flex-wrap: wrap;
    margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
    padding-bottom: clamp(0.75rem, 2vw, 1rem);
    border-bottom: 2px solid var(--border-color);
    align-items: center;
}

.post-meta span {
    color: var(--text-light);
    font-size: clamp(0.85rem, 2.5vw, 0.9rem);
    font-weight: 500;
}

.post-date,
.read-time {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 20px;
}

.blog-post h1 {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    color: var(--primary-color);
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.featured-image {
    width: 100%;
    margin: clamp(1.5rem, 3vw, 2rem) 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.post-section {
    margin: clamp(2rem, 4vw, 2.5rem) 0;
}

.post-section h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--primary-dark);
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
    font-weight: 700;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

.post-section h3 {
    font-size: clamp(1.2rem, 3.5vw, 1.35rem);
    color: var(--text-color);
    margin: clamp(1.25rem, 3vw, 1.5rem) 0 clamp(0.75rem, 2vw, 1rem);
    font-weight: 600;
}

.post-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    font-size: clamp(0.95rem, 2.5vw, 1rem);
}

.intro-text {
    font-size: clamp(1.05rem, 3vw, 1.15rem);
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: clamp(1.25rem, 3vw, 1.5rem);
    padding: clamp(0.875rem, 2.5vw, 1rem);
    background: linear-gradient(135deg, rgb(99 102 241 / 0.05) 0%, rgb(236 72 153 / 0.05) 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    overflow-wrap: break-word;
}

.table-of-contents {
    background: linear-gradient(135deg, rgb(99 102 241 / 0.08) 0%, rgb(236 72 153 / 0.08) 100%);
    padding: clamp(1rem, 3vw, 1.5rem);
    border-radius: 12px;
    margin: clamp(1.5rem, 3vw, 2rem) 0;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.table-of-contents h3 {
    color: var(--primary-dark);
    font-size: clamp(1.1rem, 3vw, 1.25rem);
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
    font-weight: 700;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents ul li {
    margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
    padding-left: clamp(1.25rem, 3vw, 1.5rem);
    position: relative;
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
}

.table-of-contents ul li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 0.8rem;
    top: 0.35em;
}

.table-of-contents a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.1em 0;
}

.table-of-contents a:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

.info-box,
.tip-box {
    padding: clamp(1rem, 3vw, 1.25rem);
    margin: clamp(1.25rem, 3vw, 1.5rem) 0;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
    overflow-wrap: break-word;
}

.info-box {
    background: linear-gradient(135deg, rgb(99 102 241 / 0.1) 0%, rgb(99 102 241 / 0.05) 100%);
}

.tip-box {
    background: linear-gradient(135deg, rgb(236 72 153 / 0.1) 0%, rgb(236 72 153 / 0.05) 100%);
    border-left-color: var(--accent-color);
}

.info-box p,
.tip-box p {
    margin: 0;
    line-height: 1.7;
    color: var(--text-color);
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
}

.info-box strong,
.tip-box strong {
    color: var(--primary-dark);
    font-weight: 700;
}

.post-section ul,
.post-section ol {
    margin: clamp(0.75rem, 2vw, 1rem) 0 clamp(1rem, 2.5vw, 1.5rem) clamp(1.25rem, 3vw, 1.5rem);
    padding-left: clamp(0.5rem, 2vw, 1rem);
}

.post-section ul li,
.post-section ol li {
    margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
    line-height: 1.7;
    color: var(--text-color);
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
}

.post-section ul li strong,
.post-section ol li strong {
    color: var(--primary-dark);
    font-weight: 600;
}

.case-type-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: clamp(1.25rem, 3vw, 1.5rem);
    margin: clamp(1.25rem, 3vw, 1.5rem) 0;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow-wrap: break-word;
}

.case-type-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.case-type-card h3 {
    color: var(--primary-color);
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
    font-size: clamp(1.15rem, 3vw, 1.25rem);
}

.case-type-card p {
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
}

.case-type-card ol {
    margin-left: clamp(1rem, 3vw, 1.5rem);
}

.example-box {
    background: linear-gradient(135deg, rgb(99 102 241 / 0.05) 0%, rgb(236 72 153 / 0.05) 100%);
    padding: clamp(0.75rem, 2.5vw, 1rem);
    border-radius: 8px;
    margin: clamp(0.75rem, 2vw, 1rem) 0;
    border-left: 3px solid var(--secondary-color);
}

.example-box p {
    margin-bottom: 0.5rem;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    line-height: 1.6;
}

.example-box strong {
    color: var(--primary-dark);
}

.example-comparison {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(0.75rem, 2vw, 1rem);
    margin: clamp(1.25rem, 3vw, 1.5rem) 0;
}

.bad-example,
.good-example {
    padding: clamp(1rem, 3vw, 1.25rem);
    border-radius: 12px;
    border: 2px solid;
    overflow-wrap: break-word;
}

.bad-example {
    background: linear-gradient(135deg, rgb(239 68 68 / 0.05) 0%, rgb(239 68 68 / 0.02) 100%);
    border-color: #ef4444;
}

.good-example {
    background: linear-gradient(135deg, rgb(34 197 94 / 0.05) 0%, rgb(34 197 94 / 0.02) 100%);
    border-color: #22c55e;
}

.bad-example p,
.good-example p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
}

.bad-example strong {
    color: #dc2626;
}

.good-example strong {
    color: #16a34a;
}

.guideline-table {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: clamp(1rem, 3vw, 1.5rem);
    margin: clamp(1.25rem, 3vw, 1.5rem) 0;
    overflow-wrap: break-word;
}

.guideline-table p {
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
    padding: clamp(0.6rem, 2vw, 0.75rem);
    background: linear-gradient(135deg, rgb(99 102 241 / 0.05) 0%, rgb(236 72 153 / 0.05) 100%);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
    line-height: 1.6;
}

.guideline-table p:last-child {
    margin-bottom: 0;
}

.guideline-table strong {
    color: var(--primary-dark);
    font-weight: 700;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 16px;
    text-align: center;
    margin: clamp(2rem, 4vw, 2.5rem) 0;
    box-shadow: var(--shadow-lg);
}

.cta-box h3 {
    color: #fff;
    font-size: clamp(1.3rem, 4vw, 1.5rem);
    margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
    line-height: 1.3;
}

.cta-box p {
    color: rgb(255 255 255 / 0.9);
    margin-bottom: clamp(1.25rem, 3vw, 1.5rem);
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.8rem, 2.5vw, 0.875rem) clamp(1.5rem, 4vw, 2rem);
    background: #fff;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgb(0 0 0 / 0.1);
    min-height: 48px; /* Touch-friendly */
    max-width: 90%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgb(0 0 0 / 0.15);
}

.related-posts {
    margin-top: clamp(2.5rem, 5vw, 3rem);
    padding-top: clamp(1.5rem, 3vw, 2rem);
    border-top: 3px solid var(--border-color);
}

.related-posts h3 {
    font-size: clamp(1.3rem, 4vw, 1.5rem);
    color: var(--primary-dark);
    margin-bottom: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(0.75rem, 2vw, 1rem);
}

.related-card {
    background: linear-gradient(135deg, rgb(99 102 241 / 0.05) 0%, rgb(236 72 153 / 0.05) 100%);
    padding: clamp(1rem, 2.5vw, 1.25rem);
    border-radius: 12px;
    text-decoration: none;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.related-card h4 {
    color: var(--primary-color);
    font-size: clamp(1rem, 2.8vw, 1.1rem);
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.related-card p {
    color: var(--text-light);
    margin: 0;
    font-size: clamp(0.85rem, 2.5vw, 0.9rem);
    line-height: 1.5;
}

.post-section a,
.intro-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid #fff0;
    transition: all 0.3s ease;
    word-break: break-word;
}

.post-section a:hover,
.intro-text a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-color);
}

/* Tablet (640px+) */
@media (min-width: 640px) {
    .blog-post-container {
        padding: clamp(2rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2rem);
    }
    .example-comparison {
        grid-template-columns: repeat(2, 1fr);
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: clamp(1rem, 2.5vw, 1.25rem);
    }
}

/* Desktop (768px+) */
@media (min-width: 768px) {
    .blog-post-container {
        padding: clamp(2.5rem, 5vw, 3rem) clamp(2rem, 5vw, 2.5rem);
        max-width: 900px;
    }
    .blog-post h1 {
        font-size: clamp(2.25rem, 4vw, 2.75rem);
    }
    .post-meta {
        gap: clamp(1.25rem, 3vw, 2rem);
    }
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(1.25rem, 2.5vw, 1.5rem);
    }
}

/* Large Desktop (1024px+) */
@media (min-width: 1024px) {
    .blog-post-container {
        padding: clamp(2.5rem, 4vw, 3.5rem) clamp(2.5rem, 4vw, 3rem);
        max-width: 1000px;
    }
    .blog-post h1 {
        font-size: clamp(2.5rem, 3.5vw, 3rem);
    }
    .post-section h2 {
        font-size: clamp(1.85rem, 3vw, 2.25rem);
    }
}

/* Mobile Adjustments (<640px) */
@media (max-width: 639px) {
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .post-date,
    .read-time {
        width: 100%;
        justify-content: flex-start;
    }
    .example-box {
        padding: 0.875rem;
    }
    .cta-box {
        padding: clamp(1.5rem, 4vw, 2rem) clamp(1.25rem, 3vw, 1.5rem);
    }
}

/* Small Mobile (<480px) */
@media (max-width: 479px) {
    .blog-post-container {
        padding: clamp(1.25rem, 3vw, 1.5rem) clamp(1rem, 3vw, 1.25rem);
        border-radius: 12px;
    }
    .post-section ul,
    .post-section ol {
        margin-left: clamp(1rem, 4vw, 1.25rem);
        padding-left: clamp(0.25rem, 2vw, 0.5rem);
    }
    .related-card {
        padding: clamp(0.85rem, 2.5vw, 1rem);
    }
}

/* Animations */
.case-type-card,
.related-card,
.info-box,
.tip-box {
    animation: fadeIn 0.6s ease backwards;
}

.case-type-card:nth-of-type(1) { animation-delay: 0.1s; }
.case-type-card:nth-of-type(2) { animation-delay: 0.2s; }
.case-type-card:nth-of-type(3) { animation-delay: 0.3s; }

.post-section a:focus,
.cta-button:focus,
.related-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .case-type-card,
    .related-card,
    .info-box,
    .tip-box {
        animation: none;
    }
}

.hilltop-banner-wrapper {
    text-align: center;
    margin: clamp(1rem, 3vw, 20px) 0;
    width: 100%;
}

.hilltop-banner-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}