/* Reset dan Style Dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: #fff;
    padding: 10px 0;
}

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



.logo {
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
}

.logo span {
    color: #4e3f3e;
}

.search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 500px;
    width: 100%;
    /* border: 1px solid #ddd; */
    border-radius: 50px; /* Bikin lebih membulat */
    overflow: hidden; /* Menghindari border yang tidak sejajar */
}

.search-bar input {
    flex: 1; /* Biar input mengisi ruang kosong */
    padding: 12px;
    border: none;
    outline: teal; /* Hilangkan efek klik */
    font-size: 16px;
}

.search-bar button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 16px;
}

.user-menu {
    display: flex;
    gap: 10px; /* Jarak antar tombol */

    /* background-color: #fff; */
    padding: 10px 20px;
    border-radius: 8px;
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.1); */
}

/* Style untuk tombol Login dan Sign Up */
.login-btn, .signup-btn {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.login-btn:hover, .signup-btn:hover {
    background-color: #fff;
    color: #3498db;
    transform: translateY(-2px);
}

.subscribe-btn {
    background: linear-gradient(to right, #9b59b6, #8e44ad);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(142, 68, 173, 0.3);
    transition: all 0.3s ease;
}

.subscribe-btn:hover {
    background: linear-gradient(to right, #8e44ad, #9b59b6);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(142, 68, 173, 0.4);
}


/* Navigation */
nav {
    background: linear-gradient(to right, #e74c3c, #c0392b);
}

.nav-menu {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-menu li a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.nav-menu li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background: #fff;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-menu li a:hover {
    background-color: rgba(255,255,255,0.1);
}

.nav-menu li a:hover:after {
    width: 60%;
}

/* Main Content */
.flex-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.flex-container:hover {
    background-color: #f5f5f5;
    color: #000000; /* text jadi hitam */
}

.content {
    flex: 2;
}

.sidebar {
    flex: 1;
}

.featured-news {
    position: relative;
    margin-bottom: 30px;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.featured-news:hover {
    transform: scale(1.02);
}

.featured-news img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.featured-content {
    position: absolute;
    bottom: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    width: 100%;
    color: #fff;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.featured-news:hover .featured-content {
    transform: translateY(-10px);
}

.featured-content .category {
    background-color: #e74c3c;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    display: inline-block;
    margin-bottom: 10px;
}

.featured-content h2 {
    margin-bottom: 10px;
    font-size: 1.8em;
}

.featured-content .meta {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Sidebar */
.widget {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.popular-posts .post {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    text-decoration: none;
}

.popular-posts .post-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

.popular-posts .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.post-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-info h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.post-info .meta {
    font-size: 0.875rem;
    color: #777;
}

/* Footer Styles */
footer {
    background-color: #cd1d31;
    color: #fff;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

footer p {
    margin: 0;
}

.footer-menu {
    display: flex;
    gap: 2rem;
}

.footer-menu a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-menu a:hover {
    color: #e74c3c;
}

/* Responsive Footer */
@media (max-width: 768px) {
    footer .container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-menu {
        margin-top: 1rem;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Responsiveness */
@media (max-width: 992px) {
    .flex-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .search-bar input {
        width: 100%;
    }
    
    .nav-menu {
        flex-direction: column;
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
}


/* Latest News Section */
.latest-news {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.latest-news .post {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.latest-news .post:hover {
    transform: translateY(-5px);
}

.latest-news .post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.latest-news .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.latest-news .post-info {
    padding: 15px;
}

.latest-news .post-info h4 {
    color: #333;
    margin-bottom: 8px;
}

.latest-news .post-info .meta {
    color: #666;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .latest-news {
        grid-template-columns: repeat(2, 1fr);
    }
}

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