/*
Theme Name: Envnews
Theme URI: 
Author: Envnews
Description: Tema berita modern
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: envnews
*/

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

:root {
  --primary: #e53935;
  --primary-dark: #d32f2f;
  --accent: #43a047;
  --bg: #f8f8f8;
  --white: #ffffff;
  --text: #333333;
  --text-muted: #888888;
  --border: #e0e0e0;
  --footer-bg: #1a1a2e;
  --footer-text: #ccc;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

body.dark-mode {
  --bg: #121212;
  --white: #1e1e1e;
  --text: #e0e0e0;
  --text-muted: #aaa;
  --border: #333;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

h1,h2,h3,h4,h5,h6 {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ===== TOP BAR ===== */
#top-bar {
  background: var(--primary-dark);
  color: #fff;
  padding: 7px 0;
  font-size: 13px;
}

#top-bar .top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.breaking-news-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  overflow: hidden;
}

.breaking-label {
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 3px;
  white-space: nowrap;
  text-transform: uppercase;
  font-family: 'Quicksand', sans-serif;
}

.breaking-ticker {
  overflow: hidden;
  flex: 1;
}

.breaking-ticker marquee { color: #fff; font-size: 13px; }

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.top-bar-right a {
  color: #fff;
  font-size: 12px;
  opacity: 0.85;
  transition: opacity .2s;
}
.top-bar-right a:hover { opacity: 1; }

.top-search-form {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 3px 10px;
}
.top-search-form input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 12px;
  width: 130px;
}
.top-search-form input::placeholder { color: rgba(255,255,255,0.7); }
.top-search-form button {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0 4px;
  font-size: 13px;
}

#dark-mode-toggle {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 28px; height: 28px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
#dark-mode-toggle:hover { background: rgba(255,255,255,0.35); }

/* ===== HEADER ===== */
#site-header {
  background: var(--white);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.site-logo img { height: 55px; width: auto; }
.site-logo .logo-text {
  font-family: 'Quicksand', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

/* ===== BANNER BAR (bawah menu) ===== */
#header-banner-bar {
  background: var(--white);
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 3px solid var(--primary);
}
.header-banner-inner {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 0;
}
.header-banner-inner a {
  display: block;
  max-width: 100%;
  width: 100%;
}
.header-banner-inner img {
  width: 100%;
  height: auto;
  display: block;
}
.header-banner-placeholder {
  max-width: 728px;
  margin: 0 auto;
  width: 100%;
  height: 90px;
  background: #f5f5f5;
  color: #aaa;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #ddd;
}

/* ===== NAVIGATION ===== */
#main-nav {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-inner {
  display: flex;
  align-items: center;
}

#primary-menu {
  display: flex;
  flex-wrap: wrap;
}

#primary-menu > li > a {
  display: block;
  color: #fff;
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 13px 16px;
  transition: background .2s;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

#primary-menu > li > a:hover,
#primary-menu > li.current-menu-item > a {
  background: rgba(0,0,0,0.2);
  color: #fff;
}

#primary-menu li { position: relative; }

#primary-menu li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #c62828;
  min-width: 200px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#primary-menu li:hover > ul { display: block; }

#primary-menu li ul li a {
  display: block;
  color: #fff;
  font-size: 13px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: background .2s;
}
#primary-menu li ul li a:hover { background: rgba(0,0,0,0.2); }

/* Secondary tags row */
#secondary-tags {
  background: #fafafa;
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}
.tags-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tags-list a {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--white);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 20px;
  transition: all .2s;
}
.tags-list a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== MAIN CONTENT AREA ===== */
#content { padding: 20px 0 30px; }

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 25px;
}

/* ===== SECTION HEADINGS ===== */
.section-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  padding: 8px 14px;
  margin-bottom: 15px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
}

/* ===== HERO SECTION ===== */
#hero { margin-bottom: 30px; }

/* Swiper Hero Styles */
.hero-swiper {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  background: var(--white);
}

.hero-main { position: relative; width: 100%; height: 450px; }
.hero-main > a { display: block; width: 100%; height: 100%; }
.hero-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.hero-swiper:hover .hero-main img { transform: scale(1.03); }

.hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
  padding: 40px 30px 30px;
  z-index: 2;
}

.hero-overlay .cat-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.hero-overlay h2 {
  color: #fff;
  font-size: 28px;
  line-height: 1.35;
  margin-bottom: 12px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.hero-overlay h2 a { color: #fff; }
.hero-overlay h2 a:hover { color: #ffcdd2; }

.hero-overlay .post-meta { 
  color: #ddd; 
  font-size: 13px; 
  display: flex;
  align-items: center;
  gap: 15px;
}

.swiper-button-prev, .swiper-button-next { 
  color: #fff; 
  text-shadow: 0 2px 4px rgba(0,0,0,0.5); 
}
.swiper-pagination-bullet-active { background: var(--primary) !important; }

/* ===== ARTICLE CARDS ===== */
.post-card {
  display: flex;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 14px;
  transition: box-shadow .2s, transform .2s;
}
.post-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.post-card-thumb {
  flex-shrink: 0;
  width: 150px;
  height: 105px;
  overflow: hidden;
  border-radius: 3px;
}
.post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.post-card:hover .post-card-thumb img { transform: scale(1.05); }

.post-card-body { flex: 1; }

.cat-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.cat-badge:hover { background: var(--primary); color: #fff; }

.post-card-body h3 {
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 6px;
}
.post-card-body h3 a:hover { color: var(--primary); }

.post-meta {
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.post-meta span { display: flex; align-items: center; gap: 4px; }

.post-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Large card variant */
.post-card-large {
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.post-card-large .post-card-thumb {
  width: 100%; height: 220px;
}
.post-card-large .post-card-body { padding: 14px; }
.post-card-large .post-card-body h3 { font-size: 18px; }

/* ===== CATEGORY SECTION ===== */
.category-section { margin-bottom: 30px; }

.cat-header {
  background: var(--primary);
  color: #fff;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 9px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cat-header a {
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  font-weight: 400;
}
.cat-header a:hover { color: #fff; }

/* ===== SIDEBAR ===== */
.sidebar { }

.widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 22px;
  overflow: hidden;
}

.widget-title {
  background: var(--primary);
  color: #fff;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.widget-body { padding: 14px; }

/* Recent posts widget */
.widget-post-list li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.widget-post-list li:last-child { border-bottom: none; }
.widget-post-list li img {
  width: 70px; height: 55px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}
.widget-post-list li .info h4 {
  font-size: 13px;
  line-height: 1.3;
  margin-bottom: 4px;
}
.widget-post-list li .info h4 a:hover { color: var(--primary); }
.widget-post-list li .info .date {
  color: var(--text-muted);
  font-size: 11px;
}

/* Popular posts */
.popular-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.popular-list li:last-child { border-bottom: none; }
.popular-list li .num {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  width: 24px; height: 24px;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.popular-list li h4 { font-size: 13px; line-height: 1.3; }
.popular-list li h4 a:hover { color: var(--primary); }
.popular-list li .date { color: var(--text-muted); font-size: 11px; margin-top: 3px; }

/* View more button */
.btn-view-more {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 3px;
  margin-top: 12px;
  transition: background .2s;
}
.btn-view-more:hover { background: var(--primary); color: #fff; }

/* ===== FOOTER ===== */
#site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 30px 0 0;
  margin-top: 20px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
  gap: 15px;
}

.footer-logo .logo-text {
  font-family: 'Quicksand', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: transform .2s, opacity .2s;
  opacity: 0.8;
  color: #fff;
}
.footer-social a:hover { opacity: 1; transform: translateY(-2px); }
.footer-social .fb { background: #1877f2; }
.footer-social .tw { background: #1da1f2; }
.footer-social .ig { background: #e1306c; }
.footer-social .yt { background: #ff0000; }
.footer-social .wa { background: #25d366; }

.footer-nav {
  padding: 15px 0;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav li {
  display: inline-block;
}
.footer-nav a {
  display: inline-block;
  color: var(--footer-text);
  font-size: 13px;
  margin: 5px 10px;
  transition: color .2s;
}
.footer-nav a:hover { color: #fff; }

.footer-bottom {
  padding: 14px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* Back to top */
#back-to-top {
  position: fixed;
  bottom: 25px; right: 25px;
  background: var(--primary);
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  z-index: 9999;
  border: none;
  box-shadow: 0 3px 12px rgba(229,57,53,0.4);
}
#back-to-top.visible { opacity: 1; }
#back-to-top:hover { transform: translateY(-3px); }

/* ===== SINGLE POST ===== */
.single-post-header { margin-bottom: 20px; }
.single-post-header h1 {
  font-size: 26px;
  line-height: 1.3;
  margin: 10px 0;
}
.single-post-featured img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
}
.single-post-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  font-size: 15px;
  line-height: 1.8;
}
.single-post-content p { margin-bottom: 16px; }
.single-post-content h2 { font-size: 20px; margin: 20px 0 10px; }
.single-post-content img { margin: 16px auto; border-radius: 4px; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 25px 0;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  transition: all .2s;
}
.pagination .current, .pagination a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Hide mobile side menu on desktop */
.side-menu { display: none; }

/* ===== RESPONSIVE ===== */
.menu-close-wrap { display: none !important; }

@media (max-width: 991px) {
  .content-wrapper { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  /* Side Menu Mobile */
  /* Mobile Horizontal Scroll Menu */
  .nav-inner {
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
  }
  #primary-menu {
    display: flex !important;
    position: static;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    scrollbar-width: none;
    background: transparent !important;
    box-shadow: none;
    padding: 0;
    margin: 0;
    flex: 1;
  }
  #primary-menu::-webkit-scrollbar { display: none; }
  
  #primary-menu > li { flex-shrink: 0; }
  #primary-menu > li > a {
    padding: 12px 14px;
    font-size: 13px;
    border: none !important;
  }
  #primary-menu li ul { display: none !important; } /* Hide dropdowns on horizontal menu */

  /* Side Menu Mobile (Off-canvas) */
  .side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #ffffff !important;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 15px rgba(0,0,0,0.5);
    padding: 0;
    margin: 0;
    list-style: none;
  }
  body.dark-mode .side-menu { background: #1e1e1e !important; }
  
  .side-menu.active { left: 0; }
  
  .side-menu > li > a {
    display: block;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding: 15px 20px;
  }
  body.dark-mode .side-menu > li > a { color: #e0e0e0; border-color: #333; }
  
  .side-menu > li > a:hover {
    background: rgba(0,0,0,0.05);
    color: var(--primary);
  }
  
  /* Submenu on mobile (make it static instead of absolute popup) */
  .side-menu li ul {
    position: static;
    display: none;
    box-shadow: none;
    background: rgba(0,0,0,0.03);
    min-width: 100%;
  }
  .side-menu li:hover > ul { display: block; }
  .side-menu li ul li a { color: var(--text); padding-left: 30px; display: block; padding-top: 10px; padding-bottom: 10px; }
  body.dark-mode .side-menu li ul li a { color: #ccc; }
  
  .menu-close-wrap { display: block !important; padding: 0 !important; border: none !important; }
  .menu-close-btn {
    background: var(--primary-dark);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 700;
    padding: 15px 20px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-transform: uppercase;
  }
  
  .menu-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 998; /* Must be below #main-nav (999) to avoid blocking clicks */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  
  /* Top Bar Mobile */
  .top-search-form { display: none; }
  .breaking-label { font-size: 10px; padding: 2px 6px; }
  .breaking-ticker marquee { font-size: 12px; }

  /* Banner Mobile */
  .header-banner-placeholder { height: 60px; font-size: 11px; }

  /* Header Fixes */
  .header-inner { flex-direction: column; text-align: center; gap: 12px; }
  .site-logo img { height: 60px; max-width: 90%; margin: 0 auto; object-fit: contain; }
  .top-bar-right .index-link { display: none; }

  /* Hero Mobile */
  .hero-main { height: 220px; }
  .hero-overlay { padding: 20px 15px 15px; }
  .hero-overlay h2 { font-size: 16px; margin-bottom: 6px; line-height: 1.35; }
  .swiper-button-prev, .swiper-button-next { transform: scale(0.5); }
  .hero-overlay .post-meta { font-size: 11px; gap: 10px; }

  /* Cards Mobile */
  .post-card { gap: 12px; padding: 10px; align-items: center; }
  .post-card-thumb { width: 100px; height: 75px; }
  .post-card-body h3 { font-size: 13px; margin-bottom: 4px; line-height: 1.4; }
  .post-excerpt { display: none; } /* Hide excerpt on mobile to keep cards compact */
  
  /* Sidebar Widgets */
  .widget-title { font-size: 13px; padding: 8px 12px; }
  
  /* Single Post */
  .single-post-header h1 { font-size: 20px; }
  .single-post-content { padding: 15px; font-size: 16px; line-height: 1.8; }
  
  /* Footer Mobile */
  .footer-top { flex-direction: column; text-align: center; }
  .footer-social { justify-content: center; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp .4s ease forwards; }

/* ===== DARK MODE ===== */
body.dark-mode #site-header { background: #1e1e1e; border-color: #333; }
body.dark-mode #header-banner-bar { background: #1a1a1a; border-color: #b71c1c; }
body.dark-mode #header-banner-bar .header-banner-inner img { background: #1a1a1a; }
body.dark-mode #main-nav { background: #b71c1c; }
body.dark-mode #secondary-tags { background: #252525; border-color: #333; }
body.dark-mode .post-card,
body.dark-mode .widget,
body.dark-mode .single-post-content {
  background: #1e1e1e;
  border-color: #333;
}
body.dark-mode .tags-list a { background: #2a2a2a; border-color: #444; }

/* Responsive adjustments */
.single-post-featured {
  width: 100%;
  overflow: hidden;
}
.single-post-featured img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}

/* ===== DEFAULT & BLOCK WIDGETS FIX ===== */
.widget h2,
.widget h3,
.widget .wp-block-heading {
  background: var(--primary);
  color: #fff;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 14px 0;
}

.widget h2:last-child,
.widget h3:last-child,
.widget .wp-block-heading:last-child {
  margin-bottom: 0;
}

/* Base padding for widgets */
.widget_block .wp-block-group,
.widget_block > ul,
.widget_block > div:not(.wp-block-heading),
.widget_block > p,
.widget > ul,
.widget > div:not(.widget-title):not(.widget-body),
.widget > p,
.widget_search form {
  padding: 0 14px 14px 14px;
}

.widget > ul:first-child,
.widget > div:not(.widget-title):not(.widget-body):first-child,
.widget > p:first-child,
.widget_search form:first-child {
  padding-top: 14px;
}

.widget ul {
  list-style: none;
  margin: 0;
}
.widget ul li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
  line-height: 1.4;
}
.widget ul li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.widget ul li:first-child {
  padding-top: 0;
}
.widget ul li a {
  color: var(--text);
  display: block;
}
.widget ul li a:hover {
  color: var(--primary);
}
.widget ul li .post-date,
.widget ul li .rss-date,
.widget ul li .wp-block-latest-comments__comment-date {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Search Widget Styling */
.widget_search form, .widget .wp-block-search {
  display: flex;
}
.widget_search input[type="text"], .widget_search input[type="search"], .widget .wp-block-search__input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px 0 0 4px;
  outline: none;
  font-size: 13px;
  background: var(--bg);
}
.widget_search button, .widget_search input[type="submit"], .widget .wp-block-search__button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 15px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-weight: bold;
  font-size: 13px;
}
.widget_search button:hover, .widget_search input[type="submit"]:hover, .widget .wp-block-search__button:hover {
  background: var(--primary-dark);
}
