/* General Site Hybrid CSS - For All Pages
 * Modernizes image-based layouts across the entire site
 * Maintains visual design while using modern CSS Grid/Flexbox
 */

/* ========================================
 * Base HTML/Body Styles
 * ======================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

* {
    box-sizing: inherit;
}

/* Remove default spacing from images */
img {
    border: 0;
    vertical-align: top;
}

/* ========================================
 * CSS Variables for Theme
 * ======================================== */
:root {
    --stf-primary: #f8a406;
    --stf-bg-dark: #000000;
    --stf-bg-darker: #060606;
    --stf-bg-content: #091418;
    --stf-bg-sidebar: #09131A;
    --stf-text-light: #ffffff;
    --stf-border: #333333;
    
    /* Typography - consistent with fonts-base.css */
    --font-primary: 'Verdana', 'Arial', 'Helvetica', sans-serif;
    --font-secondary: 'Courier New', 'Courier', monospace;
}

/* ========================================
 * Base Container
 * ======================================== */
.site-container {
    max-width: 1360px;
    margin: 0 auto;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    display: block;
    position: relative;
}

/* Ensure site-header centers properly */
.site-header {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    box-sizing: border-box;
    margin-bottom: 0 !important; /* Remove any gap below header */
    padding: 0;
    display: block;
}

/* Ensure no spacing between header and footer */
.site-header + .site-footer {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove any whitespace/gap between elements */
.site-container > * {
    margin-top: 0;
    margin-bottom: 0;
}

.site-container > header + footer {
    margin-top: 0 !important;
}

/* Remove whitespace between header and footer - handle inline whitespace */
.site-header {
    display: block;
}

.site-footer {
    display: block;
}

/* Ensure no gap from collapsed whitespace */
.site-container {
    font-size: 0;
    line-height: 0;
}

.site-container > * {
    font-size: initial;
    line-height: initial;
}

/* ========================================
 * Header Banner Section (Common to all pages)
 * ======================================== */
.header-banner {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
}

.header-banner img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 1360px;
}

/* ========================================
 * Standard Page Layout (Left Sidebar + Main + Right Sidebar)
 * Used by most pages: about, fleet, mars, etc.
 * ======================================== */
.page-layout {
    display: grid;
    grid-template-columns: 36px 1fr 129px 35px;
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    gap: 0;
    box-sizing: border-box;
    position: relative;
}

/* Ensure main content has proper width on large screens */
@media (min-width: 1361px) {
    .page-layout {
        grid-template-columns: 36px 1160px 129px 35px;
    }
    
    .page-main-content {
        width: 1160px;
        max-width: 1160px;
    }
}

/* Left Sidebar */
.page-left-sidebar {
    width: 36px;
    background-image: url('/images/stf_site_left_v18.jpg');
    background-repeat: repeat-y;
    background-position: top left;
    background-size: 36px auto;
    min-height: 100px;
}

/* Main Content Area */
.page-main-content {
    width: 100%;
    background-color: var(--stf-bg-content);
    padding: 0;
    min-height: 100px;
    position: relative;
    text-align: left; /* Default text alignment */
    box-sizing: border-box;
    overflow: hidden;
}

.page-main-content > div {
    padding: 20px;
    max-width: 100%;
    box-sizing: border-box;
    width: 100%;
}

.page-main-content > img:first-child {
    display: block;
    width: 100%;
    max-width: 1160px;
    height: auto;
    margin: 0;
    padding: 0;
}

.page-main-content img[width="1160"],
.page-main-content img[width="1161"] {
    width: 100%;
    max-width: 1160px;
    height: auto;
    display: block;
}

/* Right Sidebar/Info Panel */
.page-right-sidebar {
    width: 129px;
    background-color: var(--stf-bg-sidebar);
    padding: 0;
    min-height: 100px;
}

.page-right-sidebar img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Right Edge */
.page-right-edge {
    width: 35px;
    background-image: url('/images/stf_site_right_v18.jpg');
    background-repeat: repeat-y;
    background-position: top right;
    background-size: 35px auto;
    min-height: 100px;
}

/* ========================================
 * Bottom Corner Sections
 * ======================================== */
.page-bottom-corners {
    display: grid;
    grid-template-columns: 36px 1fr 129px 35px;
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    gap: 0;
    box-sizing: border-box;
    margin-bottom: 0 !important; /* Remove any gap below bottom corners */
    padding-bottom: 0 !important;
    border-bottom: 0;
}

/* Ensure bottom corners match page layout on large screens */
@media (min-width: 1361px) {
    .page-bottom-corners {
        grid-template-columns: 36px 1160px 129px 35px;
    }
}

.page-bottom-left-corner {
    width: 36px;
    background-image: url('/images/stf_fleet_bottom_left_corner_v18.jpg');
    background-repeat: no-repeat;
    background-position: top left;
    background-size: 36px auto;
    min-height: 100px;
}

.page-bottom-main {
    width: 100%;
    background-image: url('/images/stf_fleet_bottom_left_v18.jpg');
    background-repeat: repeat-x;
    background-position: top left;
    background-size: auto 100px;
    padding: 20px;
    min-height: 100px;
    color: var(--stf-text-light);
    margin-bottom: 0;
    padding-bottom: 20px; /* Keep content padding but ensure no extra bottom space */
}

.page-bottom-right-middle {
    width: 129px;
    background-image: url('/images/stf_fleet_bottom_right_middle_corner_v18.jpg');
    background-repeat: no-repeat;
    background-position: top right;
    background-size: 129px auto;
    min-height: 100px;
}

.page-bottom-right-corner {
    width: 35px;
    background-image: url('/images/stf_fleet_bottom_right_corner_v18.jpg');
    background-repeat: no-repeat;
    background-position: top right;
    background-size: 35px auto;
    min-height: 100px;
}

/* ========================================
 * Top Section Bar (stf_site_top_v18.jpg)
 * ======================================== */
.page-top-bar {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
}

.page-top-bar img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 1360px;
}

/* ========================================
 * Modern LCARS Panel Layout
 * Enhanced to match main page colorful design
 * ======================================== */
.lcars-panel {
    background: #0a0a0a;
    border: 1px solid #333333;
    padding: 1.5rem;
    margin: 2rem 0;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.lcars-panel h1 {
    color: #f8a406;
    font-family: 'Verdana', 'Arial', 'Helvetica', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 1.5rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #333333;
    padding-bottom: 1rem;
}

.content-panel {
    flex: 1;
    padding: 0;
    color: #ffffff;
    line-height: 1.8;
    font-size: 0.95rem;
    font-family: 'Verdana', 'Arial', 'Helvetica', sans-serif;
}

.content-panel h2 {
    color: #f8a406;
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem 0;
    font-weight: bold;
    border-bottom: 1px solid #333333;
    padding-bottom: 0.5rem;
}

.content-panel h3 {
    color: #f8a406;
    font-size: 1.3rem;
    margin: 1.25rem 0 0.75rem 0;
    font-weight: bold;
}

.content-panel p {
    margin: 0 0 1.5rem 0;
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.8;
}

.content-panel p:last-of-type {
    margin-bottom: 1.5rem;
}

.content-panel a {
    color: #f8a406;
    text-decoration: none;
    font-weight: bold;
}

.content-panel a:hover {
    text-decoration: underline;
    color: #ffb820;
}

.content-panel strong {
    color: #f8a406;
    font-weight: bold;
}

.content-panel em {
    color: #cccccc;
    font-style: italic;
}

.fleet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    padding: 10px 0;
    border-bottom: 2px solid var(--stf-border);
}

.fleet-nav-link {
    color: var(--stf-text-light);
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid var(--stf-border);
    background-color: var(--stf-bg-darker);
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.fleet-nav-link:hover {
    background-color: var(--stf-primary);
    color: var(--stf-bg-dark);
    border-color: var(--stf-primary);
}

.fleet-nav-link.active {
    background-color: var(--stf-primary);
    color: var(--stf-bg-dark);
    border-color: var(--stf-primary);
    font-weight: bold;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.data-grid-header {
    background-color: var(--stf-bg-darker);
    color: var(--stf-text-light);
    font-weight: bold;
    padding: 10px;
    border: 1px solid var(--stf-border);
}

.data-grid-row {
    padding: 10px;
    border: 1px solid var(--stf-border);
    background-color: var(--stf-bg-content);
}

.data-grid-cell {
    padding: 10px;
    border: 1px solid var(--stf-border);
    background-color: var(--stf-bg-content);
    color: var(--stf-text-light);
}

/* ========================================
 * Enhanced Roster Layout Styles
 * ======================================== */
.roster-department {
    margin-bottom: 35px;
    background-color: var(--stf-bg-content);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease;
}

.roster-department:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.roster-department-header {
    padding: 18px 20px;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: white;
    margin: 0;
}

.roster-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--stf-bg-content);
}

.roster-table-header {
    background-color: rgba(0, 0, 0, 0.25);
    padding: 16px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid;
    white-space: nowrap;
}

.roster-table-header:first-child {
    padding-left: 20px;
}

.roster-table-header:last-child {
    padding-right: 20px;
}

.roster-table-header[style*="text-align: center"] {
    text-align: center;
}

.roster-table-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.roster-table-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

.roster-table-row:last-child {
    border-bottom: none;
}

.roster-table-cell {
    padding: 18px 16px;
    vertical-align: middle;
    font-size: 15px;
}

.roster-table-cell:first-child {
    padding-left: 20px;
}

.roster-table-cell:last-child {
    padding-right: 20px;
}

.roster-table-cell[style*="text-align: center"] {
    text-align: center;
}

.roster-character {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.roster-character-name {
    font-weight: 600;
    font-size: 18px;
    color: var(--stf-text-light);
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 1.4;
}

.roster-character-name:hover {
    color: var(--stf-primary);
    text-decoration: underline;
}

.roster-character-player {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    line-height: 1.3;
}

.roster-rank-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.roster-rank-insignia {
    max-width: 100px;
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.roster-rank-name {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    line-height: 1.3;
}

.roster-position {
    font-size: 16px;
    color: var(--stf-text-light);
    line-height: 1.5;
}

.roster-species {
    font-size: 16px;
    color: var(--stf-text-light);
    line-height: 1.5;
}

.roster-type-badge {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.roster-type-badge.pc {
    background-color: #022C5E;
}

.roster-type-badge.spc {
    background-color: #540758;
}

/* Responsive Design for Roster */
@media (max-width: 1024px) {
    .roster-table-header {
        padding: 14px 12px;
        font-size: 14px;
    }
    
    .roster-table-cell {
        padding: 16px 12px;
        font-size: 14px;
    }
    
    .roster-character-name {
        font-size: 17px;
    }
    
    .roster-character-player {
        font-size: 14px;
    }
    
    .roster-rank-insignia {
        max-width: 85px;
    }
    
    .roster-position,
    .roster-species {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .roster-department {
        margin-bottom: 25px;
    }
    
    .roster-department-header {
        padding: 16px 18px;
        font-size: 18px;
    }
    
    .roster-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .roster-table-header {
        display: none;
    }
    
    .roster-table-row {
        display: block;
        margin-bottom: 15px;
        padding: 15px;
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
        border-bottom: none;
    }
    
    .roster-table-row:hover {
        transform: none;
        background-color: rgba(0, 0, 0, 0.3);
    }
    
    .roster-table-cell {
        display: block;
        padding: 8px 0;
        text-align: left !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .roster-table-cell:last-child {
        border-bottom: none;
    }
    
    .roster-table-cell::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: rgba(255, 255, 255, 0.7);
        display: inline-block;
        min-width: 100px;
        margin-right: 10px;
    }
    
    .roster-rank-container {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
    }
    
    .roster-rank-insignia {
        max-width: 60px;
    }
    
    .roster-type-badge {
        display: inline-block;
    }
}

@media (max-width: 480px) {
    .roster-department-header {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    .roster-character-name {
        font-size: 16px;
    }
    
    .roster-character-player {
        font-size: 14px;
    }
    
    .roster-rank-insignia {
        max-width: 60px;
    }
    
    .roster-table-cell {
        font-size: 14px;
    }
    
    .roster-table-cell::before {
        min-width: 90px;
        font-size: 13px;
    }
    
    .roster-position,
    .roster-species {
        font-size: 14px;
    }
}

/* ========================================
 * Enhanced Content Page Styles (Tech, Deckplans, Support)
 * ======================================== */
.content-panel {
    padding: 20px;
    background-color: var(--stf-bg-content);
    border-radius: 6px;
    margin-top: 20px;
}

.content-panel h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--stf-text-light);
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--stf-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.content-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border-left: 4px solid var(--stf-primary);
}

.content-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--stf-primary);
    margin-bottom: 15px;
    margin-top: 0;
}

.content-section p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--stf-text-light);
    margin-bottom: 12px;
}

.content-section p:last-child {
    margin-bottom: 0;
}

.content-section strong {
    color: var(--stf-primary);
    font-weight: 600;
}

.content-image {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Deck Plans and Support Craft Tables */
.deckplan-table,
.support-table {
    width: 100%;
    margin-top: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.deckplan-header,
.support-header {
    display: grid;
    grid-template-columns: 100px 20px 1fr;
    gap: 15px;
    padding: 16px 20px;
    background-color: var(--stf-primary);
    color: var(--stf-bg-dark);
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Freedom deckplans with extra columns */
.deckplan-header.freedom-style {
    grid-template-columns: 100px 20px 1fr 80px 200px;
}

.deckplan-row,
.support-row {
    display: grid;
    grid-template-columns: 100px 20px 1fr;
    gap: 15px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

.deckplan-row.freedom-style {
    grid-template-columns: 100px 20px 1fr 80px 200px;
}

.deckplan-module,
.deckplan-builder {
    font-size: 15px;
    color: var(--stf-text-light);
    text-align: center;
    line-height: 1.4;
}

/* Compiles Table Styles */
.compiles-table {
    width: 100%;
    margin-top: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.compiles-header {
    display: grid;
    grid-template-columns: 50px 20px 1fr;
    gap: 15px;
    padding: 16px 20px;
    background-color: #022C5E;
    color: white;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compiles-row {
    display: grid;
    grid-template-columns: 50px 20px 1fr;
    gap: 15px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
    color: var(--stf-text-light);
    font-size: 15px;
}

.compiles-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.compiles-row:last-child {
    border-bottom: none;
}

.compiles-number {
    font-weight: 600;
    font-size: 16px;
    color: var(--stf-primary);
    text-align: right;
}

.compiles-separator {
    color: var(--stf-primary);
    font-weight: bold;
    text-align: center;
}

.compiles-link {
    font-size: 16px;
    line-height: 1.6;
    color: var(--stf-text-light);
}

.compiles-link a {
    color: var(--stf-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.compiles-link a:hover {
    color: var(--stf-text-light);
    text-decoration: underline;
}

/* Mars Duty Stations Table Styles */
.mars-duty-table {
    width: 100%;
    margin-top: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.mars-duty-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 16px 20px;
    background-color: #022C5E;
    color: white;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mars-duty-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
    color: var(--stf-text-light);
    font-size: 15px;
}

.mars-duty-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.mars-duty-row:last-child {
    border-bottom: none;
}

.mars-duty-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--stf-primary);
}

.mars-duty-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--stf-text-light);
}

/* Mars Floor/Level Table Styles */
.mars-floor-table {
    width: 100%;
    margin-top: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.mars-floor-header {
    display: grid;
    grid-template-columns: 150px 20px 1fr;
    gap: 15px;
    padding: 16px 20px;
    background-color: #022C5E;
    color: white;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mars-floor-row {
    display: grid;
    grid-template-columns: 150px 20px 1fr;
    gap: 15px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
    color: var(--stf-text-light);
    font-size: 15px;
}

.mars-floor-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.mars-floor-row:last-child {
    border-bottom: none;
}

.mars-floor-level {
    font-weight: 600;
    font-size: 16px;
    color: var(--stf-primary);
}

.mars-floor-separator {
    color: var(--stf-primary);
    font-weight: bold;
    text-align: center;
}

.mars-floor-content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--stf-text-light);
}

.deckplan-row:hover,
.support-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.deckplan-row:last-child,
.support-row:last-child {
    border-bottom: none;
}

.deckplan-number,
.support-type {
    font-weight: 600;
    font-size: 16px;
    color: var(--stf-primary);
    text-align: right;
}

.deckplan-separator,
.support-separator {
    color: var(--stf-primary);
    font-weight: bold;
    text-align: center;
}

.deckplan-description,
.support-description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--stf-text-light);
}

.deckplan-description p,
.support-description p {
    margin: 0;
}

/* Responsive Design for Content Pages */
@media (max-width: 768px) {
    .content-panel {
        padding: 15px;
    }
    
    .content-panel h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .content-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .content-section h3 {
        font-size: 18px;
    }
    
    .content-section p {
        font-size: 15px;
    }
    
    .deckplan-header,
    .support-header,
    .compiles-header,
    .mars-duty-header,
    .mars-floor-header {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .deckplan-row,
    .support-row,
    .compiles-row,
    .mars-duty-row,
    .mars-floor-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 15px;
    }
    
    .deckplan-number,
    .support-type {
        text-align: left;
        font-size: 15px;
        margin-bottom: 5px;
    }
    
    .deckplan-separator,
    .support-separator {
        display: none;
    }
    
    .deckplan-description,
    .support-description {
        font-size: 15px;
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    .content-panel {
        padding: 12px;
    }
    
    .content-panel h2 {
        font-size: 18px;
    }
    
    .content-section {
        padding: 12px;
    }
    
    .content-section h3 {
        font-size: 16px;
    }
    
    .content-section p {
        font-size: 14px;
    }
    
    .deckplan-number,
    .support-type {
        font-size: 14px;
    }
    
    .deckplan-description,
    .support-description {
        font-size: 14px;
    }
}

/* ========================================
 * Main Content Area Styling
 * ======================================== */
main#main-content {
    background-color: #000000;
    min-height: 400px;
    padding: 20px !important;
}

main#main-content .lcars-panel {
    max-width: 100%;
}

/* Ensure content is visible and modern */
main#main-content * {
    box-sizing: border-box;
}

/* Grid layouts in content */
.content-panel > div[style*="grid"] {
    margin: 20px 0;
}

/* Tables in content */
.content-panel table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #091418;
}

.content-panel table th {
    background-color: #022C5E;
    color: #ffffff;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #333333;
}

.content-panel table td {
    background-color: #091418;
    color: #ffffff;
    padding: 10px;
    text-align: center;
    border: 1px solid #333333;
}

.content-panel table tr:hover td {
    background-color: #0a1a20;
}

/* Images in content */
.content-panel img {
    max-width: 100%;
    height: auto;
    border: 1px solid #333333;
    border-radius: 4px;
}

/* Links in content */
.content-panel a {
    transition: color 0.2s ease;
}

/* ========================================
 * Responsive Design
 * ======================================== */

/* Large screens (1360px - 1920px) */
@media (max-width: 1920px) and (min-width: 1361px) {
    .site-container,
    .page-layout,
    .page-bottom-corners {
        max-width: 100%;
    }
}

/* Medium-large screens (1200px - 1360px) */
@media (max-width: 1360px) {
    .page-layout {
        grid-template-columns: 36px 1fr 129px 35px;
    }
    
    .page-bottom-corners {
        grid-template-columns: 36px 1fr 129px 35px;
    }
    
    .page-left-sidebar,
    .page-right-sidebar,
    .page-right-edge {
        width: 100%;
    }
    
    .page-main-content {
        width: 100%;
    }
}

/* Tablets and small desktops (768px - 1200px) */
@media (max-width: 1200px) {
    .page-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .page-bottom-corners {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .page-left-sidebar,
    .page-right-edge {
        display: none; /* Hide decorative sidebars on smaller screens */
    }
    
    .page-right-sidebar {
        width: 100%;
        display: block;
    }
    
    .page-main-content {
        width: 100%;
        padding: 20px;
    }
    
    .page-bottom-left-corner,
    .page-bottom-right-middle,
    .page-bottom-right-corner {
        display: none; /* Hide decorative corners on smaller screens */
    }
    
    .page-bottom-main {
        width: 100%;
        padding: 20px;
    }
}

/* Tablets (600px - 768px) */
@media (max-width: 768px) {
    .page-layout {
        grid-template-columns: 1fr;
    }
    
    .page-right-sidebar {
        display: none; /* Hide info panel on mobile */
    }
    
    .page-main-content {
        padding: 15px;
    }
    
    .page-bottom-main {
        padding: 15px;
        font-size: 14px;
    }
    
    /* Hide image maps on mobile */
    map,
    area {
        display: none;
    }
}

/* Mobile phones (below 600px) */
@media (max-width: 600px) {
    .page-main-content {
        padding: 10px;
    }
    
    .page-bottom-main {
        padding: 10px;
        font-size: 12px;
    }
}

/* ========================================
 * Legacy Table Support (for backward compatibility)
 * ======================================== */
/* Support for pages still using table-based layouts */
table.site-container {
    max-width: 1360px;
    margin: 0 auto;
    width: 100%;
}

td[background="/images/stf_site_left_v18.jpg"] {
    background-size: 36px auto;
    background-repeat: repeat-y;
    background-position: top left;
    width: 36px;
}

td[background="/images/stf_site_right_v18.jpg"] {
    background-size: 35px auto;
    background-repeat: repeat-y;
    background-position: top right;
    width: 35px;
}

td[background="/images/stf_fleet_bottom_left_corner_v18.jpg"] {
    background-size: 36px auto;
    background-repeat: no-repeat;
    background-position: top left;
}

td[background="/images/stf_fleet_bottom_left_v18.jpg"] {
    background-size: auto 100px;
    background-repeat: repeat-x;
    background-position: top left;
}

td[background="/images/stf_fleet_bottom_right_middle_corner_v18.jpg"] {
    background-size: 129px auto;
    background-repeat: no-repeat;
    background-position: top right;
}

td[background="/images/stf_fleet_bottom_right_corner_v18.jpg"] {
    background-size: 35px auto;
    background-repeat: no-repeat;
    background-position: top right;
}

/* Ensure background images scale properly in table cells */
td[background] {
    background-size: 100% 100%;
    background-position: top left;
    background-repeat: no-repeat;
    position: relative;
}

/* ========================================
 * Footer Section
 * ======================================== */
.site-footer {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    text-align: center;
    background-color: #000000;
    box-sizing: border-box;
    padding: 0 !important;
    margin-top: 0 !important; /* Remove any gap above footer */
    margin-bottom: 0;
    line-height: 0; /* Remove spacing around images */
    font-size: 0; /* Remove spacing around images */
    display: block;
    border-top: 0;
}

.site-footer > * {
    line-height: normal;
    font-size: inherit;
}

.site-footer img:first-child {
    display: block;
    width: 100%;
    max-width: 1360px;
    height: auto;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    line-height: 0;
    position: relative;
    top: 0;
}

/* Remove any potential gap from collapsed whitespace in HTML */
.site-container header:last-child,
.site-container footer:first-of-type {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.site-footer table {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    border-collapse: collapse;
    box-sizing: border-box;
}

.site-footer td {
    text-align: center;
}

/* Social media icons - keep them small */
.site-footer img[src*="social/"] {
    display: inline-block !important;
    vertical-align: middle;
    width: auto !important;
    height: auto !important;
    max-width: 25px !important;
    max-height: 25px !important;
}

.site-footer img[src*="social/facebook"] {
    width: 15px !important;
    height: 25px !important;
    max-width: 15px !important;
    max-height: 25px !important;
}

.site-footer img[src*="social/twitter"] {
    width: 22px !important;
    height: 20px !important;
    max-width: 22px !important;
    max-height: 20px !important;
}

.site-footer img[src*="social/insta"] {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
}

.footer-copyright {
    text-align: center;
    font-size: 9px;
    color: #ffffff;
    padding: 10px 20px;
    line-height: 1.4;
    margin: 0 auto;
    max-width: 1360px;
    box-sizing: border-box;
}

/* ========================================
 * Accessibility
 * ======================================== */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
}

.skip-to-main:focus {
    left: 6px;
    top: 7px;
    background: var(--stf-primary);
    color: var(--stf-bg-dark);
    padding: 8px;
    text-decoration: none;
}

