/*
Theme Name: Republika Clone
Theme URI: https://github.com/wp-theme-ghost/republika-clone
Author: WP-THEME-GHOST
Description: 100% Identical Republika.co.id Clone Theme
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: republika-clone
Tags: news, magazine, responsive, custom-colors, custom-menu, featured-images
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Poppins:wght@400;600;700;800;900&display=swap');

/* =============================================
   CSS VARIABLES
   ============================================= */
:root {
    --color-primary: #c1272d;
    --color-primary-dark: #a30000;
    --color-accent: #1a73e8;
    --color-bg: #ffffff;
    --color-text: #222222;
    --color-gray-light: #f4f4f4;
    --color-gray-border: #e5e5e5;
    --color-footer-bg: #1a1a1a;
    --color-white: #ffffff;
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Poppins', sans-serif;
    --shadow-card: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 20px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}

/* =============================================
   GLOBAL RESET & BASE
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: #eef4f9; 
    background-image: radial-gradient(ellipse 30% 120% at -5% 50%, #e1edce 45%, transparent 46%), radial-gradient(ellipse 45% 150% at -5% 50%, #d6cbfb 45%, transparent 46%), radial-gradient(ellipse 30% 120% at 105% 50%, #e1edce 45%, transparent 46%), radial-gradient(ellipse 45% 150% at 105% 50%, #d6cbfb 45%, transparent 46%);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

a:hover {
    color: var(--color-primary) !important;
}

/* Image Zoom Animation on Hover */
a:hover img {
    transform: scale(1.05) !important;
    transition: transform 0.3s ease !important;
}
.widget a:hover img, 
.home-widget-wrapper a:hover img,
.unggulan-widget-wrapper a:hover img {
    transform: scale(1.05) !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-top: 0;
    line-height: 1.3;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

ul, ol {
    margin: 0;
    padding: 0;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.clear {
    clear: both;
}

/* =============================================
   WIDGET GLOBAL STYLES
   ============================================= */
.widget {
    margin-bottom: 30px;
    background: #fff;
    padding: 20px;
    border: 1px solid var(--color-gray-border);
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 10px;
    margin-bottom: 15px;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

/* =============================================
   POPULAR POSTS WIDGET
   ============================================= */
.republika-popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-gray-border);
}

.popular-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-thumb-wrap {
    flex-shrink: 0;
    position: relative;
    margin-right: 12px;
}

.popular-rank {
    position: absolute;
    top: -6px;
    left: -6px;
    background: var(--color-primary);
    color: #fff;
    width: 22px;
    height: 22px;
    text-align: center;
    line-height: 22px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.popular-thumb-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.popular-thumb-placeholder {
    width: 70px;
    height: 70px;
    background: var(--color-gray-light);
    border-radius: 4px;
}

.popular-info {
    flex: 1;
    min-width: 0;
}

.popular-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.4;
    margin-bottom: 5px;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.popular-title:hover {
    color: var(--color-primary);
}

.popular-date,
.popular-views {
    font-size: 11px;
    color: #999;
    display: inline-block;
    margin-right: 10px;
}

.popular-date i,
.popular-views i {
    margin-right: 3px;
}

/* =============================================
   CATEGORY LIST WIDGET
   ============================================= */
.republika-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition);
}

.category-item:last-child {
    border-bottom: none;
}

.category-item:hover {
    padding-left: 5px;
}

.category-name {
    font-size: 14px;
    color: var(--color-text);
    font-weight: 500;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-name:hover {
    color: var(--color-primary);
}

.category-icon {
    font-size: 9px;
    color: var(--color-primary);
    transition: transform 0.2s ease;
}

.category-item:hover .category-icon {
    transform: translateX(3px);
}

.category-count {
    background: var(--color-gray-light);
    color: #666;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 500;
    min-width: 28px;
    text-align: center;
}

/* =============================================
   TAG CLOUD WIDGET
   ============================================= */
.republika-tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.republika-tag-pill {
    display: inline-block;
    padding: 6px 14px;
    background: var(--color-gray-light);
    color: var(--color-text);
    font-size: 13px;
    border-radius: 20px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 400;
    border: 1px solid transparent;
}

.republika-tag-pill:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(193, 39, 45, 0.3);
}

/* =============================================
   SOCIAL MEDIA WIDGET
   ============================================= */
.republika-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    transition: var(--transition);
    text-decoration: none;
}

.social-link:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    opacity: 0.9;
}

/* =============================================
   IKLAN / AD BANNER WIDGET
   ============================================= */
.republika-ad-banner {
    width: 100%;
}

.ad-banner-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.ad-image-link {
    display: block;
    transition: opacity 0.3s ease;
}

.ad-image-link:hover {
    opacity: 0.9;
}

.ad-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e5e5e5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ccc;
    border-radius: 4px;
}

.ad-placeholder-inner {
    text-align: center;
}

.ad-placeholder-icon {
    font-size: 36px;
    color: #bbb;
    margin-bottom: 8px;
    display: block;
}

.ad-placeholder-text {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.ad-placeholder-sub {
    display: block;
    font-size: 11px;
    color: #bbb;
}

/* =============================================
   FOOTER WIDGET STYLES
   ============================================= */
.site-footer {
    background-color: var(--color-footer-bg);
    color: #ccc;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.site-footer a {
    color: #ccc;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--color-primary);
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget-title {
    font-family: var(--font-heading);
    font-size: 16px;
    color: #fff;
    text-transform: uppercase;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
    margin-bottom: 15px;
    margin-top: 0;
}

.footer-widget {
    background: transparent;
    border: none;
    padding: 0;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-widget ul li:last-child {
    border-bottom: none;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: #ccc;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.site-info {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
    font-size: 13px;
    color: #666;
}

/* =============================================
   HEADER STYLES
   ============================================= */

.network-link {
    display: inline-block;
    padding: 6px 14px;
    background: #2a2a2a;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.2s;
}

.network-link:hover {
    background: var(--color-primary);
    color: #fff;
}

.main-navigation-desktop ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: space-between;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
    max-width: 100%;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.main-navigation-desktop ul::-webkit-scrollbar {
    display: none;
}

.main-navigation-desktop ul li a {
    color: #000;
    font-weight: 800;
    font-size: 13px;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: -0.2px;
    padding: 5px 4px;
    transition: color 0.2s ease;
    display: block;
}

.main-navigation-desktop ul li a:hover {
    color: var(--color-primary);
}

/* =============================================
   DROPDOWN SUBMENU SUPPORT
   ============================================= */
.main-navigation-desktop ul li {
    position: relative;
}

.main-navigation-desktop ul li ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    flex-direction: column;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1000;
    padding: 10px 0;
    border-radius: 0 0 8px 8px;
    border-top: 3px solid var(--color-primary);
    margin: 0;
    gap: 0;
}

.main-navigation-desktop ul li:hover > ul.sub-menu {
    display: flex;
}

.main-navigation-desktop ul li ul.sub-menu li {
    width: 100%;
    list-style: none;
}

.main-navigation-desktop ul li ul.sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.main-navigation-desktop ul li ul.sub-menu li a:hover {
    background: #f8f9fa;
    color: var(--color-primary);
    padding-left: 25px; /* Subtle indent animation */
}

/* =============================================
   ENTRY CONTENT (SINGLE POST)
   ============================================= */
.entry-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}

.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.entry-content p {
    margin-bottom: 18px;
}

.entry-content img {
    border-radius: 4px;
    margin: 20px 0;
}

.entry-content h2, .entry-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
}

/* =============================================
   PAGINATION
   ============================================= */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--color-gray-border);
    font-size: 14px;
    color: var(--color-text);
    transition: var(--transition);
}

.nav-links .page-numbers.current,
.nav-links .page-numbers:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* =============================================
   404 PAGE
   ============================================= */
.error-404 {
    text-align: center;
    padding: 80px 0;
}

.error-404 .page-title {
    font-size: 48px;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.error-404 .page-content {
    max-width: 500px;
    margin: 0 auto;
}

.error-404 .search-form {
    display: flex;
    margin-top: 20px;
}

.error-404 .search-field {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--color-gray-border);
    font-size: 15px;
    outline: none;
}

.error-404 .search-submit {
    padding: 12px 25px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb {
    font-size: 13px;
    margin-bottom: 15px;
    color: #666;
    padding: 10px 0;
}

.breadcrumb a {
    color: var(--color-accent);
    transition: color 0.2s ease;
}

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

.breadcrumb .current {
    color: #999;
}

/* =============================================
   LOAD MORE BUTTON
   ============================================= */
.btn-load-more {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 12px 30px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border-radius: 4px;
}

.btn-load-more:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(193, 39, 45, 0.3);
}

.btn-load-more:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =============================================
   PAGE HEADER (archive, search)
   ============================================= */
.page-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-primary);
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.page-title span {
    color: var(--color-primary);
}

.archive-grid,
.search-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 1023px) {
    .archive-grid,
    .search-grid {
        grid-template-columns: 1fr;
    }
    .footer-widgets-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* =============================================
   SECONDARY MENU / RED BAR TAGS
   ============================================= */
.trending-tags-list {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.trending-tags-list li a {
    background: #fff;
    color: #111;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.trending-tags-list li a:hover {
    background: #f5f5f5;
    color: var(--color-primary);
}

/* =============================================
   GLOBAL RESPONSIVENESS & SMOOTH TRANSITIONS
   ============================================= */
html {
    scroll-behavior: smooth;
}

/* Ensure all media inside widgets are responsive */
.widget img,
.widget video,
.widget iframe,
.widget object,
.widget embed {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

/* Universal widget container responsiveness */
.widget {
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

/* Add smooth transitions to interactive elements globally */
a, button, input, select, textarea, .widget {
    transition: all 0.3s ease;
}

/* Prevent horizontal scroll overflow globally */
body, .site-content {
    overflow-x: hidden;
    width: 100%;
}

/* =============================================
   FOOTER WIDGET SPACING (EXTRACTED FROM INLINE)
   ============================================= */
.site-footer { padding: 25px 0 30px 0; }
.dewan-pers-box { min-width: 480px; }
.social-icons-wrapper { margin-bottom: 25px; }

.footer-heading { font-size: 18px; font-weight: 800; color: #222; margin-bottom: 0px; font-family: var(--font-heading), 'Arial', sans-serif; }
.footer-nav-grid { display: grid; grid-template-columns: 140px 140px 140px; gap: 0px 20px; margin-top: 0; margin-bottom: 15px; list-style: none; padding: 0; }
.footer-nav-grid-about { display: grid; grid-template-columns: 140px 140px 140px; gap: 0px 20px; margin-top: 0; margin-bottom: 40px; list-style: none; padding: 0; }
.footer-nav-grid li, .footer-nav-grid-about li { margin: 0; padding: 0; }
.footer-nav-grid a, .footer-nav-grid-about a { color: #333; font-size: 14px; font-weight: 400; text-decoration: none; transition: color 0.2s; display: block; line-height: 1.3; }
.footer-nav-grid a:hover, .footer-nav-grid-about a:hover { color: #d32f2f !important; }

.social-icon { width: 34px; height: 34px; color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 16px; text-decoration: none; transition: opacity 0.2s; }
.social-icon:hover { opacity: 0.8; color: #fff; }

.footer-left a:hover { color: #d32f2f !important; }
.back-to-top:hover { background: #f0f0f0 !important; }

@media (max-width: 768px) {
    .site-footer { padding: 30px 0 20px 0; }
    .dewan-pers-box { min-width: 100%; max-width: 100%; box-sizing: border-box; }
    .footer-left, .footer-right { max-width: 100% !important; }
    .footer-right { margin-top: 20px; }
    .footer-nav-grid, .footer-nav-grid-about { grid-template-columns: repeat(2, 1fr) !important; gap: 10px 15px; margin-bottom: 25px; }
    .social-icons-wrapper { margin-bottom: 30px; }
    .footer-heading { margin-bottom: 15px; }
    .back-to-top { right: 15px; }
}

/* =============================================
   SEARCH RESULTS PAGE (REPUBLIKA CLONE)
   ============================================= */

.search-page-wrapper {
    background: #eaf0f8; /* Light blue-grey background */
    min-height: 100vh;
    padding: 30px 0 60px;
    font-family: var(--font-primary);
}

.search-page-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* LEFT SIDEBAR FILTERS */
.search-sidebar-filter {
    position: sticky;
    top: 90px;
}

.filter-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #111;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-subtitle {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f4f7f6;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.filter-btn i {
    font-size: 12px;
    color: #999;
}

.filter-btn:hover {
    background: #e0e6e4;
}

.filter-btn.active {
    background: #ff0000;
    color: #fff;
}

.filter-btn.active i {
    color: #fff;
}

/* BIG PILL SEARCH BAR (TOP OF CONTENT) */
.search-big-bar-wrapper {
    margin-bottom: 30px;
}

.search-big-form {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 40px;
    padding: 8px 15px 8px 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-big-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    padding: 10px 0;
    color: #333;
    background: transparent;
}

.search-big-submit {
    background: transparent;
    border: none;
    color: #666;
    font-size: 22px;
    padding: 10px;
    cursor: pointer;
}

.search-big-submit:hover {
    color: #ff0000;
}

/* SEARCH RESULT CARDS */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-result-card {
    display: grid;
    grid-template-columns: 1fr 280px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: transform 0.2s ease;
}

.search-result-card:hover {
    transform: translateY(-2px);
}

.search-card-text {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-card-meta {
    margin-bottom: 8px;
}

.search-card-date {
    color: #1976d2; 
    font-size: 13px;
    font-weight: 500;
}

.search-card-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.search-card-title a {
    color: #111;
    text-decoration: none;
}

.search-card-title a:hover {
    color: #ff0000;
}

.search-card-excerpt {
    font-size: 15px;
    color: #666;
    line-height: 1.5;
}

.search-card-image {
    width: 100%;
    height: 100%;
    position: relative;
}

.search-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 8px 8px 0;
}

/* RESPONSIVE SEARCH PAGE */
@media (max-width: 991px) {
    .search-page-container {
        grid-template-columns: 1fr;
    }
    
    .search-sidebar-filter {
        position: static;
        order: -1;
    }
    
    .filter-list {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .filter-btn {
        flex: 0 0 auto;
    }
    
    .search-result-card {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column-reverse;
    }
    
    .search-card-image {
        height: 200px;
    }
    
    .search-card-image img {
        border-radius: 8px 8px 0 0;
    }
}
