/* ============================================================
   hosam.com — Sensitive Restoration Stylesheet
   Based on original istyle.css by S. A. McCall
   Modernized for responsive/mobile use; character preserved.
   ============================================================ */

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

body {
  background-color: #FFFDDF;
  color: #000000;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

/* ─── Links (preserved exactly from original) ─── */
a:link    { color: #0000ff; text-decoration: none; }
a:visited { color: green;   text-decoration: none; }
a:active  { color: #ff0000; text-decoration: none; }
a:hover   { text-decoration: underline; }

/* ─── Headings (preserved: Times New Roman, centered, black, bold) ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Times New Roman', Times, serif;
  text-align: center;
  color: #000000;
  font-weight: bold;
  line-height: 1.3;
  margin: 0.8em 0 0.4em;
}

h1 { font-size: 1.6em; }
h2 { font-size: 1.35em; }
h3 { font-size: 1.15em; }
h4 { font-size: 1.05em; }
h5 { font-size: 0.9em; }
h6 { font-size: 0.8em; }

/* ─── Paragraph & Block spacing ─── */
p { margin: 0.65em 0; }

blockquote {
  margin: 10px 20px;
  padding: 0;
}

/* ─── Lists ─── */
ul, ol {
  margin: 0.5em 0 0.5em 1.4em;
}

li { margin: 0.2em 0; }

/* ─── Tables ─── */
table { border-collapse: collapse; }
td, th {
  padding: 2px 6px;
  vertical-align: top;
}

/* ─── Horizontal rule ─── */
hr {
  border: none;
  border-top: 1px solid #c8c090;
  margin: 12px 0;
}

/* ─── Images ─── */
img { max-width: 100%; height: auto; }

/* ============================================================
   SITE LAYOUT — sidebar + main content
   ============================================================ */

.site-wrapper {
  display: flex;
  min-height: 100vh;
  align-items: flex-start;
}

/* ─── Sidebar ─── */
.sidebar {
  width: 20%;
  min-width: 160px;
  max-width: 220px;
  flex-shrink: 0;
  background-color: #FFFDDF;
  border-right: 1px solid #c8c090;
  padding: 12px 10px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

/* Clock widget */
.clock-widget {
  text-align: center;
  margin-bottom: 10px;
}

.clock-widget input {
  width: 100%;
  text-align: center;
  background: #FFFDDF;
  border: 1px solid #aaa;
  font-family: Arial, sans-serif;
  font-size: 12px;
  padding: 2px 4px;
  color: #000;
}

.clock-label {
  display: block;
  font-size: 10px;
  color: #444;
  margin-top: 3px;
}

/* Navigation menu */
.nav-menu h3 {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.05em;
  text-align: center;
  color: #000;
  font-weight: bold;
  margin: 8px 0 6px;
}

.nav-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu ul li {
  margin: 1px 0;
}

.nav-menu ul li a {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 12.5px;
  padding: 3px 4px;
  color: #0000ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-menu ul li a:visited { color: green; }
.nav-menu ul li a:active  { color: #ff0000; }
.nav-menu ul li a:hover   { text-decoration: underline; }

/* Sub-menu (second-level navigation, e.g. General Data, Diesel Data) */
.nav-menu ul ul {
  margin: 0 0 4px 10px;
  padding: 0;
}

.nav-menu ul ul li a {
  font-size: 12px;
}

/* Copyright line in sidebar */
.sidebar-copyright {
  font-size: 10.5px;
  text-align: center;
  color: #333;
  margin-top: 16px;
}

/* ─── Main Content ─── */
.content {
  flex: 1;
  padding: 16px 28px 24px;
  min-width: 0;  /* prevents flex overflow */
}

/* ─── "Return to menu" links ─── */
.return-link {
  display: block;
  text-align: center;
  margin: 16px 0 8px;
  font-size: 13px;
}

/* ─── Hamburger button — hidden on desktop ─── */
.nav-toggle {
  display: none;
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  background: #FFFDDF;
  border: 1px solid #999;
  padding: 5px 10px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 3px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.nav-toggle:hover { background: #f5f0cc; }

/* Overlay behind open sidebar on mobile */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 900;
}

/* ─── Close button inside sidebar (mobile only) ─── */
.nav-close {
  display: none;
  float: right;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #333;
  padding: 0 2px;
  line-height: 1;
}

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

  .nav-toggle {
    display: block;
  }

  .nav-close {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 75%;
    max-width: 280px;
    height: 100vh;
    z-index: 950;
    transition: left 0.25s ease;
    border-right: 2px solid #c8c090;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
  }

  .sidebar.open {
    left: 0;
  }

  .nav-overlay.open {
    display: block;
  }

  .content {
    padding: 48px 14px 16px;  /* top pad clears hamburger button */
  }

  /* Allow nav items to wrap on narrow screens */
  .nav-menu ul li a {
    white-space: normal;
  }

  /* Smaller heading sizes on mobile */
  h2 { font-size: 1.2em; }
  h3 { font-size: 1.05em; }
}

/* ============================================================
   PHOTO GALLERIES (smrf2002, model galleries, etc.)
   ============================================================ */

.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 16px 0;
}

.photo-grid figure {
  margin: 0;
  text-align: center;
}

.photo-grid figure img {
  display: block;
  max-width: 200px;
  border: 1px solid #c8c090;
}

.photo-grid figure figcaption {
  font-size: 11px;
  color: #333;
  margin-top: 4px;
}

/* Single-photo page (original gallery style) */
.photo-single {
  text-align: center;
  margin: 12px 0;
}

.photo-single img {
  max-width: 100%;
  border: 1px solid #c8c090;
}

/* Photo navigation (first / prev / next / last) */
.photo-nav {
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 13px;
  margin: 8px 0 12px;
}

.photo-nav a {
  margin: 0 6px;
}

/* ─── Weekly Specials navigation bar ─── */
.weekly-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid #c8c090;
  margin-bottom: 14px;
}

.weekly-nav a {
  color: #0000ff;
  white-space: nowrap;
}

.weekly-nav-sep {
  margin: 0 7px;
  vertical-align: middle;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .weekly-nav { gap: 4px; }
  .weekly-nav-sep { margin: 0 5px; }
}

