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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #1f2937;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Animated Grid Background ===== */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.grid-lines {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

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

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

/* ===== Logo ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.logo-icon .material-icons {
    font-size: 22px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Navigation ===== */
.nav {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 768px) {
    .nav {
        display: flex;
    }
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #f3f4f6;
    color: #111827;
}

.nav-link.active {
    background: #eff6ff;
    color: #2563eb;
}

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #4b5563;
    border-radius: 8px;
    cursor: pointer;
}

.menu-toggle:hover {
    background: #f3f4f6;
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
}

/* ===== Main ===== */
.main {
    position: relative;
    z-index: 1;
    padding-top: 64px;
}

/* ===== Hero Section ===== */
.hero {
    padding: 4rem 0 5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .hero {
        padding: 5rem 0 6rem;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-badge .material-icons {
    font-size: 16px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }
}

.gradient-text {
    display: block;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f9fafb;
}

.btn .material-icons {
    font-size: 18px;
}

/* ===== Section ===== */
.section {
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .section {
        padding: 4rem 0;
    }
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-line {
    width: 4px;
    height: 28px;
    background: linear-gradient(180deg, #3b82f6, #60a5fa);
    border-radius: 2px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    flex: 1;
}

.section-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
}

.section-link:hover {
    color: #1d4ed8;
}

.section-link .material-icons {
    font-size: 16px;
}

/* ===== News Grid ===== */
.news-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== News Card ===== */
.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.news-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
}

.news-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.news-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid;
}

.news-card-content {
    padding: 1.25rem;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.news-card-meta .material-icons {
    font-size: 14px;
}

.news-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card:hover .news-card-title {
    color: #2563eb;
}

.news-card-description {
    font-size: 0.875rem;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Featured Card ===== */
.featured-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.featured-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

@media (min-width: 1024px) {
    .featured-card {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

.featured-card .news-card-image {
    height: 280px;
}

@media (min-width: 1024px) {
    .featured-card .news-card-image {
        height: auto;
    }
}

.featured-card .news-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-card .news-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.featured-card .news-card-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    color: #2563eb;
}

.read-more .material-icons {
    font-size: 18px;
}

/* ===== Category Colors ===== */
.badge-internasional { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.badge-nasional { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.badge-lokal { background: #f3e8ff; color: #7c3aed; border-color: #e9d5ff; }
.badge-teknologi { background: #cffafe; color: #0e7490; border-color: #a5f3fc; }
.badge-cyber { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.badge-ekonomi { background: #fef3c7; color: #a16207; border-color: #fde68a; }
.badge-politik { background: #e0e7ff; color: #4338ca; border-color: #c7d2fe; }
.badge-olahraga { background: #ffedd5; color: #c2410c; border-color: #fed7aa; }

/* ===== Loading ===== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #6b7280;
    grid-column: 1 / -1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    grid-column: 1 / -1;
}

.empty-icon {
    width: 64px;
    height: 64px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #9ca3af;
}

.empty-icon .material-icons {
    font-size: 32px;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.empty-state p {
    color: #6b7280;
}

/* ===== Footer ===== */
.footer {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .footer-content {
        grid-template-columns: 2fr 1fr;
    }
}

.footer-text {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 1rem;
    max-width: 400px;
}

.footer-links h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.footer-links a {
    display: block;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #2563eb;
}

.footer-bottom {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== Selection ===== */
::selection {
    background: rgba(59, 130, 246, 0.2);
}
