/* ========================================
   BlogID.eu - Estonian News Aggregator
   Clean & Modern Design
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #2962ff;
    --secondary-color: #ff6d00;
    --tertiary-color: #00c853;
    --text-color: #37474f;
    --light-text: #78909c;
    --lightest-bg: #f5f7fa;
    --light-bg: #eceff1;
    --border-color: #e0e0e0;
    --star-color: #ffc107;
    --view-color: #7e57c2;
    --share-color: #26a69a;
    --comment-color: #5c6bc0;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--lightest-bg);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Header
   ======================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 12px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.site-title a {
    text-decoration: none;
    color: var(--primary-color);
}

.site-title span {
    color: var(--secondary-color);
}

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

.article-count {
    font-size: 0.85rem;
    color: var(--light-text);
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 5px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--light-text);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--lightest-bg);
    color: var(--primary-color);
}

.nav-link i {
    margin-right: 4px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1rem;
}

/* ========================================
   Filters
   ======================================== */
.filters {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    margin-bottom: 25px;
}

.filters-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.sort-options {
    display: flex;
    gap: 5px;
}

.sort-option {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--light-text);
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    cursor: pointer;
    background: none;
}

.sort-option.active,
.sort-option:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.categories-list {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    max-height: 40px;
    overflow: hidden;
}

.categories-list.active {
    max-height: none;
    overflow: visible;
}

.category-item {
    padding: 6px 14px;
    border-radius: 15px;
    background: var(--light-bg);
    font-size: 0.8rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.category-item.active,
.category-item:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ========================================
   Posts Grid
   ======================================== */
.posts-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

/* ========================================
   Post Card
   ======================================== */
.post {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 20px;
}

.post:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.post-header {
    position: relative;
    overflow: hidden;
}

.post-image-link {
    display: block;
}

.post-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.post-image-link:hover .post-image {
    transform: scale(1.03);
}

.post-stats {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 8px;
}

.post-stats .stat {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-views {
    border-left: 3px solid var(--view-color);
}

.stat-shares {
    border-left: 3px solid var(--share-color);
}

.stat-comments {
    border-left: 3px solid var(--comment-color);
}

.post-content {
    padding: 20px;
}

.post-categories {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.post-categories a {
    background: rgba(41, 98, 255, 0.08);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    text-decoration: none;
}

.post-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 10px;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-color);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--light-text);
    font-size: 0.95rem;
    margin: 0 0 15px;
    line-height: 1.5;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    gap: 15px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info .author-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
}

.author-info .post-date {
    font-size: 0.8rem;
    color: var(--light-text);
}

/* ========================================
   Rating
   ======================================== */
.rating {
    display: flex;
    gap: 3px;
}

.rating i {
    color: var(--star-color);
    font-size: 0.85rem;
}

.rating .far {
    color: var(--border-color);
}

.rating-count {
    font-size: 0.8rem;
    color: var(--light-text);
}

/* ========================================
   Single Article
   ======================================== */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-detail .post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.post-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color);
}

.source-link {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    margin-top: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.source-link:hover {
    background: #1e4fc9;
}

/* ========================================
   Rating Section
   ======================================== */
/* ========================================
   Rating Section — Voting & Assessment
   ======================================== */
.rating-section {
    background: #fff;
    border-radius: 16px;
    margin-top: 30px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.rating-section-header {
    background: linear-gradient(135deg, #2962ff 0%, #448aff 50%, #82b1ff 100%);
    color: #fff;
    padding: 28px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.rating-section-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.rating-section-header::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.rating-section-icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin: 0 auto 12px;
    backdrop-filter: blur(10px);
}

.rating-section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
    position: relative;
}

.rating-section-subtitle {
    font-size: 0.9rem;
    opacity: 0.85;
    position: relative;
}

.rating-section-body {
    padding: 25px 30px 30px;
}

/* Rating Overview — Score + Bars */
.rating-overview {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
}

.rating-score-circle {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff8e1, #fff3c4);
    border: 3px solid var(--star-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.2);
}

.rating-score-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #f57f17;
    line-height: 1;
}

.rating-score-max {
    font-size: 0.8rem;
    color: var(--light-text);
    font-weight: 500;
}

.rating-score-count {
    font-size: 0.7rem;
    color: var(--light-text);
    margin-top: 2px;
}

.rating-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-bar-label {
    font-size: 0.82rem;
    color: var(--text-color);
    min-width: 130px;
    font-weight: 500;
}

.rating-bar-label i {
    width: 18px;
    text-align: center;
    color: var(--light-text);
    margin-right: 4px;
}

.rating-bar-track {
    flex: 1;
    background: #f0f0f0;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.rating-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.rating-bar-overall {
    background: linear-gradient(90deg, #ffc107, #ffab00);
}

.rating-bar-usefulness {
    background: linear-gradient(90deg, #66bb6a, #43a047);
}

.rating-bar-credibility {
    background: linear-gradient(90deg, #42a5f5, #1e88e5);
}

.rating-bar-value {
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 28px;
    text-align: right;
    color: var(--text-color);
}

/* Rating Form */
.rating-form-wrapper {
    margin-top: 5px;
}

.rating-criteria {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.rating-criterion {
    background: var(--lightest-bg);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.rating-criterion:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.rating-criterion:has(input:checked) {
    border-color: var(--star-color);
    background: #fffde7;
}

.criterion-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

.criterion-icon {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.criterion-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Star Rating Inputs */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 2px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 1.7rem;
    color: #ddd;
    transition: color 0.15s, transform 0.15s;
    padding: 2px;
}

.star-rating label:hover {
    transform: scale(1.2);
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: var(--star-color);
}

.star-rating input:checked ~ label {
    text-shadow: 0 0 8px rgba(255, 193, 7, 0.4);
}

/* Submit Buttons */
.btn-rate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(135deg, #2962ff, #448aff);
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.btn-rate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(41, 98, 255, 0.35);
}

.btn-rate:active {
    transform: translateY(0);
}

.btn-rate:disabled,
.btn-comment:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Thank you state */
.rating-thankyou {
    text-align: center;
    padding: 30px 20px;
}

.rating-thankyou-icon {
    font-size: 3rem;
    color: var(--tertiary-color);
    margin-bottom: 12px;
    animation: thankyouPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rating-thankyou h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 6px;
}

.rating-thankyou p {
    color: var(--light-text);
    font-size: 0.95rem;
}

.rating-thankyou p strong {
    color: #f57f17;
    font-size: 1.1rem;
}

@keyframes thankyouPop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Legacy classes for JS compatibility */
.form-group {
    margin-bottom: 20px;
}

.btn-submit {
    background: linear-gradient(135deg, #2962ff, #448aff);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(41, 98, 255, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   Comments Section
   ======================================== */
.comments-section {
    margin-top: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.comments-header {
    margin-bottom: 20px;
}

.comments-header h3 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
}

.comments-header h3 i {
    color: var(--comment-color);
}

.comments-badge {
    background: var(--comment-color);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.comment-card {
    display: flex;
    gap: 14px;
    background: #fff;
    padding: 18px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}

.comment-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.comment-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8eaf6, #c5cae9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--comment-color);
    font-size: 0.9rem;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

.comment-date {
    font-size: 0.78rem;
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-text {
    font-size: 0.93rem;
    line-height: 1.6;
    color: #455a64;
}

.comments-empty {
    text-align: center;
    padding: 30px 20px;
    color: var(--light-text);
    background: var(--lightest-bg);
    border-radius: 12px;
    margin-bottom: 20px;
}

.comments-empty i {
    font-size: 2.2rem;
    margin-bottom: 10px;
    display: block;
    opacity: 0.4;
}

.comments-empty p {
    font-size: 0.95rem;
}

/* Comment Form */
.comment-form-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.comment-form-card h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-form-card h4 i {
    color: var(--primary-color);
}

.form-field {
    position: relative;
    margin-bottom: 14px;
}

.form-field-icon {
    position: absolute;
    left: 14px;
    top: 13px;
    color: var(--light-text);
    font-size: 0.85rem;
    z-index: 1;
    pointer-events: none;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 0.93rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--lightest-bg);
}

.form-field textarea {
    resize: vertical;
    min-height: 90px;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(41, 98, 255, 0.1);
    background: #fff;
}

.btn-comment {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, var(--comment-color), #7986cb);
    color: #fff;
    border: none;
    padding: 13px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.btn-comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(92, 107, 192, 0.35);
}

.btn-comment:active {
    transform: translateY(0);
}

/* Legacy comment-form styles */
.comment-form input {
    padding: 10px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 0.93rem;
    width: 100%;
    margin-bottom: 10px;
    font-family: inherit;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 0.93rem;
    resize: vertical;
    min-height: 90px;
    font-family: inherit;
    background: var(--lightest-bg);
}

.comment-form textarea:focus,
.comment-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(41, 98, 255, 0.1);
    background: #fff;
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.widget-title {
    background: var(--primary-color);
    color: #fff;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 600;
}

.widget-content {
    padding: 15px;
}

.author-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s;
    position: relative;
}

.author-card:hover {
    background: var(--lightest-bg);
}

.author-rank {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-rank.rank-1 {
    background: #ffc107;
}

.author-rank.rank-2 {
    background: #aaa;
}

.author-rank.rank-3 {
    background: #cd7f32;
}

.author-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details {
    flex: 1;
}

.author-name-link {
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.author-stats-mini {
    font-size: 0.75rem;
    color: var(--light-text);
}

.mini-post {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.mini-post:last-child {
    border-bottom: none;
}

.mini-post img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.mini-post-info {
    flex: 1;
}

.mini-post-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    display: block;
    line-height: 1.3;
}

.mini-post-meta {
    font-size: 0.75rem;
    color: var(--light-text);
    margin-top: 5px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
}

.category-list .count {
    color: var(--light-text);
    font-size: 0.85rem;
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--text-color);
    background: #fff;
    border: 1px solid var(--border-color);
}

.pagination .current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination a:hover {
    background: var(--lightest-bg);
}

.pagination .prev,
.pagination .next {
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
}

.pagination .dots {
    border: none;
    background: transparent;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--light-text);
}

/* ========================================
   Reviews Page
   ======================================== */
/* Reviews page grid - overridden below in supplementary styles */

.review-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 20px;
}

.review-card h3 {
    font-size: 1.1rem;
}

.review-date {
    color: var(--light-text);
    font-size: 0.85rem;
}

/* ========================================
   Utility Classes
   ======================================== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.success-message {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    border: 1px solid #a5d6a7;
}

.success-message i {
    font-size: 1.2rem;
}

.error-message {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #c62828;
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    border: 1px solid #ef9a9a;
}

.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ========================================
   Back Button
   ======================================== */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-decoration: none;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    transition: background 0.2s;
}

.back-button:hover {
    background: var(--lightest-bg);
}

/* ========================================
   Page Header (category, author pages)
   ======================================== */
.page-header {
    padding: 25px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.page-description {
    color: var(--light-text);
    font-size: 0.95rem;
}

/* Author Profile */
.author-profile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.author-profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-profile-stats {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    color: var(--light-text);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.author-profile-stats i {
    margin-right: 4px;
}

/* Post meta left/right in cards */
.post-meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.post-meta-right {
    flex-shrink: 0;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.author-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--light-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    font-size: 0.75rem;
}

.author-avatar-large {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.post-date {
    font-size: 0.8rem;
    color: var(--light-text);
}

.post-image-placeholder {
    background: var(--light-bg);
    height: 200px;
}

/* Author sidebar stats */
.author-stats span {
    font-size: 0.75rem;
    color: var(--light-text);
    margin-right: 10px;
}

/* Rating count text */
.rating-count-text {
    font-size: 0.85rem;
    color: var(--light-text);
}

/* Current rating */
.current-rating {
    text-align: right;
}

/* Reviews list fix — should be simple column */
.reviews-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.review-excerpt {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-top: 8px;
    line-height: 1.5;
}

.review-body {
    line-height: 1.7;
}

/* Comments title */
.comments-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.comments-count {
    color: var(--light-text);
    font-weight: 400;
}

.no-comments {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Legacy wrappers */
.comment-form-wrapper {
    margin-top: 20px;
}

.comment-form-wrapper h4 {
    margin-bottom: 10px;
}

/* Pagination dots */
.pagination-dots {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--light-text);
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--text-color);
    background: #fff;
    border: 1px solid var(--border-color);
    transition: background 0.2s;
}

.pagination-btn:hover {
    background: var(--lightest-bg);
}

.pagination-current {
    background: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
}

.pagination-prev,
.pagination-next {
    width: auto !important;
    padding: 0 15px !important;
    border-radius: 20px !important;
    font-size: 0.85rem;
}

.pagination-pages {
    display: flex;
    gap: 5px;
    align-items: center;
}

/* Error page */
.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-page h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.error-page p {
    color: var(--light-text);
    margin-bottom: 20px;
}

/* Mini post thumbnail placeholder */
.mini-post-thumb-placeholder {
    width: 80px;
    height: 80px;
    background: var(--light-bg);
    border-radius: 8px;
    flex-shrink: 0;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, #1a237e 0%, #2962ff 50%, #448aff 100%);
    color: #fff;
    padding: 40px 0;
    margin-bottom: 0;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    align-items: center;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-title span {
    color: var(--star-color);
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 20px;
}

.hero-stats {
    display: flex;
    gap: 25px;
    margin-bottom: 20px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
}

.hero-stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.hero-btn-primary {
    background: var(--star-color);
    color: #1a237e;
}

.hero-btn-secondary {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.hero-review {
    display: flex;
    align-items: center;
}

.hero-review-card {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
}

.hero-review-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: var(--star-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.hero-review-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.hero-review-card h3 a {
    color: #fff;
    text-decoration: none;
}

.hero-review-card p {
    font-size: 0.85rem;
    opacity: 0.85;
    line-height: 1.5;
    margin-bottom: 12px;
}

.hero-review-link {
    color: var(--star-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.hero-review-link i {
    margin-left: 4px;
    transition: transform 0.2s;
}

.hero-review-link:hover i {
    transform: translateX(4px);
}

/* ========================================
   Widget enhancements
   ======================================== */
.widget-content {
    padding: 15px;
}

.widget-link {
    display: block;
    text-align: center;
    padding: 10px;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

.widget-link:hover {
    background: var(--lightest-bg);
}

.review-widget-date {
    font-size: 0.8rem;
    color: var(--light-text);
    margin-bottom: 8px;
}

.review-widget h4 {
    font-size: 0.95rem;
    margin-bottom: 6px;
    line-height: 1.3;
}

.review-widget h4 a {
    color: var(--text-color);
    text-decoration: none;
}

.review-widget h4 a:hover {
    color: var(--primary-color);
}

.review-widget p {
    font-size: 0.85rem;
    color: var(--light-text);
    line-height: 1.5;
    margin-bottom: 8px;
}

/* ========================================
   Author Ranking Page
   ======================================== */
.authors-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.author-ranking-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.author-ranking-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.author-ranking-card.top-1 {
    background: linear-gradient(135deg, #fff9e6, #fff3cc);
    border: 2px solid #ffc107;
}

.author-ranking-card.top-2 {
    background: linear-gradient(135deg, #f5f5f5, #eeeeee);
    border: 2px solid #bdbdbd;
}

.author-ranking-card.top-3 {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 2px solid #cd7f32;
}

.ranking-position {
    min-width: 48px;
    text-align: center;
}

.rank-medal {
    font-size: 1.2rem;
    font-weight: 700;
}

.rank-medal i {
    margin-right: 2px;
}

.rank-1 { color: #ffc107; }
.rank-2 { color: #9e9e9e; }
.rank-3 { color: #cd7f32; }

.rank-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--light-text);
}

.ranking-author {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.ranking-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ranking-avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    color: var(--light-text);
    font-size: 1.2rem;
}

.ranking-info {
    min-width: 0;
}

.ranking-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-name:hover {
    color: var(--primary-color);
}

.ranking-rating {
    margin-top: 2px;
}

.ranking-stats {
    display: flex;
    gap: 20px;
}

.ranking-stat {
    text-align: center;
    min-width: 60px;
}

.ranking-stat-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
}

.ranking-stat-label {
    font-size: 0.7rem;
    color: var(--light-text);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Rating badge on cards */
.post-rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffc107;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.post-rating-badge i {
    font-size: 0.7rem;
}

.post-rating-badge-cta {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.post:hover .post-rating-badge-cta {
    background: rgba(255, 193, 7, 0.9);
    color: #333;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet and below */
@media (max-width: 1100px) {
    .posts-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-review {
        display: none;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .post-image {
        height: 200px;
    }

    .categories-list {
        display: none;
    }

    .categories-list.active {
        display: flex;
        width: 100%;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .post-title {
        font-size: 1.2rem;
    }

    .rating-overview {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .rating-bars {
        width: 100%;
    }

    .rating-criteria {
        grid-template-columns: 1fr;
    }

    .author-profile {
        flex-direction: column;
        text-align: center;
    }

    .author-profile-stats {
        justify-content: center;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }

    .filters-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-options {
        justify-content: center;
        flex-wrap: wrap;
    }

    .article-detail {
        margin: 0 10px;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .reviews-list {
        grid-template-columns: 1fr;
    }

    .main-nav {
        display: none;
    }

    .hero {
        padding: 25px 0;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-stats {
        gap: 15px;
    }

    .hero-stat-number {
        font-size: 1.3rem;
    }

    .hero-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .ranking-stats {
        flex-wrap: wrap;
        gap: 10px;
    }

    .author-ranking-card {
        flex-wrap: wrap;
        padding: 12px 15px;
    }
}

/* Small mobile */
@media (max-width: 576px) {
    .container {
        padding: 0 12px;
    }

    .post-image {
        height: 180px;
    }

    .sort-option {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .pagination-btn {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .rating-section-body {
        padding: 20px 15px;
    }

    .rating-section-header {
        padding: 20px 15px;
    }

    .rating-score-circle {
        width: 90px;
        height: 90px;
    }

    .rating-score-value {
        font-size: 1.8rem;
    }

    .star-rating label {
        font-size: 1.4rem;
    }

    .rating-bar-label {
        min-width: 100px;
        font-size: 0.75rem;
    }

    .comment-card {
        padding: 14px;
    }

    .comment-form-card {
        padding: 18px;
    }

    .source-link {
        display: block;
        text-align: center;
    }

    .post-content {
        padding: 15px;
    }

    .back-button {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .site-title {
        font-size: 1.2rem;
    }

    .header-inner {
        padding: 0 12px;
    }

    .filters-inner {
        padding: 0 12px;
    }

    .mini-post {
        padding: 10px;
    }

    .mini-post img,
    .mini-post-thumb-placeholder {
        width: 60px;
        height: 60px;
    }

    .post-stats .stat {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .comment {
        padding: 12px 15px;
    }
}

/* Extra small mobile */
@media (max-width: 375px) {
    .post-title {
        font-size: 1rem;
    }

    .post-excerpt {
        font-size: 0.85rem;
    }

    .sort-option {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    .category-item {
        padding: 4px 10px;
        font-size: 0.75rem;
    }
}
