/* ================================================================
   TUBES GYM — Modern Responsive Stylesheet v4
   ================================================================ */

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

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #333;
  background: #fff;
}

img { max-width: 100%; height: auto; display: inline-block; }
a { text-decoration: none; color: inherit; }
a:hover { text-decoration: underline; }

.page-wrapper {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  padding: 0 12px;
}

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
  background: #fff;
  border-bottom: 3px solid #620507;
}

.header-top-strip {
  background: #620507;
  color: #fff;
  font-size: 11px;
  padding: 5px 12px;
}

.header-top-strip .strip-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.header-top-strip a {
  color: #ffcccc;
  font-size: 11px;
  margin-left: 12px;
}
.header-top-strip a:hover { color: #fff; text-decoration: underline; }
.header-top-strip a.active { color: #fff; font-weight: bold; }

.header-main {
  display: flex;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
  padding: 12px;
  gap: 20px;
}

.header-logo img {
  display: block;
  width: 220px;
  height: auto;
}

.header-tagline {
  flex: 1;
  font-size: 13px;
  color: #555;
  line-height: 1.5;
}

.header-tagline strong {
  display: block;
  font-size: 18px;
  color: #620507;
  font-weight: bold;
  margin-bottom: 3px;
}

/* ================================================================
   MAIN NAV
   ================================================================ */
.main-nav-bar {
  background: #1a1a1a;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.main-nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.main-nav-inner a {
  font-size: 13px;
  color: #ddd;
  padding: 12px 10px;
  display: block;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.main-nav-inner a:hover {
  color: #fff;
  text-decoration: none;
  border-bottom-color: #620507;
}

.main-nav-inner a.active {
  color: #fff;
  border-bottom-color: #620507;
  font-weight: bold;
}

/* ================================================================
   HAMBURGER
   ================================================================ */
#mobile-menu-btn {
  display: none;
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 10000;
  background: #620507;
  border: none;
  border-radius: 4px;
  padding: 9px 11px;
  cursor: pointer;
}
#mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
}

#mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,26,26,0.97);
  z-index: 9999;
  overflow-y: auto;
  padding: 64px 24px 24px;
}
#mobile-nav.open { display: block; }

#mobile-nav a {
  display: block;
  color: #eee;
  font-size: 17px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
#mobile-nav a:hover { color: #fff; text-decoration: none; }
#mobile-nav a.secondary { font-size: 14px; color: #aaa; }
#mobile-nav a.secondary:hover { color: #fff; }
#mobile-nav hr { border-color: rgba(255,255,255,0.2); margin: 10px 0; }

#mobile-nav-close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 36px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

/* ================================================================
   CONTENT AREA
   ================================================================ */
.content-wrapper {
  background: url(images/muscles01.gif) 3% 160px no-repeat;
  background-attachment: fixed;
  min-height: 400px;
}

.content-area {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  padding: 16px 12px;
  gap: 0;
}

.content-pic {
  flex: 0 0 256px;
  padding: 0 16px 0 0;
}

.content-pic img {
  display: block;
  width: 100%;
  max-width: 256px;
  border: 3px solid #bbb;
}

.content-main {
  flex: 1 1 0;
  min-width: 0;
}

.content-main img { max-width: 100%; }

/* First child of content-main should never add extra top space */
.content-main > *:first-child { margin-top: 0; }

.content-divider {
  flex: 0 0 1px;
  background: #ccc;
  align-self: stretch;
  margin: 0 16px;
}

.content-sidebar { flex: 0 0 140px; }

/* Full-width sections (extra content below the main 3-col row) */
.full-width-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 12px 20px;
}

/* ================================================================
   CONTACT PAGE — two-column layout
   ================================================================ */
.contact-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.contact-details {
  flex: 0 0 340px;
}

.contact-form {
  flex: 1 1 0;
  min-width: 0;
}

/* Contact data table — semantic table, styled cleanly */
.contact-details table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.contact-details td {
  padding: 4px 6px;
  font-size: 12px;
  vertical-align: middle;
}

.contact-details td img {
  width: 22px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ================================================================
   ERT ARTICLE — article + references two-column
   ================================================================ */
.ert-article-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 16px;
}

.ert-article-main { flex: 1 1 0; min-width: 0; }

.ert-article-refs {
  flex: 0 0 240px;
  font-size: 11px;
  color: #555;
  background: #f7f7f7;
  border-left: 3px solid #ddd;
  padding: 10px 12px;
  line-height: 1.5;
}

.ert-article-refs p:first-child,
.ert-article-refs > *:first-child { margin-top: 0; }

/* ================================================================
   EXERCISE GRID (Programmes page)
   ================================================================ */
.exercise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}

.exercise-item {
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.exercise-item table { width: 100%; }

/* ================================================================
   SCROLLABLE DATA TABLES (products, contact details)
   ================================================================ */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll table { min-width: 480px; }

/* ================================================================
   SIDEBAR BOXES
   ================================================================ */
.sidebar-box {
  background: url(images/box-tile.gif) repeat;
  margin-bottom: 8px;
  text-align: center;
}

.sidebar-box-top    { width: 133px; height: 7px;  background: url(images/box-top.gif) no-repeat; }
.sidebar-box-inner  { padding: 6px 4px; }
.sidebar-box-bottom { width: 133px; height: 11px; background: url(images/box-bottom.gif) no-repeat; }

.sidebar-box a {
  font-size: 12px;
  font-weight: bold;
  color: #630608;
  display: block;
  line-height: 1.5;
}

.sidebar-box a:hover { text-decoration: underline; }
.sidebar-box a img { display: inline; vertical-align: middle; margin: 2px 0; }

.sidebar-social {
  text-align: center;
  margin-top: 10px;
  font-size: 11px;
  color: #555;
}

/* ================================================================
   CONTENT TYPOGRAPHY
   ================================================================ */
.header-whiteonred {
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  background-color: #620507;
  display: block;
  padding: 4px 8px;
  margin: 0 0 8px;   /* no top margin — content-main handles spacing */
}

.header-grey {
  font-size: 13px;
  font-weight: bold;
  color: #333;
  background-color: #ddd;
  display: inline;
  padding: 1px 4px;
}

.text-boldRed, .text-boldRed a {
  font-size: 20px;
  font-weight: bold;
  color: #630608;
  font-style: italic;
}

.text-Red-Roman, .text-Red-Roman a {
  font-size: 12px;
  font-weight: bold;
  color: #630608;
}

.text-blue-Roman {
  font-size: 12px;
  font-weight: bold;
  color: #003399;
}

.text, p {
  font-size: 12px;
  color: #333;
  line-height: 1.7;
  margin: 0 0 8px;
}

.tinytext { font-size: 11px; color: #666; }
.text-bold, .textBold { font-size: 13px; font-weight: bold; color: #111; }
.text-big { font-size: 14px; }
.text-big-white { font-size: 14px; font-weight: bold; color: #fff; }

/* Cart classes */
.nopcart   { background: #464444; font-size: 12px; color: #fff; }
.nopheader { background: #464444; font-size: 12px; color: #fff; }
.nopentry  { background: #fff; font-size: 12px; color: #000; }
.noptotal  { background: #fff; font-size: 12px; color: #000; }
.nopbutton { background: #fff; font-size: 12px; color: #000; }
.checkout, .checkoutinput { font-size: 12px; color: #000; }

#lightbox { position: absolute; top: 40px; left: 0; width: 100%; z-index: 100; text-align: center; }

#picsBackground img, #pics {
  width: 100% !important;
  height: auto !important;
  display: block;
}

/* ================================================================
   FOOTER
   ================================================================ */

/* Band 1: nav link columns */
.footer-links {
  background: #2a2a2a;
  padding: 20px 12px 16px;
}

.footer-links-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.footer-link-group h4 {
  font-size: 11px;
  font-weight: bold;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #444;
}

.footer-link-group a {
  display: block;
  color: #ccc;
  font-size: 12px;
  padding: 3px 0;
}

.footer-link-group a:hover { color: #fff; text-decoration: underline; }

/* Band 2: partners strip */
.footer-partners {
  background: #fff;
  border-top: 1px solid #3a3a3a;
  padding: 14px 12px;
}

.footer-partners-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* The "TUBES Partners" badge acts as a label */
.partners-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 24px;
  border-right: 1px solid #444;
  flex-shrink: 0;
}

.partners-label img {
  height: 50px;
  width: auto;
  opacity: 0.9;
}

/* Individual partner logos */
.partner-logo {
  display: flex;
  align-items: center;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.partner-logo:hover { opacity: 1; }

.partner-logo img {
  height: 50px;
  width: auto;
  display: block;
}

/* Band 3: phone strip */
.footer-phone-strip {
  background: url(images/bottomtile.png) repeat-x top;
  min-height: 80px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 12px;
}

.footer-phone-strip img { display: block; }

/* Band 4: legal bar */
.footer-legal {
  background: url(images/footer-tile.jpg) repeat-x top;
  min-height: 26px;
}

.footer-legal-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.footer-legal a { color: #555; font-size: 11px; }
.footer-legal a:hover { color: #620507; }
.footer-legal .sep { color: #999; margin: 0 4px; }
.footer-legal .copyright { font-size: 11px; color: #666; }

/* ================================================================
   RESPONSIVE — TABLET
   ================================================================ */
@media (max-width: 980px) {
  .content-pic { flex: 0 0 200px; }
  .content-sidebar { flex: 0 0 120px; }
  .contact-details { flex: 0 0 280px; }
  .ert-article-refs { flex: 0 0 200px; }
}

/* ================================================================
   RESPONSIVE — MOBILE
   ================================================================ */
@media (max-width: 768px) {

  #mobile-menu-btn { display: block; }
  .main-nav-bar { display: none; }

  .header-top-strip .strip-inner { justify-content: center; text-align: center; }

  .header-main {
    flex-direction: column;
    align-items: center;
    padding: 12px;
    text-align: center;
    gap: 10px;
  }

  .header-tagline { text-align: center; }
  .header-tagline strong { font-size: 15px; }

  .content-area {
    flex-direction: column;
    padding: 12px 10px;
  }

  .content-pic {
    flex: none;
    width: 100%;
    padding: 0 0 12px;
    display: flex;
    justify-content: center;
  }

  .content-pic img { max-width: 260px; }
  .content-main { width: 100%; }
  .content-divider { display: none; }

  .content-sidebar {
    flex: none;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 12px;
  }

  .sidebar-box { margin-bottom: 0; }
  .sidebar-box-top, .sidebar-box-bottom { width: 100%; background-size: 100% 100%; }

  .full-width-section { padding: 0 10px 16px; }

  /* Contact: stack on mobile */
  .contact-layout { flex-direction: column; gap: 16px; }
  .contact-details { flex: none; width: 100%; }

  /* ERT article: stack on mobile */
  .ert-article-layout { flex-direction: column; }
  .ert-article-refs { flex: none; width: 100%; border-left: none; border-top: 3px solid #ddd; }

  /* Exercise grid: single column on mobile */
  .exercise-grid { grid-template-columns: 1fr; }

  /* Partners strip: wrap and centre */
  .footer-partners-inner { justify-content: center; }
  .partners-label {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid #444;
    padding-bottom: 12px;
    width: 100%;
    justify-content: center;
  }

  #picsBackground img, #pics { width: 100% !important; height: auto !important; }

  .footer-links-inner { grid-template-columns: 1fr 1fr; }

  .footer-legal-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 12px;
  }

  .content-wrapper { background-attachment: scroll; }

  input[type=text], input[type=email], input[type=tel], textarea, select {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 16px !important;
    box-sizing: border-box;
  }

  body { font-size: 14px; }
  .text, p { font-size: 13px; }
  table { max-width: 100%; }
}

@media (max-width: 480px) {
  .footer-links-inner { grid-template-columns: 1fr; }
  .content-sidebar { grid-template-columns: 1fr 1fr; }
}

/* ================================================================
   V5 ADDITIONS
   ================================================================ */

/* Footer phone strip: margin so logo doesn't crowd the drop shadow */
.footer-phone-strip img {
  display: block;
  margin-top: 12px;
}

/* Sidebar boxes: more compact */
.sidebar-box-inner { padding: 4px 4px; }
.sidebar-box a { font-size: 11px; line-height: 1.3; }

/* Tel links in contact page */
a.tel-link { color: #620507; font-weight: bold; white-space: nowrap; }
a.tel-link:hover { text-decoration: underline; }

/* ── About Us: Vision/Mission cards ── */
.vm-cards {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}
.vm-card {
  flex: 1;
  border: 1px solid #ddd;
  border-top: 3px solid #620507;
  border-radius: 0 0 4px 4px;
  padding: 12px 14px;
  background: #fafafa;
}
.vm-card-title {
  font-size: 13px;
  font-weight: bold;
  color: #620507;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.vm-card p { margin: 0; font-size: 12px; line-height: 1.7; }

/* ── Experts: Monthly Topic + Archive ── */
.experts-extras {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.expert-box {
  flex: 1;
  min-width: 220px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0 0 12px;
  overflow: hidden;
}
.expert-box .header-whiteonred { margin: 0 0 10px; }
.expert-box p, .expert-box ul { padding: 0 14px; margin: 6px 0; }
.archive-list { font-size: 12px; padding-left: 28px; }
.archive-list li { margin-bottom: 4px; }
.archive-list a { color: #620507; }
.archive-list a:hover { text-decoration: underline; }

/* ── Products: equal-column grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
  margin: 12px 0;
}
.product-item {
  text-align: center;
  font-size: 12px;
}
.product-item img { display: block; margin: 0 auto 6px; }
.product-item p { margin: 4px 0; }

/* ── Toggles (Products @Home/@Work etc.) ── */
.toggle-section { margin-top: 16px; }
.toggle-item { margin-bottom: 8px; }
.toggle-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: block;
}
.toggle-btn:hover img { opacity: 0.85; }
.toggle-btn img { display: block; }
.toggle-content {
  background: #f9f9f9;
  border-left: 3px solid #620507;
  padding: 10px 14px;
  margin-top: 4px;
  font-size: 12px;
}
.toggle-content ul {
  margin: 0;
  padding-left: 20px;
}
.toggle-content li { margin-bottom: 4px; line-height: 1.6; }

/* ── Programmes: full-width extract header ── */
.full-width-header {
  display: block;
  width: 100%;
}

/* ── Gallery: ensure header-whiteonred shows ── */
.content-main .header-whiteonred:first-child { margin-top: 0; }

/* ── RESPONSIVE additions ── */
@media (max-width: 768px) {
  .vm-cards { flex-direction: column; }
  .experts-extras { flex-direction: column; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Product featured card (Basic Kit) ── */
.product-featured {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 12px 0 16px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 16px;
}
.product-featured img:first-child { flex-shrink: 0; }
.product-featured-info p { margin: 0 0 8px; font-size: 12px; }

/* ── Product grid (Optional extras) ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  margin: 8px 0 12px;
}
.product-item {
  text-align: center;
  font-size: 12px;
}
.product-item img:first-child { display: block; margin: 0 auto 6px; }
.product-item p { margin: 0 0 6px; }

/* Unavailable placeholder */
.product-no-img {
  width: 100px;
  height: 75px;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #999;
  margin: 0 auto 6px;
}

@media (max-width: 768px) {
  .product-featured { flex-direction: column; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================================================================
   NETWORK PAGE — Distributor cards
   ================================================================ */
.distributor-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid #ddd;
}

.distributor-card:last-of-type { border-bottom: none; }

.distributor-logo {
  flex: 0 0 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 12px;
  background: #fafafa;
}

.distributor-logo img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  display: block;
}

.distributor-info { flex: 1; min-width: 0; }

.distributor-name {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: bold;
  color: #620507;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}

.distributor-details {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}

.distributor-details li {
  font-size: 12px;
  padding: 4px 0;
  border-bottom: 1px dotted #eee;
  display: flex;
  align-items: center;
  gap: 8px;
}

.distributor-details li:last-child { border-bottom: none; }

.di-label {
  font-weight: bold;
  color: #555;
  flex: 0 0 52px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.distributor-details a { color: #620507; }
.distributor-details a:hover { text-decoration: underline; }
.distributor-region { margin: 8px 0 0; color: #888; }

@media (max-width: 600px) {
  .distributor-card { flex-direction: column; }
  .distributor-logo { flex: none; width: 100%; min-height: 100px; }
}
