/* Gaya untuk semua gambar */
img {
    max-width: 100%; /* Pastikan gambar tidak melampaui lebar kontainer */
    height: auto; /* Menjaga proporsi gambar */
    display: block; /* Menghilangkan jarak di bawah gambar */
}

/* Gambar berita (thumbnail) */
.news-thumbnail {
    width: 100%; /* Atur gambar memenuhi container */
    height: 250px; /* Menambah tinggi agar gambar lebih proporsional */
    object-fit: cover; /* Potong gambar agar pas */
    border-radius: 8px; /* Sudut melengkung */
    margin-bottom: 15px; /* Jarak dengan teks */
}

/* Gambar olahraga (logo) */
.sport-logo {
    width: 150px; /* Ukuran tetap untuk logo */
    height: 150px;
    object-fit: contain; /* Jaga agar logo tidak terpotong */
    margin: 0 auto; /* Posisikan di tengah */
    display: block;
}

/* Gaya untuk elemen <main> */
main {
    display: flex;
    flex-direction: column; /* Konten diatur vertikal */
    gap: 30px; /* Jarak antar section */
    padding: 30px; /* Jarak internal dari tepi main */
    background-color: #ffffff;
    border-radius: 12px; /* Sudut membulat lebih halus */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); /* Efek bayangan lebih besar */
    max-width: 1200px;
    margin: 40px auto; /* Menambah jarak dari tepi layar */
    box-sizing: border-box;
}

/* Gaya untuk setiap <section> di dalam <main> */
main section {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    box-sizing: border-box;
}

/* Gaya untuk heading di dalam section */
main section h2 {
    margin-top: 0;
    color: #444;
    font-size: 1.8em; /* Ukuran font lebih besar untuk desktop */
    border-bottom: 3px solid #a0522d;
    padding-bottom: 8px;
}

/* Responsivitas untuk layar kecil */
@media (max-width: 768px) {
    main {
        padding: 15px;
        gap: 20px;
    }
    main section h2 {
        font-size: 1.4em;
    }
    .news-thumbnail {
        height: 200px; /* Gambar berita lebih kecil di layar kecil */
    }
}

/* Atur artikel berita */
/* Gaya untuk setiap artikel */
article {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Mencegah konten meluap */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Efek hover pada artikel */
article:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Gaya untuk gambar thumbnail berita */
article img.news-thumbnail {
    width: 100%; /* Memenuhi container */
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Gaya judul artikel */
article h3 {
    font-size: 1.5rem;
    color: #333;
    margin: 15px 0;
    line-height: 1.4;
}

/* Gaya paragraf konten artikel */
article p {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Gaya untuk tautan "Read more" */
article a {
    display: inline-block;
    color: #a0522d; /* Warna coklat kemerahan */
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    padding: 8px 15px;
    border-radius: 5px;
    border: 1px solid #a0522d;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* Efek hover pada tautan "Read more" */
article a:hover {
    background-color: #a0522d;
    color: #fff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}


/* Atur kartu olahraga */
.sport-card {
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Layout menggunakan grid untuk desktop */
@media (min-width: 1024px) {
    main {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Membuat dua kolom */
        gap: 30px;
    }

    .news-thumbnail {
        height: 300px; /* Gambar lebih besar di desktop */
    }

    article, .sport-card {
        margin-bottom: 40px; /* Jarak lebih lebar antar artikel/kartu */
    }
}

/* Tombol "Back to Top" */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: white; /* Isi default putih */
    color: #a0522d; /* Warna teks sesuai border */
    text-align: center;
    line-height: 50px;
    font-size: 1.5rem;
    border: 2px solid #a0522d; /* Border dengan warna tetap */
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: none; /* Sembunyikan tombol secara default */
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

/* Efek hover tombol */
.back-to-top:hover {
    background-color: #a0522d; /* Isi berubah menjadi cokelat */
    color: white; /* Teks berubah menjadi putih */
    transform: scale(1.1); /* Perbesar sedikit */
}
