/* ==== Reset cơ bản ==== */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}
a:hover,a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  height: auto;
}

/* ==== Layout Wrapper ==== */
#wrapper {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1; /* đẩy footer xuống đáy */
}

/* ==== Footer ==== */
.site-footer {
  text-align: center;
  padding: 20px 0;
  background: #f5f5f5;
}

/* Footer menu */
#footer-menu,
#footer-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}
#footer-menu li a {
  text-decoration: none;
  color: #666;
  font-size: 14px;
  transition: color 0.3s ease;
}
#footer-menu li a:hover {
  color: #0073aa;
}
#footer-menu li.current-menu-item > a {
  font-weight: 500;
  color: #111;
}

/* ==== Header Styles ==== */
.site-header {
  border-bottom: 1px solid #eee;
  padding: 10px 0;
  transition: all 0.3s ease;
}

/* Option: Default */
.header-default {
  background: #fff;
  position: relative;
}

/* Option: Full width */
.header-full {
  width: 100%;
  background: #fff;
  position: relative;
}

/* Option: Transparent */
.header-transparent {
  background: transparent;
  position: absolute;
  top: 0;
  width: 100%;
  color: #fff;
  border: none;
}
.header-transparent .main-navigation a,
.header-transparent .site-title {
  color: #fff;
}
.header-transparent .main-navigation a:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* CSS cho hiệu ứng chuyển màu header khi cuộn */

a.custom-logo-link {
    display: flex;
    align-items: center;
}

.header-sticky {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1000;
    
    /* Thêm transition cho hiệu ứng mượt mà */
    transition: all 0.3s ease-in-out;
}

.header-sticky.show {
    padding: 0;
    background: #6200ea;
    
    /* Tùy chọn: Thêm shadow để nổi bật hơn */
    box-shadow: 0 2px 10px rgba(98, 0, 234, 0.2);
}

/* Tùy chọn: Thay đổi màu chữ khi header đổi màu */
.show .menu-item a{
    color: #fff;
    transition: color 0.3s ease-in-out;
}
.show .menu-item a:hover{
    background: #555;
}

/* Tùy chọn: Logo cũng chuyển màu (nếu có) */
.show .site-logo svg,
.show .site-logo path {
    fill: #fff;
    transition: fill 0.3s ease-in-out;
}

/* ==== Header Inner ==== */
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin:0 auto;
  max-width:1200px;
}
.branding {
  display: flex;
  flex-direction: column;
}
img.custom-logo {
  max-width: 50px;
  height: auto;
}
.site-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #222;
  margin: 0;
}
.site-description {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

/* ==== Main Navigation (Desktop) ==== */
.main-navigation {
  display: flex;
  gap: 20px;
}
.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-navigation li {
  position: relative;
}
.main-navigation a {
  color: #333;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.main-navigation a:hover,
.main-navigation .current-menu-item a {
    background: #6200ea;
    color: #fff;
}

/* Submenu */
.main-navigation ul ul {
  position: absolute;
  left: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #eee;
  padding: 10px 0;
  display: none;
  z-index: 9999;
}
.main-navigation ul li:hover > ul {
  display: block;
}
.main-navigation ul ul li {
  width: 200px;
}
.main-navigation ul ul a {
  display: block;
  padding: 8px 12px;
  color: #333;
}
.main-navigation ul ul a:hover {
    background: #6200ea;
    color: #fff;
}

/* ==== Header CTA ==== */
.header-cta .btn-cta {
  background: #0073aa;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: bold;
  transition: background 0.2s ease;
}
.header-cta .btn-cta:hover {
  background: #005f87;
}

/* ==== Mobile Menu Overlay ==== */
.menu-toggle {
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  display: none; /* ẩn trên desktop */
}
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #fff;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
.menu-overlay.active {
  display: flex;
}
.menu-overlay ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
.menu-overlay li {
  margin: 15px 0;
}
.menu-overlay a {
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
}
.menu-close {
  position: absolute;
  top: 50px;
  right: 20px;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
}

/* ==== Responsive ==== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block; /* hiện icon ☰ */
  }
  .main-navigation > ul {
    display: none;
  }
}
@media (min-width: 769px) {
  .main-navigation > ul {
    display: flex !important;
    gap: 5px;
  }
}

/* =====================
   Layout Options
   ===================== */

/* Full layout: nội dung chiếm full chiều ngang */
.layout-full {
    width: 100%;
    margin: 0;
}

/* Narrow layout: nội dung chính hẹp lại (600px), căn giữa */
.layout-narrow .entry-content > *:not(figure) {
    max-width: 800px;
    margin: 1rem auto;
    box-sizing: border-box;
}
.layout-narrow .wp-block-image{
	    max-width: 800px;
		margin: 1rem auto;
		box-sizing: border-box;
}
/* Boxed layout: giới hạn toàn bộ khối chính, có padding */
.layout-boxed {
    max-width: 1200px;
	width:100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* =====================
   Image Sizes in Content
   ===================== */

/* Narrow (khớp text) */
.layout-narrow .size-content-narrow,
.layout-narrow .size-content-narrow img {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    display: block;border-radius: 8px;
}

/* Wide (vượt text, không full màn hình) */
.layout-narrow .size-content-wide,
.layout-narrow .size-content-wide img {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    display: block;border-radius: 8px;
}

/* Full (tràn màn hình) */
.layout-narrow .size-content-full,
.layout-narrow .size-content-full img {
    width: 100%;
    max-width: 1024px;
    margin: 20px auto;
    display: block;border-radius: 8px;
}

.layout-narrow .wp-block-gallery.has-nested-images {
    align-items: normal;
    max-width: 1200px;
    margin: 30px auto;
}

/* =====================
   Responsive adjustments
   ===================== */
@media (max-width: 1200px) {
    .layout-boxed {
        max-width: 95%;       /* co lại trên màn hình nhỏ */
        padding: 15px;
    }
}

@media (max-width: 768px) {
    /* Narrow layout */
    .layout-narrow .entry-content {
        max-width: 100%;
        padding: 0 15px;
    }

    /* Ảnh narrow/wide/full co lại full width trên mobile */
    .layout-narrow .size-content-narrow,
    .layout-narrow .size-content-narrow img,
    .layout-narrow .size-content-wide,
    .layout-narrow .size-content-wide img,
    .layout-narrow .size-content-full,
    .layout-narrow .size-content-full img {
        width: 100%;
        max-width: 100%;
        margin: 20px auto;
    }
}
figcaption.wp-element-caption {
    background: rgb(0 0 0 / 9%);
    font-size: 14px;
    font-style: italic;
    padding: 10px 0;
    margin-top: -56px;
    position: relative;
}

.wp-element-caption {
    text-align: center;
}
