/* =============================================
   Better Built Buildings - style.css
   betterbuiltbuildings.ucanfindit.net
   ============================================= */

/* --- CSS Custom Properties --- */
:root {
  --maroon:    #800000;
  --maroon-hi: #B13B25;
  --black:     #000000;
  --white:     #ffffff;
  --bg-gray:   #CCCCCC;
  --bg-cream:  #fdfdf1;
  --sidebar-w: 210px;
  --trans:     0.18s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10pt;
  margin: 0;
  padding: 0;
  background: var(--bg-gray);
}

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

/* --- Links --- */
#main-content a         { color: #000080; text-decoration: none; }
#main-content a:hover   { color: #000000; text-decoration: underline; }
#main-content a:visited { color: #800080; text-decoration: none; }

p  { color: #656565; font-size: 10pt; font-family: Verdana, sans-serif;
     margin-top: 7px; margin-bottom: 12px; }
ul { font-family: Verdana, sans-serif; font-size: 10pt; color: #4E4E4E; }

h1 { font-size: 24pt; font-style: italic; color: #000000;
     font-family: Arial, sans-serif; font-weight: bold; margin: 0 0 4px 0; }
h2 { font-size: 16pt; font-family: Arial, sans-serif;
     color: #000080; font-weight: bold; }
h3 { font-size: 1.1em; font-family: Verdana, sans-serif; }

/* --- Moving banner --- */
#moving-banner {
  background: #cc0000; color: var(--white);
  text-align: center; padding: 10px 16px;
  font-family: Arial, sans-serif; font-size: 13pt; font-weight: bold;
}
#moving-banner a       { color: #ffff99; text-decoration: underline; }
#moving-banner a:hover { color: var(--white); }

/* --- Outer wrapper --- */
#wrapper {
  margin: 0 auto;
  max-width: 1000px;
  width: 100%;
  background: var(--bg-gray);
}

/* --- Site header: logo + title --- */
#site-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 12px;
  background: var(--white);
  flex-wrap: wrap;
}
#site-logo       { flex-shrink: 0; width: 150px; }
#site-logo img   { width: 100%; height: auto; display: block; }
#site-title      { flex: 1; min-width: 160px; }
#site-title h1   { font-size: 22pt; }
#site-title .tagline {
  font-size: 10pt; margin: 0; color: #555;
  font-family: Verdana, sans-serif;
}

/* Subline */
#subline {
  text-align: center;
  margin: 0;
  padding: 5px 8px;
  background: var(--white);
  font-size: 12pt;
  font-family: Arial, sans-serif;
  color: #000080;
  font-weight: bold;
  border-top: 1px solid #ddd;
}

/* =============================================
   TOP NAV BAR
   Desktop (>768px): full row of block links
   Mobile  (<=768px): hamburger + dropdown
   ============================================= */
#top-nav-bar {
  background: var(--black);
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 32px;
}

/* Hamburger button - HIDDEN on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: #333;
  border: 1px solid #555;
  border-radius: 3px;
  padding: 7px 9px;
  cursor: pointer;
  margin: 5px 8px;
  flex-shrink: 0;
}
.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

/* Nav list */
.site-nav { width: 100%; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav li { margin: 0; }

.site-nav a {
  display: block;
  padding: 7px 10px;
  color: var(--white);
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--black);
  border-bottom: 3px solid var(--maroon);
  border-right: 1px solid #2a2a2a;
  white-space: nowrap;
  transition: background var(--trans);
}
.site-nav a:hover,
.site-nav a:focus-visible        { background: var(--maroon); }
.site-nav a[aria-current="page"] { background: var(--maroon); border-bottom-color: var(--white); }

/* =============================================
   TWO-COLUMN LAYOUT  -  NO TABLES
   Flexbox row: sidebar (fixed) | content (fluid)
   ============================================= */
#page-body {
  display: flex;
  flex-direction: row;       /* side by side on desktop */
  align-items: stretch;      /* both columns full height */
  width: 100%;
}

/* Left sidebar */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;            /* never squish the sidebar */
  flex-grow: 0;
  background: var(--maroon);
}

/* Right content area */
#main-content {
  flex: 1 1 auto;
  min-width: 0;              /* critical: lets flex child shrink below content width */
  background: var(--bg-cream);
  padding: 12px 14px;
  min-height: 350px;
}

/* --- Sidebar block menu --- */
#ddblueblockmenu { border: 1px solid var(--white); width: 100%; }
#ddblueblockmenu ul {
  padding: 0 0 0 3px; margin: 0;
  font: 90% 'Trebuchet MS','Lucida Grande',Arial,sans-serif;
  list-style: none;
}
#ddblueblockmenu li a {
  padding: 4px 0 4px 9px;
  display: block;
  border-left: #ddd 3px solid;
  color: var(--white);
  border-bottom: var(--white) 1px solid;
  background: var(--maroon);
  text-decoration: none;
}
#ddblueblockmenu li a:hover { border-left-color: var(--black); background: var(--maroon-hi); }
#ddblueblockmenu div.menutitle {
  padding: 2px 0 2px 5px;
  font: bold 95% 'Trebuchet MS','Lucida Grande',Arial,sans-serif;
  color: var(--white);
  border-bottom: var(--white) 1px solid;
  background: var(--black);
}

/* Sidebar ad */
.sidebar-ad { text-align: center; padding: 8px 4px; }
.sidebar-ad .ad-label {
  color: var(--white);
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 4px 0;
  font-family: Arial, sans-serif;
}
.ad-responsive { width: 100%; text-align: center; overflow: hidden; }

/* Dealer call-out box */
.dealer-box {
  border: 2px solid var(--maroon);
  background: #fff8f8;
  padding: 12px 16px;
  margin: 16px 0 10px 0;
  text-align: center;
  font-family: Verdana, sans-serif;
  font-size: 10pt;
  color: #333;
}
.dealer-box a { color: var(--maroon); font-weight: bold; text-decoration: none; }
.dealer-box a:hover { text-decoration: underline; }

/* --- Footer --- */
#footer {
  background: var(--maroon);
  border-top: 1px solid #ccc;
  border-bottom: 5px solid #ccc;
  width: 100%;
}
.footer-inner { padding: 10px 14px; }
.footer-links { margin-bottom: 6px; }
.footer-links a       { color: #ddd; font-size: 80%; text-decoration: none; }
.footer-links a:hover { color: #bbb; text-decoration: underline; }
.footer-copy {
  color: #ddd; font-size: 75%;
  text-align: center; margin-top: 8px;
  font-family: Verdana, sans-serif;
}
.footer-copy a { color: #ccc; text-decoration: none; }

#footer-text-box {
  border: 2px solid #C0C0C0;
  background: #DDDDDD;
  padding: 10px 12px;
  margin: 8px 0;
  color: #333;
}
#footer-text-box p { color: #333; font-size: 10pt; }

/* =============================================
   RESPONSIVE  -  768px and below
   ============================================= */
@media (max-width: 768px) {

  /* Header */
  #site-header { gap: 10px; padding: 8px; }
  #site-logo   { width: 110px; }
  #site-title h1 { font-size: 17pt; }

  /* Hamburger shows; full nav hides until toggled */
  .nav-toggle           { display: flex; }
  #site-nav             { display: none; width: 100%; }
  #site-nav.open        { display: block; }

  /* Nav items go vertical */
  .site-nav ul          { flex-direction: column; }
  .site-nav li          { width: 100%; }
  .site-nav a {
    padding: 11px 16px;
    border-right: none;
    border-bottom: 1px solid #333;
    font-size: 13px;
    white-space: normal;
  }

  /* Stack sidebar above content */
  #page-body            { flex-direction: column; }
  #sidebar              { width: 100%; }
  #main-content         { min-height: auto; padding: 10px; }

  h2 { font-size: 14pt; }
  h3 { font-size: 1em; }
}

@media (max-width: 480px) {
  #site-header { flex-direction: column; align-items: flex-start; }
  h1           { font-size: 16pt; }
}
