/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c5530;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #2c5530;
}

.nav-dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 5px;
    overflow: hidden;
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background: #f8f9fa;
}

.nav-search {
    display: flex;
    align-items: center;
}

.nav-search input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.nav-search button {
    padding: 8px 12px;
    background: #2c5530;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2c5530 0%, #4a7c59 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-primary {
    background: #fff;
    color: #2c5530;
}

.btn-primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #2c5530;
}

/* Category Filter */
.category-filter {
    padding: 3rem 0;
    background: white;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #2c5530;
    background: transparent;
    color: #2c5530;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background: #2c5530;
    color: white;
}

/* Works Grid */
.latest-works {
    padding: 3rem 0;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.work-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.work-image {
    width: 100%;
    height: 200px;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.work-content {
    padding: 1.5rem;
}

.work-category {
    display: inline-block;
    background: #e8f5e8;
    color: #2c5530;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.work-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.work-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.work-author {
    font-weight: 500;
}

.work-excerpt {
    color: #666;
    margin-bottom: 1rem;
    /* Perbaikan line-clamp dengan semua vendor prefixes dan standard property */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Firefox support */
    display: -moz-box;
    -moz-line-clamp: 3;
    -moz-box-orient: vertical;
    /* Standard property untuk masa depan */
    display: box;
    line-clamp: 3;
    box-orient: vertical;
}

.work-rating {
    color: #ffc107;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    color: #2c5530;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.read-more:hover {
    color: #1e3a24;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: #2c5530;
    font-size: 2rem;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-results i {
    font-size: 3rem;
    color: #666;
    margin-bottom: 1rem;
}

/* About and Submit Sections */
.about, .submit-work {
    padding: 3rem 0;
    background: white;
    margin: 2rem 0;
}

.email-submission {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.email-submission ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.email-submission li {
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* ===== BOOKMARK SYSTEM STYLES ===== */
.bookmarks-page {
    padding-top: 100px;
    min-height: 100vh;
}

.bookmarks-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Bookmark Button */
.bookmark-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #ccc;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    backdrop-filter: blur(5px);
}

.bookmark-btn:hover {
    color: #2c5530;
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
}

.bookmark-btn.bookmarked {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.bookmark-btn.bookmarked:hover {
    color: #c0392b;
    background: rgba(231, 76, 60, 0.2);
}

/* Bookmark Badge Position */
.work-card {
    position: relative;
}

.bookmark-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

/* Navigation Badge */
.nav-badge {
    background: #e74c3c;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 5px;
    display: none;
}

/* No Bookmarks State */
.no-bookmarks {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 2rem 0;
}

.no-bookmarks i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1.5rem;
}

.no-bookmarks h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.5rem;
}

.no-bookmarks p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: #666;
}

/* Loading State */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: #2c5530;
    font-size: 1.1rem;
}

.loading-spinner i {
    font-size: 2rem;
    margin-right: 0.5rem;
}

/* Bookmarks Summary */
#bookmarksSummary {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Responsive Design untuk Bookmarks */
@media (max-width: 768px) {
    .bookmarks-page {
        padding-top: 80px;
    }
    
    .bookmarks-actions {
        justify-content: center;
    }
    
    .bookmark-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .no-bookmarks {
        padding: 3rem 1rem;
    }
    
    .no-bookmarks i {
        font-size: 3rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-dropdown .dropdown-content {
        position: static;
        box-shadow: none;
        display: none;
    }

    .nav-dropdown:hover .dropdown-content {
        display: none;
    }

    .nav-dropdown.active .dropdown-content {
        display: block;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 200px;
        text-align: center;
    }

    .nav-search {
        display: none;
    }
}

/* Proteksi Copy Paste */
.protected-content {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.protected-content::selection {
    background: transparent;
}

.protected-content::-moz-selection {
    background: transparent;
}