/**
 * Public shell — layout-public only.
 * Minimal overrides so header/nav/footer match Tailwind layout (layout.blade.php).
 * No homepage section styling. Load after Tailwind.
 */

/* Topbar: ensure single border (avoid double with .site-header) */
.site-header .topbar {
  border-bottom: none;
}

/* Nav items: Tailwind-like spacing and hover */
.mainnav__item {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: color 0.15s, background-color 0.15s;
}
.mainnav__item:hover {
  color: var(--primary-600);
}
.mainnav__item--active {
  font-weight: 700;
  color: var(--primary-800);
}

/* Dropdown wrapper */
.mainnav__item-wrap {
  position: relative;
  display: inline-block;
}
.mainnav__item-wrap:hover .mainnav__dropdown,
.mainnav__item-wrap:focus-within .mainnav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mainnav__dropdown {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 0.25rem;
  min-width: 12rem;
  padding: 0.25rem 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 50;
}
.mainnav__dropdown-link {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.mainnav__dropdown-link:hover {
  background: #f1f5f9;
  color: var(--primary-600);
}
.mainnav__dropdown-link--active {
  font-weight: 600;
  background: #eff6ff;
  color: var(--primary-600);
}

/* Header utility actions (หน้าแรก, ติดต่อ, เข้าสู่ระบบ) */
.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.header-action {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: background-color 0.15s, color 0.15s;
}
.header-action:hover {
  background: #f8fafc;
  color: var(--primary-600);
}
.header-action__icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}
.header-action__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.header-action__icon path[fill="var(--icon-outline)"],
.header-action__icon path[fill="var(--icon-fill)"] {
  fill: currentColor;
}

/* Hamburger bars (when no legacy style.css) */
.topbar__menu-btn-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.topbar__menu-btn-bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

/* Mobile overlay */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 40;
  transition: opacity 0.2s;
}
.mobile-overlay[aria-hidden="true"] {
  opacity: 0;
  pointer-events: none;
}
.mobile-menu-open .mobile-overlay[aria-hidden="false"] {
  opacity: 1;
}

/* Mobile drawer panel */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 320px;
  height: 100%;
  z-index: 50;
  overflow: auto;
  transition: transform 0.25s ease;
}
.mobile-drawer[aria-hidden="true"] {
  transform: translateX(100%);
  visibility: hidden;
}
.mobile-menu-open .mobile-drawer[aria-hidden="false"] {
  transform: translateX(0);
  visibility: visible;
}
.mobile-drawer__panel {
  min-height: 100%;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  padding-top: 3rem;
}
.mobile-drawer__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748b;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 0.5rem;
}
.mobile-drawer__close:hover {
  background: #f1f5f9;
  color: #334155;
}
.mobile-drawer__section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.5rem;
}
.mobile-drawer__utilities {
  margin-bottom: 1rem;
}
.mobile-drawer__utilities .header-actions {
  flex-direction: column;
  align-items: stretch;
}
.mobile-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-drawer__link {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: background-color 0.15s, color 0.15s;
}
.mobile-drawer__link:hover {
  background: #f8fafc;
  color: var(--primary-600);
}
.mobile-drawer__link--sub {
  padding-left: 1.5rem;
}
.mobile-drawer__link--active {
  font-weight: 700;
  background: #eff6ff;
  color: var(--primary-600);
}

/* Footer */
.footer {
  position: relative;
  background-image:
    linear-gradient(180deg, rgba(52, 46, 28, 0.30) 0%, rgba(20, 30, 19, 0.46) 52%, rgba(10, 20, 15, 0.58) 100%),
    url("../images/misc/footer-bg-fppter.png");
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 100%, cover;
  background-position: center center, center calc(30% + 80px);
  color: #f8fafc;
  min-height: 300px;
}

.footer__inner {
  padding-top: 3.4rem;
  padding-bottom: 2.8rem;
}

.footer__topgrid {
  align-items: start;
}

.footer__brandCol,
.footer__contactCol {
  min-width: 0;
}

.footer__ctaCol {
  justify-self: end;
  align-items: flex-end;
}

.footer__org {
  display: block;
  margin: 0;
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.35;
  color: #ffffff;
}

.footer__subtitle {
  display: block;
  margin-top: 0.2rem;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.35;
  color: #e2e8f0;
  opacity: 1;
}

.footer__copy {
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #dbeafe;
}

.footer .contact-section__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.footer .contact-section__list li {
  color: #e2e8f0;
  line-height: 1.5;
}

.footer a {
  color: #f8fafc;
}

.footer .contact-section__list a {
  text-decoration: none;
  border-bottom: 1px dotted rgba(248, 250, 252, 0.65);
}

.footer .contact-section__list a:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.footer__social {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.footer__social-link {
  display: inline-flex;
  align-items: center;
  color: #f8fafc;
  opacity: 0.92;
}

.footer__social-link:hover {
  opacity: 1;
}

.footer .pill-btn {
  white-space: nowrap;
}

.footer .pill-btn,
.footer .pill-btn:hover,
.footer a.pill-btn {
  color: #ffffff;
}

.footer .text-slate-400 {
  color: #cbd5e1 !important;
}

.footer .text-slate-500 {
  color: #a8c4dd !important;
}

.footer .border-white\/10 {
  border-color: rgba(255, 255, 255, 0.22) !important;
}

@media (max-width: 767px) {
  .footer__ctaCol {
    justify-self: stretch;
    align-items: flex-start;
  }

  .footer__social {
    justify-content: flex-start;
  }

  .footer {
    min-height: 0;
  }

  .footer__inner {
    padding-top: 2.2rem;
    padding-bottom: 1.8rem;
  }
}
