/*
Theme Name: Tinh Anh
Theme URI: https://tinhanh.vn
Author: Antigravity Team
Description: Theme Báo chí Tinh Anh dành cho WordPress - Giao diện chuẩn tin tức 24/7, tối ưu SEO, hỗ trợ tùy biến danh mục động trang chủ, quảng cáo độc lập/dùng chung, footer linh hoạt.
Version: 1.0.0
Text Domain: tinhanh
*/

/* Custom CSS Styles */
body {
  font-family: 'Inter', sans-serif;
  background-color: #f4f6f8;
  color: #212529;
  -webkit-font-smoothing: antialiased;
}

/* Hide Scrollbar for category & tag horizontal scrolling */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Custom Logo Image Constraints */
.custom-logo,
.custom-logo-link img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

/* 2-Level Dropdown Styling (Desktop) */
.tinhanh-nav-menu li {
  position: relative;
}
.tinhanh-nav-menu .menu-item-has-children:hover > .sub-menu,
.tinhanh-nav-menu .group:hover > .sub-menu,
.tinhanh-nav-menu li:hover > .sub-menu {
  display: block !important;
  animation: tinhanhFadeIn 0.18s ease-out;
}
.tinhanh-nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  min-width: 220px;
  background-color: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.2), 0 8px 15px -6px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 0.5rem 0.5rem;
  border: 1px solid #e5e7eb;
  padding: 0.5rem 0;
  z-index: 9999;
}
.tinhanh-nav-menu .sub-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  width: 100%;
  height: 8px;
  background: transparent;
}
.tinhanh-nav-menu .sub-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  transition: all 0.15s ease;
  border-bottom: 1px solid #f9fafb;
}
.tinhanh-nav-menu .sub-menu a:hover {
  background-color: #e6f0fa;
  color: #0959AB;
}

@keyframes tinhanhFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Line Clamp Utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* Smooth Image Zoom on Hover */
.zoom-img {
  transition: transform 0.35s ease;
}
.group:hover .zoom-img {
  transform: scale(1.04);
}

/* Article Typography & Media Bounds (Prevent Sidebar Overflow) */
.article-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.article-content p {
  margin-bottom: 1.25rem;
  line-height: 1.85;
  color: #2b2b2b;
}

.article-content img,
.article-content figure,
.article-content figure img,
.article-content iframe,
.article-content video,
.article-content embed,
.article-content object,
.article-content table,
.article-content .wp-block-image,
.article-content .wp-block-embed {
  max-width: 100% !important;
  height: auto !important;
  box-sizing: border-box;
}

.article-content figure {
  margin: 1.5rem auto !important;
  display: block;
  clear: both;
}

.article-content figure img,
.article-content p img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 6px;
}

.article-content figcaption {
  text-align: center;
  font-size: 0.8125rem;
  color: #6b7280;
  font-style: italic;
  margin-top: 0.5rem;
  line-height: 1.4;
}

.article-content img.aligncenter {
  display: block;
  margin: 1.25rem auto;
}

.article-content img.alignleft {
  float: left;
  margin: 0.5rem 1.25rem 1rem 0;
  max-width: 50% !important;
}

.article-content img.alignright {
  float: right;
  margin: 0.5rem 0 1rem 1.25rem;
  max-width: 50% !important;
}

@media (max-width: 640px) {
  .article-content img.alignleft,
  .article-content img.alignright {
    float: none;
    display: block;
    margin: 1rem auto;
    max-width: 100% !important;
  }
}

.article-content table {
  width: 100% !important;
  border-collapse: collapse;
  margin: 1.25rem 0;
}

.article-content th,
.article-content td {
  border: 1px solid #e5e7eb;
  padding: 8px 12px;
}

.article-content blockquote {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  border-left-width: 4px;
  border-color: #f59e0b;
  background-color: rgba(254, 243, 199, 0.6);
  padding: 1rem;
  border-top-right-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
  font-style: italic;
  color: #374151;
}

/* Custom Scrollbar for Weather City List */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ============================================== */
/* WORDPRESS PAGINATION STYLING (.page-numbers) */
/* ============================================== */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.navigation.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.navigation.pagination .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  line-height: 1;
  user-select: none;
}

.page-numbers:hover:not(.current):not(.dots) {
  background-color: #0959AB;
  color: #ffffff;
  border-color: #0959AB;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(9, 89, 171, 0.2);
}

.page-numbers.current {
  background-color: #0959AB;
  color: #ffffff;
  font-weight: 700;
  border-color: #0959AB;
  box-shadow: 0 4px 12px rgba(9, 89, 171, 0.3);
}

.page-numbers.dots {
  background-color: transparent;
  border-color: transparent;
  min-width: 24px;
  padding: 0 4px;
  color: #94a3b8;
  font-weight: 700;
  cursor: default;
}

.page-numbers.prev,
.page-numbers.next {
  padding: 0 16px;
  font-weight: 700;
  gap: 6px;
}

/* ============================================== */
/* AUDIO PLAYER STYLES & EQUALIZER ANIMATION      */
/* ============================================== */
@keyframes tinhanhEq {
  0%, 100% {
    height: 3px;
  }
  50% {
    height: 14px;
  }
}
.tinhanh-eq-bar {
  display: inline-block;
  width: 2px;
  background-color: #0959AB;
  border-radius: 2px;
  animation: tinhanhEq 0.9s ease-in-out infinite;
}
.tinhanh-eq-bar:nth-child(1) { animation-delay: 0.1s; }
.tinhanh-eq-bar:nth-child(2) { animation-delay: 0.35s; }
.tinhanh-eq-bar:nth-child(3) { animation-delay: 0.15s; }
.tinhanh-eq-bar:nth-child(4) { animation-delay: 0.45s; }

/* Custom Range Slider Thumb for Audio Scrubber */
.tinhanh-audio-range {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  width: 100%;
}
.tinhanh-audio-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0959AB;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.15s ease;
}
.tinhanh-audio-range:hover::-webkit-slider-thumb {
  transform: scale(1.25);
}
.tinhanh-audio-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0959AB;
  cursor: pointer;
  border: none;
}



