/* style.css - Desain Elegan & Minimalis */

/* Import Google Font - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset CSS Dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: #333; /* Soft main text color */
    background-color: #f8f8f8; /* Clean off-white background */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased; /* For smoother font rendering */
    -moz-osx-font-smoothing: grayscale;
}

/* General Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #ffffff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Softer shadow */
    position: sticky; /* Header stays at the top when scrolling */
    top: 0;
    z-index: 1000; /* Ensures header is above other content */
}

/* Terapkan flexbox khusus untuk container di dalam header */
header .container {
    display: flex; /* Membuat item di dalam container sejajar horizontal */
    justify-content: space-between; /* Memisahkan logo dan navigasi ke ujung */
    align-items: center; /* Menyelaraskan item secara vertikal di tengah */
}

.logo {
    display: flex; /* IMPORTANT: Makes logo image and text align horizontally */
    align-items: center; /* Vertically aligns logo image and text */
}

.logo img {
    height: 40px;
    width: auto;
    margin-right: 10px;
    border-radius: 50%; /* If you want a circular logo */
}

.logo h1 {
    font-size: 1.8em;
    color: #2c3e50; /* Darker color for text logo */
    margin: 0;
    font-weight: 600; /* Slightly bolder */
}

/* Navigation */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* IMPORTANT: Makes navigation items align horizontally */
    align-items: center; /* Align items vertically */
}

nav ul li {
    margin-left: 30px; /* Spacing between navigation items */
}

nav ul li a {
    text-decoration: none;
    color: #555;
    font-weight: 500; /* Medium weight */
    transition: color 0.3s ease, border-bottom 0.3s ease;
    padding-bottom: 5px; /* For border-bottom effect */
}

nav ul li a:hover {
    color: #4a5568; /* Hover color matching buttons */
    border-bottom: 2px solid #4a5568; /* Underline effect on hover */
}

/* New Login Button in Header */
.btn-login-header {
    background-color: #4a5568;
    color: white;
    padding: 8px 18px; /* Smaller padding for header button */
    border-radius: 6px; /* Slightly smaller border-radius */
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none; /* Ensure it's not underlined */
    display: inline-block; /* To apply padding */
}

.btn-login-header:hover {
    background-color: #2d3748;
    transform: translateY(-1px);
}


/* Hero Section */
.hero-section {
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 120px 20px; /* Larger padding */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px; /* Minimum height for hero section */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Transparent dark overlay */
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
    max-width: 800px; /* Hero content not too wide */
    /* Menambahkan pengaturan flexbox untuk menyusun item secara vertikal */
    display: flex;
    flex-direction: column; /* Menyusun item dalam kolom (menurun) */
    align-items: center; /* Pusatkan item secara horizontal */
    text-align: center; /* Pastikan teks tetap di tengah */
}

.hero-section h1 {
    font-size: 3.5em; /* Larger font size */
    margin-bottom: 15px;
    color: white;
    font-weight: 700; /* Bold */
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.3em;
    margin-bottom: 40px;
    color: #e0e0e0; /* Softer text color */
    font-weight: 300; /* Light weight */
}

.btn-hero {
    background-color: #4a5568; /* Elegant grayish-blue color */
    color: white;
    padding: 15px 30px; /* Larger padding for hero button */
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: inline-block; /* So padding and margin work */
}

.btn-hero:hover {
    background-color: #2d3748;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Sections General Styling */
section {
    padding: 80px 0; /* Wider vertical padding */
    text-align: center; /* Keep section text-align center */
    background-color: #f8f8f8;
}

section:nth-of-type(even) { /* For even sections (e.g., Articles, Partners) */
    background-color: #f0f0f0; /* Slightly different background color */
}

/* Terapkan flexbox column untuk container di dalam section agar judul dan konten menumpuk */
section .container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Pusatkan item secara horizontal */
    /* text-align: center; // Removed as it's handled by section parent */
}


h2 {
    font-size: 2.8em; /* Larger section heading size */
    color: #2c3e50;
    /* margin-bottom dipindahkan ke h2::after */
    font-weight: 600;
    position: relative;
    display: inline-block; /* For underline effect */
    padding-bottom: 15px; /* Memberi ruang untuk garis bawah */
}

h2::after { /* Underline effect on section headings */
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #4a5568;
    margin: 10px auto 15px; /* Changed from 30px to 15px to reduce space */
    border-radius: 2px;
}

/* Grid Layouts for Content Sections */
.events-grid, .articles-grid, .gallery-grid, .partners-grid {
    display: grid;
    /* Mengubah grid-template-columns agar item tersusun 4 ke samping, lalu turun */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Auto-fit untuk 4 kolom atau lebih, min lebar 250px */
    gap: 30px; /* Jarak antar item */
    /* Margin atas diatur oleh h2::after, jadi hapus margin-top di sini */
    /* margin-top: 0; */ 
}

/* Card Item Styling (Events, Articles) */
.event-item, .article-item {
    background-color: #ffffff;
    border-radius: 12px; /* Larger border-radius for cards */
    box-shadow: 0 6px 20px rgba(0,0,0,0.08); /* Soft and spread shadow */
    padding: 30px; /* Padding sedikit lebih banyak untuk ruang bernapas */
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Transisi untuk card hover */
    overflow: hidden; /* Ensures content doesn't overflow card */
    /* Menghapus max-width dan margin auto agar grid bisa mengelola lebar */
    /* max-width: 450px; */ 
    /* margin: 0 auto; */ 
    cursor: pointer; /* Menunjukkan bahwa item bisa diklik */
}

.event-item:hover, .article-item:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); /* Stronger shadow on hover */
}

.event-item img, .article-item img {
    max-width: 100%;
    height: 200px; /* Fixed image height */
    object-fit: cover; /* Ensures image fills area without distortion */
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.event-item h3, .article-item h3 {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}

.event-item p, .article-item p {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 10px;
}

.event-date, .event-location, .article-date {
    font-size: 0.85em;
    color: #777;
    margin-bottom: 5px;
}

.event-date i, .event-location i, .article-date i {
    margin-right: 5px;
    color: #4a5568;
}

/* Styling for "Lihat Selengkapnya" button within items */
/* Tombol ini akan dihapus dari HTML, jadi stylenya tidak lagi relevan untuk kartu */
.read-more-btn {
    background-color: #4a5568;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    margin-top: auto; /* Pushes button to the bottom if content varies */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    align-self: flex-start; /* Prevents button from stretching full width */
    letter-spacing: 0.02em;
}

.read-more-btn:hover {
    background-color: #2d3748;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.read-more-btn:active {
    background-color: #1a202c;
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Class to hide/show content */
.hidden {
    display: none !important; /* Added !important for stronger override */
}

/* short-description dan full-description tidak lagi digunakan di kartu utama */
.short-description, .full-description, .short-content, .full-content {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
}


/* Gallery Section */
.gallery-item {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    padding: 20px; /* Padding disesuaikan */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Menghapus max-width dan margin auto agar grid bisa mengelola lebar */
    /* max-width: 450px; */ 
    /* margin: 0 auto; */ 
    cursor: pointer; /* Menunjukkan bahwa item bisa diklik */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.gallery-item img {
    max-width: 100%;
    height: 220px; /* Fixed height for gallery images */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.gallery-item p {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

/* Partners Section */
.partner-item {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    padding: 25px; /* Padding disesuaikan */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Menghapus max-width dan margin auto agar grid bisa mengelola lebar */
    /* max-width: 450px; */ 
    /* margin: 0 auto; */ 
}

.partner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.partner-item img {
    max-width: 120px; /* Partner logo size */
    height: auto;
    margin-bottom: 15px;
    filter: grayscale(80%); /* Grayscale effect for logos */
    transition: filter 0.3s ease;
}

.partner-item:hover img {
    filter: grayscale(0%); /* Original color on hover */
}

.partner-item h3 {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.partner-item a {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.partner-item a:hover {
    color: #2d3748;
    text-decoration: underline;
}

/* Contact Section */
.contact-section .container {
    display: flex; /* Menggunakan flexbox untuk tata letak horizontal */
    justify-content: space-between; /* Memisahkan konten kiri dan kanan */
    align-items: flex-start; /* Menyelaraskan item ke atas */
    text-align: left; /* Mengatur text-align untuk konten di dalam container */
    flex-direction: row; /* Explicitly set to row for side-by-side */
}

.contact-section h2 {
    /* Menghapus margin-bottom dan after pseudo-element agar tidak ada garis di bawah judul ini */
    margin-bottom: 0;
    font-size: 2.8em;
    color: #2c3e50;
    font-weight: 600;
    position: relative;
    display: inline-block;
    text-align: left; /* Align title to the left */
}

.contact-section h2::after {
    content: none; /* Menghapus garis bawah khusus untuk judul Hubungi Kami */
}

.contact-right-content {
    display: flex; /* Menggunakan flexbox untuk mengatur detail kontak dan sosial media */
    flex-direction: column; /* Menyusun item secara vertikal */
    align-items: flex-end; /* Menyelaraskan item ke kanan */
    gap: 15px; /* Jarak antar kelompok info kontak dan sosial media */
}

.contact-info {
    text-align: right; /* Menyelaraskan teks info kontak ke kanan */
}

.contact-info p {
    margin: 5px 0; /* Mengurangi margin vertikal */
    font-size: 1.1em;
    color: #555;
}

.contact-info i {
    margin-right: 10px;
    color: #4a5568; /* Contact icon color */
}

.social-media {
    display: flex; /* Menggunakan flexbox untuk ikon sosial media */
    gap: 15px; /* Jarak antar ikon */
    justify-content: flex-end; /* Menyelaraskan ikon ke kanan */
}

.social-media a {
    font-size: 2em; /* Larger icon size */
    color: #777;
    transition: color 0.3s ease, transform 0.2s ease;
    margin: 0; /* Menghapus margin horizontal yang lama */
}

.social-media a:hover {
    color: #4a5568;
    transform: translateY(-3px);
}

/* Footer */
footer {
    background-color: #2c3e50; /* Consistent dark color */
    color: white;
    padding: 25px 0;
    text-align: center;
    font-size: 0.9em;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 10px 0;
    }

    nav ul {
        margin-top: 10px;
        flex-wrap: wrap; /* Navigation can wrap on small screens */
        justify-content: center;
    }

    nav ul li {
        margin: 5px 15px;
    }

    /* Sembunyikan tombol Login Admin di layar kecil */
    .btn-login-header {
        display: none !important;
    }

    .hero-section {
        padding: 80px 15px;
        min-height: 400px;
    }

    .hero-section h1 {
        font-size: 2.5em;
    }

    .hero-section p {
        font-size: 1em;
    }

    .btn-hero {
        padding: 12px 25px;
        font-size: 0.9em;
    }

    h2 {
        font-size: 2em;
        margin-bottom: 30px;
    }

    .events-grid, .articles-grid, .gallery-grid, .partners-grid {
        grid-template-columns: 1fr; /* Single column on small screens */
        padding: 0 15px;
        gap: 25px;
    }

    .event-item, .article-item, .gallery-item, .partner-item {
        padding: 20px;
        max-width: 100%; /* Pastikan di mobile tetap responsif */
    }

    .social-media a {
        font-size: 1.5em;
        margin: 0 10px;
    }

    .contact-section .container {
        flex-direction: column; /* Susun vertikal di mobile */
        align-items: center; /* Pusatkan semua item */
    }

    .contact-section h2 {
        margin-bottom: 20px; /* Tambahkan kembali margin di mobile */
        text-align: center; /* Center title on mobile */
    }

    .contact-right-content {
        align-items: center; /* Pusatkan konten kanan di mobile */
        text-align: center;
    }
    .contact-info {
        text-align: center; /* Pusatkan teks info kontak di mobile */
    }
    .social-media {
        justify-content: center; /* Pusatkan ikon sosial media di mobile */
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2em;
    }
    .hero-section p {
        font-size: 0.9em;
    }
    .btn-hero {
        padding: 12px 25px;
        font-size: 0.9em;
    }
}

/* --- MODAL LOGIN STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Dark semi-transparent background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001; /* Above header */
    backdrop-filter: blur(5px); /* Optional: blur background */
}

.login-modal-content {
    background-color: #2c3e50; /* Dark background for the modal box */
    padding: 30px 40px;
    border-radius: 15px; /* Rounded corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    width: 90%;
    max-width: 450px; /* Max width for the modal */
    text-align: center;
    color: white; /* Text color inside modal */
}

.login-modal-content .close-button {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #aaa;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.login-modal-content .close-button:hover,
.login-modal-content .close-button:focus {
    color: #f4f4f4;
    text-decoration: none;
}

.auth-form-modal h2 {
    color: #f4f4f4; /* Lighter heading for modal */
    margin-bottom: 25px;
    font-size: 2em;
}

.auth-form-modal input[type="email"],
.auth-form-modal input[type="password"] {
    width: calc(100% - 20px); /* Account for padding */
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #4a5568; /* Border color matching theme */
    border-radius: 8px;
    font-size: 1.1em;
    background-color: #3d495b; /* Slightly lighter dark background for inputs */
    color: white;
    caret-color: #007bff; /* Cursor color */
}

.auth-form-modal input[type="email"]::placeholder,
.auth-form-modal input[type="password"]::placeholder {
    color: #a0aec0; /* Placeholder color */
}

.auth-form-modal input[type="email"]:focus,
.auth-form-modal input[type="password"]:focus {
    outline: none;
    border-color: #007bff; /* Highlight border on focus */
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3); /* Soft glow on focus */
}

.auth-form-modal button {
    background-color: #007bff; /* Primary blue for login button */
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%; /* Full width button */
    margin-top: 10px;
}

.auth-form-modal button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.auth-form-modal button:active {
    background-color: #004085;
    transform: translateY(0);
    box-shadow: none;
}

.modal-footer-text {
    font-size: 0.8em;
    color: #a0aec0;
    margin-top: 25px;
}

/* Responsive for modal */
@media (max-width: 500px) {
    .login-modal-content {
        padding: 25px 20px;
        border-radius: 10px;
    }
    .auth-form-modal h2 {
        font-size: 1.8em;
    }
    .auth-form-modal input {
        padding: 12px;
        font-size: 1em;
    }
    .auth-form-modal button {
        padding: 12px 25px;
        font-size: 1em;
    }
}

/* --- DETAIL CONTENT MODAL STYLES (NEW) --- */
.detail-modal-content {
    background-color: #ffffff; /* Latar belakang putih untuk modal detail */
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    width: 90%;
    max-width: 700px; /* Lebar maksimum untuk modal detail */
    text-align: left; /* Teks di dalam modal rata kiri */
    color: #333;
    max-height: 90vh; /* Batasi tinggi modal agar bisa discroll */
    overflow-y: auto; /* Aktifkan scroll jika konten melebihi tinggi */
    display: flex; /* Mengatur tata letak internal modal */
    flex-direction: column; /* Konten tersusun vertikal */
    align-items: center; /* Pusatkan konten horizontal */
}

.detail-modal-content .close-detail-button {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #aaa;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.detail-modal-content .close-detail-button:hover,
.detail-modal-content .close-detail-button:focus {
    color: #333;
}

.detail-modal-content h2 {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center; /* Judul di tengah modal */
}

.detail-modal-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
    display: block; /* Agar gambar di tengah jika lebar kurang dari max-width */
    margin-left: auto;
    margin-right: auto;
}

#detail-video-container { /* NEW: Styling for video container */
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden; /* Ensure video corners are rounded */
}

#detail-video-container iframe { /* NEW: Styling for video iframe */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}


.detail-modal-content p {
    font-size: 1em;
    color: #555;
    margin-bottom: 10px;
}

#detail-date-location, #detail-author {
    font-size: 0.9em;
    color: #777;
    text-align: center;
    margin-bottom: 15px;
}

#detail-description {
    font-size: 1.05em;
    line-height: 1.8;
    color: #444;
    margin-top: 20px;
    white-space: pre-wrap; /* Mempertahankan format baris baru dari teks */
    text-align: left; /* Deskripsi rata kiri */
    width: 100%; /* Memastikan deskripsi mengisi lebar */
}

#detail-actions {
    margin-top: 25px; /* Spasi di atas tombol */
    width: 100%;
    display: flex;
    justify-content: center; /* Pusatkan tombol */
}

.btn-register-now {
    background-color: #007bff; /* Warna biru untuk tombol daftar */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none; /* Hapus garis bawah */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: inline-block; /* Agar padding berfungsi */
}

.btn-register-now:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,123,255,0.2);
}

.btn-register-now:active {
    background-color: #004085;
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}


/* Responsive for detail modal */
@media (max-width: 768px) {
    .detail-modal-content {
        padding: 20px;
        border-radius: 10px;
    }
    .detail-modal-content h2 {
        font-size: 1.8em;
    }
    .detail-modal-content img {
        margin-bottom: 15px;
    }
    #detail-video-container { /* Responsive video container */
        padding-bottom: 56.25%; /* Maintain aspect ratio */
        margin-bottom: 15px;
    }
    .detail-modal-content p {
        font-size: 0.95em;
    }
    #detail-date-location, #detail-author {
        font-size: 0.85em;
    }
    #detail-description {
        font-size: 1em;
    }
    .btn-register-now {
        padding: 10px 20px;
        font-size: 1em;
    }
}
