/* Style dasar */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
}

/* Header */
.header {
    background: #028f76;
    color: white;
    padding: 20px;
    text-align: center;
}

.header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffffff;
}

.header p {
    font-size: 1.2rem;
    color: #d4f3eb;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: top 0.3s ease, box-shadow 0.3s ease;
}

.navbar a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    text-transform: uppercase;
    padding: 10px 20px;
    margin: 0 10px;
    position: relative;
    font-size: 1rem;
}

.navbar a:hover {
    color: #00796b;
}

.navbar a.active {
    color: #00796b;
}

.navbar a.active::after,
.navbar a:hover::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #00796b;
}

/* Main content */
main {
    padding: 20px;
    max-width: 800px;
    margin: 20px auto;
}

main h2 {
    color: black;
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-transform: capitalize;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

.gambar {
    max-width: 100%;
    margin: 10px 0;
    border-radius: 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table,
th,
td {
    border: 1px solid #ddd;
    text-align: center;
}

th,
td {
    padding: 10px;
}

#faktor ul li {
    margin-bottom: 15px;
    line-height: 1.8;
}

#faktor ul li b {
    color: #00796b;
    font-weight: bold;
}

.komplikasi-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 kolom */
    gap: 20px;
    margin-top: 20px;
}

.komplikasi-item {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* Animasi hover */
.komplikasi-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0px 12px 30px rgba(0, 0, 0, 0.2);
}

.komplikasi-gambar {
    width: 100%;
    max-width: 200px;
    /* Ukuran gambar lebih besar, namun tetap proporsional */
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    /* Jarak antara gambar dan teks */
}

.komplikasi-item p {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
    transition: color 0.3s ease;
}

/* Mengubah warna teks saat hover */
.komplikasi-item:hover p {
    color: #00796b;
}

/* Responsif: Mengubah menjadi 2 kolom pada tablet */
@media (max-width: 768px) {
    .komplikasi-images {
        grid-template-columns: repeat(2, 1fr);
        /* 2 kolom pada tablet */
    }
}

/* Responsif: Mengubah menjadi 1 kolom pada ponsel */
@media (max-width: 480px) {
    .komplikasi-images {
        grid-template-columns: 1fr;
        /* 1 kolom pada ponsel */
    }
}

/* Bagian Hipertensi Emergensi */
#emergensi {
    margin-top: 40px;
    padding: 20px;
    background: #fff3f4;
    border-radius: 8px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

#emergensi p {
    font-size: 1rem;
    color: #d9534f;
    line-height: 1.5;
}

#pencegahan ul li {
    margin-bottom: 15px;
    line-height: 1.8;
}

#pencegahan ul li b {
    color: #00796b;
    font-weight: bold;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* Aspect ratio 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
    margin: 20px 0;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Menjaga proporsi video tanpa crop */
}

/* Footer */
footer {
    text-align: center;
    background: linear-gradient(45deg, #6c757d, #40474e);
    padding: 20px;
    color: white;
    margin-top: 20px;
}

footer p {
    margin: 0;
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 1px;
}

footer p:hover {
    color: #007BFF;
    cursor: pointer;
    transition: color 0.3s;
}

/* Responsif: Lebih kecil dari 768px (tablet dan ponsel) */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 10px;
    }

    .navbar a {
        margin: 5px 0;
        font-size: 0.9rem;
    }

    main {
        padding: 10px;
    }

    main h2 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }

    .gambar {
        margin: 10px 0;
        max-width: 100%;
    }

    table {
        font-size: 0.9rem;
        padding: 5px;
    }

    table,
    th,
    td {
        border: 1px solid #ddd;
    }
}

/* Responsif: Lebih kecil dari 480px (ponsel) */
@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }

    .header p {
        font-size: 1rem;
    }

    .navbar a {
        font-size: 0.8rem;
        padding: 8px 15px;
    }

    main h2 {
        font-size: 1.4rem;
    }

    .gambar {
        margin: 10px 0;
    }

    footer p {
        font-size: 0.9rem;
    }
}
