/*
 * sd-layout.css  –  Header, Nav, Dropdown, Footer
 * Tennis Court Luxe Theme  –  viết lại hoàn toàn
 */

/* ═══════════════════════════════════
   GLOBAL BODY
═══════════════════════════════════ */
.sd-luxury-body {
  background: #F5FBF4;
  color: #0F2240;
  font-family: 'Inter', Arial, sans-serif;
}

/* Hard-reset header khỏi mọi CSS bên ngoài */
.sd-lux-header,
.sd-lux-header * {
  box-sizing: border-box;
  /* KHÔNG inherit màu từ .slx-fullpage */
}

/* ═══════════════════════════════════
   HEADER WRAPPER
═══════════════════════════════════ */
.sd-lux-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  width: 100%;
  background: rgba(253, 250, 245, 0.96) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #D7E7D6;
  transition: box-shadow .2s ease;
}
.sd-lux-header.scrolled {
  box-shadow: 0 2px 20px rgba(15,107,60,.12);
}

.sd-lux-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
}

/* ── Logo ── */
.sd-lux-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 28px;
}
.sd-lux-logo img { height: 36px; width: auto; display: block; }
.sd-lux-logo__mark {
  font-size: 22px;
  color: #D7FF4D !important;
  line-height: 1;
  flex-shrink: 0;
}
.sd-lux-logo__text {
  display: flex;
  flex-direction: column;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0F2240 !important;
  line-height: 1.1;
  text-decoration: none;
}
.sd-lux-logo__sub {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 9px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #D7FF4D !important;
  line-height: 1.4;
}

/* ═══════════════════════════════════
   PRIMARY NAV
═══════════════════════════════════ */
.sd-lux-nav {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

/* Level-1 list */
.sd-lux-nav__list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Level-1 item */
.sd-lux-nav__list > li {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Level-1 link */
.sd-lux-nav__list > li > a {
  display: flex !important;
  align-items: center;
  gap: 4px;
  padding: 7px 13px !important;
  font-family: 'Inter', Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #305548 !important;
  background: transparent !important;
  border-radius: 50px;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background .15s, color .15s;
  line-height: 1.4;
}
.sd-lux-nav__list > li > a:hover,
.sd-lux-nav__list > li.current-menu-item > a,
.sd-lux-nav__list > li.current-menu-ancestor > a {
  background: #E8F5E8 !important;
  color: #0F6B3C !important;
}
.sd-lux-nav__list > li.current-menu-item > a {
  font-weight: 600 !important;
}

/* Mũi tên dropdown */
.sd-lux-nav__list > li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #5E6F66;
  flex-shrink: 0;
  transition: transform .2s;
  margin-left: 3px;
}
.sd-lux-nav__list > li.menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
  border-top-color: #0F6B3C;
}

/* ═══════════════════════════════════
   DROPDOWN CẤP 2 – JS-driven (class .open qua mouseenter/leave)
   KHÔNG dùng CSS :hover vì bị theme cha override
═══════════════════════════════════ */
.sd-lux-nav__list li ul,
.sd-lux-nav__list li ul.sub-menu {
  /* Định vị */
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  z-index: 10000 !important;

  /* Size */
  min-width: 210px;
  width: max-content;
  max-width: 300px;

  /* Reset list */
  list-style: none !important;
  margin: 0 !important;
  padding: 6px 0 !important;

  /* Visual */
  background: #ffffff !important;
  border: 1px solid #D7E7D6 !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 36px rgba(15,107,60,.16), 0 2px 8px rgba(15,107,60,.06) !important;

  /* JS sẽ set display:none lúc init, sau đó toggle opacity/transform */
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}

/* Level-2 items */
.sd-lux-nav__list li ul li,
.sd-lux-nav__list li ul.sub-menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
}

/* Level-2 link */
.sd-lux-nav__list li ul li a,
.sd-lux-nav__list li ul.sub-menu li a {
  display: block !important;
  padding: 9px 18px !important;
  font-family: 'Inter', Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #305548 !important;
  background: transparent !important;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background .12s, color .12s;
  line-height: 1.5;
  border-radius: 0;
}
.sd-lux-nav__list li ul li a:hover,
.sd-lux-nav__list li ul.sub-menu li a:hover,
.sd-lux-nav__list li ul li.current-menu-item > a {
  background: #E8F5E8 !important;
  color: #0F6B3C !important;
  font-weight: 500 !important;
}

/* Separator đầu tiên */
.sd-lux-nav__list li ul li:first-child {
  border-top: none;
}

/* Cấp 3 (nếu có) – dịch sang phải */
.sd-lux-nav__list li ul li ul {
  top: 0 !important;
  left: 100% !important;
  margin-top: -6px;
}

/* ── Header right ── */
.sd-lux-header__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.sd-lux-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid #D7E7D6;
  background: transparent !important;
  color: #305548 !important;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  flex-shrink: 0;
}
.sd-lux-icon-btn:hover {
  border-color: #D7FF4D !important;
  color: #0F6B3C !important;
  background: #F3FFD1 !important;
}

.sd-lux-submit-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: #0F6B3C !important;
  color: #ffffff !important;
  border: none;
  border-radius: 50px;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: background .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.sd-lux-submit-btn:hover { background: #0B5A32 !important; }

.sd-lux-mobile-toggle { display: none; }

/* ── Search dropdown ── */
.sd-lux-search-drop {
  overflow: hidden;
  max-height: 0;
  background: #F5FBF4;
  border-top: 1px solid transparent;
  transition: max-height .25s ease, border-color .25s;
}
.sd-lux-search-drop.open {
  max-height: 90px;
  border-top-color: #D7E7D6;
}
.sd-lux-search-drop__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
}

/* ═══════════════════════════════════
   MOBILE NAV
═══════════════════════════════════ */
.sd-lux-mobile-nav {
  background: #fff;
  border-top: 1px solid #D7E7D6;
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease;
}
.sd-lux-mobile-nav.open { max-height: 80vh; overflow-y: auto; }

.sd-lux-mobile-nav__list {
  list-style: none;
  margin: 0; padding: 8px 0 16px;
}
.sd-lux-mobile-nav__list li {
  list-style: none;
  margin: 0; padding: 0;
}
.sd-lux-mobile-nav__list li a {
  display: block;
  padding: 11px 24px;
  font-size: 15px;
  font-weight: 500;
  color: #0F2240;
  border-bottom: 1px solid #F0F8F0;
  text-decoration: none;
  transition: color .15s, background .15s;
}
.sd-lux-mobile-nav__list li a:hover { color: #0F6B3C; background: #E8F5E8; }
.sd-lux-mobile-nav__list li:last-child > a { border-bottom: none; }

/* Mobile sub-menu: indent + nhỏ hơn */
.sd-lux-mobile-nav__list li ul {
  list-style: none;
  margin: 0; padding: 0;
  background: #F5FBF4;
  border-top: 1px solid #F0F8F0;
}
.sd-lux-mobile-nav__list li ul li a {
  padding-left: 42px;
  font-size: 14px;
  font-weight: 400;
  color: #305548;
}

/* ── Overlay ── */
.sd-lux-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 9998;
}
.sd-lux-overlay.open { display: block; }

/* ═══════════════════════════════════
   FOOTER
═══════════════════════════════════ */
.sd-lux-footer {
  margin-top: 60px;
  background: #F0F8F0;
  border-top: 1px solid #D7E7D6;
}
.sd-lux-footer__top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  text-align: center;
  border-bottom: 1px solid #D7E7D6;
}
.sd-lux-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.sd-lux-footer__tagline { font-size: 14px; color: #5E6F66; margin-bottom: 18px; }
.sd-lux-footer__tax-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sd-lux-footer__tag {
  padding: 5px 14px;
  background: #fff; border: 1px solid #D7E7D6;
  border-radius: 50px; font-size: 12px; font-weight: 500; color: #305548;
  text-decoration: none; transition: all .15s;
}
.sd-lux-footer__tag:hover { border-color: #0F6B3C; color: #0F6B3C; background: #E8F5E8; }

.sd-lux-footer__cols {
  max-width: 1280px; margin: 0 auto; padding: 36px 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
.sd-lux-footer__col h4,
.sd-lux-footer__col .widget-title {
  font-size: 10px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: #D7FF4D; margin-bottom: 14px;
}
.sd-lux-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sd-lux-footer__col ul li a { font-size: 14px; color: #305548; text-decoration: none; transition: color .15s; }
.sd-lux-footer__col ul li a:hover { color: #0F6B3C; }
.sd-lux-footer__col--about p { font-size: 13px; color: #5E6F66; line-height: 1.6; margin-bottom: 14px; }
.sd-lux-footer__socials { display: flex; gap: 8px; }
.sd-lux-social {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid #D7E7D6; border-radius: 50%;
  color: #305548; text-decoration: none; transition: all .15s;
}
.sd-lux-social:hover { background: #0F6B3C; border-color: #0F6B3C; color: #fff; }
.sd-lux-footer__bottom { background: #D7E7D6; }
.sd-lux-footer__bottom-inner {
  max-width: 1280px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: #5E6F66; flex-wrap: wrap; gap: 8px;
}
.sd-lux-footer__powered strong { color: #0F6B3C; }

/* ═══════════════════════════════════
   RESPONSIVE
═══════════════════════════════════ */
@media (max-width: 960px) {
  .sd-lux-nav { display: none; }
  .sd-lux-mobile-toggle { display: flex !important; }
  .sd-lux-submit-btn { display: none; }
  .sd-lux-footer__cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .sd-lux-header__inner { padding: 0 16px; }
  .sd-lux-logo { margin-right: 0; }
  .sd-lux-footer__cols { grid-template-columns: 1fr; gap: 20px; }
  .sd-lux-footer__top { padding: 28px 16px 20px; }
  .sd-lux-footer__bottom-inner { flex-direction: column; text-align: center; }
}
