* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    text-decoration: none;
    border: none;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    background-color: #f5f5f5;
}

.background {
    background-image: url(../logo/background.png);
    background-repeat: no-repeat;
    background-size: contain;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 7%;
    background-color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transition: all 0.3s ease;
}

.navbar.sticky {
    padding: 15px 7%;
    background: rgba(3, 144, 10, 0.95);
    border-bottom: rgba(3, 144, 10, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10001;
}

.navbar img {
    height: 2.5rem;
    width: auto;
}

.navbar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(7, 98, 11, 0.95);
    white-space: nowrap;
}

.navbar-logo span {
    color: rgba(3, 144, 10, 0.95);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.navbar-nav a {
    color: rgba(3, 144, 10, 0.95);
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: rgba(3, 144, 10, 0.95);
    transition: width 0.3s ease;
}

.navbar-nav a:hover::after {
    width: 100%;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: rgba(3, 144, 10, 0.95);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-7px, -8px);
}

.kegiatan-hero {
    background-color: rgba(3, 144, 10, 0.95);
    color: white;
    padding: 120px 7% 60px;
    text-align: center;
}

.kegiatan-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.kegiatan-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.kegiatan-container {
    padding: 50px 7%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
}

.kegiatan-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.kegiatan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.kegiatan-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.kegiatan-card .placeholder-img {
    height: 150px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.85rem;
    text-align: center;
}

.kegiatan-content {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.kegiatan-content h3 {
    font-size: 1.05rem;
    color: rgba(3, 144, 10, 0.95);
    margin-bottom: 5px;
    height: 2.6em;
    overflow: hidden;
}

.kegiatan-content p {
    font-size: 0.8rem;
    color: #555;
    line-height: 1.35;
    text-align: justify;
    height: 3.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    margin-bottom: 8px;
    flex-grow: 1;
}

.read-more-btn {
    display: inline-block;
    padding: 6px 10px;
    background-color: rgba(3, 144, 10, 0.95);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
    margin-top: auto;
    text-align: center;
}

.read-more-btn:hover {
    background-color: rgb(7, 98, 11);
}

@media (max-width: 768px) {
    .kegiatan-container {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        padding: 30px 5%;
        gap: 12px;
    }

    .kegiatan-hero {
        padding: 100px 7% 40px;
    }

    .kegiatan-hero h1 {
        font-size: 1.8rem;
    }

    .kegiatan-hero p {
        font-size: 0.95rem;
    }

    .navbar-nav {
        position: absolute;
        top: 100%;
        right: -100%;
        background-color: white;
        flex-direction: column;
        width: 50%;
        padding: 10px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
    }

    .navbar-nav.active {
        right: 0;
    }

    .navbar-nav a {
        padding: 10px 20px;
        width: 100%;
        text-align: left;
    }

    .hamburger-menu {
        display: flex;
    }

    .navbar.sticky .hamburger-line {
        background-color: white;
    }

    .modal-content {
        width: 90%;
        margin: 10% auto;
        padding: 15px;
    }

    .modal-content img {
        max-height: 250px;
    }

    .modal-content h2 {
        font-size: 1.3rem;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .navbar {
        padding: 10px 5%;
    }

    .navbar-logo {
        font-size: 1.2rem;
    }

    .navbar img {
        height: 2rem;
    }

    .kegiatan-hero {
        padding: 90px 5% 30px;
    }

    .kegiatan-hero h1 {
        font-size: 1.5rem;
    }

    .kegiatan-hero p {
        font-size: 0.9rem;
    }

    .kegiatan-container {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px 4%;
        gap: 10px;
    }

    .kegiatan-card img {
        height: 120px;
    }

    .kegiatan-content {
        padding: 8px;
    }

    .kegiatan-content h3 {
        font-size: 0.9rem;
        height: auto;
    }

    .kegiatan-content p {
        font-size: 0.75rem;
        height: auto;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .read-more-btn {
        padding: 5px 8px;
        font-size: 0.8rem;
    }

    .modal-content {
        width: 95%;
        margin: 15% auto;
        padding: 12px;
    }

    .modal-content img {
        max-height: 200px;
    }

    .modal-content h2 {
        font-size: 1.1rem;
    }

    .modal-content p {
        font-size: 0.9rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .navbar-logo {
        font-size: 1rem;
    }

    .kegiatan-container {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 15px 3%;
    }

    .kegiatan-card img {
        height: 100px;
    }

    .kegiatan-content h3 {
        font-size: 0.85rem;
    }

    .read-more-btn {
        padding: 4px 6px;
        font-size: 0.75rem;
    }
}

@keyframes animatetop {
    from {
        top: -300px;
        opacity: 0
    }

    to {
        top: 0;
        opacity: 1
    }
}