/*
 * Historic Aviation Military — Master Stylesheet
 * Version 2.0 — Pomler Classic Modernisation
 * 
 * This single file controls the entire site appearance.
 * Change anything here and it updates on ALL pages instantly.
 *
 * SECTIONS:
 * 1. Reset & Base
 * 2. Hero Banner
 * 3. Navigation Bar
 * 4. Content Card
 * 5. Typography
 * 6. Images
 * 7. Footer
 * 8. Mobile Responsive
 */

/* ═══════════════════════════════════════════════
   1. RESET & BASE
   ═══════════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #5a6fd4 !important;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide the old site structure */
body > center > table:first-child {
    display: none !important;
}

/* ═══════════════════════════════════════════════
   2. HERO BANNER
   ═══════════════════════════════════════════════ */
.ham-hero {
    width: 100%;
    height: 65vh;
    min-height: 320px;
    max-height: 600px;
    overflow: hidden;
    position: relative;
    background: #0a1628;
    display: block;
}

.ham-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 45%;
    display: block;
    opacity: 0.88;
    /* Inline image styling is enforced site-wide; neutralize it for the hero. */
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

.ham-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(5,12,28,0.35) 0%,
        rgba(5,12,28,0.05) 55%,
        rgba(5,12,28,0.6) 100%
    );
    pointer-events: none;
}

/* ═══════════════════════════════════════════════
   3. NAVIGATION BAR
   ═══════════════════════════════════════════════ */
.ham-nav {
    background: linear-gradient(
        90deg,
        #0d1f3c 0%,
        #1a2f55 20%,
        #2c4a8b 50%,
        #1a2f55 80%,
        #0d1f3c 100%
    );
    border-top: 2px solid rgba(255,255,255,0.6);
    border-bottom: 2px solid rgba(255,255,255,0.6);
    padding: 10px 12px;
    text-align: center;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.ham-nav a {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255,255,255,0.13);
    color: white !important;
    text-decoration: none !important;
    border-radius: 30px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 700;
    margin: 3px 3px;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.8);
    letter-spacing: 0.3px;
    transition: background 0.2s ease;
}

.ham-nav details.ham-dd {
    display: inline-block;
    margin: 3px 3px;
    position: relative;
    vertical-align: top;
}

.ham-nav details.ham-dd > summary {
    list-style: none;
    cursor: pointer;
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255,255,255,0.13);
    color: white !important;
    text-decoration: none !important;
    border-radius: 30px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.8);
    letter-spacing: 0.3px;
    user-select: none;
}

.ham-nav details.ham-dd > summary::-webkit-details-marker {
    display: none;
}

.ham-nav details.ham-dd[open] > summary {
    background: rgba(255,255,255,0.28) !important;
}

.ham-dd-menu {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(100% + 8px);
    min-width: 220px;
    max-width: min(92vw, 420px);
    background: rgba(13,31,60,0.98);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 14px;
    padding: 10px 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    z-index: 1100;
}

.ham-nav details.ham-dd[open] .ham-dd-menu {
    display: block;
}

.ham-dd-menu a {
    display: block !important;
    margin: 2px 0;
    padding: 8px 12px !important;
    border-radius: 10px;
    background: transparent !important;
    border: 1px solid transparent !important;
    color: rgba(255,255,255,0.92) !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    white-space: normal !important;
}

.ham-dd-menu a:hover {
    background: rgba(255,255,255,0.12) !important;
    border-color: rgba(255,255,255,0.18);
}

.ham-nav a:hover {
    background: rgba(255,255,255,0.28) !important;
    color: white !important;
}

/* Sub-navigation for section pages */
.ham-subnav {
    background: rgba(0,0,0,0.25);
    padding: 6px 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.ham-subnav a {
    display: inline-block;
    padding: 5px 12px;
    color: rgba(255,255,255,0.8) !important;
    text-decoration: none !important;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    margin: 2px 2px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.2s;
}

.ham-subnav a:hover {
    background: rgba(255,255,255,0.15);
    color: white !important;
}

/* ═══════════════════════════════════════════════
   4. CONTENT CARD
   ═══════════════════════════════════════════════ */
.ham-card-wrap {
    background: #5a6fd4;
    min-height: 50vh;
    padding: 36px 28px 56px;
}

.ham-card {
    max-width: 980px;
    margin: 0 auto;
    background: white;
    border-radius: 28px;
    border: 1px solid #ccc;
    padding: 40px 48px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* ═══════════════════════════════════════════════
   5. TYPOGRAPHY
   ═══════════════════════════════════════════════ */

/* ALL headings — red, centred, Tahoma (incl. nested spans/fonts) */
.ham-card h1,
.ham-card h2,
.ham-card h3,
.ham-card h4,
.ham-card h5,
.ham-card h6 {
    font-family: Tahoma, Arial, sans-serif !important;
    font-weight: 900 !important;
    color: #cc0000 !important;
    text-align: center !important;
    line-height: 1.35 !important;
    margin: 22px 0 12px !important;
    display: block !important;
    width: 100% !important;
}

.ham-card h1 *,
.ham-card h2 *,
.ham-card h3 *,
.ham-card h4 *,
.ham-card h5 *,
.ham-card h6 * {
    color: inherit !important;
}

/* Hub pages: horizontal pill rows (Burtonwood home, Tunison hub, etc.) */
.ham-airfields-hub,
.ham-subpage-links {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px 12px !important;
    margin: 20px 0 28px !important;
    padding: 12px 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.ham-subpage-links > h1,
.ham-subpage-links > h2,
.ham-subpage-links > h3,
.ham-subpage-links > h4,
.ham-subpage-links > h5,
.ham-subpage-links > h6 {
    display: inline-flex !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

.ham-subpage-links > h3 a,
.ham-subpage-links > h4 a,
.ham-subpage-links > h2 a,
.ham-subpage-links > h1 a,
.ham-subpage-links > h5 a,
.ham-subpage-links > h6 a {
    display: inline-block !important;
    padding: 10px 18px !important;
    background: linear-gradient(180deg, #2c4a8b 0%, #1a2f55 100%) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 999px !important;
    border: 2px solid rgba(255, 255, 255, 0.85) !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-align: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    transition: background 0.2s ease, transform 0.15s ease !important;
}

.ham-subpage-links > h3 a:hover,
.ham-subpage-links > h4 a:hover,
.ham-subpage-links > h2 a:hover,
.ham-subpage-links > h1 a:hover,
.ham-subpage-links > h5 a:hover,
.ham-subpage-links > h6 a:hover {
    background: #cc0000 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.ham-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 14px 22px !important;
    min-width: 160px !important;
    background: linear-gradient(180deg, #2c4a8b 0%, #1a2f55 100%) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 999px !important;
    border: 2px solid rgba(255, 255, 255, 0.9) !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25) !important;
    transition: background 0.2s ease, transform 0.15s ease !important;
}

.ham-pill:hover {
    background: #cc0000 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
}

@media (max-width: 768px) {
    .ham-airfields-hub,
    .ham-subpage-links {
        gap: 8px !important;
        padding: 10px 4px !important;
    }
    .ham-pill {
        min-width: 140px !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
    .ham-subpage-links > h3 a,
    .ham-subpage-links > h4 a {
        padding: 9px 14px !important;
        font-size: 13px !important;
    }
}

/* Override any inline heading styles — red titles centred */
.ham-card h1[style], .ham-card h2[style],
.ham-card h3[style], .ham-card h4[style],
.ham-card h5[style], .ham-card h6[style] {
    color: #cc0000 !important;
    text-align: center !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Red titles — larger sizes, NEVER exceed image width (800px) */
.ham-card h1 { font-size: 26px !important; }
.ham-card h2 { font-size: 24px !important; }
.ham-card h3 { font-size: 22px !important; }
.ham-card h4 { font-size: 20px !important; }

/* ALL text constrained to image width — nothing extends beyond images above/below */
.ham-card p,
.ham-card h1, .ham-card h2, .ham-card h3, .ham-card h4, .ham-card h5, .ham-card h6,
.ham-card li, .ham-card td {
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

/* Body text — black, left-aligned, tighter line spacing, centred to match images */
.ham-card p,
.ham-card li {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #000000 !important;
    text-align: left !important;
    padding: 0 8px !important;
    margin: 0 auto 16px auto !important;
}

.ham-card td {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #000000 !important;
}

/* Override ALL inline colour styles on text */
.ham-card p[style],
.ham-card span[style],
.ham-card font {
    color: inherit !important;
    font-size: inherit !important;
}

/* Force black on any grey/colored inline text */
.ham-card p span,
.ham-card p font,
.ham-card td span,
.ham-card td font {
    color: #000000 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 16px !important;
}

/* Malcolm Webb signature — keep special styling */
.ham-sig {
    font-family: 'Segoe Script', 'Dancing Script', cursive !important;
    font-size: 28px !important;
    color: #1a3a8f !important;
    font-weight: 700 !important;
    display: block !important;
    margin: 8px 0 !important;
}

/* Links */
.ham-card a {
    color: #1a2f55 !important;
    text-decoration: underline !important;
}

.ham-card a:hover {
    color: #cc0000 !important;
}

/* Email links */
.ham-card a[href^="mailto:"] {
    color: #cc0000 !important;
    font-weight: 700 !important;
}

/* ═══════════════════════════════════════════════
   6. IMAGES
   ═══════════════════════════════════════════════ */

/* Image wrap div — gsite gold standard: 800px max, centred (same as text/paragraphs) */
.ham-card .ham-img-wrap {
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ALL content images — gsite gold standard: blue border 3px, border-radius 14px, 800px max */
.ham-card img {
    max-width: 800px !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 16px auto !important;
    border: 3px solid #4a7ab5 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}

/* Images inside tables — same treatment as standalone content images */
.ham-card table img {
    max-width: 800px !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 16px auto !important;
    border: 3px solid #4a7ab5 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}

/* Previously we removed borders on images in the "first table" to avoid styling old nav buttons.
   The moderniser now removes nav-button images entirely, so this override is no longer needed
   and would incorrectly strip styling from real content images. */

/* ═══════════════════════════════════════════════
   7. FOOTER
   ═══════════════════════════════════════════════ */
.ham-footer {
    background: linear-gradient(
        90deg,
        #0a1628 0%,
        #1a2f55 50%,
        #0a1628 100%
    );
    border-top: 2px solid rgba(255,255,255,0.5);
    padding: 20px 16px;
    text-align: center;
}

.ham-footer p {
    color: #aab4cc;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    margin: 4px 0;
    letter-spacing: 0.8px;
}

.ham-footer a {
    color: #7a9acc !important;
    text-decoration: none !important;
}

.ham-footer a:hover {
    color: white !important;
}

/* ═══════════════════════════════════════════════
   TABLE CONTENT FIX — forces all content tables
   to display as block so images go full width
   ═══════════════════════════════════════════════ */

/* Collapse all content tables into block layout (incl. thead/tfoot if ever present) */
.ham-card table,
.ham-card thead,
.ham-card tbody,
.ham-card tfoot,
.ham-card caption,
.ham-card colgroup,
.ham-card col,
.ham-card tr,
.ham-card td,
.ham-card th {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    border-collapse: separate !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    text-align: left !important;
}

/* Re-centre images after table collapse */
.ham-card td img,
.ham-card th img {
    display: block !important;
    margin: 20px auto !important;
    width: calc(100% - 16px) !important;
    max-width: calc(100% - 16px) !important;
    height: auto !important;
    border: 3px solid #4a7ab5 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}

/* Headings inside table cells - red centred */
.ham-card td h1, .ham-card td h2,
.ham-card td h3, .ham-card td h4,
.ham-card th h1, .ham-card th h2,
.ham-card th h3, .ham-card th h4 {
    font-family: Tahoma, Arial, sans-serif !important;
    font-weight: 900 !important;
    color: #cc0000 !important;
    text-align: center !important;
    margin: 16px 0 8px !important;
}

/* Paragraphs inside table cells - left aligned */
.ham-card td p, .ham-card th p {
    text-align: left !important;
    color: #000000 !important;
    font-size: 16px !important;
    font-family: Arial, Helvetica, sans-serif !important;
    line-height: 1.85 !important;
}

/* Remove old table borders/backgrounds */
.ham-card table[border],
.ham-card table[bgcolor],
.ham-card td[bgcolor],
.ham-card td[background] {
    border: none !important;
    background: transparent !important;
}

/* ═══════════════════════════════════════════════
   8. MOBILE RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .ham-hero {
        height: 22vh;
        min-height: 130px;
    }

    .ham-card {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .ham-nav a {
        font-size: 11px;
        padding: 7px 11px;
        margin: 2px 2px;
    }

    .ham-nav details.ham-dd > summary {
        font-size: 11px;
        padding: 7px 11px;
        margin: 2px 2px;
    }

    .ham-dd-menu {
        position: static;
        transform: none;
        min-width: 0;
        max-width: 100%;
        margin: 8px auto 0;
    }

    .ham-card h2 { font-size: 20px !important; }
    .ham-card h3 { font-size: 18px !important; }

    .ham-card p,
    .ham-card li,
    .ham-card td {
        font-size: 15px !important;
    }
}

@media (max-width: 480px) {
    .ham-nav a {
        font-size: 10px;
        padding: 6px 9px;
        margin: 2px 1px;
    }

    .ham-card {
        padding: 18px 14px;
        border-radius: 14px;
    }

    .ham-card-wrap {
        padding: 20px 10px 36px;
    }
}

/* ═══════════════════════════════════════════════
   HOME PAGE SPECIALS
   ═══════════════════════════════════════════════ */

/* Hello and welcome heading */
.ham-welcome {
    font-family: Tahoma, Arial, sans-serif !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    color: #cc0000 !important;
    text-align: center !important;
    margin: 0 0 20px !important;
    padding-bottom: 14px !important;
    border-bottom: 2px solid #cc0000 !important;
    display: block !important;
    width: 100% !important;
}

/* Malcolm Webb signature */
.ham-sig {
    font-family: 'Dancing Script', 'Segoe Script', 'Brush Script MT', cursive !important;
    font-size: 36px !important;
    color: #1a3a8f !important;
    font-weight: 700 !important;
    display: block !important;
    margin: 12px 0 !important;
    font-style: italic !important;
    letter-spacing: 1px !important;
}

/* Info/display box — title + lines above an image (G site model) */
.ham-info-box {
    max-width: 800px;
    margin: 20px auto 24px;
    padding: 20px 24px;
    border: 2px solid #4a7ab5;
    border-radius: 14px;
    background: #f8fafd;
    box-sizing: border-box;
}

.ham-info-box h4 {
    margin: 0 0 12px !important;
}

.ham-info-box p {
    margin: 0 0 8px !important;
}

.ham-info-box p:last-child {
    margin-bottom: 0 !important;
}

/* Centred red caption underneath a title (sub-caption between images) */
.ham-card p.ham-caption-red,
.ham-caption-red {
    font-family: Tahoma, Arial, sans-serif !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #cc0000 !important;
    text-align: center !important;
    margin: 6px auto 12px !important;
    max-width: 800px !important;
    display: block !important;
}

/* Contact bottom block */
.ham-contact-bottom {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.ham-contact-bottom p {
    font-family: Arial, sans-serif !important;
    font-size: 15px !important;
    color: #333 !important;
    margin: 6px 0 !important;
    text-align: center !important;
}

.ham-contact-bottom a {
    color: #cc0000 !important;
    font-weight: 700 !important;
}
