/* ============================================
   SECTION 1 — HERO
   ============================================ */
.ar-hero {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.ar-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: #16213e;
    transform: scale(1.03);
    transition: transform 8s ease;
}

.ar-hero:hover .ar-hero-bg { transform: scale(1); }

.ar-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(22,33,62,0.85) 0%, rgba(193,18,31,0.55) 100%);
}

.ar-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 40px 80px;
    width: 100%;
}

.ar-hero-content h1 {
    font-family: var(--font-display);
    font-size: 52px;
    font-weight: 900;
    color: white;
    line-height: 1.1;
    margin: 12px 0 20px;
    max-width: 700px;
}

.ar-hero-content p {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    line-height: 1.75;
    max-width: 560px;
}

/* ============================================
   SECTION 2 — PENCAPAIAN TERBARU
   ============================================ */
.ar-recent-section {
    padding: 80px 0;
    background: var(--white);
}

.ar-recent-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 32px;
}

/* Recent card — compact vertikal */
.ar-recent-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.ar-recent-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.ar-recent-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: var(--bg);
    display: block;
}

.ar-recent-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ar-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(230,57,70,0.1);
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    width: fit-content;
}

.ar-recent-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.ar-recent-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: auto;
}

/* ============================================
   SECTION 3 — BROWSE / KATALOG
   ============================================ */
.ar-browse-section {
    padding: 80px 0 100px;
    background: var(--bg);
}

.ar-browse-header {
    margin-bottom: 36px;
}

/* Filter Bar */
.ar-filter-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
    padding: 20px 24px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.ar-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 9px 16px;
    flex: 0 0 280px;
    color: var(--text-muted);
    transition: border-color 0.2s;
}

.ar-search-box:focus-within {
    border-color: var(--primary);
    color: var(--text);
}

.ar-search-box input {
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text);
    outline: none;
    width: 100%;
}

.ar-search-box input::placeholder { color: var(--text-muted); }

.ar-tag-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.ar-tag-btn {
    padding: 6px 16px;
    border-radius: 40px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.ar-tag-btn:hover { border-color: var(--primary); color: var(--primary); }
.ar-tag-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Browse Grid — mirip IP Catalogue gambar 2 */
.ar-browse-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    min-height: 200px;
}

/* Browse card — lebih detail dari recent card */
.ar-browse-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.ar-browse-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.ar-browse-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--bg);
    display: block;
}

.ar-browse-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ar-browse-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.ar-browse-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.ar-browse-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: auto;
    font-size: 12px;
    color: var(--text-muted);
    gap: 8px;
}

.ar-browse-penulis {
    font-weight: 600;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ar-browse-tanggal { flex-shrink: 0; }

/* Pagination */
.ar-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 48px;
}

.ar-page-btn {
    padding: 10px 24px;
    border-radius: 40px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ar-page-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

#ar-page-info {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    min-width: 100px;
    text-align: center;
}

/* Empty state */
.ar-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    grid-column: 1 / -1;
}

.ar-empty svg { opacity: 0.25; }
.ar-empty p { font-size: 15px; }

/* Skeleton */
.ar-skeleton {
    background: white;
    border-radius: var(--radius);
    height: 260px;
    overflow: hidden;
    position: relative;
}

.ar-skeleton.wide { height: 300px; }

.ar-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: ar-shimmer 1.5s infinite;
}

@keyframes ar-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   ARTIKEL DETAIL PAGE
   ============================================ */
.ar-detail-container {
    max-width: 900px;
    padding-top: 100px;
    padding-bottom: 80px;
}

.ar-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 32px;
    transition: background 0.2s, color 0.2s;
}

.ar-back-btn:hover { background: var(--primary); color: white; }

.ar-detail-layout {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.ar-detail-layout article { flex: 1; min-width: 0; }

.ar-detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.ar-detail-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 900;
    color: var(--dark);
    line-height: 1.2;
    margin-bottom: 16px;
}

.ar-detail-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.ar-detail-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ar-detail-foto {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 32px;
    display: block;
}

.ar-detail-konten {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text);
}

/* Nav btn (prev/next) — sticky di samping */
.ar-nav-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--dark);
    position: sticky;
    top: 50vh;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.ar-nav-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.ar-nav-btn:disabled { opacity: 0.2; cursor: not-allowed; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .ar-recent-grid { grid-template-columns: repeat(2, 1fr); }
    .ar-browse-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .ar-hero-content h1 { font-size: 36px; }
    .ar-hero-content { padding: 120px 20px 60px; }
    .ar-recent-grid { grid-template-columns: repeat(2, 1fr); }
    .ar-browse-grid { grid-template-columns: 1fr; }
    .ar-filter-bar { flex-direction: column; align-items: stretch; }
    .ar-search-box { flex: none; }
    .ar-detail-layout { flex-direction: column; }
    .ar-detail-layout .ar-nav-btn { display: none; }
    .ar-detail-title { font-size: 26px; }
}

@media (max-width: 480px) {
    .ar-recent-grid { grid-template-columns: 1fr; }
}
