/* TAB Office Systems — shared layout & components */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --sidebar-bg: #4f040c;
  --sidebar-width: 248px;
  --accent: #4a90d9;
  --text: #333;
  --light-bg: #f9f9f9;
  --border: #ddd;
  --white: #fff;
  --nav-hover: rgba(255, 255, 255, 0.15);
}

html,
body {
  height: 100%;
  font-family: 'Open Sans', 'Noto Sans', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--light-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

#page {
  display: flex;
  min-height: 100vh;
}

#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.site-branding {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.site-branding img {
  max-width: 100%;
  height: auto;
  display: block;
}

.site-description {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  margin-top: 8px;
  font-style: italic;
  line-height: 1.4;
}

/* ----- Main navigation ----- */
nav.main-navigation {
  padding: 12px 0;
  flex: 1;
}

.nav-menu {
  list-style: none;
}

.nav-menu > li > a,
.nav-menu > li > span {
  display: block;
  padding: 9px 20px;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background 0.15s;
  cursor: pointer;
}

.nav-menu > li > a:hover,
.nav-menu > li > span:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-ancestor > span {
  background: var(--nav-hover);
  text-decoration: none;
}

.nav-menu li {
  position: relative;
}

/* Nested branch labels (Products → Seating, etc.) */
.nav-menu .sub-menu > li.menu-item-has-children > span {
  display: block;
  padding: 7px 20px 7px 30px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: background 0.15s;
  cursor: pointer;
  user-select: none;
}

.nav-menu .sub-menu .sub-menu > li.menu-item-has-children > span {
  padding-left: 42px;
  font-size: 11.5px;
}

.nav-menu .sub-menu > li.menu-item-has-children > span:hover,
.nav-menu .sub-menu li.current-menu-ancestor > span {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.nav-menu .sub-menu {
  list-style: none;
  display: none;
  background: rgba(0, 0, 0, 0.25);
}

/* No JS: hover / focus-within flyouts (desktop-friendly fallback) */
.main-navigation:not(.nav--js) .nav-menu li:hover > .sub-menu,
.main-navigation:not(.nav--js) .nav-menu li:focus-within > .sub-menu {
  display: block;
}

/* JS: click-controlled sections */
.main-navigation.nav--js .nav-menu li.is-open > .sub-menu {
  display: block;
}

.main-navigation.nav--js li.is-open.menu-item-has-children > span {
  background: rgba(255, 255, 255, 0.12);
}

.nav-menu .sub-menu a {
  display: block;
  padding: 7px 20px 7px 30px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  transition: background 0.15s;
}

.nav-menu .sub-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.nav-menu .sub-menu .sub-menu a {
  padding-left: 42px;
  font-size: 11.5px;
}

.nav-menu .sub-menu li.current-menu-item > a {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.nav-menu li.menu-item-has-children > a::after,
.nav-menu li.menu-item-has-children > span::after {
  content: ' ▾';
  font-size: 10px;
  opacity: 0.7;
}

#content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ----- Home slideshow ----- */
.slideshow {
  width: 100%;
  overflow: hidden;
  background: #222;
  position: relative;
  height: 270px;
}

.slides {
  list-style: none;
  position: relative;
  height: 270px;
}

.slides li {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 270px;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.slides li img {
  width: 100%;
  height: 270px;
  object-fit: cover;
  display: block;
}

.slides li:nth-child(1) {
  animation: tabo-slide 12s infinite 0s;
}

.slides li:nth-child(2) {
  animation: tabo-slide 12s infinite 3s;
}

.slides li:nth-child(3) {
  animation: tabo-slide 12s infinite 6s;
}

.slides li:nth-child(4) {
  animation: tabo-slide 12s infinite 9s;
}

@keyframes tabo-slide {
  0% {
    opacity: 1;
  }
  20% {
    opacity: 1;
  }
  25% {
    opacity: 0;
  }
  95% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* ----- Content area ----- */
#primary {
  flex: 1;
  padding: 40px 48px;
  background: var(--white);
}

.entry-header {
  margin: -40px -48px 28px;
  padding: 22px 48px 24px;
  background: var(--sidebar-bg);
  color: var(--white);
  text-align: center;
}

.entry-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  border-bottom: none;
  padding-bottom: 0;
  margin: 0;
}

body.page-home .entry-title {
  display: none;
}

.entry-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin-bottom: 16px;
  line-height: 1.3;
}

/* Home intro line — match sidebar / brand */
body.page-home .entry-content h3,
body.page-portfolio .entry-content h3,
body.page-contact .entry-content h3 {
  color: var(--sidebar-bg);
}

.entry-content p {
  line-height: 1.7;
  margin-bottom: 16px;
  color: #444;
}

.entry-content a {
  color: var(--accent);
  text-decoration: underline;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-top: 8px;
  border-radius: 2px;
}

.vendor-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.vendor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 187px;
}

.vendor-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.vendor-card a:hover img {
  opacity: 0.85;
  transform: scale(1.03);
}

.vendor-card img {
  width: 187px;
  height: 187px;
  object-fit: contain;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 8px;
  background: #fafafa;
  transition: opacity 0.2s, transform 0.2s;
}

.vendor-card figcaption {
  font-size: 13px;
  color: #555;
  font-weight: 600;
}

/* ----- Contact page ----- */
.contact-hero {
  margin-bottom: 28px;
  border-radius: 4px;
  overflow: hidden;
}

.contact-hero img {
  width: 100%;
  height: auto;
  max-height: 270px;
  object-fit: cover;
  margin-top: 0;
}

.contact-form {
  margin-top: 24px;
}

.contact-form-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 40px;
}

.contact-field {
  margin-bottom: 16px;
}

.contact-field label,
.contact-fieldset legend {
  display: block;
  margin-bottom: 6px;
  color: #333;
}

.contact-input,
.contact-textarea {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  background: var(--white);
}

.contact-textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-fieldset {
  border: none;
  margin: 0 0 20px;
  padding: 0;
}

.contact-radio {
  display: block;
  margin-bottom: 8px;
  font-weight: 400;
  color: #444;
  cursor: pointer;
}

.contact-radio input {
  margin-right: 8px;
}

.contact-submit-wrap {
  text-align: center;
  margin-top: 8px;
}

.contact-submit {
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 36px;
  color: var(--white);
  background: var(--sidebar-bg);
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.contact-submit:hover {
  background: #3a0309;
}

.contact-divider {
  border: none;
  border-top: 1px solid #eee;
  margin: 32px 0;
}

.contact-map iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 4px;
}

.contact-form-error,
.field-error {
  display: block;
  color: #a00;
  font-size: 13px;
  margin-top: 4px;
}

.contact-form-error {
  margin-bottom: 16px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #f5c6c6;
  border-radius: 3px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ----- About Us page ----- */
body.page-about .entry-content p strong {
  font-weight: 700;
  color: #222;
  display: block;
  margin-bottom: 6px;
}

body.page-about .entry-content > p > strong:only-child {
  color: var(--sidebar-bg);
  font-size: 14px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* ----- Portfolio page ----- */
.portfolio-header {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 28px;
  border-radius: 4px;
}

.entry-content .photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.photo-grid a {
  display: block;
  overflow: hidden;
  border-radius: 3px;
  text-decoration: none;
}

.photo-grid a:hover {
  text-decoration: none;
}

.photo-grid a:hover img {
  opacity: 0.85;
  transform: scale(1.04);
}

.photo-grid img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s, transform 0.2s;
}

footer.site-footer {
  background: #444;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12.5px;
  padding: 20px 48px;
}

footer.site-footer p {
  margin-bottom: 10px;
}

.footer-nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.footer-nav-menu a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12.5px;
}

.footer-nav-menu a:hover {
  color: var(--white);
  text-decoration: none;
}

@media (max-width: 768px) {
  #page {
    flex-direction: column;
  }

  #sidebar {
    width: 100%;
    min-width: unset;
    height: auto;
    position: static;
  }

  .slideshow,
  .slides,
  .slides li,
  .slides li img {
    height: 160px;
  }

  #primary {
    padding: 24px 20px;
  }

  .entry-header {
    margin: -24px -20px 24px;
    padding: 18px 20px 20px;
  }

  footer.site-footer {
    padding: 20px;
  }

  .vendor-grid {
    justify-content: center;
  }

  .entry-content .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .contact-form-columns {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-hero img {
    max-height: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slides li {
    animation: none !important;
    opacity: 0;
  }

  .slides li:first-child {
    opacity: 1;
  }
}
