/* File: assets/css/style.css */
/* Blogbintang.com - Main Stylesheet */

:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary: #dc2626;
    --accent: #f59e0b;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #f9fafb;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-sm: 4px;
    --container: 1200px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.logo svg {
    width: 40px;
    height: 40px;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    font-weight: 500;
    font-size: 15px;
    padding: 10px 0;
    position: relative;
}

.nav a:hover {
    color: var(--primary);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

/* Breaking News */
.breaking-news {
    background: var(--secondary);
    color: var(--white);
    padding: 10px 0;
    overflow: hidden;
}

.breaking-news-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.breaking-label {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.breaking-content {
    overflow: hidden;
    flex: 1;
}

.breaking-title {
    white-space: nowrap;
    overflow: hidden;
    animation: scroll-left 20s linear infinite;
}

@keyframes scroll-left {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* Hero Section */
.hero {
    margin-bottom: 40px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.hero-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
}

.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.hero-main:hover img {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 30px;
    color: var(--white);
}

.hero-category {
    display: inline-block;
    background: var(--secondary);
    color: var(--white);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}

.hero-meta {
    font-size: 14px;
    opacity: 0.9;
}

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-card {
    flex: 1;
    display: flex;
    gap: 15px;
    background: var(--white);
    padding: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s;
}

.hero-card:hover {
    box-shadow: var(--shadow-lg);
}

.hero-card-img {
    width: 120px;
    height: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.hero-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-card-category {
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.hero-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

/* Section Title */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.section-title h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
}

.view-all {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.article-card-img {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.article-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-card-img img {
    transform: scale(1.05);
}

.article-card-body {
    padding: 20px;
}

.article-card-category {
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.article-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.article-card-excerpt {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: var(--text-light);
}

.article-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* List Layout */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-list-item {
    display: flex;
    gap: 20px;
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s;
}

.article-list-item:hover {
    box-shadow: var(--shadow-lg);
}

.article-list-img {
    width: 280px;
    height: 180px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.article-list-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-list-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-list-category {
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.article-list-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.article-list-excerpt {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Sidebar */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

/* Popular Posts Widget */
.popular-post {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.popular-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-post-num {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.popular-post-img {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.popular-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content {
    flex: 1;
}

.popular-post-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
}

.popular-post-meta {
    font-size: 12px;
    color: var(--text-light);
}

/* Category Widget */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    transition: background 0.3s;
}

.category-item:hover {
    background: var(--primary);
    color: var(--white);
}

.category-item-count {
    background: var(--white);
    color: var(--text);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Newsletter Widget */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-form input {
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.newsletter-form button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: var(--bg);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    transition: background 0.3s, color 0.3s;
}

.tag:hover {
    background: var(--primary);
    color: var(--white);
}

/* Footer */
.footer {
    background: var(--text);
    color: var(--white);
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-brand p {
    color: #9ca3af;
    line-height: 1.8;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--primary);
}

.footer-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #9ca3af;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #9ca3af;
    font-size: 14px;
}

/* Single Post */
.single-post {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.post-header {
    padding: 40px;
}

.post-category {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

.post-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text-light);
    font-size: 14px;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-featured-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    padding: 40px;
    font-size: 18px;
    line-height: 1.8;
}

.post-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 40px 0 20px;
    color: var(--text);
}

.post-content h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 30px 0 15px;
    color: var(--text);
}

.post-content p {
    margin-bottom: 20px;
}

.post-content img {
    width: 100%;
    border-radius: var(--radius);
    margin: 30px 0;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-light);
}

.post-content ul, .post-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-tags {
    padding: 0 40px 40px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.post-share {
    padding: 30px 40px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: transform 0.3s;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.telegram { background: #0088cc; }

/* Related Posts */
.related-posts {
    margin-top: 40px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a, .pagination span {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s;
}

.pagination a:hover, .pagination .current {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 20px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-list-item {
        flex-direction: column;
    }
    
    .article-list-img {
        width: 100%;
        height: 200px;
    }
    
    .post-title {
        font-size: 24px;
    }
    
    .post-header, .post-content {
        padding: 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Breadcrumb */
.breadcrumb {
    padding: 20px 0;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb span {
    margin: 0 10px;
}

/* Search */
.search-box {
    position: relative;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }