/*
Theme Name: Multisite Tag Aggregator - SDG Complete
Description: Complete CSS for SDG news aggregator with icons, tooltips, uniform cards, and 3-column layout
Version: 6.0
Author: TRG Unhas
*/

/* ===== RESET & DASAR ===== */
* {
    box-sizing: border-box;
}

/* ===== CONTAINER UTAMA ===== */
.mta-sdg-container,
.mta-sdg-berita-container,
.mta-sdg-terbaru-container,
.mta-sdg-icon-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ===== TYPOGRAFI ===== */
.mta-sdg-title,
.mta-sdg-terbaru-title,
.mta-sdg-icon-title {
    text-align: center;
    color: #1e3c72;
    margin-bottom: 10px;
    font-size: 32px;
    position: relative;
    padding-bottom: 15px;
}

.mta-sdg-title:after,
.mta-sdg-terbaru-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    border-radius: 3px;
}

.mta-sdg-icon-title {
    font-size: 24px;
    margin-bottom: 30px;
}

.mta-sdg-subtitle,
.mta-sdg-terbaru-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 16px;
}

/* ===== HALAMAN 1: DAFTAR ICON SDG DENGAN TOOLTIP ===== */
.mta-sdg-icon-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mta-sdg-icon-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    --icon-size: 60px;
}

/* Link icon - menggunakan CSS global */
.mta-sdg-icon-grid a[href*="/tag/"] {
    display: inline-block !important;
    width: var(--icon-size) !important;
    height: var(--icon-size) !important;
    margin: 0 !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: cover !important;
    overflow: hidden !important;
    color: transparent !important;
    text-indent: 100% !important;
    white-space: nowrap !important;
    font-size: 0 !important;
    line-height: 0 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Hover effect untuk icon */
.mta-sdg-icon-grid a[href*="/tag/"]:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 10;
}

/* Sembunyikan teks span */
.mta-sdg-icon-grid a[href*="/tag/"] .mta-sdg-icon-text {
    display: none !important;
}

/* ===== HALAMAN 2: DAFTAR SEMUA SDG (KARTU) ===== */
.mta-sdg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.mta-sdg-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

.mta-sdg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.mta-sdg-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mta-sdg-number {
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
}

.mta-sdg-count {
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 14px;
}

.mta-sdg-body {
    padding: 20px;
}

.mta-sdg-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e3c72;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.mta-sdg-body p {
    margin: 10px 0 5px;
    color: #333;
    font-weight: 500;
}

.mta-sdg-sites-list {
    margin: 5px 0 15px;
    padding-left: 20px;
    color: #666;
}

.mta-sdg-sites-list li {
    margin-bottom: 3px;
    font-size: 13px;
}

.mta-sdg-button {
    display: inline-block;
    background: #1e3c72;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.mta-sdg-button:hover {
    background: #2a5298;
    color: white;
}

/* ===== HALAMAN 3: BERITA PER SDG - UNIFORM CARDS (TANPA ICON) ===== */

/* Header dengan nama SDG */
.mta-sdg-berita-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.mta-sdg-berita-header h1 {
    margin: 0 0 5px 0;
    color: white;
    font-size: 32px;
    font-weight: 600;
}

/* Subtitle untuk slug SDG */
.mta-sdg-slug-subtitle {
    margin: 0 0 15px 0;
    color: rgba(255,255,255,0.8);
    font-size: 18px;
    font-weight: normal;
    letter-spacing: 1px;
}

/* Simple header stats */
.mta-sdg-berita-info-simple {
    background: rgba(255,255,255,0.15);
    padding: 12px 20px;
    border-radius: 8px;
    display: inline-block;
    margin-top: 10px;
}

.mta-sdg-stats {
    margin: 0;
    font-size: 16px;
    color: white;
}

.mta-sdg-stat-item {
    display: inline-block;
}

.mta-sdg-stat-item strong {
    font-size: 20px;
    color: #ffd700;
    margin-right: 5px;
}

.mta-sdg-stat-separator {
    margin: 0 15px;
    opacity: 0.5;
    color: white;
}

/* Grid untuk uniform cards */
.mta-sdg-news-grid-uniform {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

/* Uniform card */
.mta-sdg-news-card-uniform {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mta-sdg-news-card-uniform:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: #2a5298;
}

/* Thumbnail - fixed height */
.mta-sdg-news-thumb-uniform {
    height: 180px;
    overflow: hidden;
}

.mta-sdg-news-thumb-uniform img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mta-sdg-news-card-uniform:hover .mta-sdg-news-thumb-uniform img {
    transform: scale(1.05);
}

/* Content */
.mta-sdg-news-content-uniform {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Meta */
.mta-sdg-news-meta-uniform {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 11px;
    color: #666;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.mta-sdg-news-date-uniform {
    color: #888;
}

.mta-sdg-news-source-uniform a {
    color: #1e3c72;
    text-decoration: none;
    font-weight: 500;
}

.mta-sdg-news-source-uniform a:hover {
    text-decoration: underline;
}

/* Title - 2 lines */
.mta-sdg-news-title-uniform {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mta-sdg-news-title-uniform a {
    color: #333;
    text-decoration: none;
}

.mta-sdg-news-title-uniform a:hover {
    color: #1e3c72;
}

/* Excerpt - 3 lines (NO ICONS) */
.mta-sdg-news-excerpt-uniform {
    font-size: 13px;
    line-height: 1.5;
    color: #555;
    margin-bottom: 12px;
    height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Read more */
.mta-sdg-news-readmore-uniform {
    margin-top: auto;
    text-align: right;
}

.mta-sdg-news-readmore-uniform a {
    display: inline-block;
    background: #1e3c72;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    transition: background 0.3s ease;
}

.mta-sdg-news-readmore-uniform a:hover {
    background: #2a5298;
}

/* ===== HALAMAN 4: BERITA TERBARU 3 KOLOM (ICON DI EXCERPT) ===== */

/* Grid System */
.mta-sdg-terbaru-grid {
    display: grid;
    gap: 25px;
    margin: 30px 0;
}

/* 3 Kolom (Default) */
.mta-sdg-grid-3cols {
    grid-template-columns: repeat(3, 1fr);
}

/* 2 Kolom */
.mta-sdg-grid-2cols {
    grid-template-columns: repeat(2, 1fr);
}

/* 4 Kolom */
.mta-sdg-grid-4cols {
    grid-template-columns: repeat(4, 1fr);
}

/* 1 Kolom */
.mta-sdg-grid-1cols {
    grid-template-columns: 1fr;
}

/* Item Berita Terbaru */
.mta-sdg-terbaru-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mta-sdg-terbaru-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: #2a5298;
}

/* THUMBNAIL - BERSIH TANPA ICON */
.mta-sdg-terbaru-thumb {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
    height: 180px;
}

.mta-sdg-terbaru-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mta-sdg-terbaru-item:hover .mta-sdg-terbaru-thumb img {
    transform: scale(1.05);
}

/* Konten */
.mta-sdg-terbaru-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Meta info */
.mta-sdg-terbaru-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 11px;
    color: #666;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.mta-sdg-terbaru-date {
    color: #888;
}

.mta-sdg-terbaru-source a {
    color: #1e3c72;
    text-decoration: none;
    font-weight: 500;
}

.mta-sdg-terbaru-source a:hover {
    text-decoration: underline;
}

/* Judul */
.mta-sdg-terbaru-post-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mta-sdg-terbaru-post-title a {
    color: #333;
    text-decoration: none;
}

.mta-sdg-terbaru-post-title a:hover {
    color: #1e3c72;
}

/* Excerpt */
.mta-sdg-terbaru-excerpt {
    font-size: 13px;
    line-height: 1.5;
    color: #555;
    margin-bottom: 12px;
    height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ICON SDG DI EXCERPT */
.mta-sdg-terbaru-taginfo {
    margin: 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Link icon SDG - menggunakan CSS global */
.mta-sdg-terbaru-taginfo a[href*="/tag/"] {
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    display: inline-block !important;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.mta-sdg-terbaru-taginfo a[href*="/tag/"]:hover {
    transform: scale(1.1);
    z-index: 5;
}

/* Read more */
.mta-sdg-terbaru-readmore {
    margin-top: auto;
    text-align: right;
}

.mta-sdg-terbaru-readmore a {
    display: inline-block;
    background: #1e3c72;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    transition: background 0.3s ease;
}

.mta-sdg-terbaru-readmore a:hover {
    background: #2a5298;
}

/* ===== NOT FOUND ===== */
.mta-sdg-notfound {
    text-align: center;
    padding: 50px;
    background: #f8f9fa;
    border-radius: 10px;
    color: #666;
    font-size: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .mta-sdg-grid-3cols,
    .mta-sdg-grid-4cols {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mta-sdg-news-grid-uniform {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Grid */
    .mta-sdg-grid-2cols,
    .mta-sdg-grid-3cols,
    .mta-sdg-grid-4cols,
    .mta-sdg-news-grid-uniform,
    .mta-sdg-grid {
        grid-template-columns: 1fr;
    }
    
    /* Kartu SDG */
    .mta-sdg-card {
        margin-bottom: 20px;
    }
    
    /* Header */
    .mta-sdg-berita-header {
        padding: 20px;
    }
    
    .mta-sdg-berita-header h1 {
        font-size: 28px;
    }
    
    .mta-sdg-slug-subtitle {
        font-size: 16px;
    }
    
    /* Thumbnail */
    .mta-sdg-thumbnail,
    .mta-sdg-terbaru-thumb,
    .mta-sdg-news-thumb-uniform {
        height: 200px;
    }
    
    /* Icon grid */
    .mta-sdg-icon-grid {
        gap: 10px;
        --icon-size: 50px;
    }
}

@media (max-width: 480px) {
    .mta-sdg-title,
    .mta-sdg-terbaru-title,
    .mta-sdg-icon-title {
        font-size: 24px;
    }
    
    .mta-sdg-berita-header h1 {
        font-size: 24px;
    }
    
    .mta-sdg-slug-subtitle {
        font-size: 14px;
    }
    
    .mta-sdg-stats {
        font-size: 14px;
    }
    
    .mta-sdg-stat-item strong {
        font-size: 18px;
    }
    
    .mta-sdg-stat-separator {
        margin: 0 8px;
    }
    
    .mta-sdg-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .mta-sdg-meta,
    .mta-sdg-news-meta-uniform,
    .mta-sdg-terbaru-meta {
        flex-direction: column;
        gap: 5px;
        text-align: left;
    }
    
    .mta-sdg-icon-grid {
        gap: 8px;
        --icon-size: 40px;
    }
}

/* ===== UTILITY ===== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.clearfix:after {
    content: "";
    display: table;
    clear: both;
}

/* ===== HALAMAN 5: ALL NEWS (MENGIKUTI STYLE LATEST NEWS) ===== */
.mta-all-news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mta-all-news-title {
    text-align: center;
    color: #1e3c72;
    margin-bottom: 30px;
    font-size: 32px;
    position: relative;
    padding-bottom: 15px;
}

.mta-all-news-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    border-radius: 3px;
}

.mta-all-news-stats {
    text-align: center;
    margin-bottom: 30px;
    font-size: 16px;
    color: #666;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.mta-all-news-stat-item {
    display: inline-block;
}

.mta-all-news-stat-item strong {
    color: #1e3c72;
    font-size: 20px;
    margin-right: 5px;
}

.mta-all-news-stat-separator {
    margin: 0 20px;
    color: #ccc;
}

.mta-all-news-search-query {
    margin-left: 20px;
    color: #2a5298;
    font-style: italic;
}

/* Search Form */
.mta-all-news-search {
    margin-bottom: 30px;
}

.mta-search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 10px;
}

.mta-search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
}

.mta-search-input:focus {
    outline: none;
    border-color: #1e3c72;
}

.mta-search-button {
    background: #1e3c72;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.mta-search-button:hover {
    background: #2a5298;
}

/* Search Highlight */
.mta-search-highlight {
    background: #fff3cd;
    color: #856404;
    font-weight: bold;
    padding: 0 2px;
    border-radius: 3px;
}

/* Grid untuk All News - sama dengan latest news */
.mta-all-news-grid {
    display: grid;
    gap: 25px;
    margin: 30px 0;
}

.mta-all-news-grid.mta-sdg-grid-3cols {
    grid-template-columns: repeat(3, 1fr);
}

.mta-all-news-grid.mta-sdg-grid-2cols {
    grid-template-columns: repeat(2, 1fr);
}

.mta-all-news-grid.mta-sdg-grid-4cols {
    grid-template-columns: repeat(4, 1fr);
}

.mta-all-news-grid.mta-sdg-grid-1cols {
    grid-template-columns: 1fr;
}

/* Item Card - sama dengan latest news */
.mta-all-news-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mta-all-news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: #2a5298;
}

/* Thumbnail */
.mta-all-news-thumb {
    height: 180px;
    overflow: hidden;
}

.mta-all-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mta-all-news-item:hover .mta-all-news-thumb img {
    transform: scale(1.05);
}

/* Content */
.mta-all-news-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Meta */
.mta-all-news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 11px;
    color: #666;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.mta-all-news-date {
    color: #888;
}

.mta-all-news-source a {
    color: #1e3c72;
    text-decoration: none;
    font-weight: 500;
}

.mta-all-news-source a:hover {
    text-decoration: underline;
}

/* Title */
.mta-all-news-title-text {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mta-all-news-title-text a {
    color: #333;
    text-decoration: none;
}

.mta-all-news-title-text a:hover {
    color: #1e3c72;
}

/* Excerpt */
.mta-all-news-excerpt {
    font-size: 13px;
    line-height: 1.5;
    color: #555;
    margin-bottom: 12px;
    height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* SDG Icons - SAMA DENGAN LATEST NEWS */
.mta-all-news-taginfo {
    margin: 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.mta-all-news-taginfo a[href*="/tag/"] {
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    display: inline-block !important;
    border-radius: 4px !important;
    transition: transform 0.2s ease !important;
}

.mta-all-news-taginfo a[href*="/tag/"]:hover {
    transform: scale(1.1) !important;
    z-index: 5;
}

/* Read more */
.mta-all-news-readmore {
    margin-top: auto;
    text-align: right;
}

.mta-all-news-readmore a {
    display: inline-block;
    background: #1e3c72;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    transition: background 0.3s ease;
}

.mta-all-news-readmore a:hover {
    background: #2a5298;
}

/* Pagination */
.mta-all-news-pagination {
    text-align: center;
    margin: 40px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mta-pagination-page,
.mta-pagination-prev,
.mta-pagination-next {
    display: inline-block;
    padding: 8px 12px;
    background: #f8f9fa;
    color: #1e3c72;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
}

.mta-pagination-page:hover,
.mta-pagination-prev:hover,
.mta-pagination-next:hover {
    background: #1e3c72;
    color: white;
    border-color: #1e3c72;
}

.mta-pagination-current {
    display: inline-block;
    padding: 8px 12px;
    background: #1e3c72;
    color: white;
    border-radius: 4px;
    border: 1px solid #1e3c72;
}

/* Responsive untuk all news */
@media (max-width: 992px) {
    .mta-all-news-grid.mta-sdg-grid-3cols,
    .mta-all-news-grid.mta-sdg-grid-4cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mta-all-news-grid.mta-sdg-grid-2cols,
    .mta-all-news-grid.mta-sdg-grid-3cols,
    .mta-all-news-grid.mta-sdg-grid-4cols {
        grid-template-columns: 1fr;
    }
    
    .mta-search-form {
        flex-direction: column;
    }
    
    .mta-search-button {
        width: 100%;
    }
}