@font-face {
    font-family: trajan;
    src: url(font/TrajanPro-Regular.ttf);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

section {
    scroll-margin-top: 150px;
}

hr {
    border: black 1px solid;
}

.navbar {
    position: sticky;
    overflow: hidden;
    top: 0;
    background-color: #3D2424;
    padding: 2px 0;
    box-shadow: black 0px 4px 6px -1px, black 0px 2px 4px -1px;
    z-index: 1000;
}

.navbar ul {
    list-style-type: none;
    margin: 20px;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.navbar ul li {
    margin-left: 50px;
    margin-right: 50px;
}

.navbar ul li a {
    color: rgb(251, 251, 251);
    text-decoration: none;
    padding: 8px 16px;
    transition: color 0.3s, font-weight 0.3s;
    position: relative;
    font-size: 30px;
    cursor: pointer;
}

.navbar li a:hover {
    color: rgb(255, 255, 255);
    font-weight: bold;
}

.navbar ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: #fff;
    left: 0;
    bottom: -5px;
    transition: width 0.5s;
}

.navbar ul li a:hover::after {
    width: 100%;
}

.navbar ul li a.active {
    color: rgb(255, 255, 255);
    font-weight: bold;
}

.navbar ul li a.active::after {
    width: 100%;
}

.page {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.page.active-page {
    display: block;
    opacity: 1;
}

.banner {
    background-image: url(assets/industrialrevolution.jpg);
    background-color: #836355;
    background-size: cover;
    background-position: center-bottom;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Banner per halaman — ganti gambar sesuai kebutuhan */
.banner-page2 {
    background-image: url(assets/assemblyline.jpg);
    background-color: #3a4a6b;
}

.banner-page3 {
    background-image: url(assets/computer_room.jpg);
    background-color: #2d5a3d;
}

.banner-page4 {
    background-image: url(assets/bigdata.png);
    background-color: #1a1a2e;
}

.banner h1, .banner h2 {
    text-align: center;
    font-family: trajan;
    margin-bottom: 200px;
}

.banner h1 {
    font-size: 48px;
    margin: 0;
}

.banner h2 {
    font-size: 24px;
    margin: 10px 0 0;
}

.banner h2 a {
    color: rgb(255, 255, 255);
    text-decoration: none;
    transition: all 0.3s ease
}

.banner h2 a:hover {
    color: rgb(255, 255, 255);
    font-weight: bold;
    transform: scale(1.05);
    font-size: 25px;
}

.container {
    max-width: 90%;
    margin: 40px auto;
    display: flex;
    gap: 20px;
}

.container h2 {
    font-family: trajan;
    margin-bottom: 20px;
}

.container p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.sidebar {
    width: 220px;
    background-color: #d2c8a5b7;
    border: black 1px solid;
    padding: 20px;
    text-align: left;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar ul {
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    list-style: none;
    margin-top: 30px;
    margin-bottom: 15px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #3D2424;
    font-weight: bold;
    font-size: 16px;
    display: block;
    padding: 10px 15px;
    border-left: 3px solid transparent;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.sidebar ul li a:hover {
    color: rgb(130, 18, 18);
    border-left: 3px solid rgb(130, 18, 18);
}

.sidebar ul li a.active {
    color: rgb(141, 18, 18);
    border-left: 3px solid rgb(141, 18, 18);
}

.content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
    margin-left: 20px;
}

.content .text {
    flex: 1;
}

.content img {
    width: 100%;
    height: auto;
    padding-bottom: 20px;
}

.content section {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.content section .text {
    margin-right: 30px;
    text-align: justify;
}

.content section .info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.content section .info img {
    width: 300px;
    height: auto;
    margin-bottom: 10px;
} 

.content section .info .link {
width: 300px;
}

.content section h3 {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content section h3 .sign {
    font-size: 20px;
    font-weight: bold;
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
    border: black 1px solid;
    border-radius: 50%;
}

.content section h3 + p {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.content section h3 + p.active {
    max-height: 500px; 
}

.text ul li a {
    color: #3D2424;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.text ul li{
    padding-left: 20px;
    padding-bottom: 20px;
}

.text ul li a:hover {
    color: rgb(130, 18, 18);
}

.info {
    background-color: #e2e0d6b7;
    padding: 15px;
    text-align: center;
}

.info a img {
    width: 100%;
    height: auto;
}

.info img:hover {
   cursor: pointer;
}

.link a {
    display: inline-block;
    padding: 10px 20px;
    margin-bottom: 20px;
    text-decoration: none;
    color: #3D2424;
    font-weight: bold;
    font-size: 20px;
    transition: all 0.3s ease;
}

.link a:hover {
    color: #7773ca;
}

.separator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
}

.separator img {
    width: 100px;
    height: auto;
    margin-left: 30px;
}

.footer {
    background-color: #3D2424;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

@media (max-width: 768px) {   
    .navbar ul {
        display: flex;
        gap: 10px;
        padding: 10px 0;
    }

    .navbar ul li a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        background-color: #fff;
        left: 0;
        bottom: -5px;
        transition: width 0.5s;
    }

    .navbar ul li a.active::after {
        width: 100%;
    }

    .navbar ul li {
        margin: 0;
    }

    .navbar ul li a {
        font-size: 12px;
        padding: 5px 10px;
    }

    .banner {
        height: 250px;
    }

    .banner h1 {
        font-size: 32px;
    }

    .banner h2 {
        font-size: 18px;
    }

    .container {
        flex-direction: row;
        gap: 10px;
        max-width: 100%;
        padding: 0 10px;
    }

    .sidebar {
        padding: 10px;
        font-size: 14px;
        width: 120%;
        position: sticky;
        top: 80px;
    }

    .sidebar ul li a {
        font-size: 14px;
        padding: 6px;
    }

    .content {
        margin-left: 10px;
        gap: 10px;
        flex: 1;
        padding: 0 5px;
    }

    .content section {
        flex-direction: column;
    }

    .content section .text {
        margin-right: 0;
    }

    .content section .info img {
        width: 200px;
    }

    .other-links {
        padding: 20px;
    }

    .other-links ul li a {
        font-size: 16px;
    }

    .separator img {
        width: 50px;
    }
}