/* ClinicalSteps.com - Modern UI */
:root {
    --primary: #0a5c7e;
    --primary-light: #1a7ca0;
    --primary-dark: #06425a;
    --secondary: #2d9cdb;
    --accent: #e67e22;
    --success: #27ae60;
    --bg-light: #f0f4f8;
    --bg-white: #ffffff;
    --text-dark: #1a2332;
    --text-muted: #5a6b7c;
    --text-light: #8a9aa8;
    --border: #dce3ea;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 40px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

body.article-page .container {
    max-width: 800px;
}

header {
    background: rgba(255,255,255,0.92);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span { color: var(--text-muted); font-weight: 400; }

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch {
    display: flex;
    gap: 4px;
    border-left: 1px solid var(--border);
    padding-left: 12px;
}

.lang-switch a {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.lang-switch a:hover { color: var(--primary); }
.lang-switch a.active { background: var(--primary); color: #fff; }

.back-link,
.back {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 20px;
    transition: var(--transition);
}

.back-link:hover,
.back:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--secondary);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 4px 18px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 44px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-desc {
    font-size: 18px;
    color: rgba(255,255,255,0.85);
    max-width: 560px;
    margin: 0 auto 30px;
}

.hero-btn {
    display: inline-block;
    padding: 14px 36px;
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    border-radius: 40px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.filter-wrapper {
    margin: 32px 0 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.cat-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
}

.cat-nav::-webkit-scrollbar { display: none; }

.cat-btn {
    padding: 8px 20px;
    border-radius: 30px;
    background: var(--bg-white);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.cat-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-light);
}

.cat-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(10,92,126,0.25);
}

.section-header { margin-bottom: 24px; }

.section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-light);
}

.articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    padding-bottom: 40px;
}

.article-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary);
}

.article-image {
    height: 220px;
    overflow: hidden;
    background: var(--bg-light);
    position: relative;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-image img { transform: scale(1.04); }

.article-content {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-category {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    margin-bottom: 12px;
    align-self: flex-start;
}

.article-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-title-large,
body.article-page .article-header .article-title,
body.article-page .article-header .article-title-large {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin: 12px 0;
    text-align: center;
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.article-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.article-date,
.article-views,
.view-count {
    font-size: 13px;
    color: var(--text-light);
}

.article-header {
    padding: 30px 0 20px;
    text-align: center;
}

.article-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 14px;
}

.article-page .article-image {
    height: auto;
    margin: 20px 0;
    padding: 24px;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
}

.article-page .article-image img {
    width: 100%;
    max-width: 640px;
    height: auto;
    border-radius: 12px;
}

.article-body {
    background: var(--bg-white);
    padding: 40px 48px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 24px 0 40px;
}

.article-body p {
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--text-dark);
    text-align: justify;
}

.article-body h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 36px 0 16px;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 12px;
}

.related {
    margin: 30px 0 50px;
    padding: 0;
}

.related-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin: 0 0 40px;
}

.related-card {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.related-image {
    height: 140px;
    overflow: hidden;
    background: var(--bg-light);
}

.related-image img,
.related-card .article-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.related-card:hover .related-image img {
    transform: scale(1.05);
}

.related-card-content {
    padding: 16px 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-category {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    margin-bottom: 8px;
    align-self: flex-start;
}

.related-card-title,
.related-card-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.35;
    color: var(--text-dark);
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.related-card-content p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.related-views {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-light);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 60px;
    flex-wrap: wrap;
    align-items: center;
}

.page-btn,
.page-number {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    min-width: 40px;
    text-align: center;
}

.page-btn:hover,
.page-number:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-number.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.page-numbers {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    color: var(--text-light);
}

.empty {
    text-align: center;
    padding: 80px 20px;
}

.empty h2 {
    font-size: 24px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.empty p { color: var(--text-light); }

footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 32px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 300px;
    line-height: 1.7;
}

.footer-links h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 0;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover { color: var(--primary); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
}

@media (max-width: 768px) {
    .hero-title { font-size: 30px; }
    .hero-section { padding: 50px 0 40px; }
    .articles { grid-template-columns: 1fr; }
    .article-body { padding: 24px; }
    .article-title-large,
    body.article-page .article-header .article-title { font-size: 26px; }
    .header-inner { flex-wrap: wrap; gap: 12px; }
    .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero-title { font-size: 24px; }
    .cat-btn { font-size: 12px; padding: 6px 14px; }
}