/* ===========================
   RESPONSIVE.CSS - COSCO THEME
   =========================== */

.mobile-menu-toggle {
  display: none;
}
@media (max-width: 1399px) {
  .container {
    max-width: 1140px !important;
  }
}

@media (max-width: 1199px) {
  .container {
    max-width: 960px !important;
  }
}
@media (max-width: 991px) {
  .container {
    max-width: 720px !important;
  }
}
/* ===========================
   TABLET: 769px - 1024px
   =========================== */

@media (min-width: 769px) and (max-width: 1024px) {
  .site-header {
    padding: 0;
  }

  .site-slogan {
    font-size: 18px;
  }

  .header-color-bar {
    margin: 0 15px;
    margin-bottom: 8px;
  }

  /* Giảm padding để có nhiều không gian hơn */
  .header-content {
    padding: 15px 30px;
    gap: 10px;
  }

  /* Thu nhỏ logo */
  .site-branding {
    padding-right: 20px;
  }

  .site-branding img,
  .site-branding .custom-logo {
    max-height: 50px;
  }

  .site-title {
    font-size: 18px;
  }

  /* Giảm khoảng cách menu */
  .menutop {
    padding-bottom: 5px;
  }

  .menubottom {
    padding-top: 5px;
  }

  /* Giảm gap giữa các menu item */
  .main-navigation ul {
    gap: 20px;
  }

  /* Giảm font size menu */
  .main-navigation a {
    font-size: 13px;
  }

  /* Thu nhỏ search form */
  .search-form-wrapper.active .search-form {
    width: 220px;
  }

  .search-toggle {
    font-size: 13px;
    padding: 5px 0;
  }

  /* ===========================
     SECTION 1: HERO SLIDER
     =========================== */
  .hero-swiper {
    height: 500px;
  }

  .swiper-slide {
    height: 500px;
  }

  .swiper-button-prev,
  .swiper-button-next {
    width: 45px;
    height: 45px;
  }

  .swiper-button-prev::after,
  .swiper-button-next::after {
    font-size: 18px;
  }

  /* News Grid */
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  /* Featured News */
  .featured-news-content {
    padding: 30px;
  }

  .featured-news-title {
    font-size: 26px;
  }

  /* Single News */
  .single-news-layout {
    grid-template-columns: 1fr 300px;
    gap: 30px;
  }
  .article-title {
    font-size: 28px;
  }
}

/* ===========================
   TABLET NHỎ: 600px - 768px
   =========================== */
@media (min-width: 600px) and (max-width: 768px) {
  .container {
    max-width: 540px !important;
  }
  .site-slogan {
    display: none;
  }
  .site-header {
    padding: 0;
  }

  .header-content {
    padding: 18px 20px;
  }

  .site-branding {
    padding-right: 25px;
  }

  .site-branding img,
  .site-branding .custom-logo {
    max-height: 48px;
  }

  .site-title {
    font-size: 19px;
  }

  .menutop {
    padding-bottom: 8px;
  }

  .menubottom {
    padding-top: 8px;
  }

  .main-navigation ul {
    gap: 18px;
  }

  .main-navigation a {
    font-size: 13.5px;
  }

  .search-form-wrapper.active .search-form {
    width: 220px;
  }
  /* ===========================
   SECTION 1: HERO SLIDER
   =========================== */
  .hero-swiper {
    height: 450px;
  }

  .swiper-slide {
    height: 450px;
  }

  .swiper-button-prev,
  .swiper-button-next {
    width: 42px;
    height: 42px;
  }

  .swiper-button-prev::after,
  .swiper-button-next::after {
    font-size: 17px;
  }
  .news-section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .news-thumbnail {
    height: 180px;
  }

  .news-title {
    font-size: 15px;
  }
}

/* ===========================
   MOBILE: ≤ 768px
   =========================== */
@media (max-width: 768px) {
  .container {
    max-width: 100% !important;
    padding-left: 20px;
    padding-right: 20px;
  }
  .site-slogan {
    display: none;
  }
  /* Mobile Toggle Button */
  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
  }

  .mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: #333;
    transition: all 0.3s;
    display: block;
  }

  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  /* Header Layout */
  .site-header {
    padding: 0px;
  }

  .header-content {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto;
    padding: 15px 20px 10px 20px;
    align-items: center;
  }

  .header-color-bar {
    height: 10px;
    margin: 0;
    margin-bottom: 0;
  }

  /* Logo */
  .site-branding {
    grid-column: 1;
    grid-row: 1;
    padding-right: 0;
  }

  .site-branding img,
  .site-branding .custom-logo {
    max-height: 42px;
    display: block;
  }

  .site-title {
    font-size: 18px;
  }

  /* Menu Top */
  .menutop {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
    gap: 15px;
    display: flex;
    align-items: center;
  }

  /* Search */
  .header-search {
    display: flex;
    align-items: center;
  }

  .search-toggle {
    display: flex;
    align-items: center;
  }

  .search-text {
    display: none;
  }

  .search-form-wrapper {
    position: fixed;
    top: 72px;
    left: 15px;
    right: 15px;
    transform: none;
  }

  .search-form-wrapper.active .search-form {
    width: 100%;
  }

  /* Menu Bottom */
  .menubottom {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 0;
    justify-content: flex-start;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
  }

  .menubottom.active {
    max-height: 500px;
    padding-top: 15px;
    border-top: 1px solid #eee;
  }

  /* Navigation */
  .main-navigation {
    width: 100%;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
  }

  .main-navigation li {
    width: 100%;
    border-bottom: 1px solid #f5f5f5;
  }

  .main-navigation li:last-child {
    border-bottom: none;
  }

  .main-navigation a {
    padding: 13px 0;
    display: block;
    font-size: 15px;
  }

  /* Sub Menu */
  .main-navigation ul ul {
    position: static;
    box-shadow: none;
    border-radius: 0;
    background: #f9f9f9;
    padding: 0;
    margin-top: 5px;
    display: none;
  }

  .main-navigation li:hover > ul {
    display: none;
  }

  .main-navigation li.menu-item-has-children > a::after {
    content: " ▼";
    font-size: 10px;
    margin-left: 5px;
  }

  .main-navigation li.menu-item-has-children.open > a::after {
    content: " ▲";
  }

  .main-navigation li.menu-item-has-children.open > ul {
    display: block;
  }

  .main-navigation ul ul a {
    padding: 11px 0 11px 20px;
    font-size: 14px;
  }
  /* ===========================
   SECTION 1: HERO SLIDER
   =========================== */
  .hero-swiper {
    height: 400px;
  }

  .swiper-slide {
    height: 400px;
  }

  .swiper-button-prev,
  .swiper-button-next {
    width: 40px;
    height: 40px;
  }

  .swiper-button-prev::after,
  .swiper-button-next::after {
    font-size: 16px;
  }

  .swiper-pagination {
    bottom: 20px !important;
  }
  .banner-background {
    height: 180px;
  }

  .banner-tabs {
    flex-direction: column;
  }

  .tab-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
  }

  .tab-item.active {
    border-bottom: 3px solid #fff;
  }

  .featured-news-link {
    flex-direction: column;
  }

  .featured-news-image {
    flex: 0 0 auto;
    height: 250px;
  }

  .featured-news-content {
    padding: 25px;
  }

  .featured-news-title {
    font-size: 24px;
  }
  .scroll-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
  }

  .featured-news-link {
    flex-direction: column;
  }

  .featured-news-image {
    flex: 0 0 auto;
    min-height: 250px;
  }

  .featured-news-content {
    max-height: none;
    padding: 20px;
  }

  .featured-news-title {
    font-size: 24px;
  }

  .featured-news-excerpt {
    -webkit-line-clamp: 3;
  }
  .news-category-banner .banner-name {
    font-size: 28px;
    left: 30px;
    top: calc(50% - 30px);
  }

  .news-category-banner .banners-item img {
    width: 100%;
  }

  .news-category-banner .tab-item {
    padding: 12px 20px;
    font-size: 13px;
  }
  .news-sidebar-slider {
    max-width: 100%;
    height: 400px;
  }

  .my-featured-news {
    max-width: 100%;
    height: 400px;
  }

  .news-sidebar-thumbnail {
    width: 70px;
    height: 70px;
  }

  .news-sidebar-title {
    font-size: 13px;
  }

  .news-sidebar-date {
    font-size: 11px;
  }
  /* Chuyển layout từ 2 cột thành 1 cột */
  .single-news-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* Bỏ sticky cho sidebar trên mobile */
  .news-sidebar {
    position: static;
    margin-top: 30px;
  }

  /* Giảm padding cho nội dung bài viết */
  .news-main-content {
    padding: 20px;
  }

  /* Giảm font size tiêu đề */
  .article-title {
    font-size: 24px;
  }

  /* Điều chỉnh thumbnail sidebar */
  .sidebar-news-thumb {
    width: 80px;
    height: 60px;
  }

  .sidebar-news-title {
    font-size: 14px;
  }

  /* Điều chỉnh breadcrumb */
  .breadcrumb {
    font-size: 13px;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ===========================
   MOBILE NHỎ: ≤ 480px
   =========================== */
@media (max-width: 480px) {
  .header-content {
    padding: 12px 15px 10px 15px;
  }

  .site-slogan {
    display: none;
  }

  .header-color-bar {
    height: 8px;
  }

  .site-branding img,
  .site-branding .custom-logo {
    max-height: 36px;
  }

  .site-title {
    font-size: 16px;
  }

  .menutop {
    gap: 12px;
  }

  .mobile-menu-toggle {
    padding: 6px;
  }

  .mobile-menu-toggle span {
    width: 22px;
  }

  .main-navigation a {
    padding: 12px 0;
    font-size: 14px;
  }

  .search-form-wrapper {
    top: 62px;
    left: 12px;
    right: 12px;
  }
  /* ===========================
   SECTION 1: HERO SLIDER
   =========================== */
  .hero-swiper {
    height: 300px;
  }

  .swiper-slide {
    height: 300px;
  }

  .swiper-button-prev,
  .swiper-button-next {
    width: 35px;
    height: 35px;
  }

  .swiper-button-prev::after,
  .swiper-button-next::after {
    font-size: 14px;
  }

  .swiper-pagination {
    bottom: 15px !important;
  }

  .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
  }

  .swiper-pagination-bullet-active {
    width: 20px;
  }
  .news-section {
    padding: 30px 0;
  }

  .section-title {
    font-size: 20px;
    margin-bottom: 25px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .news-thumbnail {
    height: 200px;
  }
  .news-sidebar-slider {
    height: 350px;
  }

  .my-featured-news {
    height: 350px;
  }

  .news-sidebar-item {
    padding: 12px;
  }

  .news-sidebar-thumbnail {
    width: 60px;
    height: 60px;
  }

  /* Giảm padding thêm cho màn hình nhỏ hơn */
  .news-main-content {
    padding: 15px;
  }

  .news-sidebar {
    padding: 15px;
  }

  .article-title {
    font-size: 20px;
  }

  .article-content {
    font-size: 15px;
  }
}

/* ===========================
   LANDSCAPE MOBILE
   =========================== */
@media (max-width: 768px) and (max-height: 500px) and (orientation: landscape) {
  .menubottom.active {
    max-height: 300px;
    overflow-y: auto;
  }
}
