/* ====================================
   GREEN CAMPUS PPI MADIUN - MAIN STYLE
   ==================================== */

:root {
    --primary: #0f5c3b;
    --primary-dark: #09482e;
    --primary-light: #eafaf1;
    --accent: #1abc9c;
    --dark: #1e2d24;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
    --shadow: 0 5px 18px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 22px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-light);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;  /* body setinggi viewport */
    margin: 0;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.main-content {
    flex: 1;  /* mengisi sisa ruang, mendorong footer ke bawah */
}
/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.page-title {
    font-size: 2rem;
    margin-top: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--primary-dark);
}

.page-desc {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.75rem;
    margin: 1rem 0 1rem;
    border-left: 5px solid var(--primary);
    padding-left: 1rem;
    color: var(--primary-dark);
}

/* ========== PUBLIC NAVBAR ========== */
.navbar {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);

    position:relative;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

.logo a{
    font-size:15px;
    font-weight:700;
    color:white;
    text-decoration:none;
}

.menu{
    display:flex;
    gap:1.5rem;
    align-items:center;
    white-space:nowrap;
}

.menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding-bottom: 0.1rem;
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s;
}

.menu a:hover::after {
    width: 100%;
}

/* DROPDOWN NAVBAR */

.dropdown{
position:relative;
display:inline-block;
}

.dropdown-menu{
display:none;
position:absolute;
background:white;
min-width:220px;
box-shadow:var(--shadow);
border-radius:6px;
top:100%;
left:0;
z-index:1000;
overflow:hidden;
}

.dropdown-menu a{
display:block;
padding:10px 15px;
color:#333;
text-decoration:none;
font-size:14px;
}

.dropdown-menu a:hover{
background:var(--primary-light);
}

.dropdown:hover .dropdown-menu{
display:block;
}
/* ========== HERO SECTION ========== */
.hero {
    background: linear-gradient(rgba(39,174,96,0.13), rgba(46,204,113,0.8)),
                url('/static/img/hero.jpg') center/cover no-repeat;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    border-radius: 0 0 2rem 2rem;
    margin-bottom: 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.btn,
.hero-content button {
    background: white;
    color: var(--primary-dark);
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover,
.hero-content button:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}
/*=========== grid program===========*/
.grid-program {
    display: grid;
    grid-template-columns: 1fr;;
    gap: 1.5rem;
    margin: 1.5rem 0;
}
/* ========== CARDS & GRID ========== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.card,
.program-card,
.target-card,
.achievement-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
    transition: 0.3s;
        word-break: break-word;
        overflow-wrap: break-word;
}

.card:hover,
.program-card:hover,
.target-card:hover,
.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.achievement-year,
.target-year {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 1rem;
}


/* ========== GALLERY ========== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.gallery-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.3s;
}

.gallery-card:hover {
    transform: scale(1.03);
}

.gallery-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: fill;
}

.gallery-caption {
    padding: 0.75rem;
    text-align: center;
}


/* ========== IMAGE PREVIEW ========== */
.preview-image {
    width: 120px;
    margin-top: 0.5rem;
    border-radius: 5px;
    display: block;
}
/* ===========NEWS GRID NEWS Page============ */
.home-news-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
gap:25px;
margin-top:25px;
}

.home-news-card{
display:flex;
flex-direction:column;
background:white;
border-radius:8px;
overflow:hidden;
text-decoration:none;
color:#333;
box-shadow:0 5px 18px rgba(0,0,0,0.08);
transition:.3s;
}

.home-news-card:hover{
transform:translateY(-6px);
box-shadow:0 10px 25px rgba(0,0,0,0.15);
}

.home-news-image{
width:100%;
height:200px;
object-fit:cover;
flex-grow:3;
}

.home-news-content{
padding:20px;
flex:1;
display:flex;
flex-direction:column;
}

.home-news-date{
font-size:12px;
color:#888;
margin-bottom:5px;

}

.home-news-preview{
    flex-grow: 1;
}


/* CONTENT */

.news-content, .home-news-content{
    flex:1;
    min-width:0;
}

.news-title, .home-news-title {
    font-size:18px;
    margin:4px 0;

    display:-webkit-box;
    -webkit-line-clamp:2;
    line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.news-date, .home-news-date{
    font-size:13px;
    color:#888;
}

.news-preview, .home-news-preview{
    font-size:14px;
    color:#666;
    line-height:1.5;

    display:-webkit-box;
    -webkit-line-clamp:3;
    line-clamp:3;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.news-title,
.news-preview, .news-grid p, .home-news-title ,.home-news-preview, .home-news-grid p{
    word-break: break-word;
    overflow-wrap: break-word;
}

.read-more{
    font-size:14px;
    color:var(--primary-dark);
    font-weight:600;
}

/* ======================= */
/* NEWS BLOG PAGE */
/* ======================= */

.news-layout{
    display:grid;
    grid-template-columns: minmax(0,2fr) 320px;
    gap:30px;
    margin-top:20px;
    align-items:start;
}


/* Perbaikan tampilan news card di homepage */
.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.news-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.news-card h3 {
    font-size: 1.2rem;
    margin: 15px 15px 5px 15px;
    line-height: 1.4;
}

.news-date {
    font-size: 0.8rem;
    color: #999;
    margin: 0 15px 10px 15px;
}

.news-card p {
    font-size: 0.9rem;
    color: #555;
    margin: 0 15px 15px 15px;
    flex-grow: 1; /* Mendorong tombol ke bawah */
}

.btn-small {
    display: inline-block;
    background: var(--primary-dark);
    color: rgb(255, 255, 255);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: 0.3s;
    border: none;
    cursor: pointer;
    align-self: flex-start; /* Tidak melebar penuh */
    margin: 0 15px 15px 15px; /* Jarak dari tepi dan bawah */
}


/* LIST BERITA */

.news-list{
    display:flex;
    flex-direction:column;
    gap:25px;
}

/* CARD BLOG */

.news-list .news-card{
    display:flex;
    gap:20px;
    background:white;
    border-radius:10px;
    padding:18px;
    text-decoration:none;
    color:#333;
    box-shadow:0 4px 14px rgba(0,0,0,0.08);
    transition:0.25s;
    overflow:hidden;
    align-items:flex-start;
}

.news-list .news-card:hover{
    transform:translateY(-4px);
}

/* IMAGE */
.news-list .news-image{
    width:100%;
    height:auto;
    object-fit:contain;
    border-radius:8px;
    flex-shrink:0;
}

.news-detail-img{
width:100%;
border-radius:8px;
margin:20px 0;
aspect-ratio: 16/9;
}

.news-article{
font-size:16px;
line-height:1.7;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ============================= */
/* FIX SPACING KAYAK DI ADMIN */
/* ============================= */

.news-article {
    font-family: Arial, sans-serif;
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

/* PARAGRAF (INI YANG BIKIN RENGGANG) */
.news-article p {
    margin: 0 0 16px;
}

/* HEADING */
.news-article h1 {
    font-size: 32px;
    margin: 24px 0 10px;
}

.news-article h2 {
    font-size: 26px;
    margin: 22px 0 10px;
}

.news-article h3 {
    font-size: 20px;
    margin: 20px 0 10px;
}

/* LIST */
.news-article ul,
.news-article ol {
    margin: 0 0 16px 20px;
}

/* IMAGE */
.news-article img {
    max-width: 100%;
    margin: 20px 0;
    border-radius: 6px;
}

/* LINK */
.news-article a {
    color: #2e7d32;
}

.news-article a:hover {
    text-decoration: underline;
}

.detail-title{
    word-break: break-word;
    overflow-wrap: break-word;
    margin-top: 1.25rem;
}

.news-category-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.news-category-filter a {
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    background: #f1f1f1;
    color: #333;
    font-size: 14px;
}

.news-category-filter a.active {
    background: #2e7d32;
    color: white;
}

.news-category {
    font-size: 12px;
    color: #2e7d32;
    font-weight: bold;
    margin-bottom: 5px;
}

/* SIDEBAR */

.news-sidebar{
    display:flex;
    flex-direction:column;
    gap:20px;
    width:100%;
    position:sticky;
    top:100px;
}

.sidebar-box, .sidebar-box-latest{
    background:white;
    padding:20px;
    border-radius:10px;
    box-shadow:0 4px 14px rgba(0,0,0,0.08);
    word-break: break-word;
    overflow-wrap: break-word;
}

.search-input{
    width:100%;
    padding:10px;
    border-radius:6px;
    border:1px solid #ddd;
}

.sidebar-news{
    display:block;
    font-size:14px;
    padding:8px 0;
    border-bottom:1px solid #eee;
    text-decoration:none;
    color:#333;
}

.sidebar-news:hover{
    color:var(--primary-dark);
}

/* ================= MEDIA LIST ================= */

.media-list{
list-style:none;
padding:0;
}

.media-list li{
padding:12px 0;
border-bottom:1px solid #eee;
}

.media-list a{
text-decoration:none;
color:var(--primary-dark);
font-weight:600;
font-size:16px;
}

.media-list a:hover{
color:var(--primary);
}

/* ================= MEDIA YEAR ================= */

.media-year-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(420px,1fr));
gap:30px;
margin-top:30px;
}

.media-card{
background:white;
padding:25px;
border-radius:10px;
box-shadow:var(--shadow);
border-top:4px solid var(--primary);
transition:.3s;
}

.media-card:hover{
transform:translateY(-5px);
box-shadow:var(--shadow-hover);
}

.media-card h3{
margin-bottom:15px;
}

.media-card iframe{
border-radius:6px;
border:1px solid #ddd;
margin-bottom:15px;
}

/* ========== LOGIN PAGE ========== */
.login-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
}

.login-box {
    background: white;
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-top: 5px solid var(--primary);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-dark);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-login {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-login:hover {
    background: var(--primary-dark);
}

/* ========== ADMIN LAYOUT ========== */
.admin-wrapper {
    display: flex;
    width: 100%;
    overflow-x: hidden;
    
}

.admin-sidebar {
    width: 250px;
    background: var(--dark);
    color: white;
    padding: 2rem 1rem;
}

.admin-logo {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.admin-sidebar a {
    display: block;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    transition: 0.2s;
}

.admin-sidebar a:hover {
    background: var(--primary);
    color: white;
}

.admin-sidebar hr {
    border: 0.5px solid rgba(255,255,255,0.1);
    margin: 1.5rem 0;
}

.admin-content {
    flex: 1;
    background: #f4f6f9;
    padding: 2rem;
    max-width: 100%;
    overflow-x: hidden;
}

/* ========== DASHBOARD ADMIN GRID ========== */
.admin-content .grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(200px,1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.admin-content .stat-card {
    background: linear-gradient(145deg, var(--primary), var(--accent));
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 140px;
}

.admin-content .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(46, 204, 113, 0.4);
}

.admin-content .stat-card h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: white;
}

.admin-content .stat-card p {
    font-size: 1rem;
    margin: 0.5rem 0 0;
    opacity: 0.95;
    font-weight: 500;
    letter-spacing: 0.5px;
}


/* ========== ADMIN TABLES ========== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-table th {
    background: var(--primary-dark);
    color: white;
    padding: 1rem;
    text-align: left;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
        word-break: break-word;
        overflow-wrap: break-word;
}

.admin-table tr:hover {
    background: #f8faf8;
}

/* ========== ADMIN BUTTONS ========== */
.btn-primary,
.btn-submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover,
.btn-submit:hover {
    background: var(--primary-dark);
}
.btn-warning {
    background: #f39c12;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
}
.btn-danger,
.btn-delete {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-danger:hover,
.btn-delete:hover {
    background: #c0392b;
}

/* ========== ADMIN FORMS - FIXED & VISIBLE ========== */
/* Semua input di dalam admin-content dipaksa tampil jelas */
.admin-content input[type="text"],
.admin-content input[type="password"],
.admin-content input[type="file"],
.admin-content input[type="number"],
.admin-content textarea,
.admin-content select {
    background-color: #ffffff !important;
    border: 2px solid #d1d5db !important;
    color: #111827 !important;
    padding: 10px 14px !important;
    border-radius: 6px !important;
    width: 100% !important;
    display: block;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    margin-top: 4px !important;
}

.admin-content textarea {
    min-height: 100px;
    resize: vertical;
}

.admin-content .form-group {
    margin-bottom: 1.5rem !important;
}

.admin-content .form-group label {
    display: block !important;
    margin-bottom: 6px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    font-size: 14px !important;
}

.admin-content input::placeholder,
.admin-content textarea::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

/* Untuk input file, pastikan tetap terlihat */
.admin-content input[type="file"] {
    padding: 8px !important;
    background: #f9fafb !important;
    border: 2px dashed #9ca3af !important;
}

/* Upload form khusus */
.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Card di admin */
.admin-content .card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
}

/* Gallery admin */
.admin-content .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.admin-content .gallery-item {
    position: relative;
    border-radius: 8px;
    background: white;
    overflow: hidden;
}

.admin-content .gallery-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.gallery-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    text-align: center;
    padding: 0.5rem;
    opacity: 0;
    transition: 0.3s;
}

.gallery-item:hover .gallery-actions {
    opacity: 1;
}

.gallery-actions a {
    color: white;
    text-decoration: none;
}

/* Page header admin */
.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    color: var(--primary-dark);
}

/* SDGs Section */
/* SECTION */
.sdgs-section {
    padding: 10px 0px;
    background: var(--primary-light);
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
}

.sdgs-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

/* CARD */
.sdgs-card {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
}

/* IMAGE */
.sdgs-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

/* HOVER */
.sdgs-card:hover img {
    transform: scale(1.08);
}

/* container utama */
.sdg-top-nav {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 5px;
    padding: 5px 20px;
    background: var(--primary);

    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* judul */
.sdg-top-nav h1 {
    font-size: 14px;
    font-weight: bold;
    line-height: 24px;
    color: white;
    margin: 0;
    text-align: center;
}
.sdg-top-nav p {
    font-size: 12px;
    color: white;
    margin: 0;
    text-align: center;
}
/* wrapper logo */
.sdg-nav-logos {
    display: flex;
    gap: 10px;
    overflow-x: auto; /* 🔥 scroll horizontal */
}

/* logo */
.sdg-nav-logos img {
    height: 50px;
    flex-shrink: 0; /* 🔥 biar gak gepeng */
}

.sdg-top-nav img {
    height: auto;
    width: 70 - 90px;
    max-width: 100%;
    aspect-ratio: auto 800 / 800;
}

.sdg-header {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    padding: 40px 20px;
}

.sdg-left h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.sdg-sub {
    color: #555;
    margin-bottom: 20px;
}

.sdg-meta {
    display: flex;
    gap: 20px;
    align-items: center;
}

.sdg-meta img {
    width: 120px;
}

.sdg-years a {
    border: 2px solid var(--primary);
    padding: 8px 15px;
    margin-right: 10px;
    text-decoration: none;
    color: var(--primary);
    transition: 0.3s;
}

.sdg-years a.active {
    background: var(--primary-dark);
    color: white;
}

.sdg-years a:hover {
    background: var(--primary);
    color: white;
}

/* RIGHT */
.sdg-right {
    border: 2px dashed red;
    overflow: hidden;      /* Potong kelebihan jika ada, tapi dengan contain biasanya aman */
    display: flex;
    flex-direction: column;
    justify-content: center; 
    max-height: 280px;
    padding: 60px;
    text-align: center;
    background: #e9dfc7
}

.sdg-pdf-preview {
    width: 100%;           /* Lebar penuh sesuai container */
    height: auto;          /* Tinggi menyesuaikan proporsi asli */
    max-height: 100%;      /* Tidak melebihi tinggi container */
    object-fit: contain;   /* Seluruh gambar terlihat tanpa terpotong */
    display: block;
    margin: 0 auto;
    padding:5px
    
}

.btn-pdf {
    display: inline-block;
    padding: 10px 20px;
    background: #2e7d32;
    color: white;
    text-decoration: none;
}

/* =========================
   SDG ADMIN LIST
========================= */
/* GROUP */
.sdg-group {
    margin-bottom: 25px;
}

/* TITLE SDG */
.sdg-group-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-dark);
    border-left: 5px solid var(--primary);
    padding-left: 10px;
}

.sdg-list {
    margin-top: 20px;
}

/* CARD ITEM */
.sdg-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #fff;
    padding: 15px 20px;
    margin-bottom: 10px;

    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* LEFT CONTENT */
.sdg-info {
    display: flex;
    flex-direction: column;
}

/* BADGE SDG */
.sdg-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 5px;
    width: fit-content;
}

/* TITLE */
.sdg-title {
    font-weight: bold;
    font-size: 16px;
}

/* YEAR */
.sdg-year {
    font-size: 13px;
    color: #777;
}

/* BUTTON */
.btn-edit {
    background: #2e7d32;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    transition: 0.3s;
}

.btn-edit:hover {
    background: #1b5e20;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0;
    margin-top: 3rem;
}
.admin-footer {
    margin-top: auto;
    background: var(--dark);
    color: white;
    width: 100%;
    padding: 1.5rem;
    text-align: center;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer a {
    color: #ccc;
    text-decoration: none;
}

.footer a:hover {
    color: white;
}

.footer hr {
    margin: 2rem 0;
    border: 0.5px solid rgba(255,255,255,0.1);
}

.copyright {
    text-align: center;
    color: #aaa;
}

/* DEFAULT (DESKTOP) */
.admin-topbar{
    display:none;
    align-items:center;
    gap:15px;
    margin-bottom:15px;
}
/* =========================
   RESPONSIVE SYSTEM FIXED
   ========================= */
/* =========================
   RESPONSIVE SDG DETAIL
========================= */

/* TABLET */
@media (max-width: 992px) {
    .sdg-header {
        grid-template-columns: 1fr 300px; /* kanan lebih kecil */
        gap: 20px;
    }

    .sdg-left h1 {
        font-size: 24px;
    }

    .sdg-meta img {
        width: 90px;
    }

    .sdg-right {
        padding: 30px;
        max-height: 250px;
    }
}


/* MOBILE */
@media (max-width: 768px) {
    
    /* 🔥 jadi 1 kolom */
    .sdg-header {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* urutan: kiri dulu baru kanan */
    .sdg-right {
        order: 2;
        max-height: none; /* 🔥 biar fleksibel */
        padding: 20px;
    }

    .sdg-left {
        order: 1;
    }

    /* navbar sdg */
    .sdg-top-nav h1 {
        font-size: 14px;
    }

    .sdg-nav-logos img {
        height: 40px;
    }

    /* meta */
    .sdg-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .sdg-meta img {
        width: 80px;
    }

    .sdg-years span {
        padding: 6px 10px;
        font-size: 12px;
    }

    /* preview */
    .sdg-pdf-preview {
        max-height: 200px;
    }
}


/* SMALL MOBILE */
@media (max-width: 480px) {

    .sdg-left h1 {
        font-size: 20px;
    }

    .sdg-sub {
        font-size: 14px;
    }

    .btn-pdf {
        width: 100%;
        text-align: center;
    }
}

/* ===== TABLET ===== */
@media (max-width: 1024px){
    body{
    min-height: 90vh;  /* body setinggi viewport */
    }
    .container{
        width:95%;
    }
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

    .news-layout{
        grid-template-columns:1fr;
        gap:25px;
    }

    .news-sidebar{
        order:-1; /* 🔥 pindah ke atas */
        position:static;
    }

    .sidebar-box-latest{
        display:none;
    }

    .admin-topbar{
        display:block;
    }

    .admin-toggle{
        font-size:26px;
        cursor:pointer;
    }

    .admin-wrapper{
        position:relative;
    }

    /* SIDEBAR OFF-CANVAS */
    .admin-sidebar{
        position:fixed;
        top:0;
        left:-260px;
        width:250px;
        height:100%;
        z-index:1000;
        transition:0.3s ease;
        font-size: 30px;
    }

    .admin-sidebar.active{
        left:0;
    }

    /* OVERLAY */
    .admin-overlay{
        position:fixed;
        top:0;
        left:0;
        width:100%;
        height:100%;
        background:rgba(0,0,0,0.4);
        z-index:999;
        display:none;
    }

    .admin-overlay.show{
        display:block;
    }
    .admin-content .grid {
    display: grid;
    grid-template-columns: 1fr;
    }

    .admin-content{
        padding: 1.5rem;
        font-size: 25px;
    }

    .admin-content .form-group label {
        font-size: 25px !important;
    }
    .admin-content h2{
        font-size: 1.5rem;
    }

    .admin-content .card{
        padding: 1.5rem;
    }

    .admin-content input,
    .admin-content textarea{
        font-size: 16px;
        padding: 12px;
    }
}

/* ===== MOBILE ===== */
/* HAMBURGER */
.menu-toggle{
    display:none;
    font-size:26px;
    cursor:pointer;
    color:white;
}

/* DEFAULT MENU (DESKTOP) */
.menu{
    display:flex;
    gap:1.5rem;
    align-items:center;
}

/* MOBILE */
@media (max-width:768px){

    .nav-container{
        flex-direction:row;
        justify-content:space-between;
        align-items:center;
    }

    .menu-toggle{
        display:block;
    }

    .menu{
        display:none;
        flex-direction:column;

        position:absolute;
        top:70px;
        left:0;

        width:100%;
        background:#14532d; /* samakan navbar */

        padding:10px 0;
        z-index:999;
        gap:0; /* 🔥 hapus jarak antar item */
        padding:0;
    }

    .menu.show{
        display:flex;
    }

    .menu.show{
        display:flex;
    }

    .menu a{
        padding:14px 20px;
        color:white;
        border-bottom:1px solid rgba(255,255,255,0.1);
    }

    /* sembunyikan label dropdown (opsional) */
    .dropdown > a{
        display:none;
    }

    /* tampilkan isi dropdown langsung */
    .dropdown-menu{
        display:block !important;
        position:static;
        background:none;
        box-shadow:none;
        border-radius:0;
    }

    .dropdown-menu a{
        padding:14px 20px;
        display:block;
        border-bottom:1px solid rgba(255,255,255,0.1);
        color:white;
    }

    .dropdown-menu .laporan-item, 
    .dropdown-menu .news-kategori{
        display:none;
    }

    /* HERO */
    .hero-content h1{
        font-size:1.8rem;
    }

    .hero-content p{
        font-size:1rem;
    }

    /* GRID GLOBAL */
    .grid{
        grid-template-columns:1fr;
    }

    /* NEWS LIST */
    .news-list .news-card{
        flex-direction:column;
        padding:15px;
    }

    .news-list .news-image{
        width:100%;
        height:180px;
        object-fit:cover;
    }

    /* HOMEPAGE NEWS */
    .home-news-grid{
        grid-template-columns:1fr;
    }

    .home-news-image{
        height:180px;
        object-fit:cover;
    }

    /* TEXT FIX */
    .news-title,
    .home-news-title{
        font-size:16px;
    }

    .news-preview,
    .home-news-preview{
        font-size:13px;
    }

    .news-date,
    .home-news-date{
        font-size:12px;
    }

    /* FIX MEDIA PDF MOBILE */
    .media-year-grid{
        grid-template-columns:1fr;
    }

    .media-card iframe{
        height:300px; /* dari 480 jadi lebih kecil */
    }
    /* SIDEBAR */
    .sidebar-box{
        padding:15px;
    }
        .sdg-container {
        grid-template-columns: 1fr;
    }



}

/* ===== SMALL PHONE ===== */
@media (max-width: 480px){

    .hero{
        min-height:300px;
    }

    .hero-content h1{
        font-size:1.5rem;
    }

    .section-title{
        font-size:1.3rem;
    }

    .news-list .news-image,
    .home-news-image{
        height:160px;
    }

}