:root {
  --foreground-rgb: 0, 0, 0;
  --background-start-rgb: 214, 219, 220;
  --background-end-rgb: 255, 255, 255;
}

body {
  color: rgb(var(--foreground-rgb));
  background: linear-gradient(to bottom, transparent, rgb(var(--background-end-rgb))) rgb(var(--background-start-rgb));
}

.text-balance {
  text-wrap: balance;
}

.font-seol {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.font-mplus1c {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

img {
  max-width: 100%;
  height: auto;
}

#primary-menu {
  display: none;
}

@media (min-width: 1024px) {
  #primary-menu {
    display: flex !important;
  }
}

#primary-menu.menu-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #1e3a8a;
  z-index: 50;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#primary-menu-list,
.primary-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Top-level menu items */
#primary-menu li,
#primary-menu ul li {
  position: relative;
}

/* Menu item links - match original Next.js styling */
#primary-menu a.menu-item-link {
  display: inline-block;
  padding: 0.5rem 0;
  color: white;
  text-decoration: none;
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#primary-menu a.menu-item-link:hover {
  color: #d1d5db;
}

/* Active/Current page - original had no special active styling for top-level */
/* .current-menu-item class is available on <li> if needed */

/* Desktop: hover expands submenu */
@media (min-width: 1024px) {
  #primary-menu li:hover > .sub-menu {
    display: flex;
    flex-direction: column;
  }

  #primary-menu .sub-menu {
    display: none;
  }
}

/* Mobile: submenu toggle controlled by JS */
@media (max-width: 1023px) {
  #primary-menu .sub-menu {
    display: none;
    max-height: 0;
    overflow: hidden;
  }

  #primary-menu li.submenu-open > .sub-menu {
    display: flex;
    flex-direction: column;
    max-height: 1000px;
  }
}

/* Submenu styling */
#primary-menu .sub-menu,
#primary-menu ul ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Desktop submenu positioning - match original Next.js header exactly */
@media (min-width: 1024px) {
  #primary-menu .sub-menu,
  #primary-menu ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 14rem;
    width: 14rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    z-index: 40;
  }

  #primary-menu .sub-menu li,
  #primary-menu ul ul li {
    position: static;
  }

  #primary-menu .sub-menu a,
  #primary-menu ul ul a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
    color: #374151;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  }

  #primary-menu .sub-menu a:hover,
  #primary-menu ul ul a:hover {
    background-color: #1e3a8a;
    color: white;
  }
}

/* Mobile submenu styling */
@media (max-width: 1023px) {
  #primary-menu .sub-menu,
  #primary-menu ul ul {
    position: static;
    background-color: rgba(30, 58, 138, 0.95);
    margin-left: 1rem;
    margin-top: 0.25rem;
    border-radius: 0.375rem;
    transition: max-height 0.3s ease;
  }

  #primary-menu .sub-menu li,
  #primary-menu ul ul li {
    position: static;
  }

  #primary-menu .sub-menu a,
  #primary-menu ul ul a {
    padding: 0.5rem 0.75rem;
    color: #e5e7eb;
    font-size: 1rem;
  }

  #primary-menu .sub-menu a:hover,
  #primary-menu ul ul a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
  }

  #primary-menu .sub-menu a.active,
  #primary-menu ul ul a.active {
    color: #fbbf24;
    background-color: rgba(251, 191, 36, 0.1);
  }
}

/* ============================================================
   ASP House Tabs Block Styles
   ============================================================ */

.asp-house-tab-item a {
    display: inline-block;
    border-top: 2px solid transparent;
    border-right: 2px solid transparent;
    border-left: 2px solid transparent;
    border-radius: 0.25rem 0.25rem 0 0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.asp-house-tab-item.active a,
.asp-house-tab-item a:hover {
    border-top-color: #1e3a8a;
    border-right-color: #1e3a8a;
    border-left-color: #1e3a8a;
    background-color: #fff !important;
    color: #1e3a8a !important;
}

/* Tab size variants — only horizontal padding varies; font, line-height, and vertical padding are identical */
.tab-size-small {
    padding: 0.5rem 0.75rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.tab-size-medium {
    padding: 0.5rem 1.5rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.tab-size-large {
    padding: 0.5rem 2.25rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.tab-size-extra-large {
    padding: 0.5rem 3rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
}

/* ============================================================
   ASP Bullet List Block Styles
   ============================================================ */

.wp-block-asp-bullet-list ul,
.wp-block-asp-bullet-list ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ============================================================
   Table Component Styles
   ============================================================ */

/* Responsive wrapper: horizontal scroll on small screens */
.table-responsive-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
}

.table-responsive-wrapper table {
    min-width: 600px;
}

/* Alternating row colors match the existing mandatory disclosure style */
.table-responsive-wrapper tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Mobile: stacked card layout for very small screens */
@media (max-width: 480px) {
    .table-responsive-wrapper table,
    .table-responsive-wrapper thead,
    .table-responsive-wrapper tbody,
    .table-responsive-wrapper th,
    .table-responsive-wrapper td,
    .table-responsive-wrapper tr {
        display: block;
    }

    .table-responsive-wrapper thead {
        display: none;
    }

    .table-responsive-wrapper td {
        padding-left: 50% !important;
        position: relative;
        min-height: 2.5rem;
        border-bottom: 1px solid #e5e7eb;
    }

    .table-responsive-wrapper td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.5rem;
        top: 0.5rem;
        font-weight: 700;
        color: #374151;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .table-responsive-wrapper tr {
        margin-bottom: 0.75rem;
        border: 1px solid #d1d5db;
        border-radius: 0.375rem;
        overflow: hidden;
    }
}
