* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --light-bg: #ecf0f1;
    --text-color: #2c3e50;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
body.dark-mode,
html.dark-mode body {
    --primary-color: #1a252f;
    --text-color: #e0e0e0;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --border-color: #333;
    --shadow: 0 2px 8px rgba(0,0,0,0.5);
    --light-bg: #2a2a2a;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* NAVBAR */
.navbar {
    background-color: var(--primary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.navbar-brand h1 {
    color: white;
    font-size: 1.5rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.navbar-logo:hover {
    transform: scale(1.05);
}

/* HAMBURGER MENU */
.navbar-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.navbar-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 3px;
}

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.navbar-menu {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.dropdown-arrow {
    font-size: 0.7em;
    margin-left: 5px;
    transition: transform 0.3s;
}

.nav-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    min-width: 200px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    z-index: 1000;
    list-style: none;
    border: 1px solid var(--border-color);
}

.nav-dropdown.active .dropdown-menu {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    background: transparent;
}

.dropdown-item:hover {
    background: var(--light-bg);
    color: var(--secondary-color);
}

.dropdown-item.active {
    background: var(--light-bg);
    color: var(--secondary-color);
    font-weight: 600;
}

.nav-link {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    display: block;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: var(--secondary-color);
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: 2px solid white;
    border-radius: 50px;
    padding: 8px 15px;
    cursor: pointer;
    color: white;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.dark-mode-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.dark-mode-toggle .sun-icon,
.dark-mode-toggle .moon-icon {
    transition: opacity 0.3s, transform 0.3s;
}

body:not(.dark-mode) .dark-mode-toggle .moon-icon {
    opacity: 0;
    transform: translateY(20px);
    position: absolute;
}

body:not(.dark-mode) .dark-mode-toggle .sun-icon {
    opacity: 1;
    transform: translateY(0);
}

body.dark-mode .dark-mode-toggle .sun-icon {
    opacity: 0;
    transform: translateY(-20px);
    position: absolute;
}

body.dark-mode .dark-mode-toggle .moon-icon {
    opacity: 1;
    transform: translateY(0);
}

/* MAIN CONTENT */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 60vh;
}

/* HERO SECTION */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 3rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 2rem;
}

.hero-content h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.hero-content .tagline {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
    font-weight: 300;
}

.hero-content .description {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: var(--accent-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* HIGHLIGHTS */
.highlights {
    margin-bottom: 2rem;
}

.highlights h2, .cta-section h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.highlight-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.highlight-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.highlight-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.highlight-card p {
    font-size: 0.95rem;
}

/* CTA SECTION */
.cta-section {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    padding: 2.5rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin-top: 2rem;
}

.cta-section p {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    margin-bottom: 1.5rem;
}

/* PAGE HEADER */
.page-header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    font-weight: 300;
}

/* CONTENT SECTIONS */
.content-section {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.section-item {
    margin-bottom: 2.5rem;
}

.section-item h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.section-item p {
    margin-bottom: 1rem;
    text-align: justify;
    line-height: 1.8;
    font-size: 0.95rem;
}

/* LIST ITEMS */
.list-items {
    list-style: none;
    padding-left: 0;
}

.list-items li {
    padding: 0.8rem 0 0.8rem 2rem;
    position: relative;
    border-bottom: 1px solid var(--light-bg);
    font-size: 0.95rem;
}

.list-items li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* CONCEPT BOX */
.concept-box {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--secondary-color);
    margin-bottom: 1rem;
}

/* VALUES GRID */
.values-grid, .books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.value-card, .book-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-top: 4px solid var(--accent-color);
    text-align: center;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.book-card.clickable {
    cursor: pointer;
}

.book-card.clickable:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-top-color: var(--secondary-color);
}

.value-card:hover, .book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.view-books {
    display: block;
    margin-top: 0.8rem;
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: bold;
}

.value-card h3, .book-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.value-card p, .book-card p {
    font-size: 0.9rem;
}

.book-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* FLOW DIAGRAM */
.flow-diagram {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.flow-item {
    background-color: var(--light-bg);
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
}

.flow-number {
    background-color: transparent;
    color: var(--text-color);
    padding: 0;
    border-radius: 0;
    margin: 0 auto 1rem;
    font-weight: bold;
    width: auto;
    height: auto;
    display: block;
    font-size: 1rem;
    box-shadow: none;
    flex-shrink: 0;
}

.flow-item p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
}

/* SCHEDULE TABLE */
.schedule-table {
    overflow-x: auto;
    margin: 1rem 0;
}

.schedule-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    min-width: 500px;
}

.schedule-table th {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-size: 0.95rem;
}

.schedule-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-bg);
    font-size: 0.9rem;
}

.schedule-table tr:hover {
    background-color: var(--light-bg);
}

/* DISKUSI GRID */
.diskusi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.diskusi-card {
    background: white;
    border: 2px solid var(--accent-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.diskusi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.diskusi-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.diskusi-card p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* ANNOUNCEMENT LIST */
.announcement-list {
    list-style: none;
    padding: 0;
}

.announcement-list li {
    background: linear-gradient(90deg, var(--secondary-color), transparent);
    color: white;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
}

/* GALLERY */
.filter-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    border: 2px solid var(--primary-color);
    background-color: white;
    color: var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
    font-size: 0.9rem;
}

.filter-btn.active {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    background: white;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    position: relative;
    overflow: hidden;
    height: 250px;
    background-color: var(--light-bg);
}

.gallery-image img,
.gallery-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4em;
    color: white;
    opacity: 0.8;
    pointer-events: none;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    color: white;
    opacity: 0;
    transition: var(--transition);
    padding: 1.5rem;
}

.gallery-overlay p {
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 0.5rem;
}

.media-badge {
    padding: 4px 12px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { 
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

.modal-content {
    background-color: white;
    border-radius: 20px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(100px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10001;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: rotate(90deg) scale(1.1);
}

.modal-media {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-media img,
.modal-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-media::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    pointer-events: none;
}

.modal-body {
    overflow-y: auto;
    max-height: calc(90vh - 300px);
}

.modal-details {
    padding: 35px;
}

.modal-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.modal-details .badge {
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
}

.modal-details .badge:hover {
    transform: translateY(-2px);
}

.badge-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.badge-type {
    background: var(--light-bg);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
}

.modal-details h2 {
    color: var(--primary-color);
    font-size: 2.2em;
    margin-bottom: 15px;
    line-height: 1.3;
    font-weight: 700;
}

.modal-date {
    color: #888;
    font-size: 1em;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 2px solid var(--light-bg);
}

.modal-date i {
    color: var(--accent-color);
    font-size: 1.1em;
}

.modal-description {
    color: #555;
    line-height: 1.9;
    font-size: 1.05em;
    text-align: justify;
}

.modal-description {
    color: #555;
    line-height: 1.8;
    font-size: 1.05em;
}

.gallery-info {
    padding: 1.5rem;
}

.gallery-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.gallery-info p {
    font-size: 0.9rem;
    color: #666;
}

/* NO DATA MESSAGE */
.no-data {
    text-align: center;
    padding: 3rem 1.5rem;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    color: var(--text-color);
    grid-column: 1 / -1;
}

.no-data p {
    font-size: 1.1rem;
}

/* CONTACT GRID */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.contact-info {
    background: linear-gradient(135deg, var(--light-bg), white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--accent-color);
}

.contact-info h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.contact-info p {
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
    word-break: break-all;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* PARTICIPATION GRID */
.participation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.participation-card {
    background: linear-gradient(135deg, var(--secondary-color), #e74c3c);
    color: white;
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: bold;
    transition: var(--transition);
    font-size: 0.95rem;
}

.participation-card:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* HIGHLIGHT BOX */
.highlight-box {
    background: linear-gradient(135deg, var(--accent-color), #2980b9);
    color: white;
    padding: 2rem 1.5rem !important;
    border-radius: var(--border-radius);
}

.highlight-box h2 {
    color: white;
    border-bottom-color: white;
}

.highlight-box p {
    color: white;
    text-align: left;
}

/* FOOTER */
.footer {
    background: linear-gradient(135deg, #6b5b4c 0%, #4a3f35 100%);
    color: white;
    padding: 3rem 1rem 1rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.footer-logo h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-info li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.footer-info i {
    font-style: normal;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.social-link.whatsapp {
    background: #25D366;
    color: white;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.footer-cta {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
}

.footer-bottom p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* RESPONSIVE MOBILE */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: row;
        gap: 0;
        position: relative;
    }

    .navbar-brand h1 {
        font-size: 1.1rem;
    }
    
    .navbar-logo {
        height: 40px;
    }

    /* Show hamburger menu */
    .navbar-toggle {
        display: flex;
    }

    /* Hide menu by default on mobile */
    .navbar-menu {
        display: flex;
        width: 100%;
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--primary-color);
        padding: 0;
        margin: 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                    opacity 0.3s ease,
                    visibility 0.3s ease;
        opacity: 0;
        visibility: hidden;
    }

    /* Show menu when active */
    .navbar-menu.active {
        max-height: 500px;
        padding: 0.5rem 0;
        opacity: 1;
        visibility: visible;
    }

    .navbar-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        opacity: 0;
        transform: translateY(-10px);
        animation: slideDown 0.3s ease forwards;
    }

    .navbar-menu.active li:nth-child(1) {
        animation-delay: 0.05s;
    }

    .navbar-menu.active li:nth-child(2) {
        animation-delay: 0.1s;
    }

    .navbar-menu.active li:nth-child(3) {
        animation-delay: 0.15s;
    }

    .navbar-menu.active li:nth-child(4) {
        animation-delay: 0.2s;
    }

    .navbar-menu.active li:nth-child(5) {
        animation-delay: 0.25s;
    }

    .navbar-menu.active li:nth-child(6) {
        animation-delay: 0.3s;
    }

    .navbar-menu.active li:nth-child(7) {
        animation-delay: 0.35s;
    }

    .navbar-menu li:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 0.8rem 1rem;
        text-align: left;
        display: block;
        width: 100%;
        border-radius: 0;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .nav-link:hover,
    .nav-link.active {
        background-color: rgba(255, 255, 255, 0.15);
    }
    
    /* Dropdown mobile adjustments */
    .nav-dropdown {
        width: 100%;
    }
    
    .dropdown-menu {
        position: static !important;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.2);
        margin: 0.5rem 0;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0.5rem 0;
    }
    
    .dropdown-item {
        color: rgba(255, 255, 255, 0.9) !important;
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        border-left: 3px solid transparent;
        background: transparent !important;
        -webkit-text-fill-color: rgba(255, 255, 255, 0.9) !important;
        text-decoration: none !important;
    }
    
    .dropdown-item:hover,
    .dropdown-item.active {
        background: rgba(255, 255, 255, 0.15) !important;
        color: white !important;
        -webkit-text-fill-color: white !important;
        border-left-color: var(--secondary-color);
    }
    
    /* Force override any inherited styles */
    .nav-menu .dropdown-menu .dropdown-item {
        color: rgba(255, 255, 255, 0.9) !important;
        background: transparent !important;
    }
    
    .nav-menu .dropdown-menu .dropdown-item:hover,
    .nav-menu .dropdown-menu .dropdown-item.active {
        color: white !important;
        background: rgba(255, 255, 255, 0.15) !important;
    }
    
    /* Dark Mode - Mobile Dropdown */
    body.dark-mode .dropdown-menu {
        background: rgba(0, 0, 0, 0.4);
        border-color: rgba(255, 255, 255, 0.05);
    }
    
    body.dark-mode .dropdown-item {
        color: rgba(255, 255, 255, 0.85) !important;
        -webkit-text-fill-color: rgba(255, 255, 255, 0.85) !important;
    }
    
    body.dark-mode .dropdown-item:hover,
    body.dark-mode .dropdown-item.active {
        background: rgba(255, 255, 255, 0.1) !important;
        color: #58a6ff !important;
        -webkit-text-fill-color: #58a6ff !important;
        border-left-color: #58a6ff;
    }
    
    /* Force override for dark mode mobile */
    body.dark-mode .nav-menu .dropdown-menu .dropdown-item {
        color: rgba(255, 255, 255, 0.85) !important;
        background: transparent !important;
    }
    
    body.dark-mode .nav-menu .dropdown-menu .dropdown-item:hover,
    body.dark-mode .nav-menu .dropdown-menu .dropdown-item.active {
        color: #58a6ff !important;
        background: rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Modal mobile adjustments */
    .modal {
        padding: 10px;
        align-items: flex-end;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 20px 20px 0 0;
        animation: modalSlideUpMobile 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    @keyframes modalSlideUpMobile {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .modal-media {
        height: 200px;
    }
    
    .modal-body {
        max-height: calc(95vh - 200px);
    }
    
    .modal-details {
        padding: 25px 20px;
    }
    
    .modal-details h2 {
        font-size: 1.6em;
        margin-bottom: 12px;
    }
    
    .modal-date {
        font-size: 0.9em;
        padding: 10px 0;
        margin-bottom: 20px;
    }
    
    .modal-description {
        font-size: 1em;
        line-height: 1.7;
    }
    
    .modal-badges {
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .modal-details .badge {
        padding: 8px 14px;
        font-size: 0.85em;
    }
    
    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 24px;
        top: 15px;
        right: 15px;
    }

    .main-content {
        padding: 0.75rem;
    }
    
    /* Footer Mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-col h4 {
        font-size: 1rem;
    }
    
    .footer-logo h3 {
        font-size: 1.1rem;
    }
    
    .footer-social {
        justify-content: flex-start;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }

    .hero {
        padding: 2rem 1rem;
        margin-bottom: 1.5rem;
    }

    .content-section {
        padding: 1rem;
    }

    .section-item {
        margin-bottom: 2rem;
    }

    .highlights-grid,
    .values-grid,
    .books-grid,
    .diskusi-grid,
    .participation-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .flow-diagram {
        flex-direction: column;
        gap: 1rem;
    }

    .flow-item {
        min-width: 100%;
        padding: 1.5rem;
    }

    .flow-number {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-image {
        height: 200px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        flex: 1;
        min-width: calc(50% - 0.25rem);
    }

    .schedule-table {
        font-size: 0.85rem;
    }

    .announcement-list li {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .navbar-brand h1 {
        font-size: 1.1rem;
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-content .tagline {
        font-size: 1rem;
    }

    .hero-content .description {
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .page-header {
        padding: 1.5rem 1rem;
    }

    .highlight-card,
    .value-card,
    .book-card,
    .diskusi-card {
        padding: 1.25rem;
    }

    .gallery-image {
        height: 180px;
    }

    .filter-btn {
        min-width: 100%;
    }

    .flow-number {
        font-size: 0.9rem;
    }

    .flow-item p {
        font-size: 0.9rem;
    }
}

/* LANDSCAPE TABLET */
@media (min-width: 769px) and (max-width: 1024px) {
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .values-grid,
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* SMOOTH SCROLLING */
html {
    scroll-behavior: smooth;
}

/* LOADING ANIMATION */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SLIDE DOWN ANIMATION FOR MENU ITEMS */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SLIDE UP ANIMATION (for closing) */
@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.gallery-item,
.highlight-card,
.value-card,
.diskusi-card {
    animation: fadeIn 0.5s ease-out;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--secondary-color);
    transform: scale(1.2);
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.book-list {
    display: grid;
    gap: 1.5rem;
}

.book-item {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
}

.book-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.book-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.book-item .book-meta {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #666;
}

.book-item .book-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.book-item .book-description {
    margin-top: 0.8rem;
    color: var(--text-color);
    line-height: 1.6;
}

.book-item .book-status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

.book-item .book-status.tersedia {
    background-color: #2ecc71;
    color: white;
}

.book-item .book-status.dipinjam {
    background-color: #e74c3c;
    color: white;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--accent-color);
    font-size: 1.1rem;
}

.no-books {
    text-align: center;
    padding: 2rem;
    color: #666;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-header {
        padding: 1rem 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .modal-body {
        padding: 1.5rem;
        max-height: 70vh;
    }

    .book-item {
        padding: 1rem;
    }

    .book-item h3 {
        font-size: 1.1rem;
    }

    .book-item .book-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ========================================
   DARK MODE COMPREHENSIVE STYLING
   ======================================== */

/* Dark Mode - Global Elements */
body.dark-mode {
    background-color: #0d1117;
    color: #c9d1d9;
}

/* Dark Mode - Headings */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #e6edf3;
}

body.dark-mode .highlights h2,
body.dark-mode .cta-section h2,
body.dark-mode .page-header h1 {
    color: #e6edf3;
}

/* Dark Mode - Cards */
body.dark-mode .value-card,
body.dark-mode .book-card,
body.dark-mode .section-card,
body.dark-mode .contact-card,
body.dark-mode .flow-item,
body.dark-mode .highlight-card {
    background-color: #161b22;
    border-color: #30363d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body.dark-mode .value-card h3,
body.dark-mode .book-card h3,
body.dark-mode .section-card h2,
body.dark-mode .contact-card h3,
body.dark-mode .highlight-card h3 {
    color: #58a6ff;
}

body.dark-mode .value-card p,
body.dark-mode .book-card p,
body.dark-mode .section-card p,
body.dark-mode .highlight-card p {
    color: #8b949e;
}

/* Dark Mode - Buttons */
body.dark-mode .btn,
body.dark-mode .btn-primary {
    background-color: #238636;
    color: white;
    border-color: #238636;
}

body.dark-mode .btn:hover,
body.dark-mode .btn-primary:hover {
    background-color: #2ea043;
    border-color: #2ea043;
}

body.dark-mode .btn-secondary {
    background-color: #21262d;
    color: #c9d1d9;
    border-color: #30363d;
}

body.dark-mode .btn-secondary:hover {
    background-color: #30363d;
    border-color: #484f58;
}

/* Dark Mode - Hero Section */
body.dark-mode .hero {
    background: linear-gradient(135deg, #0d1117, #161b22);
    border: 1px solid #30363d;
}

/* Dark Mode - Table */
body.dark-mode .schedule-table table {
    border-color: #30363d;
}

body.dark-mode .schedule-table th {
    background-color: #161b22;
    color: #58a6ff;
    border-color: #30363d;
}

body.dark-mode .schedule-table td {
    background-color: #0d1117;
    border-color: #30363d;
    color: #c9d1d9;
}

body.dark-mode .schedule-table tr:hover td {
    background-color: #161b22;
}

/* Dark Mode - Contact Info */
body.dark-mode .contact-info {
    background-color: #161b22;
    border-color: #30363d;
}

body.dark-mode .contact-info p {
    color: #8b949e;
}

body.dark-mode .contact-info i {
    color: #58a6ff;
}

/* Dark Mode - Gallery */
body.dark-mode .gallery-item {
    background-color: #161b22;
    border-color: #30363d;
}

body.dark-mode .gallery-item h3 {
    color: #58a6ff;
}

body.dark-mode .gallery-item p {
    color: #8b949e;
}

body.dark-mode .gallery-image {
    background: linear-gradient(135deg, #0d1117, #161b22);
}

/* Dark Mode - Modal */
body.dark-mode .modal {
    background-color: rgba(0, 0, 0, 0.97);
}

body.dark-mode .modal-content {
    background-color: #0d1117;
    border: 1px solid #30363d;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
}

body.dark-mode .modal-media {
    background: linear-gradient(135deg, #161b22, #0d1117);
}

body.dark-mode .modal-media::after {
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}

body.dark-mode .modal-close {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #c9d1d9;
}

body.dark-mode .modal-close:hover {
    background: #da3633;
    border-color: #da3633;
    color: white;
}

body.dark-mode .modal-details h2 {
    color: #e6edf3;
}

body.dark-mode .modal-date {
    color: #8b949e;
    border-bottom-color: #30363d;
}

body.dark-mode .modal-date i {
    color: #58a6ff;
}

body.dark-mode .modal-description {
    color: #c9d1d9;
}

body.dark-mode .badge-type {
    background-color: #21262d;
    color: #58a6ff;
    border-color: #30363d;
}

body.dark-mode .modal-header {
    background-color: #0d1117;
    border-bottom-color: #30363d;
}

body.dark-mode .modal-header h2 {
    color: #58a6ff;
}

body.dark-mode .close {
    color: #8b949e;
}

body.dark-mode .close:hover {
    color: #c9d1d9;
}

body.dark-mode .modal-body {
    color: #c9d1d9;
}

/* Dark Mode - Book Info */
body.dark-mode .book-info h3 {
    color: #58a6ff;
}

body.dark-mode .book-info p {
    color: #8b949e;
}

body.dark-mode .book-meta span {
    color: #8b949e;
}

/* Dark Mode - Forms */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background-color: #0d1117;
    border-color: #30363d;
    color: #c9d1d9;
}

body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    border-color: #58a6ff;
    background-color: #161b22;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #6e7681;
}

/* Dark Mode - Links */
body.dark-mode a {
    color: #58a6ff;
}

body.dark-mode a:hover {
    color: #79c0ff;
}

body.dark-mode .view-books {
    color: #58a6ff;
}

/* Dark Mode - Sections */
body.dark-mode .section {
    background-color: transparent;
}

body.dark-mode .section h2 {
    color: #c9d1d9;
}

/* Dark Mode - Footer */
body.dark-mode .footer {
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    border-top: 1px solid #30363d;
    color: #8b949e;
}

body.dark-mode .footer h3,
body.dark-mode .footer h4 {
    color: #c9d1d9;
}

body.dark-mode .footer-desc,
body.dark-mode .footer-info,
body.dark-mode .footer-cta {
    color: #8b949e;
}

body.dark-mode .footer-links a {
    color: #8b949e;
}

body.dark-mode .footer-links a:hover {
    color: #58a6ff;
}

body.dark-mode .footer-grid {
    border-bottom-color: #30363d;
}

body.dark-mode .footer-bottom {
    border-top-color: #30363d;
}

body.dark-mode .footer-bottom p {
    color: #6e7681;
}

/* Dark Mode - Navbar */
body.dark-mode .navbar {
    background-color: #161b22;
    border-bottom: 1px solid #30363d;
}

/* Dark Mode - Dropdown Menu */
body.dark-mode .dropdown-menu {
    background-color: #161b22;
    border-color: #30363d;
}

body.dark-mode .dropdown-item {
    color: #c9d1d9;
}

body.dark-mode .dropdown-item:hover {
    background-color: #21262d;
    color: #58a6ff;
}

/* Dark Mode - Badges & Tags */
body.dark-mode .badge,
body.dark-mode .tag {
    background-color: #21262d;
    color: #58a6ff;
    border-color: #30363d;
}

/* Dark Mode - Book Categories */
body.dark-mode .category-filter button {
    background-color: #21262d;
    color: #c9d1d9;
    border-color: #30363d;
}

body.dark-mode .category-filter button:hover,
body.dark-mode .category-filter button.active {
    background-color: #238636;
    color: white;
    border-color: #238636;
}

/* Dark Mode - Search */
body.dark-mode .search-box input {
    background-color: #0d1117;
    border-color: #30363d;
    color: #c9d1d9;
}

body.dark-mode .search-box input:focus {
    border-color: #58a6ff;
    background-color: #161b22;
}

/* Dark Mode - Stats/Counters */
body.dark-mode .stat-card {
    background-color: #161b22;
    border-color: #30363d;
}

body.dark-mode .stat-value {
    color: #58a6ff;
}

/* Dark Mode - Alerts/Messages */
body.dark-mode .alert-info {
    background-color: #1c2d41;
    color: #79c0ff;
    border-color: #1f6feb;
}

body.dark-mode .alert-success {
    background-color: #0f3d0d;
    color: #7ee787;
    border-color: #238636;
}

body.dark-mode .alert-warning {
    background-color: #3d2b00;
    color: #f0b72f;
    border-color: #9e6a03;
}

body.dark-mode .alert-error {
    background-color: #3d0d0d;
    color: #ff7b72;
    border-color: #da3633;
}

/* Dark Mode - Loading States */
body.dark-mode .loading {
    color: #58a6ff;
}

body.dark-mode .no-books {
    color: #8b949e;
}

/* Dark Mode - Smooth Transitions */
body.dark-mode * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Prevent transition on page load */
body.dark-mode.no-transition * {
    transition: none !important;
}
