/* Modern News Website CSS */

/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background-color: #f7fafc;
    font-size: 16px;
}

/* Header Navigation */
.main-header {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.nav-brand .logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2C1810;
    text-decoration: none;
}

.news-text {
    color: #8B4513;
    font-weight: 400;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #2C1810;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(139, 69, 19, 0.2);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #2C1810;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

/* Featured Article */
.featured-article {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.article-header {
    padding: 2rem 2rem 1rem;
}

.category-tag {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #2C1810;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 1rem 0;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 12px;
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.featured-image:hover {
    transform: scale(1.05);
}

.article-content {
    padding: 2rem;
}

.lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #FFFACD, #FFF8DC);
    border-left: 4px solid #FFD700;
    border-radius: 8px;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #4a5568;
}

.highlight-box {
    background: linear-gradient(135deg, #FFFACD, #FFF8DC);
    border: 1px solid #FFD700;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.highlight-box h3 {
    color: #B8860B;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.highlight-box ul {
    list-style: none;
    padding-left: 0;
}

.highlight-box li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.highlight-box li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #DAA520;
    font-weight: bold;
}

.call-to-action {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #2C1810;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 2rem;
}

.call-to-action p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.news-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
    transition: transform 0.2s ease;
}

.news-item:hover {
    transform: translateX(5px);
}

.news-item:last-child {
    border-bottom: none;
}

.news-thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
}

.news-thumbnail svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
}

.news-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.news-date {
    font-size: 0.8rem;
    color: #718096;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    color: #4a5568;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.category-list a:hover {
    background-color: #f7fafc;
    color: #667eea;
    transform: translateX(5px);
}

.category-list span {
    color: #a0aec0;
    font-size: 0.8rem;
}

/* Related News Grid */
.related-news {
    margin-top: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 2rem;
    text-align: center;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Enhanced image and SVG handling */
.news-thumbnail img,
.news-thumbnail svg,
.card-image img,
.card-image svg {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* Fallback for browsers that don't support object-fit */
.news-thumbnail,
.card-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Ensure SVG scales properly */
svg {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* Responsive adjustments for images */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card-image {
        height: 180px;
    }
    
    .news-thumbnail {
        width: 70px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .card-image {
        height: 160px;
    }
    
    .news-thumbnail {
        width: 60px;
        height: 45px;
    }
}

@media (min-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .card-image {
        height: 220px;
    }
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

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

.card-image svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.news-card:hover .card-image img,
.news-card:hover .card-image svg {
    transform: scale(1.1);
}

.category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 215, 0, 0.9);
    color: #2C1810;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.card-content p {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #a0aec0;
}

/* Footer */
.main-footer {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #FFD700;
}

.footer-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #e2e8f0;
}

.footer-section p {
    color: #a0aec0;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #FFD700;
    color: #2C1810;
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
}

.newsletter-input::placeholder {
    color: #a0aec0;
}

.newsletter-btn {
    padding: 0.8rem 1.5rem;
    background: #FFD700;
    color: #2C1810;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    background: #FFA500;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4a5568;
    color: #a0aec0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-image {
        height: 250px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-content,
    .article-header {
        padding: 1rem;
    }
    
    .hero-image {
        height: 200px;
    }
    
    .lead {
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* Smooth animations */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background-color: #667eea;
    color: white;
}

/* Focus styles for accessibility */
.nav-link:focus,
.newsletter-btn:focus,
.newsletter-input:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* Loading animation for images */
img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

/* Hover effects for interactive elements */
a, button {
    cursor: pointer;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}