/* ============================================================
   Pridi Banomyong Institute — Homepage
   โทนสี: Classic Blue #0F4C81 | Off-white | Light Blue
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Sarabun:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

/* ─── Root Variables (เหมือนฟอร์ม) ─── */
:root {
  --pbi-blue:        #0F4C81;
  --pbi-blue-dark:   #0a3560;
  --pbi-blue-mid:    #1a6bb5;
  --pbi-blue-light:  #d6e8f7;
  --pbi-blue-pale:   #eef5fb;
  --pbi-offwhite:    #f7f5f0;
  --pbi-white:       #ffffff;
  --pbi-text:        #1a2533;
  --pbi-text-muted:  #4a5568;
  --pbi-border:      #b8d0e8;
  --pbi-radius:      8px;
  --pbi-radius-lg:   16px;
  --pbi-shadow:      0 4px 16px rgba(15, 76, 129, 0.08);
}

.mobile-menu {
  width: 26px;
  height: 16px;
}
.mobile-menu span,
.mobile-menu span:nth-child(2) {
	background:#fff;
}

/* ─── Base ─── */
body {
  font-family: "Sarabun", sans-serif;
  background: var(--pbi-offwhite);
  color: var(--pbi-text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Kanit", sans-serif;
  font-weight: 500;
}

.container {
	padding:10px 25px;
}

/* ════════════════════════════════════════
   Header
   ════════════════════════════════════════ */
.header {
  background: var(--pbi-blue);
  color: var(--pbi-white);
  box-shadow: 0 2px 8px rgba(15, 76, 129, 0.25);
}

.site-name a {
  color: var(--pbi-white) !important;
  font-family: "Kanit", sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}

/* Nav */
#block-thex-main-menu .menu {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

#block-thex-main-menu .menu .menu-item a {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  transition: background 0.15s ease, color 0.15s ease;
  display: block;
}

#block-thex-main-menu .menu .menu-item a:hover {
  background: var(--pbi-blue-dark);
  color: var(--pbi-white);
}
.menu-wrap .menu-item-has-children:hover,
.menu-wrap .menu-item-has-children:hover::after {
  background: var(--pbi-blue-dark);
  color: var(--pbi-white);
}

#block-thex-main-menu .menu .menu-item.is-active > a,
#block-thex-main-menu .menu .menu-item.menu-item--active-trail > a {
  background: rgba(255, 255, 255, 0.18);
  color: var(--pbi-white);
}

/* ─── Submenu dropdown ─── */
#block-thex-main-menu .submenu {
  background: var(--pbi-blue-dark) !important;
  border-radius: var(--pbi-radius) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
  padding: 0.35rem 0 !important;
  min-width: 180px;
}

#block-thex-main-menu .submenu .menu-item a {
  color: var(--pbi-white) !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0.55rem 1.1rem !important;
  font-size: 0.85rem !important;
}

#block-thex-main-menu .submenu .menu-item a:hover {
  background: var(--pbi-blue-dark);
  color: var(--pbi-white) !important;
}

/* ════════════════════════════════════════
   Homepage Hero Section
   ════════════════════════════════════════ */
.space-homepage {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 0 0 2.5rem 0;
}

/* ─── Left: Title & Buttons ─── */
.space-title {
  flex: 1;
}

.space-title h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--pbi-blue);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.space-title p {
  color: var(--pbi-text-muted);
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.space-title button {
  border: none;
  border-radius: 24px;
  background: var(--pbi-blue);
  padding: 0;
  margin: 0 0.5rem 0.5rem 0;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
  display: inline-block;
}

.space-title button:hover {
  background: var(--pbi-blue-dark);
  transform: translateY(-1px);
}

.space-title button a {
  color: var(--pbi-white);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  display: block;
  letter-spacing: 0.01em;
}

/* ─── Right: Info Card ─── */
.space-detail {
  flex: 1;
  padding: 1.75rem 2rem;
  background: var(--pbi-white);
  border: 1px solid var(--pbi-border);
  border-radius: var(--pbi-radius-lg);
  box-shadow: var(--pbi-shadow);
  position: relative;
}

.space-detail::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--pbi-blue);
  border-radius: var(--pbi-radius-lg) 0 0 var(--pbi-radius-lg);
}

.space-detail h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--pbi-blue);
  margin: 0 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1.5px solid var(--pbi-blue-light);
}

.space-detail ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.space-detail ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.93rem;
  color: var(--pbi-text);
  line-height: 1.5;
}

.icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--pbi-blue-mid);
  fill: none;
}

/* ════════════════════════════════════════
   Footer Top — Space Types
   ════════════════════════════════════════ */
.footer-top {
  background: var(--pbi-blue-pale);
  padding: 2.5rem 0;
  border-top: 1px solid var(--pbi-blue-light);
}

.footer-top h2 {
  font-size: 1.25rem;
  color: var(--pbi-blue);
  margin-bottom: 1.5rem;
}

.space-type-wrapper {
  display: flex;
  gap: 1.25rem;
  position: relative;
  overflow: visible;
}

.space-type {
  flex: 1;
  padding: 1.5rem;
  background: var(--pbi-white);
  border: 1px solid var(--pbi-border);
  border-radius: var(--pbi-radius-lg);
  box-shadow: var(--pbi-shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
}

.space-type h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--pbi-blue);
  margin: 0 0 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1.5px solid var(--pbi-blue-light);
}

.space-type p {
  font-size: 0.88rem;
  color: var(--pbi-text-muted);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer ul li {
  font-size: 0.85rem;
  color: var(--pbi-text);
  padding-left: 0.75rem;
  border-left: 2px solid var(--pbi-blue-light);
  line-height: 1.5;
}

/* Buttons in footer cards */
.space-button {
  margin-top: auto;
  padding-top: 1rem;
}

.space-type-hall button,
.space-type-meeting button {
  border: none;
  border-radius: 24px;
  background: var(--pbi-blue);
  width: 100%;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
  padding: 0;
}

.space-type-hall button:hover,
.space-type-meeting button:hover {
  background: var(--pbi-blue-dark);
  transform: translateY(-1px);
}

.space-type-hall button a,
.space-type-meeting button a {
  color: var(--pbi-white);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  display: block;
  text-align: center;
}

.space-type-coworking button {
  border: none;
  border-radius: 24px;
  background: var(--pbi-blue-light);
  color: var(--pbi-blue-dark);
  width: 100%;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  cursor: default;
  font-family: "Sarabun", sans-serif;
}

/* ════════════════════════════════════════
   Footer Bottom
   ════════════════════════════════════════ */
.footer-bottom {
  background: var(--pbi-blue);
  color: rgba(255, 255, 255, 0.8);
  padding: 1rem 0;
  font-size: 0.85rem;
  text-align: center;
}

.footer-bottom .block-content a,
.header .block-content a {
  color: var(--pbi-white);
}

.website-copyright {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.83rem;
}

/* ─── Hide contextual menu in footer block ─── */
#block-thex-typeofroom .contextual {
  display: none !important;
}

#block-thex-typeofroom .contextual-links {
  display: none !important;
}

/* ใช้เฉพาะภายใน .block-content */
#block-thex-emnuuaexdmin .block-content ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* ลิงก์เป็นปุ่ม */
#block-thex-emnuuaexdmin .block-content ul li a {
  display: inline-block;
  background-color: #0F4C81;
  color: #ffffff;
  padding: 10px 18px;
  text-decoration: none;
  border-radius: 3px;
  font-weight: 600;
  transition: all 0.2s ease;
}

/* Hover */
#block-thex-emnuuaexdmin .block-content ul li a:hover {
  background-color: #0b3a63;
  transform: translateY(-2px);
}


/* ════════════════════════════════════════
   Responsive
   ════════════════════════════════════════ */
@media (max-width: 768px) {
  .space-homepage {
    flex-direction: column;
    padding: 1.5rem 0;
    gap: 1.25rem;
  }

  .space-type-wrapper {
    flex-direction: column;
  }

  .space-title h2 {
    font-size: 1.35rem;
  }
}