/* ============================
   GLOBAL RESET & BASE STYLES
============================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: Arial, Helvetica, sans-serif;
    color: #000;
    min-height: 100%;
}

body {
    overflow-x: hidden; /* prevent horizontal cut-off/scroll */
}

main {
    padding: 100px 20px 40px;
    max-width: 1000px;
    margin: auto;
}

@media (max-width: 760px) {
    main {
        padding: 80px 15px 30px;
        max-width: 100%;
    }
}

h1, h2, h3 {
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Improve list spacing and indentation */
ul, ol {
    margin-left: 25px;      /* clean, consistent indent */
    padding-left: 10px;     /* prevents bullets from touching the edge */
}

li {
    margin-bottom: 10px;    /* matches paragraph spacing */
    line-height: 1.2;       /* closer to the <p> tags */
}

/* Horizontal rule spacing */
hr {
    border: none;            /* remove default browser line */
    height: 2px;             /* thickness */
    background-color: #ccc;  /* color */
    margin: 30px auto;       /* spacing */
    width: 100%;             /* full width or adjust as needed */
}

/* Center all quotes consistently */
.quote {
    text-align: center;
    font-style: italic;
    font-weight: 600;
    display: block;
    margin: 25px auto;
    line-height: 1.5;
}

.centered {
    text-align: center;
    margin: 20px auto;
    width: 100%;
}

/* Make all embeds respect container width */
img, iframe, video {
    max-width: 100%;
}

/* ============================
   NAVIGATION BAR
============================= */

.nav-pane {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #e7e9ff; 
    border-bottom: 1px solid #ccc;
    z-index: 9999;
}

.nav-container {
    display: flex;
    align-items: center;
    padding: 10px 15px;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-list a {
    color: #000;
    text-decoration: none;
    font-size: 17px;
    padding: 6px 4px;
}

.nav-list a:hover {
    color: #333;
}

/* Logo */
.nav-logo img {
    width: 40px;
    height: auto;
}

/* ============================
   SUBMENU (DESKTOP)
============================= */

.has-submenu {
    position: relative;
}

/* Hidden by default */
.submenu {
    display: none;
    position: absolute;
    left: 0;
    top: 50px;
    background: #f2f2f2;
    padding: 10px 0;
    list-style: none;
    margin: 0;
    min-width: 220px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    border-radius: 4px;
    z-index: 3000;
}

/* Submenu links */
.submenu li a {
    display: block;
    padding: 8px 15px;
    color: #000;
    font-weight: 500;
    text-decoration: none;
}

.submenu li a:hover {
    background: #ddd;
    color: #0077ff;
}

/* Desktop submenu behavior */
@media (min-width: 761px) {

    .has-submenu {
        position: relative;
    }

    .submenu {
        display: none;
        position: absolute;
        top: 100%;        /* sits directly under the parent */
        left: 0;
        background: #ffffff;
        padding: 10px 0;
        list-style: none;
        margin: 0;
        min-width: 220px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.25);
        border-radius: 4px;
        z-index: 3000;
    }

    .has-submenu:hover .submenu {
        display: block;
    }

    .submenu li a {
        display: block;
        padding: 8px 15px;
        color: #333;
        text-decoration: none;
        white-space: nowrap;
    }

    .submenu li a:hover {
        background: #e6f0ff;
        color: #0077ff;
    }

    .submenu.open {
        display: block !important;
    }
}

/* ============================
   HAMBURGER (MORPH TO X)
============================= */

.hamburger {
    display: none;
    width: 32px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    margin-right: 15px;
}

.hamburger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    background: #00008c; /* dark blue */
    border-radius: 2px;
    transition: all 0.35s ease;
}

/* Top bar */
.hamburger span:nth-child(1) {
    top: 4px;
}

/* Middle bar */
.hamburger span:nth-child(2) {
    top: 12px;
}

/* Bottom bar */
.hamburger span:nth-child(3) {
    top: 20px;
}

/* When menu is open → morph into X */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hover effect on bars */
.hamburger:hover span {
    background: #990000;
}

/* Show hamburger on mobile */
@media (max-width: 760px) {
    .hamburger {
        display: block;
    }
}

/* ============================
   MOBILE NAVIGATION
============================= */

@media (max-width: 760px) {

    .nav-groups {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: #e6e6e6;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-groups.open {
        max-height: 600px;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        gap: 12px;
    }

    /* Mobile submenu toggle */
    .submenu {
        position: static;
        display: none;
        width: 100%;
        border: none;
        background: #f2f2f2;
        padding-left: 10px;
    }

    .submenu.open {
        display: block;
    }

    .has-submenu > a::after {
        content: " ▾";
    }

    .submenu li a {
        color: #000;
    }
}

/* ============================
   SELECTED PAGE HIGHLIGHT (LIGHT YELLOW)
============================= */

.nav-list a.active {
    background: #fff6b3;   /* soft light yellow */
    padding: 6px 8px;
    border-radius: 4px;
    font-weight: bold;
    color: #000;           /* ensure text stays black */
}

@media (max-width: 760px) {
    .nav-list a.active {
        background: #fff2a6;  /* slightly deeper yellow for mobile */
        width: 100%;
        display: block;
    }
}

/* ============================
   PAGE-SPECIFIC BACKGROUNDS
============================= */

/* Home Page */
body.home-page {
    background: #000 url('1.jpg') repeat top left;
}

/* R/C Cars */
body.rccars-page {
    background: #111 url('dirt4.jpg') repeat top left;
}

/* Other R/C Info */
body.rcstuff-page {
    background: #222 url('marblebg.jpg') repeat top left;
}

/* Trains */
body.trains-page {
    background: #000 url('trainsbg.jpg') repeat top left;
}

/* Solar */
body.solar-page {
    background: #ffd84f url('solarbg2.jpg') repeat top left;
}

/* Camping */
body.camper-page {
    background: #FFE873 url('campbg.jpg') repeat top left;
}

/* All non‑PT boat pages */
body.boats-page {
    background: #002233 url('wave3.jpg') repeat top left;
}

/* PT‑Boats pages */
body.ptboats-page {
    background: #001a26 url('ptboatsbg.jpg') repeat top left;
}

/* ============================
   PAGE-SPECIFIC TEXT COLORS
============================= */

/* Home page uses white text */
body.home-page,
body.home-page h1,
body.home-page h2,
body.home-page h3,
body.home-page p,
body.home-page li {
    color: #fff;
}

/* ============================
   RESPONSIVE VIDEO WRAPPER (MAX 560PX)
============================= */

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 560px;   /* ← hard cap */
    margin: 1.5rem auto;
    padding: 0;
    overflow: hidden;
    border-radius: 6px;
}

.video-wrapper::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ============================
   FOOTER
============================= */

.footer-info {
    margin-top: 40px;
    font-size: 14px;
    opacity: 0.9;
}

.footer-info a {
    color: #ffd84f;
}

/* ============================
   IMAGES
============================= */

.scaleA {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
}

/* ============================
   DESKTOP NAV BAR — TIGHTER VERSION
============================= */
@media (min-width: 761px) {

    /* Reduce container padding further */
    .nav-container {
        padding-top: 3px;     /* was 4px */
        padding-bottom: 1px;  /* was 4px */
    }

    /* Reduce link padding slightly more */
    .nav-list a {
        padding-top: 1px;     /* was 3–4px */
        padding-bottom: 1px;
        line-height: 1.0;
        font-size: 16px;     /* was 17px → subtle reduction */

    }

    /* Shrink logo slightly to match reduced height */
    .nav-logo img {
        width: 23px;          /* was 32–34px */
    }

    /* Remove hamburger vertical space on desktop */
    .hamburger {
        height: 0;            /* eliminates reserved height */
        padding: 0;
        margin: 0;
    }

    .hamburger span {
        display: none;        /* fully hides bars on desktop */
    }
}

/* ============================
   MOBILE SIZE REDUCTION
============================= */
@media (max-width: 760px) {
    .nav-logo img {
        width: 28px;   /* was 40px */
        height: auto;
    }
}

/* Reduce hamburger vertical footprint */
.hamburger {
    height: 20px;        /* was 28px */
}

.hamburger span {
    height: 3px;         /* was 4px */
}

/* Adjust bar spacing */
.hamburger span:nth-child(1) { top: 3px; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 15px; }

/* Adjust anchor links to stop before nav bar */
@media (min-width: 761px) {
    [id] { scroll-margin-top: 70px; }
}

@media (max-width: 760px) {
    [id] { scroll-margin-top: 70px; }
}

/* ============================
   DESKTOP NAV BAR — EXACT 30PX HEIGHT
============================= */
@media (min-width: 761px) {

    /* Total height target: 30px */
    .nav-container {
        padding-top: 3px;   /* balanced */
        padding-bottom: 3px;
    }

    /* Logo height: 24px (centered inside 30px bar) */
    .nav-logo img {
        width: 24px;        /* was 23px */
        height: auto;
    }

    /* Link vertical footprint: 16px text + 2px padding = 18px */
    .nav-list a {
        padding-top: 1px;
        padding-bottom: 1px;
        line-height: 1.0;
        font-size: 16px;
    }

    /* Remove hamburger space on desktop */
    .hamburger {
        height: 0;
        padding: 0;
        margin: 0;
    }

    .hamburger span {
        display: none;
    }
}
