/* ============================================================
   Dave's Southern Railway System — stylesheet
   Replaces Microsoft FrontPage "Capsules" theme
   Colors inspired by the Southern Railway's classic livery:
     Pullman Green, Gold lettering, Dark Red accent
   ============================================================ */

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

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #111111;
    background: #ffffff;
}

a            { color: #8b0000; }
a:visited    { color: #336666; }
a:hover      { color: #cc0000; text-decoration: underline; }
a:active     { color: #000099; }

/* --- Site header ------------------------------------------ */
#site-header {
    background: #1b4332;          /* Pullman Green */
    color: #f0d060;               /* Gold */
    padding: 18px 24px 14px;
    border-bottom: 4px solid #f0d060;
}

#site-header h1 {
    margin: 0 0 4px 0;
    font-size: 1.8em;
    font-weight: bold;
    letter-spacing: 0.03em;
    color: #f0d060;
}

#site-header .site-subtitle {
    font-size: 0.9em;
    color: #a8d5b5;
    margin: 0;
}

/* --- Navigation bar --------------------------------------- */
nav#main-nav {
    background: #2d6a4f;          /* Medium SR green */
    padding: 0;
    border-bottom: 2px solid #1b4332;
}

nav#main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

nav#main-nav li { margin: 0; }

nav#main-nav a,
nav#main-nav span.nav-current {
    display: block;
    padding: 9px 18px;
    font-size: 0.92em;
    font-weight: bold;
    text-decoration: none;
    color: #ffffff;
    border-right: 1px solid #1b4332;
    transition: background 0.15s;
}

nav#main-nav a:hover {
    background: #1b4332;
    color: #f0d060;
}

nav#main-nav span.nav-current {
    background: #1b4332;
    color: #f0d060;
    cursor: default;
}

/* sub-nav (second level, shown on sub-pages) */
nav#sub-nav {
    background: #f5f0e8;
    border-bottom: 1px solid #c9b99a;
    padding: 0;
}

nav#sub-nav ul {
    list-style: none;
    margin: 0;
    padding: 0 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

nav#sub-nav a,
nav#sub-nav span.nav-current {
    display: block;
    padding: 6px 14px;
    font-size: 0.85em;
    font-weight: bold;
    text-decoration: none;
    color: #1b4332;
    border-right: 1px solid #c9b99a;
}

nav#sub-nav a:hover       { color: #8b0000; }
nav#sub-nav span.nav-current { color: #8b0000; cursor: default; }

/* --- Page content area ------------------------------------ */
#content {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 28px 40px;
}

/* --- Headings --------------------------------------------- */
h1 { color: #1b4332; margin-top: 0.5em; }
h2 { color: #1b4332; border-bottom: 2px solid #2d6a4f; padding-bottom: 4px; }
h3 { color: #2d6a4f; }

/* --- Horizontal rule (replaces FrontPage separator image) - */
hr.sr-sep {
    border: none;
    border-top: 3px solid #2d6a4f;
    margin: 24px auto;
    width: 50%;
    max-width: 360px;
}

hr { border: none; border-top: 1px solid #cccccc; margin: 20px 0; }

/* --- Lists ------------------------------------------------ */
ul, ol { margin: 0.5em 0 1em 0; padding-left: 1.6em; }
li { margin-bottom: 0.5em; }

/* links section styled list */
ul.links-list {
    list-style: none;
    padding: 0;
}

ul.links-list li {
    padding: 10px 0 10px 20px;
    border-bottom: 1px solid #e8e8e8;
    position: relative;
}

ul.links-list li::before {
    content: "▶";
    color: #2d6a4f;
    position: absolute;
    left: 0;
    top: 10px;
    font-size: 0.8em;
}

/* --- Tables ----------------------------------------------- */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    font-size: 0.95em;
}

table caption {
    font-weight: bold;
    font-size: 1.05em;
    margin-bottom: 8px;
    text-align: center;
    color: #1b4332;
}

/* Data table (Extant Cabs, photo grids) */
table.data-table th,
table.data-table td {
    border: 1px solid #99cc99;
    padding: 6px 10px;
    vertical-align: top;
    text-align: left;
}

table.data-table th {
    background: #2d6a4f;
    color: #ffffff;
    font-weight: bold;
    text-align: center;
}

table.data-table tr:nth-child(even) td { background: #f4faf4; }
table.data-table tr:hover td          { background: #e8f5e8; }

/* Photo grid table */
table.photo-grid {
    width: auto;
    margin: 0 auto;
}

table.photo-grid td {
    border: 1px solid #99cc99;
    padding: 10px;
    text-align: center;
    vertical-align: top;
}

/* WebRing table */
table.webring {
    width: auto;
    margin: 20px auto;
    border: 1px solid #99cc99;
}

table.webring td,
table.webring th {
    padding: 8px 16px;
    text-align: center;
    border: 1px solid #99cc99;
}

/* --- Guestbook form --------------------------------------- */
.guestbook-form {
    max-width: 600px;
    margin: 0 auto;
}

.guestbook-form p { margin: 0.6em 0; }

.guestbook-form label {
    display: inline-block;
    width: 180px;
    font-weight: bold;
    vertical-align: top;
}

.guestbook-form input[type="text"],
.guestbook-form input[type="email"],
.guestbook-form select,
.guestbook-form textarea {
    border: 1px solid #999;
    padding: 4px 6px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95em;
    border-radius: 2px;
}

.guestbook-form textarea { width: 100%; }

.guestbook-form input[type="submit"],
.guestbook-form input[type="reset"] {
    background: #2d6a4f;
    color: #fff;
    border: none;
    padding: 6px 18px;
    font-size: 0.95em;
    font-weight: bold;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 8px;
}

.guestbook-form input[type="submit"]:hover { background: #1b4332; }
.guestbook-form input[type="reset"] { background: #666; }
.guestbook-form input[type="reset"]:hover  { background: #444; }

/* --- Footer ----------------------------------------------- */
#site-footer {
    background: #f5f0e8;
    border-top: 3px solid #2d6a4f;
    padding: 16px 24px;
    text-align: center;
    font-size: 0.82em;
    color: #555555;
    margin-top: 40px;
}

#site-footer a { color: #2d6a4f; }
#site-footer a:hover { color: #8b0000; }

/* --- Utility ---------------------------------------------- */
.center        { text-align: center; }
.notice        { background: #fff8e1; border-left: 4px solid #f0a500; padding: 10px 14px; margin: 1em 0; font-size: 0.92em; }
img            { max-width: 100%; height: auto; }

/* --- Responsive ------------------------------------------- */
@media (max-width: 640px) {
    #site-header h1 { font-size: 1.3em; }
    #content        { padding: 16px 14px 28px; }
    nav#main-nav a,
    nav#main-nav span.nav-current { padding: 8px 10px; font-size: 0.82em; }
    table.data-table { font-size: 0.82em; }
}
