/* ============================================================
   XEBERHUB — Ana CSS
   ============================================================ */

:root {
  --primary: #c0392b;
  --primary-dark: #a93226;
  --dark: #1a1a2e;
  --text: #2d2d2d;
  --text-muted: #6c757d;
  --border: #e8e8e8;
  --bg-light: #f7f7f8;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 10px;
}

* { box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Arial, sans-serif; color: var(--text); background: #fff; font-size: 15px; line-height: 1.6; }
a { text-decoration: none; color: inherit; transition: color .2s; }
a:hover { color: var(--primary); }
img { max-width: 100%; }

/* ---- BREAKING BAR ---- */
.breaking-bar { background: var(--primary); color: #fff; padding: 7px 0; overflow: hidden; }
.breaking-label { background: rgba(0,0,0,0.2); padding: 3px 12px; border-radius: 4px; font-size: 12px; font-weight: 700; white-space: nowrap; flex-shrink: 0; margin-right: 12px; letter-spacing: 1px; }
.breaking-ticker { overflow: hidden; flex: 1; }
.ticker-content { display: flex; gap: 24px; animation: ticker 40s linear infinite; white-space: nowrap; }
.ticker-content a { color: #fff; font-size: 13px; }
.ticker-content a:hover { text-decoration: underline; }
.ticker-sep { opacity: 0.4; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- HEADER ---- */
.site-header { background: #fff; border-bottom: 1px solid var(--border); }
.header-top { font-size: 13px; }
.header-social a { color: var(--text-muted); font-size: 16px; }
.header-social a:hover { color: var(--primary); }
.logo-area { padding: 12px 0; border-bottom: 1px solid var(--border); }
.site-logo { display: inline-block; }
.logo-text { font-size: 2.2rem; font-weight: 900; line-height: 1; }
.logo-best { color: var(--primary); }
.logo-xeber { color: var(--dark); }
.logo-text:hover .logo-best, .logo-text:hover .logo-xeber { opacity: 0.85; }

/* Weather & Currency mini */
.weather-mini { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.currency-mini { font-size: 12px; }
.currency-item { display: flex; gap: 4px; align-items: center; }
.currency-item .rate { font-weight: 600; }
.currency-item .change.up { color: #27ae60; }
.currency-item .change.down { color: var(--primary); }

/* ---- NAVBAR ---- */
.main-nav { background: var(--dark); }
.main-nav .nav-link { color: rgba(255,255,255,0.85) !important; font-size: 14px; font-weight: 500; padding: 12px 14px !important; transition: color .2s, background .2s; }
.main-nav .nav-link:hover, .main-nav .nav-link.active { color: #fff !important; background: rgba(255,255,255,0.08); border-radius: 4px; }
.main-nav .form-control { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff; border-radius: 6px 0 0 6px; font-size: 13px; }
.main-nav .form-control::placeholder { color: rgba(255,255,255,0.5); }
.main-nav .form-control:focus { background: rgba(255,255,255,0.15); box-shadow: none; color: #fff; }

/* ---- HERO SLIDER ---- */
.hero-section { background: var(--bg-light); padding: 16px 0; }
.hero-slider { border-radius: var(--radius); overflow: hidden; }
.hero-img { width: 100%; height: 420px; object-fit: cover; }
.carousel-caption { background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%); bottom: 0; left: 0; right: 0; text-align: left; padding: 24px 20px 20px; }
.hero-title { font-size: 1.3rem; font-weight: 700; margin: 8px 0 4px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.5); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { font-size: 12px; color: rgba(255,255,255,0.75); margin: 0; }
.badge-cat { font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 4px; }
.badge-cat-sm { font-size: 10px; padding: 2px 6px; border-radius: 3px; }

/* Sidebar news */
.sidebar-news-list { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.sidebar-news-item a { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); align-items: flex-start; transition: background .15s; }
.sidebar-news-item a:hover { background: var(--bg-light); }
.sidebar-news-item img { width: 70px; height: 50px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.sidebar-news-item p { font-size: 13px; font-weight: 500; margin: 4px 0 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sidebar-news-item small { font-size: 11px; color: var(--text-muted); }

/* ---- SECTION HEADERS ---- */
.section-header { display: flex; justify-content: space-between; align-items: center; }
.section-header span { font-size: 17px; font-weight: 700; border-left: 4px solid var(--primary); padding-left: 10px; color: var(--dark); }
.see-all { font-size: 13px; color: var(--primary); font-weight: 500; }
.see-all:hover { color: var(--primary-dark); }

/* ---- NEWS CARDS ---- */
.news-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; height: 100%; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.news-card-img-link { position: relative; display: block; }
.news-card-img { width: 100%; height: 190px; object-fit: cover; display: block; }
.news-card-img-link .badge-cat { position: absolute; top: 10px; left: 10px; }
.news-card-body { padding: 14px; }
.news-card-title { font-size: 14px; font-weight: 600; margin: 0 0 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-title a:hover { color: var(--primary); }
.news-card-summary { font-size: 12px; color: var(--text-muted); margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; }
.news-card-large { position: relative; border-radius: var(--radius); overflow: hidden; height: 280px; }
.news-card-large img { width: 100%; height: 100%; object-fit: cover; }
.news-card-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.85), transparent); padding: 20px 16px 16px; color: #fff; }
.news-card-overlay h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.list-news-item { display: flex; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.list-news-item img { width: 80px; height: 56px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.list-news-item a { font-size: 13px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-news-item small { color: var(--text-muted); font-size: 11px; }

/* ---- POPULAR ---- */
.popular-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.popular-num { font-size: 22px; font-weight: 900; color: var(--border); flex-shrink: 0; line-height: 1; }
.popular-item a { font-size: 13px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- SIDEBAR WIDGET ---- */
.sidebar-widget { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }

/* ---- WEATHER WIDGET ---- */
.weather-widget .weather-main { display: flex; align-items: center; gap: 10px; }
.weather-temp { font-size: 2rem; font-weight: 700; color: var(--dark); }
.weather-city { font-size: 14px; font-weight: 600; }
.weather-desc { font-size: 13px; color: var(--text-muted); }

/* ---- CURRENCY WIDGET ---- */
.currency-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.currency-flag { display: flex; align-items: center; gap: 6px; }
.currency-rate { font-weight: 600; }
.currency-change.up { color: #27ae60; }
.currency-change.down { color: var(--primary); }

/* ---- VIDEO CARDS ---- */
.video-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s; }
.video-card:hover { transform: translateY(-3px); }
.video-thumb { position: relative; }
.video-thumb img { width: 100%; height: 160px; object-fit: cover; display: block; }
.play-btn, .play-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 48px; height: 48px; background: rgba(192,57,43,0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; transition: background .2s, transform .2s; }
.video-card:hover .play-btn, .play-overlay:hover { background: var(--primary); transform: translate(-50%,-50%) scale(1.1); }
.play-overlay { display: flex; }
.video-info { padding: 10px 12px; }
.video-info a { font-size: 13px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- NEWS DETAIL ---- */
.news-detail-title { font-size: 1.75rem; font-weight: 700; line-height: 1.3; color: var(--dark); margin-bottom: 12px; }
.news-detail-meta { font-size: 13px; color: var(--text-muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 10px 0; }
.news-detail-img { margin: 0; }
.news-summary { background: var(--bg-light); border-left: 4px solid var(--primary); padding: 14px 16px; font-size: 15px; font-weight: 500; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 20px; }
.news-content { font-size: 16px; line-height: 1.8; }
.news-content img { border-radius: var(--radius); }
.news-content p { margin-bottom: 1rem; }
.news-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-link { background: var(--bg-light); color: var(--text-muted); padding: 4px 12px; border-radius: 20px; font-size: 13px; border: 1px solid var(--border); }
.tag-link:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.share-btns { display: flex; gap: 6px; }
.share-btn { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff !important; transition: transform .15s; }
.share-btn:hover { transform: scale(1.15); }
.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #000; }
.share-btn.telegram { background: #0088cc; }
.share-btn.whatsapp { background: #25d366; }
.news-card-mini { display: flex; gap: 10px; background: #fff; padding: 10px; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.news-card-mini img { width: 80px; height: 56px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.news-card-mini a { font-size: 13px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- FOOTER ---- */
.site-footer-main { background: var(--dark); color: rgba(255,255,255,0.8); margin-top: 40px; }
.footer-heading { color: rgba(255,255,255,0.4); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; margin-bottom: 12px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 13px; }
.footer-links a:hover { color: #fff; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { color: rgba(255,255,255,0.7); font-size: 18px; }
.footer-social a:hover { color: #fff; }
.footer-currency { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-weather { display: flex; align-items: center; gap: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); }
.app-badge img { height: 36px; border-radius: 6px; }
.footer-banner-area { background: var(--bg-light); }

/* ---- AD BLOCKS ---- */
.ad-block { text-align: center; }
.ad-block img { border-radius: 6px; max-width: 100%; }

/* ---- PAGINATION ---- */
.page-link { color: var(--primary); border-radius: 6px !important; }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); }
.page-link:hover { color: var(--primary-dark); }

/* ---- SCROLL TOP ---- */
.scroll-top-btn { position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); border: none; color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all .3s; cursor: pointer; z-index: 999; box-shadow: 0 4px 12px rgba(192,57,43,0.3); }
.scroll-top-btn.visible { opacity: 1; visibility: visible; }
.scroll-top-btn:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ---- LIVE SEARCH ---- */
.live-search-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); z-index: 9999; overflow: hidden; border: 1px solid var(--border); }
.search-result-item { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.search-result-item:last-child { border: none; }
.search-result-item:hover { background: var(--bg-light); }
.search-result-item img { width: 55px; height: 40px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.search-result-item strong { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.search-result-item small { font-size: 11px; color: var(--text-muted); }

/* ---- ERROR PAGE ---- */
.error-page { padding: 60px 20px; }

/* ---- PAGE CONTENT ---- */
.page-content { font-size: 16px; line-height: 1.8; }
.page-content h2, .page-content h3 { color: var(--dark); margin-top: 24px; }

/* ---- WEATHER CARD ---- */
.weather-card-main { background: linear-gradient(135deg, #1a1a2e, #0f3460); color: #fff; border-radius: var(--radius); }
.weather-card-main .weather-temp { color: #fff; }
.weather-card-main .weather-city { color: rgba(255,255,255,0.8); }
.weather-card-main .weather-desc { color: rgba(255,255,255,0.7); }
.weather-card-main small { color: rgba(255,255,255,0.5); }

/* ---- MAIN CONTENT SPACING ---- */
.main-content { min-height: 60vh; }
.latest-section { background: #fff; }
.category-section { background: #fff; border-top: 1px solid var(--border); }

/* ---- BREADCRUMB ---- */
.breadcrumb { font-size: 13px; }
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-muted); }

/* ---- CONTACT ---- */
.contact-info p { font-size: 15px; }
.contact-info i { width: 24px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 767px) {
  .hero-img { height: 240px; }
  .hero-title { font-size: 1rem; }
  .news-detail-title { font-size: 1.3rem; }
  .logo-text { font-size: 1.5rem; }
  .main-nav .nav-link { font-size: 13px; padding: 8px 10px !important; }
  .currency-mini { display: none !important; }
  .news-card-img { height: 160px; }
  .ticker-content { animation-duration: 25s; }
}

@media (max-width: 575px) {
  .section-header span { font-size: 15px; }
  .news-detail-meta .share-btns { display: none; }
}
