/* ============================================
   OPTIK FORTUNA GRUP - Stylesheet Khusus Halaman Artikel
   100 Artikel Edukasi Kesehatan Mata, Kacamata & Softlens
   ============================================ */

/* ===== Reading Progress Bar ===== */
#readingProgressBar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--gradient-red);
    z-index: 10001;
    transition: width 0.1s linear;
}

/* ===== Artikel Hero Section ===== */
.artikel-hero {
    position: relative;
    padding: 150px 24px 70px;
    background: var(--gradient-hero);
    color: var(--white);
    text-align: center;
    overflow: hidden;
}

.artikel-hero .hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

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

.artikel-hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 18px;
}

.artikel-hero p.hero-subtitle {
    font-size: 1.1rem;
    color: var(--gray-300);
    max-width: 780px;
    margin: 0 auto 35px;
    line-height: 1.7;
}

/* Quick Stats Bar in Hero */
.artikel-stats-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 35px;
    padding: 16px 28px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    display: inline-flex;
}

.artikel-stat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--gray-300);
}

.artikel-stat-pill strong {
    color: var(--red-400);
    font-weight: 700;
    font-size: 1.05rem;
}

.artikel-stat-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

/* ===== Search Box ===== */
.article-search-container {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrap i.search-icon {
    position: absolute;
    left: 20px;
    color: var(--gray-400);
    font-size: 1.15rem;
    pointer-events: none;
    transition: color var(--transition-fast);
}

.search-input-wrap input {
    width: 100%;
    padding: 18px 55px 18px 52px;
    border-radius: var(--radius-full);
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 1rem;
    outline: none;
    transition: all var(--transition-base);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.search-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.search-input-wrap input:focus {
    border-color: var(--red-500);
    background: rgba(26, 26, 26, 0.95);
    box-shadow: 0 0 25px rgba(229, 57, 53, 0.4);
}

.search-input-wrap input:focus + .search-icon {
    color: var(--red-500);
}

.clear-search-btn {
    position: absolute;
    right: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.clear-search-btn:hover {
    background: var(--red-600);
    transform: scale(1.1);
}

/* ===== Article Section Layout ===== */
.artikel-main-section {
    padding: 50px 0 90px;
    background: #FAFAFA;
    min-height: 80vh;
}

/* Filter Bar & Category Pills */
.artikel-filter-wrap {
    margin-bottom: 35px;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
}

.cat-pill {
    padding: 10px 20px;
    border-radius: var(--radius-full);
    background: var(--white);
    color: var(--gray-700);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.cat-pill span.count {
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.cat-pill:hover {
    transform: translateY(-2px);
    border-color: var(--red-400);
    color: var(--red-600);
    box-shadow: var(--shadow-md);
}

.cat-pill.active {
    background: var(--gradient-red);
    color: var(--white);
    border-color: transparent;
    box-shadow: var(--shadow-red);
}

.cat-pill.active span.count {
    background: rgba(255, 255, 255, 0.25);
    color: var(--white);
}

/* Toolbar (Info & Sorting) */
.artikel-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 30px;
}

.results-info {
    font-size: 0.95rem;
    color: var(--gray-600);
}

.results-info strong {
    color: var(--gray-900);
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.sort-select {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-800);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.sort-select:focus {
    border-color: var(--red-500);
}

/* ===== Article Grid & Cards ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
}

.article-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(229, 57, 53, 0.2);
}

.article-img-wrap {
    position: relative;
    width: 100%;
    height: 210px;
    overflow: hidden;
    background: var(--gray-900);
}

.article-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-img-wrap img {
    transform: scale(1.08);
}

.article-cat-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 14px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--red-500);
}

.article-read-badge {
    position: absolute;
    bottom: 14px;
    right: 14px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--gray-800);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

.article-meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.article-meta-row span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-card-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.45;
    margin-bottom: 12px;
    transition: color var(--transition-fast);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card:hover .article-card-title {
    color: var(--red-600);
}

.article-card-excerpt {
    font-size: 0.92rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.article-tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.tag-chip {
    font-size: 0.72rem;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 3px 9px;
    border-radius: var(--radius-full);
    font-weight: 500;
}

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

.read-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--red-600);
    font-size: 0.9rem;
    font-weight: 700;
    transition: all var(--transition-fast);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.read-btn:hover {
    color: var(--red-800);
    transform: translateX(4px);
}

/* Empty State */
.articles-empty-state {
    text-align: center;
    padding: 70px 20px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin: 30px auto;
    max-width: 600px;
}

.empty-state-icon {
    font-size: 3.5rem;
    color: var(--gray-400);
    margin-bottom: 18px;
}

.articles-empty-state h3 {
    font-size: 1.4rem;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.articles-empty-state p {
    color: var(--gray-600);
    margin-bottom: 24px;
}

/* ===== Pagination Styling ===== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--gray-700);
    font-size: 0.92rem;
    font-weight: 600;
    border: 1px solid var(--gray-300);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
    background: var(--red-50);
    color: var(--red-600);
    border-color: var(--red-300);
}

.page-btn.active {
    background: var(--gradient-red);
    color: var(--white);
    border-color: transparent;
    box-shadow: var(--shadow-red);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-ellipsis {
    padding: 0 6px;
    color: var(--gray-400);
    font-weight: 700;
}

/* ===== Full Article Reader View ===== */
.article-reader-view {
    display: none;
    padding: 40px 0 90px;
    background: #FAFAFA;
}

.reader-container {
    max-width: 860px;
    margin: 0 auto;
    background: var(--white);
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.reader-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 15px;
}

.back-to-list-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gray-100);
    color: var(--gray-800);
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.back-to-list-btn:hover {
    background: var(--red-600);
    color: var(--white);
    border-color: var(--red-600);
    transform: translateX(-3px);
}

.reader-breadcrumbs {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.reader-breadcrumbs a {
    color: var(--gray-600);
}

.reader-breadcrumbs a:hover {
    color: var(--red-600);
}

.reader-header {
    margin-bottom: 30px;
}

.reader-category-tag {
    display: inline-block;
    padding: 5px 14px;
    background: var(--red-50);
    color: var(--red-600);
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reader-title {
    font-size: clamp(1.8rem, 3.2vw, 2.4rem);
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.3;
    margin-bottom: 20px;
}

.reader-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    font-size: 0.88rem;
    color: var(--gray-500);
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.reader-meta-row span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.reader-cover-wrap {
    width: 100%;
    max-height: 440px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin-bottom: 35px;
    box-shadow: var(--shadow-md);
}

.reader-cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Article Body Typography */
.reader-content {
    font-size: 1.08rem;
    line-height: 1.85;
    color: var(--gray-800);
    margin-bottom: 45px;
}

.reader-content p {
    margin-bottom: 20px;
}

.reader-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 35px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--red-100);
    position: relative;
}

.reader-content h3::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--red-600);
}

.reader-content ul,
.reader-content ol {
    margin: 16px 0 25px 24px;
}

.reader-content li {
    margin-bottom: 10px;
    position: relative;
}

.reader-content ul li::marker {
    color: var(--red-500);
}

.article-tip {
    background: #FFF8E1;
    border-left: 4px solid #FFA000;
    padding: 20px 24px;
    border-radius: var(--radius-sm);
    margin: 28px 0;
    color: #5D4037;
    font-size: 1rem;
    line-height: 1.7;
    box-shadow: var(--shadow-sm);
}

.article-tip i {
    color: #F57C00;
    margin-right: 6px;
}

/* Share & Reviewer Boxes */
.reader-share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 35px;
}

.share-label {
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    transition: all var(--transition-fast);
}

.share-wa {
    background: #25D366;
}
.share-wa:hover {
    background: #1EBE5D;
    transform: translateY(-2px);
}

.share-fb {
    background: #1877F2;
}
.share-fb:hover {
    background: #0E65D9;
    transform: translateY(-2px);
}

.share-copy {
    background: var(--gray-800);
}
.share-copy:hover {
    background: var(--black);
    transform: translateY(-2px);
}

/* Reviewer Card */
.reviewer-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    margin-bottom: 35px;
}

.reviewer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-red);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.6rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-red);
}

.reviewer-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.reviewer-info p {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin: 0;
}

/* Article Consultation Banner */
.article-consultation-banner {
    padding: 35px 30px;
    background: linear-gradient(135deg, var(--gray-900) 0%, #1a0505 100%);
    border-radius: var(--radius-lg);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 45px;
    border: 1px solid rgba(229, 57, 53, 0.3);
}

.article-consultation-banner h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.article-consultation-banner p {
    color: var(--gray-300);
    font-size: 0.98rem;
    max-width: 600px;
    margin: 0 auto 24px;
}

.article-consultation-banner .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-full);
}

/* Related Articles */
.related-articles-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--gray-200);
}

.related-articles-section h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.related-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-base);
    cursor: pointer;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--red-400);
}

.related-card-img {
    height: 130px;
    overflow: hidden;
}

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

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

.related-card-body {
    padding: 16px;
}

.related-card-body h4 {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--gray-900);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.related-card-date {
    font-size: 0.78rem;
    color: var(--gray-500);
}

/* Toast Notification for Link Copied */
.toast-copied {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(10, 10, 10, 0.95);
    color: var(--white);
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 10002;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.toast-copied.show {
    transform: translateX(-50%) translateY(0);
}

.toast-copied i {
    color: #25D366;
}

/* Responsive Rules for Artikel */
@media (max-width: 768px) {
    .reader-container {
        padding: 24px 18px;
        border-radius: var(--radius-md);
    }
    
    .artikel-hero {
        padding: 130px 18px 50px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .artikel-stats-strip {
        gap: 12px;
        padding: 12px 18px;
    }
}
