/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
    color: #4fc3f7;
}

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo-text p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.class-info {
    display: flex;
    gap: 10px;
}

.badge {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #4fc3f7;
    border-bottom: 2px solid #4fc3f7;
}

.auth-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 10px;
}

.user-welcome {
    margin-right: 15px;
    font-weight: 500;
}

.btn-login, .btn-logout {
    background-color: #4fc3f7;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.btn-login:hover, .btn-logout:hover {
    background-color: #29b6f6;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(26, 35, 126, 0.8), rgba(26, 35, 126, 0.9)), url('assets/images/default-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stat i {
    font-size: 2rem;
    color: #4fc3f7;
}

.stat span {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.content-header h2 {
    font-size: 2rem;
    color: #1a237e;
    font-weight: 700;
}

.btn-add {
    background-color: #4caf50;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.btn-add:hover {
    background-color: #388e3c;
}

/* Posting Grid */
.postings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.posting-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.posting-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.category-badge.informasi {
    background-color: #e3f2fd;
    color: #1565c0;
}

.category-badge.acara {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.category-badge.prestasi {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.category-badge.dokumentasi {
    background-color: #fff3e0;
    color: #ef6c00;
}

.post-date {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-body {
    padding: 20px;
    flex-grow: 1;
}

.card-body h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #1a237e;
}

.card-body p {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #777;
    font-size: 0.9rem;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-read-more {
    color: #1a237e;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.btn-read-more:hover {
    color: #4fc3f7;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.btn-edit, .btn-delete {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.btn-edit {
    background-color: #ff9800;
}

.btn-delete {
    background-color: #f44336;
}

.btn-edit:hover, .btn-delete:hover {
    opacity: 0.8;
}

.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #777;
}

.no-posts i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #ccc;
}

.no-posts h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #555;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

#modal-body {
    padding: 20px 0;
}

/* Footer */
.footer {
    background-color: #1a237e;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: #4fc3f7;
}

.footer-section p {
    margin-bottom: 15px;
    opacity: 0.8;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #4fc3f7;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: background-color 0.3s;
}

.social-icons a:hover {
    background-color: #4fc3f7;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-bottom p {
    margin-bottom: 5px;
}

.footer-bottom i.fa-heart {
    color: #f44336;
}

/* Responsive */
@media (max-width: 992px) {
    .nav-menu ul {
        gap: 15px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .stats {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .logo-section {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-menu ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .content-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .postings-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10% auto;
        width: 95%;
    }
}