/* /lingkungan-mch/assets/css/style.css */

/* --- STYLES BARU UNTUK KALENDER --- */
.agenda-section {
    padding: 30px 0;
}
#calendar-container {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.calendar-header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-green);
}
.calendar-header h3 {
    font-size: 1.2rem;
    margin: 0;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}
.calendar-day, .calendar-weekday {
    text-align: center;
    padding: 10px 5px;
}
.calendar-weekday {
    font-weight: bold;
    color: var(--grey);
    font-size: 0.8rem;
}
.calendar-day {
    border-radius: 4px;
    transition: background-color 0.3s;
}
.calendar-day.other-month {
    color: #ccc;
}
.calendar-day.today {
    background-color: #e8f5e9;
    font-weight: bold;
}
.calendar-day.has-event {
    background-color: var(--primary-green);
    color: var(--white);
    cursor: pointer;
    font-weight: bold;
}
.calendar-day.has-event:hover {
    background-color: var(--dark-green);
}

#agenda-popup .popup-content {
    max-width: 400px;
}
#agenda-popup-title {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.agenda-item {
    margin-bottom: 15px;
}
.agenda-item h4 {
    margin-bottom: 5px;
    color: var(--dark-green);
}
.agenda-item p {
    margin: 0;
    font-size: 0.9rem;
}
.agenda-item .time {
    font-weight: bold;
    color: var(--primary);
}
.agenda-item-share {
    display: block;
    margin-top: 10px;
    background-color: #25D366;
    color: white;
    text-align: center;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
}
.agenda-item-share:hover {
    background-color: #128C7E;
}

:root {
    --primary-green: #6a994e;
    --dark-green: #386641;
    --light-bg: #fcfdfc;
    --text-dark: #333;
    --text-light: #fff;
    --white: #fff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
body { 
    font-family: 'Poppins', sans-serif; 
    background-color: var(--light-bg); 
    color: var(--text-dark); 
    line-height: 1.7; 
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
main {
    flex-grow: 1;
}
.container { width: 90%; max-width: 1200px; margin: 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: var(--primary-green); transition: color 0.3s; }
.page-content { padding: 30px 0; animation: fadeIn 0.5s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
section h1, section h2 { color: var(--dark-green); text-align: center; margin-bottom: 30px; font-size: 1.8rem; }
.btn { display: inline-block; padding: 10px 20px; background: var(--primary-green); color: var(--text-light); border-radius: 50px; font-weight: 600; transition: background 0.3s; border: none; cursor: pointer; }
.btn:hover { background: var(--dark-green); }

/* --- MOBILE FIRST STYLES --- */
header { background: var(--white); box-shadow: var(--shadow); padding: 15px 0; position: sticky; top: 0; z-index: 1000; width: 100%; }
header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; }
.logo img { height: 40px; margin-right: 10px; }
.logo span { font-size: 1.1rem; font-weight: 700; color: var(--dark-green); }
nav { position: fixed; top: 0; right: 0; background: var(--white); width: 250px; height: 100%; display: flex; flex-direction: column; padding: 60px 30px 30px 30px; box-shadow: -5px 0 15px rgba(0,0,0,0.1); transform: translateX(100%); transition: transform 0.3s ease-in-out; z-index: 999; }
nav.active { transform: translateX(0); }
nav a { display: block; margin: 15px 0; font-size: 1.2rem; font-weight: 600; color: var(--dark-green); }
nav a.active { color: var(--primary-green); }
.menu-toggle { display: block; cursor: pointer; z-index: 1001; }
.menu-toggle span { display: block; width: 28px; height: 3px; background: var(--dark-green); margin: 5px 0; transition: all 0.3s; }

.slider { height: 40vh; position: relative; overflow: hidden; background: #333; }
.slide { width: 100%; height: 100%; position: absolute; opacity: 0; transition: opacity 1.2s ease-in-out; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.slide-content-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; }
.slide-content { background: rgba(0,0,0,0.5); padding: 15px 25px; border-radius: 10px; color: white; text-align: center; }
.slide-content h2 { font-size: 1.5rem; text-shadow: 1px 1px 2px #000; margin: 0; }
.slide:first-child { opacity: 1; }

.news-grid { display: grid; grid-template-columns: 1fr; gap: 25px; }
.news-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.news-card img { width: 100%; height: 180px; object-fit: cover; object-position: center; }
.card-content { padding: 20px; }
.card-content h3 { font-size: 1.1rem; margin-bottom: 5px; color: var(--dark-green); }
.card-content p { font-size: 0.9rem; margin-bottom: 15px; color: #555; }

.sponsor-section { padding: 20px 0 40px; background: var(--light-bg); margin-top: 0; }
.sponsor-track-container { width: 100%; overflow: hidden; position: relative; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.sponsor-track { display: flex; width: fit-content; animation: scroll 25s linear infinite; }
.sponsor-track-container:hover .sponsor-track { animation-play-state: paused; }
.sponsor-logo { height: 60px; margin: 0 30px; cursor: pointer; flex-shrink: 0; }
.sponsor-logo img { height: 100%; width: auto; filter: grayscale(100%); opacity: 0.6; transition: all 0.3s ease; }
.sponsor-logo:hover img { filter: grayscale(0%); opacity: 1; transform: scale(1.1); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

footer { background: var(--dark-green); color: var(--text-light); text-align: center; padding: 25px 0; margin-top: auto; }

.profile-content { display: flex; flex-direction: column; gap: 20px; align-items: center; }
.profile-content img { width: 100%; height: auto; max-width: 250px; border-radius: 15px; box-shadow: var(--shadow); }
.profile-content .description { text-align: justify; }

.list-grid-container { display: grid; grid-template-columns: 1fr; gap: 25px; }
.list-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform 0.3s, box-shadow 0.3s; }
.list-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.list-card img { width: 100%; height: 200px; object-fit: cover; object-position: center; }
.list-card .card-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.list-card .card-content h2 { font-size: 1.2rem; margin-bottom: 5px; text-align: left; color: var(--dark-green); }
.list-card .card-content .meta { font-size: 0.8rem; color: #777; margin-bottom: 10px; display: block; }
.list-card .card-content p { font-size: 0.9rem; margin-bottom: 15px; color: #555; flex-grow: 1; }
.list-card .card-content .btn { align-self: flex-start; }

.detail-page .meta { color: #777; margin-bottom: 15px; text-align: center; font-size: 0.9rem; }
.detail-page .featured-image { width: 100%; height: 250px; object-fit: cover; object-position: center; border-radius: 10px; margin: 0 auto 20px auto; box-shadow: var(--shadow); }
.content-body { font-size: 1rem; text-align: justify; }
.back-link { display: inline-block; margin-bottom: 25px; font-weight: 600; }

.video-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.video-card { position: relative; cursor: pointer; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.video-card img { display: block; width: 100%; height: 180px; object-fit: cover; object-position: center; }
.video-card h3 { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: var(--white); padding: 20px 15px 10px 15px; margin: 0; font-size: 1rem; }
.video-card .play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 3rem; color: rgba(255,255,255,0.9); text-shadow: 0 0 10px rgba(0,0,0,0.5); }

.filter-controls { display: flex; flex-direction: column; gap: 15px; margin-bottom: 30px; }
.filter-controls input, .filter-controls select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-family: 'Poppins', sans-serif; font-size: 1rem; }

.umkm-detail-slider { position: relative; margin-bottom: 20px; }
.umkm-detail-slider .slide-item { display: none; }
.umkm-detail-slider .slide-item.active { display: block; animation: fadeIn 0.5s; }
.umkm-detail-slider img { width: 100%; height: 250px; object-fit: cover; object-position: center; border-radius: 10px; }
.slider-nav { position: absolute; top: 50%; width: 100%; display: flex; justify-content: space-between; transform: translateY(-50%); }
.slider-nav button { background: rgba(0,0,0,0.5); color: white; border: none; padding: 5px 10px; font-size: 1.5rem; cursor: pointer; border-radius: 5px; }
.umkm-info h1 { text-align: left; font-size: 1.8rem; margin-bottom: 5px; }
.umkm-info .category { background: var(--primary-green); color: white; display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: 0.8rem; margin-bottom: 15px; }
.action-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.action-buttons .btn { flex-grow: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.action-buttons .btn svg { width: 18px; height: 18px; fill: white; }

.pagination-controls { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 30px; }
.pagination-controls button { background: var(--white); border: 1px solid #ddd; color: var(--primary-green); padding: 8px 12px; border-radius: 5px; cursor: pointer; }
.pagination-controls button:disabled { color: #ccc; cursor: not-allowed; }
.pagination-controls button.active { background: var(--primary-green); color: white; border-color: var(--primary-green); }

.popup-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.75); z-index: 2000; display: none; justify-content: center; align-items: center; backdrop-filter: blur(5px); animation: fadeIn 0.3s; }
.popup-content { background: var(--white); padding: 20px; border-radius: 10px; position: relative; max-width: 90%; animation: zoomIn 0.3s; }
@keyframes zoomIn { from { transform: scale(0.8); } to { transform: scale(1); } }
.close-btn { position: absolute; top: -15px; right: -15px; width: 35px; height: 35px; line-height: 35px; text-align: center; background: white; border-radius: 50%; font-size: 1.5rem; font-weight: bold; cursor: pointer; color: #333; box-shadow: 0 2px 5px rgba(0,0,0,0.3); z-index: 2001; }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; width: 90vw; }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 10px; }

#share-popup .popup-content { padding: 25px; text-align: center; }
#share-popup h3 { margin-bottom: 20px; }
#share-popup .share-options { display: flex; flex-direction: column; gap: 15px; }
#share-popup .btn { width: 100%; }

/* --- DESKTOP & TABLET STYLES --- */
@media (min-width: 768px) {
    .page-content { padding: 50px 0; }
    section h1, section h2 { font-size: 2.2rem; margin-bottom: 40px; }
    .logo img { display: block; } .logo span { font-size: 1.3rem; }
    .menu-toggle { display: none; }
    nav { position: static; transform: translateX(0); flex-direction: row; width: auto; height: auto; padding: 0; box-shadow: none; }
    nav a { margin: 0 18px; font-size: 1rem; position: relative; padding-bottom: 5px; }
    nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--primary-green); transition: width 0.3s; }
    nav a:hover::after, nav a.active::after { width: 100%; }
    .slider { height: 60vh; }
    .slide-content h2 { font-size: 2.5rem; }
    .news-grid { grid-template-columns: repeat(3, 1fr); }
    .sponsor-logo { height: 80px; }
    .profile-content { flex-direction: row; gap: 40px; }
    .profile-content img { max-width: 350px; }
    .list-grid-container { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .video-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
    .detail-page .featured-image { height: 400px; }
    .umkm-detail-slider img { height: 400px; }
    .video-wrapper { width: 80vw; max-width: 900px; }
    .filter-controls { flex-direction: row; }
    .filter-controls input { flex-grow: 1; }
    .filter-controls select { width: 200px; }

    /* Desktop Popup Sizing */
    #home-popup .popup-content {
        max-width: 450px; /* Lebar maksimal popup home */
    }
    #sponsor-popup .popup-content {
        max-width: 500px; /* Lebar maksimal popup sponsor */
    }
}
