/* ============================
   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;
}

/* Center standalone images */
main img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 25px;
}

/* Gallery images override */
.gallery img {
    margin: 0;
    margin-bottom: 0;
}

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;
}

ul, ol {
    margin-left: 25px;
    padding-left: 10px;
}

li {
    margin-bottom: 10px;
    line-height: 1.2;
}

hr {
    border: none;
    height: 2px;
    background-color: #ccc;
    margin: 30px auto;
    width: 100%;
}

.centered {
    text-align: center;
    margin: 20px auto;
}

img, iframe, video {
    max-width: 100%;
}

/* ============================
   GLOBAL ANCHOR SCROLL FIX
============================= */

[id] {
    scroll-margin-top: 120px;
}

@media (min-width: 761px) {
    [id] {
        scroll-margin-top: 90px;
    }
}

/* ============================
   PAGE BACKGROUNDS
============================= */

body.rep-page {
    background: #001a26 url('repbg1.jpg') repeat top left;
}

body.home-page {
    background: #000 url('1.jpg') repeat top left;
}

body.rccars-page {
    background: #111 url('dirt4.jpg') repeat top left;
}

body.rcstuff-page {
    background: #222 url('marblebg.jpg') repeat top left;
}

body.trains-page {
    background: #000 url('trainsbg.jpg') repeat top left;
}

body.solar-page {
    background: #ffd84f url('solarbg2.jpg') repeat top left;
}

body.camper-page {
    background: #FFE873 url('campbg.jpg') repeat top left;
}

body.boats-page {
    background: #002233 url('wave3.jpg') repeat top left;
}

body.ptboats-page {
    background: #001a26 url('ptboatsbg.jpg') repeat top left;
}

/* ============================
   PAGE-SPECIFIC TEXT COLORS
============================= */

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;
}

/* ============================
   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;
}

/* Mobile logo */
.nav-logo img {
    width: 28px;
    height: auto;
}

.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;
}

/* ============================
   DESKTOP NAV (NO SHRINK)
============================= */

@media (min-width: 761px) {

    .nav-container {
        padding: 6px 16px;
        height: 50px;
    }

    .nav-logo img {
        width: 26px;
    }

    .nav-list a {
        padding: 4px 6px;
        font-size: 16px;
        line-height: 1.1;
    }
}

/* ============================
   SUBMENU (DESKTOP, FIXED)
============================= */

.has-submenu {
    position: relative;
    padding-bottom: 0;
}

.submenu {
    display: none;
    position: absolute;
    top: 100% !important;
    left: 0;
    background: #fff;
    padding: 10px 0;
    list-style: none;
    min-width: 220px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    border-radius: 4px;
    z-index: 3000;
}

.submenu li a {
    display: block;
    padding: 8px 15px;
    color: #000;
}

.submenu li a:hover {
    background: #ddd;
    color: #0077ff;
}

@media (min-width: 761px) {
    .has-submenu:hover .submenu {
        display: block;
    }
}

/* ============================
   HAMBURGER
============================= */

.hamburger {
    display: none;
    width: 32px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    margin-right: 15px;
}

.hamburger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: #00008c;
    border-radius: 2px;
    transition: all 0.35s ease;
}

.hamburger span:nth-child(1) { top: 3px; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 15px; }

.hamburger.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@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;
    }

    .submenu {
        position: static;
        display: none;
        width: 100%;
        background: #f2f2f2;
        padding-left: 10px;
    }

    .submenu.open {
        display: block;
    }

    .has-submenu > a::after {
        content: " ▾";
    }
}

/* ============================
   ACTIVE PAGE HIGHLIGHT
============================= */

.nav-list a.active {
    background: #fff6b3;
    padding: 6px 8px;
    border-radius: 4px;
    font-weight: bold;
}

@media (max-width: 760px) {
    .nav-list a.active {
        background: #fff2a6;
        width: 100%;
        display: block;
    }
}

/* ============================
   VIDEO WRAPPER
============================= */

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 1.5rem auto;
    border-radius: 6px;
}

.video-wrapper::before {
    content: "";
    display: block;
    padding-top: 56.25%;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================
   FOOTER
============================= */

.footer-info {
    margin-top: 40px;
    font-size: 14px;
    opacity: 0.9;
}

/* ============================
   GALLERY
============================= */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 90%;
    margin: 40px auto;
}

.gallery img {
    width: 100%;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.35),
        0 20px 40px rgba(0, 0, 0, 0.25),
        0 0 20px rgba(0, 0, 0, 0.15);
}

.gallery img:hover {
    transform: scale(1.03);
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.45),
        0 28px 60px rgba(0, 0, 0, 0.35),
        0 0 30px rgba(0, 0, 0, 0.25);
}

/* ============================
   LIGHTBOX
============================= */

#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 3rem;
    cursor: pointer;
    user-select: none;
    padding: 0 20px;
}

#prev { left: 10px; }
#next { right: 10px; }

/* ============================
   HERO (NO OVERLAY)
============================= */

.rep-page .hero {
    position: relative;
    margin-top: 40px;
    padding: 0;
}

.rep-page .hero img {
    width: 100%;
    display: block;
}

/* HERO TEXT NOW A NORMAL BLOCK BELOW IMAGE */
.rep-page .hero-text {
    position: static;
    transform: none;
    background: none;
    backdrop-filter: none;
    text-shadow: none;
    padding: 1rem 1rem;
    margin: 0.5rem auto 0 auto;
    max-width: 900px;
    text-align: center;
    color: #000;
    text-shadow: 0 3px 6px rgba(0,0,0,0.35);
}

.rep-page .hero-text h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
}

.rep-page .hero-text h2 {
    font-size: clamp(1.2rem, 4vw, 2rem);
}

/* CLAMP-BASED RESPONSIVE HERO TEXT */
.rep-page .hero .hero-text h1 {
    font-size: clamp(1.2rem, 4vw, 2.8rem);
}

.rep-page .hero .hero-text h2 {
    font-size: clamp(0.9rem, 3vw, 1.6rem);
}

/* ============================
   REP PAGE MAIN SPACING FIX
============================= */

.rep-page main {
    margin-top: 10px !important; /* was 20px */
}

/* ============================
   CONTENT SECTIONS
============================= */

.rep-page #contact,
.rep-page #about {
    max-width: 900px;
    padding: 1rem 1.5rem;
    font-size: 1.15rem;
    line-height: 1.6;
}

.rep-page #about {
    margin: 3rem auto;
}

/* ============================
   LOGO BEHAVIOR
============================= */

.rep-page .nav-logo a.rep-logo {
    cursor: pointer;
    pointer-events: auto !important;
}

/* ============================
   UNIVERSAL YOUTUBE SHORTS
============================= */

/* Shorts video wrapper — remove global 16:9 behavior */
.video-wrapper:has(.shorts-video) {
    position: static !important;
    padding: 0 !important;
    height: auto !important;
    margin: 10px auto 20px auto !important;
}

/* Disable the global 16:9 pseudo-element ONLY for Shorts */
.video-wrapper:has(.shorts-video)::before {
    content: none !important;
    padding-top: 0 !important;
    display: none !important;
}

/* Shorts iframe — vertical layout */
.shorts-video {
    position: static !important;
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 9 / 16;
    height: auto;
    border-radius: 8px;
}

/* Section expands normally */
.rep-page #video {
    overflow: visible;
    height: auto;
}
