/* === General Body & Typography === */
body {
    margin: 0;
    padding-top: 0; 
    font-family: Arial, sans-serif;
   /* background-color: #f7f9fc; */
    color: #333;
    line-height: 1.6;
}

.container { /* This is your main content constraining class */
    width: 100%; 
    max-width: 1100px; 
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px; 
    padding-right: 15px; 
    box-sizing: border-box;
}

a {
    color: #007acc;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    color: #333;
}

h1 { font-size: 2.2em; margin-bottom: 0.5em; }
h2 { font-size: 1.8em; margin-top: 1.5em; margin-bottom: 0.75em; }
h3 { font-size: 1.4em; margin-top: 1.2em; margin-bottom: 0.6em; }


/* === Main Site Navigation (nav.site-nav) === */
nav.site-nav {
    background-color: #007acc; /* Blue background spans full width */
    width: 100%;
    position: relative; 
    z-index: 1000; 
    box-sizing: border-box;
    padding: 0; 
}

nav.site-nav .nav-container {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    /* flex-wrap: wrap; /* Default is nowrap, relying on this for desktop, mobile handles it explicitly */
    
    width: 90%; 
    max-width: 1100px; 
    margin: 0 auto;    
    
    padding: 5px 15px;   
    box-sizing: border-box; 
}

nav.site-nav .nav-brand {
    font-size: 1.5em; 
    font-weight: bold;
    margin-right: 15px; 
    white-space: nowrap; 
}
nav.site-nav .nav-brand a,
nav.site-nav .nav-brand a:hover,
nav.site-nav .nav-brand a:visited {
    color: #ffffff;
    text-decoration: none;
    display: flex; 
    align-items: center;
}

nav.site-nav .nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center; 
    /* flex-grow: 1; /* Let search take grow priority */
}

nav.site-nav .nav-links li {
    display: inline; 
}

nav.site-nav .nav-links li a {
    color: white;
    font-weight: bold;
    padding: 10px 12px; 
    display: block;
    line-height: normal; 
    white-space: nowrap; 
}

/* Search within the nav */
nav.site-nav .nav-search-wrapper {
    display: flex; 
    align-items: center;
    margin-left: 15px; 
    flex-grow: 1; /* Allow search to take more space on desktop if links are compact */
    min-width: 150px; /* Ensure it doesn't collapse too much on desktop */
}

nav.site-nav .nav-search { 
    display: flex;
    gap: 5px; 
    width: 100%; /* Make form take full width of its wrapper */
}

nav.site-nav .nav-search input[type="text"] {
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 0.9em;
    flex-grow: 1; /* Input takes available space within form */
    /* min-width: 150px; /* Defined in wrapper */
    max-width: 220px; 
}

nav.site-nav .nav-search button {
    padding: 8px 16px;
    background-color: #fff;
    color: #007acc;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9em;
}
nav.site-nav .nav-search button:hover {
    background-color: #e0e0e0;
}

/* Nav Toggle for Mobile */
.nav-toggle {
    font-size: 1.8em; 
    background: none;
    border: none;
    color: white;
    display: none; 
    cursor: pointer;
    padding: 8px; 
}

/* === Breadcrumbs === */
.breadcrumbs {
  background-color: #f8f9fa; 
  font-size: 0.9em;
  color: #555;
  text-align: left; 
  margin-bottom: 25px; 
  border-bottom: 1px solid #e9ecef;
  padding: 12px 0; 
}
.breadcrumbs-content-wrapper { 
    width: 90%; 
    max-width: 1100px; 
    margin-left: auto;
    margin-right: auto;
    padding-left: 0; 
    padding-right: 15px; 
    box-sizing: border-box;
}
.breadcrumbs a { color: #007acc; }
.breadcrumbs span.breadcrumb-separator { margin: 0 8px; color: #888; }


/* === Museum Hero Banner (museum.php) === */
.museum-hero-banner {
    background-size: cover; background-position: center center; background-repeat: no-repeat;
    padding: 80px 20px; color: #ffffff; position: relative; text-align: center; 
    min-height: 350px; display: flex; flex-direction: column; 
    align-items: center; justify-content: center; box-sizing: border-box; width: 100%;
}
.museum-hero-banner .hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5); z-index: 1; 
}
.museum-hero-banner .hero-content { position: relative; z-index: 2; } 
.museum-hero-banner .hero-content h1 {
    font-size: 3em; margin-top: 0; margin-bottom: 10px; color: #ffffff; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7); 
}
.museum-hero-banner .hero-meta {
    font-size: 1.1em; color: #e8e8e8; margin-bottom: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6); 
}
.museum-hero-banner .hero-meta-item { display: inline-block; margin: 0 10px; }
.museum-hero-banner .hero-meta-item:first-child { margin-left: 0; }
.museum-hero-banner .hero-meta-item:last-child { margin-right: 0; }

.museum-hero-banner .hero-content .breadcrumbs {
    font-size: 0.9em; margin-bottom: 20px; background: none; border: none; padding: 0;
}
.museum-hero-banner .hero-content .breadcrumbs a,
.museum-hero-banner .hero-content .breadcrumbs span {
    color: #f0f0f0; text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

/* === Museum Page Content (museum.php & general content) === */
.museum-page-content.container, .generic-content.container { 
    padding-top: 30px; padding-bottom: 40px; background-color: #fff; 
}

/* Two-Column Layout for museum.php content body */
.museum-body.two-column-layout {
    display: flex;
    flex-wrap: wrap; 
    gap: 30px; 
}
.two-column-layout .column { box-sizing: border-box; }
.two-column-layout .main-column { flex: 2; min-width: 300px; }
.two-column-layout .sidebar-column { flex: 1; min-width: 280px; }

/* Card style for content sections */
.content-card.section { /* Applied to sections within the two-column layout */
    background-color: #f8f9fa; border: 1px solid #e9ecef; 
    border-radius: 6px; padding: 20px; margin-bottom: 25px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden; /* CRITICAL FIX for map/embed overrun */
}
.content-card.section h2 { /* Specific H2 style for cards */
    font-size: 1.3em; color: #007acc; margin-top: 0;
    margin-bottom: 15px; padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0; 
}
/* General .section h2 if used outside cards */
.museum-page-content .section:not(.content-card) h2, 
.generic-content .section:not(.content-card) h2 {
    border-bottom: 2px solid #007acc; padding-bottom: 10px;
    margin-top:0; margin-bottom: 20px; font-size: 1.6em; color: #005fa3; 
}
.museum-page-content address { font-style: normal; line-height: 1.7; }
.museum-image-section img.museum-image { 
    max-width: 100%; height: auto; border-radius: 5px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Map div inside a card */
.content-card #individual-museum-map { /* Target the map specifically inside a card */
    height: 300px; 
    width: 100%;   
    background-color: #e0e0e0; 
    border-radius: 4px; /* Rounded corners for the map div itself */
    /* overflow: hidden; /* Already handled by .content-card */
}
.sidebar-column #individual-museum-map { height: 250px; }
.sidebar-column .embed-container { padding-top: 75%; }


/* === Museum Listing Page (museums.php) === */
#museums-map { 
    height: 450px; width: 100%; margin-bottom: 30px; 
    background-color: #e9e9e9; border-radius: 5px;
}
.museum-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px;
}
.museum-card {
  background: #fff; border-radius: 6px; box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  padding: 0; text-align: left; transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex; flex-direction: column;
}
.museum-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.12); transform: translateY(-5px); }
.museum-card img, .museum-card .placeholder-img { 
    width: 100%; height: 180px; object-fit: cover; 
    border-radius: 6px 6px 0 0; margin-bottom: 0; 
}
.placeholder-img { background: #e0e0e0; display: flex; justify-content: center; align-items: center; color: #777; font-size: 0.9em; }
.museum-card .card-content { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; }
.museum-card h3 { font-size: 1.25rem; margin: 0 0 8px 0; line-height: 1.3; }
.museum-card h3 a { text-decoration: none; color: #007acc; }
.museum-card h3 a:hover { text-decoration: underline; }
.museum-card .meta { font-size: 0.85rem; color: #666; margin-bottom: 10px; margin-left: 0; line-height: 1.4; }

/* === Homepage Specific Styles === */
.homepage-hero {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
    color: #ffffff; padding: 100px 20px; text-align: center; 
    position: relative; min-height: 500px; 
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.homepage-hero .hero-overlay { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5); z-index: 1;
}
.homepage-hero .hero-content { position: relative; z-index: 2; max-width: 800px; }
.homepage-hero h1 {
    font-size: 3em; margin-top: 0; margin-bottom: 20px; font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4); color: #ffffff; 
}
.homepage-hero .tagline { font-size: 1.4em; margin-bottom: 35px; font-weight: 300; color: #f0f0f0; } 
.hero-search-wrapper { margin-top: 20px; }
.hero-search-form {
    display: flex; max-width: 650px; margin: 0 auto; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.15); border-radius: 50px; 
    overflow: hidden; 
}
.hero-search-form input[type="text"] {
    flex-grow: 1; padding: 20px 25px; font-size: 1.1em; border: none; outline: none; 
    color: #333; background-color: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(2px);
}
.hero-search-form input[type="text"]:focus {
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.3);
}
.hero-search-form button[type="submit"] {
    padding: 20px 35px; font-size: 1.1em; background-color: #007acc; 
    color: white; border: none; cursor: pointer; font-weight: bold;
    transition: background-color 0.2s ease;
    line-height: 1.2;
    height: auto;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-search-form button[type="submit"]:hover { background-color: #005fa3; }
.homepage-content.container { padding-top: 50px; padding-bottom: 50px; }
.info-section .section-title { text-align: center; font-size: 2.2em; margin-bottom: 50px; color: #333; }
.columns-wrapper { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.columns-wrapper .column {
    background-color: #ffffff; padding: 30px; border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    flex-basis: calc(33.333% - 20px); 
    box-sizing: border-box; margin-bottom: 20px;
}
.columns-wrapper .column h3 { margin-top: 0; color: #007acc; font-size: 1.5em; }
.columns-wrapper .column p { font-size: 1em; line-height: 1.7; color: #555; }
.columns-wrapper .column ul { list-style: disc; padding-left: 20px; margin-bottom: 25px; }
.columns-wrapper .column ul li { margin-bottom: 10px; }
.columns-wrapper .column ul li a { color: #0066aa; } 
.cta-button {
    display: inline-block; background-color: #007acc; color: #ffffff;
    padding: 12px 25px; text-decoration: none; border-radius: 5px;
    font-weight: bold; transition: background-color 0.2s ease;
    font-size: 0.95em;
}
.cta-button:hover { background-color: #005fa3; color: #ffffff; }
.featured-museums-section { margin-top: 50px; padding-top: 30px; border-top: 1px solid #eee; }
.featured-museums-section .section-title { text-align: center; font-size: 2.2em; margin-bottom: 40px;}


/* === Embeds & Utility === */
.embed-container { position: relative; overflow: hidden; width: 100%; padding-top: 56.25%; margin-top:15px; border-radius: 5px; }
.embed-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
hr.section-divider { border: 0; border-top: 1px dashed #ccc; margin: 30px 0; }


/* === Responsive Adjustments === */
@media (max-width: 992px) { 
    .columns-wrapper .column { flex-basis: calc(50% - 15px); }
    nav.site-nav .nav-search-wrapper { margin-left: 10px; }
}

@media (max-width: 768px) { 
  nav.site-nav { padding: 0; }
  nav.site-nav .nav-container {
    flex-direction: row; justify-content: space-between; align-items: center;
    width: 100%; padding: 5px 10px; box-sizing: border-box; flex-wrap: nowrap; 
    height: 50px; 
  }
  nav.site-nav .nav-brand { padding: 5px 0; margin-right: 5px; flex-shrink: 0; white-space: nowrap; display:flex; align-items:center;}
  nav.site-nav .nav-brand a { padding: 5px 0; }
  .nav-toggle { 
      display: block; order: 3; padding: 8px; margin-left: 5px; 
      flex-shrink: 0; height: 34px; box-sizing: content-box; display:flex; 
      align-items:center; justify-content:center;
  } 
  nav.site-nav .nav-search-wrapper {
    order: 2; flex-grow: 1; flex-shrink: 1; margin: 0 5px;   
    min-width: 80px; display: flex; align-items: center; 
  }
  nav.site-nav .nav-search { width: 100%; display: flex; }
  nav.site-nav .nav-search input[type="text"] {
      min-width: 40px; flex-grow: 1; flex-shrink: 1; font-size: 0.8em; 
      padding: 6px 8px; height: 34px; box-sizing: border-box;
  }
   nav.site-nav .nav-search button { 
      font-size: 0.8em; padding: 6px 8px; flex-shrink: 0; height: 34px; box-sizing: border-box; 
  }
  nav.site-nav .nav-links { 
    flex-direction: column; width: 100%; display: none; background-color: #006ab0; 
    position: absolute; top: 50px; left: 0; right: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); z-index: 999; 
  }
  nav.site-nav .nav-links.show { display: flex; }
  nav.site-nav .nav-links li { margin: 0; width: 100%; text-align: left; }
  nav.site-nav .nav-links li a { padding: 12px 20px; border-bottom: 1px solid #005fa3; }
  nav.site-nav .nav-links li:last-child a { border-bottom: none; }
  
  .museum-hero-banner .hero-content h1 { font-size: 2em; } 
  .museum-hero-banner .hero-meta { font-size: 0.9em; }
  .hero-search-form { flex-direction: column; box-shadow: none; border-radius: 0; }
  .hero-search-form input[type="text"],
  .hero-search-form button[type="submit"] { width: 100%; border-radius: 5px; margin-bottom: 10px; font-size: 1em; padding: 15px;}
  .hero-search-form input[type="text"] {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(2px);
  }
  .hero-search-form input[type="text"]:focus {
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.3);
  }
  .hero-search-form button[type="submit"] { 
    margin-bottom: 0; 
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
  }
  .columns-wrapper .column { flex-basis: 100%; }
  .museum-list-header { display: none; }
  .museum-list-item { 
      grid-template-columns: 70px 1fr; 
      padding: 12px 0; gap: 12px;
  }
  .museum-list-item > div:not(:first-child):not(.actions) { grid-column: 2; }
  .museum-list-item .actions { grid-column: 1 / -1; text-align: center; margin-top: 8px; }
  .museum-list-item div { font-size: 0.9em; } 

  /* Two-column layout stacking for museum.php */
  .two-column-layout { flex-direction: column; }
  .two-column-layout .main-column,
  .two-column-layout .sidebar-column { flex: 1 1 100%; width: 100%; }
  
  /* Adjust map height in sidebar for mobile if it was different from main column */
  .sidebar-column #individual-museum-map,
  .main-column #individual-museum-map { /* Standardize map height on mobile if it's in main column now */
     height: 280px; 
  }
  .content-card #individual-museum-map { /* This is already defined, but ensure it's not conflicting */
    /* height: 300px; /* Desktop height */
    /* On mobile, this will be overridden by the rule above if map is in sidebar/main column */
  }
  
  /* Aircraft search mobile adjustments */
  .aircraft-search-container {
    padding: 10px;
    margin-bottom: 15px;
  }
  
  .aircraft-search-input {
    padding: 10px 12px;
    font-size: 0.9em;
  }
  
  .search-results-count {
    font-size: 0.8em;
    margin-top: 8px;
  }
}

/* Error and Success Message Styling */
.error-message, .error { 
    color: #D8000C; border: 1px solid #D8000C; padding: 10px; 
    margin-top:5px; margin-bottom: 10px; background: #FFD2D2; border-radius: 4px; 
}
.success-message, .success { 
    color: #4F8A10; border: 1px solid #4F8A10; padding: 10px; 
    margin-top:5px; margin-bottom: 10px; background: #DFF2BF; border-radius: 4px;
}
.messages { margin-bottom: 15px; } .messages p:last-child { margin-bottom: 0; }

/* Admin Museum List Styling */
.museum-list-header, .museum-list-item { 
    display: grid; 
    grid-template-columns: 80px 2fr 1.2fr 1fr 1.2fr 80px 80px 100px; 
    gap: 10px; padding: 8px 0; border-bottom: 1px solid #eee; align-items: center; 
}
.museum-list-header > div { font-weight: bold; }
.museum-list-item div { font-size: 0.9em; word-break: break-word; }
.museum-list-item .actions a { text-decoration: none; padding: 2px 4px; }
.edit-link { color: #007acc; } .delete-link { color: #d32f2f; }

hr.section-divider { border: 0; border-top: 1px dashed #ccc; margin: 30px 0; }
h3.section-header { 
    margin-top: 25px; margin-bottom: 10px; color: #333; 
    font-size: 1.1em; border-bottom: 1px dotted #ccc; padding-bottom: 5px;
}
small { display: block; font-size: 0.8em; color: #777; margin-top: 3px; }

/* === Museum Page Gallery Styles (museum.php) === */
#museum-gallery h2 { /* Ensure gallery title is styled like other card titles */
    font-size: 1.3em; 
    color: #007acc;   
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.museum-image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Creates a responsive grid of thumbnails */
    gap: 10px;
}

.gallery-item {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden; /* To respect image border-radius */
    background-color: #f9f9f9;
}

.gallery-item a {
    display: block; /* Make the link the block container for the image */
    text-decoration: none;
}

.gallery-item img {
    width: 100%;
    height: 100px; /* Fixed height for thumbnails, adjust as needed */
    object-fit: cover; /* Crop images to fit, maintaining aspect ratio */
    display: block;
    transition: transform 0.2s ease-in-out;
}

.gallery-item a:hover img {
    transform: scale(1.05); /* Slight zoom on hover */
}

.gallery-item .gallery-caption {
    font-size: 0.8em;
    color: #555;
    padding: 5px 8px;
    text-align: center;
    margin: 0;
    background-color: #f0f0f0;
    border-top: 1px solid #eee;
}

/* Basic Lightbox Styles (if you implement one) - This is just a placeholder */
/* You would typically use a dedicated lightbox library like Lightbox2, Featherlight, etc. */
/* body.lb-disable-scrolling { overflow: hidden; }
.lightboxOverlay { position: fixed; top: 0; left: 0; z-index: 9999; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); display: none; }
.lightbox { position: fixed; left: 0; right: 0; top: 5%; bottom: 5%; margin: auto; max-width: 90%; max-height: 90%; z-index: 10000; display: none; text-align: center; }
.lightbox img { max-width: 100%; max-height: 100%; border: 3px solid white; border-radius: 3px; box-shadow: 0 0 8px rgba(0,0,0,0.6); }
.lb-dataContainer {  ... styles for caption area if using Lightbox2 ...  }
*/

/* Add to your /css/style.css */
.featured-museum-card {
    /* Example: Add a subtle border or background to featured cards */
    /* border: 2px solid gold; */
    /* background-color: #fffbee; */
}

.featured-tag {
    font-size: 0.7em;
    font-weight: bold;
    color: #e67e22; /* Orange/Gold color for the tag */
    margin-left: 8px;
    vertical-align: middle; /* Align star nicely with text */
}

/* === Social Media Links (museum.php) === */
.content-card#museum-social-media h2 {
    font-size: 1.3em; 
    color: #007acc;   
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

ul.social-media-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; /* Arranges icons horizontally */
    flex-wrap: wrap; /* Allows them to wrap if many */
    gap: 15px; /* Space between icons */
}

ul.social-media-links-list li {
    /* margin-bottom: 0; /* Not needed if using gap and flex */
}

ul.social-media-links-list li a {
    display: inline-flex; 
    align-items: center;
    justify-content: center; /* Center icon if it's the only content */
    text-decoration: none;
    color: #555; /* Default icon color */
    font-size: 1.8em; /* Size of the Font Awesome icons */
    width: 40px;  /* Make a square-ish clickable area */
    height: 40px;
    /* border: 1px solid #ddd; /* Optional border */
    /* border-radius: 4px; */
    transition: color 0.2s ease, transform 0.2s ease;
}

ul.social-media-links-list li a:hover {
    color: #007acc; /* Change color on hover */
    transform: scale(1.1);
}

/* Specific Font Awesome Brand Colors (Optional) */
/* You'll need to ensure you have the Font Awesome CSS/JS kit loaded for these classes to work */
.fa-facebook-f { color: #3b5998; }
.fa-x-twitter { color: #000000; } /* Or the new X logo color */
.fa-instagram { color: #e4405f; }
.fa-youtube { color: #ff0000; }
.fa-tiktok { color: #000000; } /* Or its brand colors */
.fa-threads { color: #000000; } /* Or its brand colors */
/* Add .fa-bluesky, .fa-pinterest, .fa-linkedin if Font Awesome has them or use generic link icon */
.fa-pinterest-p { color: #bd081c; }
.fa-linkedin-in { color: #0077b5; }

/* === Utility Classes === */
/* From includes/nav.php */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* === Search Results (museums-handler.php) === */
.search-results-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
}
.search-results-section h2 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.search-section-divider {
    border: 0;
    height: 1px;
    background-color: #ddd;
    margin: 40px 0;
}
.museum-description-snippet {
    font-size: 0.9em;
    color: #555 !important; /* Override link color */
    line-height: 1.5;
    margin-bottom: 10px; /* Ensure space before meta or if it's the last item */
    text-decoration: none !important; /* Override any link text decoration */
}

/* Ensure description text in museum cards doesn't inherit link styling */
.museum-card a .museum-description-snippet {
    color: #555 !important;
    text-decoration: none !important;
}

.museum-card a:hover .museum-description-snippet {
    color: #555 !important;
    text-decoration: none !important;
}

.read-more {
    font-weight: bold;
    color: #007acc;
    text-decoration: none;
    font-size: 0.9em;
}
.read-more:hover {
    text-decoration: underline;
}

/* === Aircraft List on Museum Page (museum.php) === */
.aircraft-search-container {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.aircraft-search-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 1em;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.aircraft-search-input:focus {
    border-color: #007acc;
    box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.1);
}

.search-results-count {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

.aircraft-list-on-museum-page .aircraft-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 5px;
    overflow: hidden; /* To contain floated image (if one was used) or clear floats within */
    transition: opacity 0.3s ease;
}
.aircraft-list-on-museum-page .aircraft-item.hidden {
    display: none;
}
.aircraft-list-on-museum-page .aircraft-item:last-child {
    border-bottom: none;
}
.aircraft-list-on-museum-page .aircraft-thumbnail-link {
    float: left;
    margin-right: 15px;
    width: 100px; /* Adjust as needed */
    height: 75px; /* Adjust as needed */
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Aircraft Image Gallery Styles */
.aircraft-image-gallery {
    margin: 20px 0 30px 0;
}

.aircraft-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.aircraft-gallery-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.aircraft-gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
}

.aircraft-gallery-image-container {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background-color: #f5f5f5;
    position: relative;
}

.aircraft-gallery-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.aircraft-gallery-item:hover .aircraft-gallery-image-container img {
    transform: scale(1.05);
}

.aircraft-gallery-info {
    padding: 12px;
}

.aircraft-gallery-name {
    font-weight: bold;
    font-size: 0.9em;
    color: #0056b3;
    margin-bottom: 4px;
    line-height: 1.3;
    display: block;
}

.aircraft-gallery-type {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 8px;
}

.aircraft-gallery-attributes {
    font-size: 0.75em;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.aircraft-gallery-attributes .attribute-tag {
    display: inline-block;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.75em;
    margin: 0;
    vertical-align: middle;
}

.aircraft-gallery-attributes .attribute-tag.static-display {
    background-color: #e0e0e0;
    color: #333;
}

.aircraft-gallery-attributes .attribute-tag.airworthy {
    background-color: #d4edda;
    color: #155724;
}

@media (max-width: 768px) {
    .aircraft-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .aircraft-gallery-image-container {
        height: 120px;
    }
    
    .aircraft-gallery-info {
        padding: 8px;
    }
    
    .aircraft-gallery-name {
        font-size: 0.85em;
    }
    
    .aircraft-gallery-type {
        font-size: 0.75em;
    }
}
.aircraft-list-on-museum-page .aircraft-thumbnail-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.aircraft-list-on-museum-page .aircraft-item-info {
    overflow: hidden; /* To allow text to flow around float */
}
.aircraft-list-on-museum-page .aircraft-name {
    font-weight: bold;
    font-size: 0.9em;
    color: #0056b3;
    text-decoration: none;
}
.aircraft-list-on-museum-page .aircraft-name:hover {
    text-decoration: underline;
}
.aircraft-list-on-museum-page .aircraft-type {
    font-size: 0.85em;
    color: #555;
    margin-left: 5px;
}
.aircraft-list-on-museum-page .aircraft-link-attributes {
    font-size: 0.85em;
    color: #333;
    display: inline;
}
.aircraft-list-on-museum-page .aircraft-link-attributes .attribute-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
    margin-right: 5px;
    margin-bottom: 0;
    margin-top: 0;
    vertical-align: middle;
}
.aircraft-list-on-museum-page .attribute-tag.static-display {
    background-color: #e0e0e0;
    color: #333;
}
.aircraft-list-on-museum-page .attribute-tag.airworthy {
    background-color: #d4edda; /* Light green */
    color: #155724;    /* Dark green */
}
.aircraft-list-on-museum-page .display-notes {
    font-size: 0.85em;
    color: #444;
    font-style: italic;
    display: inline;
    margin-left: 3px;
}

/* === Aircraft Grid & Cards (aircraft.php & search results) === */
.aircraft-listing-page .page-intro {
    margin-bottom: 25px;
    font-size: 1.1em;
    color: #555;
}

.aircraft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsive grid */
    gap: 20px;
    margin-bottom: 30px; /* Added for spacing if it's the last element */
}

.aircraft-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex; /* Added for flex layout */
    flex-direction: column; /* Added for flex layout */
}

.aircraft-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.aircraft-card a {
    text-decoration: none;
    color: inherit;
    display: flex; /* Make anchor fill the card and be a flex container */
    flex-direction: column;
    flex-grow: 1; /* Ensure anchor expands */
}

.aircraft-card-image-container {
    width: 100%;
    height: 200px; /* Fixed height for image container */
    overflow: hidden;
    background-color: #f0f0f0; /* Placeholder color */
    position: relative; /* For potential future additions like overlays */
}

.aircraft-card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area, might crop */
    transition: transform 0.3s ease;
}

.aircraft-card:hover .aircraft-card-image-container img {
    transform: scale(1.05);
}

.aircraft-card .card-content {
    padding: 15px;
    flex-grow: 1; /* Allows content to expand if card height is fixed or limited by grid row */
    display: flex; /* Added for flex layout */
    flex-direction: column; /* Added for flex layout */
}

.aircraft-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.3em;
    color: #333; /* Was #007acc in museum card, changed to #333 for aircraft */
}

.aircraft-card .meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.aircraft-card .meta.type {
    font-weight: bold;
    /* margin-bottom: auto; /* Pushes following elements down if card content is flex column */
}
.aircraft-card .meta.manufacturer {
    margin-top: auto; /* Pushes manufacturer to the bottom if type is short */
}

/* Special styling for aircraft cards without images */
.aircraft-card .aircraft-card-image-container.no-image {
    height: 60px; /* Much smaller height for no-image cards */
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

.aircraft-card .aircraft-card-image-container.no-image::before {
    content: "✈";
    font-size: 24px;
    color: #6c757d;
    opacity: 0.7;
    font-family: Arial, sans-serif; /* Ensure the airplane symbol displays consistently */
}

/* Fallback for browsers that don't support ::before content */
.aircraft-card .aircraft-card-image-container.no-image {
    font-size: 24px;
    color: #6c757d;
    opacity: 0.7;
    padding: 0 0 0 5px;
}

/* Make the entire card more compact when there's no image */
.aircraft-card.no-image-card {
    min-height: auto;
}

.aircraft-card.no-image-card .card-content {
    padding: 12px 15px; /* Slightly reduced padding */
}

.aircraft-card.no-image-card h3 {
    font-size: 1.1em; /* Slightly smaller title */
    margin-bottom: 6px;
}

.aircraft-card.no-image-card .meta {
    font-size: 0.85em; /* Slightly smaller meta text */
}

/* === Aircraft Detail Page (aircraft_detail.php) === */
.aircraft-detail-page .aircraft-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.aircraft-detail-page h1 { /* This might be too general, consider scoping more if needed */
    margin-top: 0;
    margin-bottom: 10px;
}
.aircraft-detail-page .aircraft-meta-info .meta-tag {
    display: inline-block;
    background-color: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    margin-right: 8px;
    margin-bottom: 8px;
}

.aircraft-detail-page .aircraft-main-content.with-image {
    display: flex; /* Changed from grid */
    flex-direction: column; /* Stack image and text vertically */
    gap: 30px; 
    width: 100%; /* Ensure container takes full width */
}
.aircraft-detail-page .aircraft-main-content.with-image .aircraft-image-container {
    min-width: 0; 
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}
.aircraft-detail-page .aircraft-main-content .aircraft-image-container img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    margin: 0 auto;
}

.aircraft-detail-page .aircraft-main-content.with-image .aircraft-text-content {
    min-width: 0; 
    overflow: hidden; 
}

.aircraft-detail-page .aircraft-description,
.aircraft-detail-page .aircraft-specifications,
.aircraft-detail-page .museums-featuring-aircraft {
    margin-bottom: 30px;
}
.aircraft-detail-page .aircraft-description h2,
.aircraft-detail-page .aircraft-specifications h2,
.aircraft-detail-page .museums-featuring-aircraft h2 {
    font-size: 1.6em;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 5px;
}

.aircraft-detail-page .museums-featuring-aircraft .museum-list {
    list-style: none;
    padding-left: 0;
}
.aircraft-detail-page .museums-featuring-aircraft .museum-list li {
    padding: 10px 0;
    border-bottom: 1px dotted #eee;
}
.aircraft-detail-page .museums-featuring-aircraft .museum-list li:last-child {
    border-bottom: none;
}
.aircraft-detail-page .museums-featuring-aircraft .museum-list a {
    font-weight: bold;
    text-decoration: none;
    color: #007acc;
}
.aircraft-detail-page .museums-featuring-aircraft .museum-list a:hover {
    text-decoration: underline;
}
.aircraft-detail-page .museums-featuring-aircraft .museum-meta {
    font-size: 0.9em;
    color: #777;
    margin-left: 5px;
}

/* display-notes, attribute-tag styles for aircraft_detail.php. These might overlap/refine general ones */
.aircraft-detail-page .museums-featuring-aircraft .display-notes {
    font-size: 0.9em; /* Was 0.85em on museum page list */
    color: #555;
    margin-top: 5px; /* Was 3px inline */
    margin-bottom: 5px; /* Added for consistency */
    margin-left: 10px; /* Indent notes slightly */
    font-style: italic; /* Added based on typical use */
}
.aircraft-detail-page .museums-featuring-aircraft .attribute-tag {
    display: inline-block;
    padding: 3px 7px; /* Slightly more padding than inline */
    border-radius: 3px;
    font-size: 0.85em; /* Was 0.9em on museum page list */
    margin-right: 5px;
    margin-bottom: 3px; /* Added for spacing */
}
.aircraft-detail-page .museums-featuring-aircraft .attribute-tag.static-display {
    background-color: #e0e0e0;
    color: #333;
}
.aircraft-detail-page .museums-featuring-aircraft .attribute-tag.airworthy {
    background-color: #d4edda; /* Light green, consistent with museum page list */
    color: #155724;    /* Dark green, consistent */
}

/* Master aircraft museum section styling */
.aircraft-detail-page .master-museums-featuring-aircraft h2 {
    font-size: 1.6em;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 5px;
}

.aircraft-detail-page .master-museums-featuring-aircraft .master-museum-list {
    list-style: none;
    padding-left: 0;
}

.aircraft-detail-page .master-museums-featuring-aircraft .master-museum-list li {
    padding: 5px 0;
    border-bottom: 1px dotted #eee;
}

.aircraft-detail-page .master-museums-featuring-aircraft .master-museum-list li:last-child {
    border-bottom: none;
}

.aircraft-detail-page .master-museums-featuring-aircraft .master-museum-list a {
    font-weight: bold;
    text-decoration: none;
    color: #007acc;
    font-size: 0.9em;
}

.aircraft-detail-page .master-museums-featuring-aircraft .master-museum-list a:hover {
    text-decoration: underline;
}

.aircraft-detail-page .master-museums-featuring-aircraft .museum-meta {
    font-size: 0.9em;
    color: #777;
    margin-left: 5px;
}

.aircraft-detail-page .master-museums-featuring-aircraft .museum-aircraft-summary {
    margin-top: 8px;
    margin-left: 10px;
}

.aircraft-detail-page .master-museums-featuring-aircraft .aircraft-count {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 5px;
}

.aircraft-detail-page .master-museums-featuring-aircraft .aircraft-names {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0;
    line-height: 1.4;
}

/* === Social Media Icons (museum.php sidebar) === */
#museum-social-media ul.social-media-links-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0; /* Add some top margin */
    display: flex; /* Align icons in a row */
    flex-wrap: wrap; /* Allow wrapping if many icons */
    gap: 10px; /* Space between icons */
}

#museum-social-media ul.social-media-links-list li {
    margin: 0;
    padding: 0;
}

#museum-social-media ul.social-media-links-list li a {
    display: inline-block;
    font-size: 1.5em; /* Adjust icon size as needed */
    color: #333; /* Default icon color */
    transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
    padding: 5px; /* Add some padding around the icon for easier clicking */
    line-height: 1; /* Ensure consistent vertical alignment */
}

#museum-social-media ul.social-media-links-list li a:hover {
    color: #007acc; /* Example hover color - can be platform specific later */
    transform: scale(1.1); /* Slight zoom on hover */
}

/* === Admin Area (admin.css loaded separately) === */

/* Book Recommendations Section on Aircraft Detail Page */
.book-recommendation-list {
    list-style: none;
    padding-left: 0;
}

.book-recommendation-list li {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.book-recommendation-list li:last-child {
    border-bottom: none;
}

.book-recommendation-list .book-title {
    display: block; /* Or inline-block if preferred */
    margin-bottom: 5px;
    font-size: 1.1em;
    font-weight: bold;
}

.book-recommendation-list .book-author {
    display: block;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 10px;
}

.book-recommendation-list .book-link.button-style {
    display: inline-block;
    padding: 8px 15px;
    background-color: #007bff;
    color: white !important; /* Ensure text color is white */
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.2s ease-in-out;
}

.book-recommendation-list .book-link.button-style:hover {
    background-color: #0056b3;
    color: white !important; /* Ensure text color remains white on hover */
    text-decoration: none;
}

/* Specific styling for the Book Recommendations card container itself */
.aircraft-books-recommendations {
    background-color: #f8f9fa; /* Light background for the card */
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-top: 30px; /* Add some space above this section */
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.aircraft-books-recommendations h2 {
    font-size: 1.3em; /* Consistent with other card titles */
    color: #007acc;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* Book grid layout for improved individual aircraft book display */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.book-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.book-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #007acc;
}

.book-item.master-book {
    border-left: 4px solid #f39c12; /* Orange left border for master aircraft books */
    background: #fffbf7; /* Very light orange background */
}

.book-item.individual-book {
    border-left: 4px solid #007acc; /* Blue left border for individual aircraft books */
}

.book-details .book-title {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1em;
    line-height: 1.3;
}

.book-details .book-title a {
    color: #007acc;
    text-decoration: none;
    font-weight: 600;
}

.book-details .book-title a:hover {
    text-decoration: underline;
    color: #005fa3;
}

.book-details .book-author {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
    font-style: italic;
}

.book-details .book-description {
    color: #555;
    font-size: 0.85em;
    line-height: 1.4;
    margin-bottom: 12px;
}

.book-details .book-source-note {
    color: #777;
    font-size: 0.8em;
    margin-bottom: 10px;
    padding: 5px 8px;
    background: rgba(243, 156, 18, 0.1);
    border-radius: 3px;
    border-left: 2px solid #f39c12;
}

.books-note {
    margin-top: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #007acc;
    color: #555;
}

@media (max-width: 768px) {
    .book-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .book-item {
        padding: 12px;
    }
    
    .book-details .book-title {
        font-size: 1em;
    }
}

/* General Content Card Styling (if not already comprehensively defined elsewhere) */
/* Ensure this doesn't conflict with existing .content-card or .section styles if they are more specific */
/* 
.content-card.section {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content-card.section h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
} 
*/

/* End of style.css */

/* === Aircraft Page Filters === */
.filters-container {
    display: flex;
    flex-wrap: wrap; /* Allow filters to wrap on smaller screens */
    gap: 20px; /* Space between filter groups */
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.filter-group {
    display: flex;
    flex-direction: column; /* Stack label and select vertically */
    flex-grow: 1; /* Allow groups to grow and share space */
    min-width: 200px; /* Minimum width for each filter group */
}

.filter-group label {
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9em;
    color: #333;
}

.filter-group select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    width: 100%; /* Make select take full width of its group */
    box-sizing: border-box; /* Include padding and border in width calculation */
}

/* Responsive adjustments for filters if needed */
@media (max-width: 768px) {
    .filters-container {
        flex-direction: column;
    }
    
    .filter-group {
        margin-bottom: 15px;
    }
}

/* === Video Gallery Styles === */
.video-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 20px;
}

.video-item {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.video-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.video-embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-details {
    padding: 20px;
}

.video-title {
    font-size: 1.3em;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.3;
}

.video-description {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.video-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.video-link:hover {
    background-color: #545b62;
    text-decoration: none;
}

/* Video sections styling */
.master-aircraft-videos,
.aircraft-videos {
    margin-top: 40px;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.master-aircraft-videos h2,
.aircraft-videos h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #007acc;
    padding-bottom: 10px;
}

/* Responsive adjustments for videos */
@media (max-width: 768px) {
    .video-gallery {
        gap: 20px;
    }
    
    .video-details {
        padding: 15px;
    }
    
    .video-title {
        font-size: 1.2em;
    }
    
    .master-aircraft-videos,
    .aircraft-videos {
        padding: 20px;
        margin-top: 30px;
    }
}

/* General book link styling for all book affiliate links */
.book-link.button-style,
a.book-link.button-style {
    display: inline-block;
    padding: 8px 15px;
    background-color: #6c757d; /* Default grey color for all buttons */
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    transition: background-color 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}

.book-link.button-style:hover,
a.book-link.button-style:hover {
    background-color: #545b62; /* Darker grey on hover */
    color: white !important;
    text-decoration: none;
}

/* Make only the FIRST book button in each section blue to reduce visual overwhelm */
.book-grid .book-item:first-child .book-link.button-style {
    background-color: #007bff;
}

.book-grid .book-item:first-child .book-link.button-style:hover {
    background-color: #0056b3;
}

/* === Admin Edit Buttons on Frontend === */
.admin-edit-button-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 5px;
}

/* Special positioning for hero banners */
.museum-hero-banner .admin-edit-button-container,
.homepage-hero .admin-edit-button-container {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.admin-edit-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.admin-edit-button:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
    text-decoration: none;
    color: white !important;
}

.admin-edit-button i {
    font-size: 1em;
}

/* Responsive adjustments for admin edit button */
@media (max-width: 768px) {
    .admin-edit-button-container {
        top: 10px;
        right: 10px;
    }
    
    .admin-edit-button {
        padding: 8px 12px;
        font-size: 0.8em;
    }
    
    .admin-edit-button .button-text {
        display: none; /* Hide text on mobile, show only icon */
    }
}

/* Small admin edit buttons for listing pages */
.admin-edit-button-small {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.admin-edit-button-small-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(220, 53, 69, 0.9);
    color: white !important;
    text-decoration: none;
    border-radius: 50%;
    font-size: 0.8em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.admin-edit-button-small-link:hover {
    background: rgba(200, 35, 51, 1);
    transform: scale(1.1);
    text-decoration: none;
    color: white !important;
}

/* Ensure cards have relative positioning for small edit buttons */
.aircraft-card,
.museum-card {
    position: relative;
}

/* === Video Gallery Styles === */

/* === Charity/Restoration Trust Display === */
.charity-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.charity-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.charity-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.charity-logo-container {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 6px;
    overflow: hidden;
}

.charity-logo-container img.charity-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.charity-details {
    flex: 1;
    min-width: 0; /* Allows text to wrap properly */
}

.charity-details .charity-title {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    line-height: 1.3;
}

.charity-details .charity-title a {
    color: #007acc;
    text-decoration: none;
    font-weight: 600;
}

.charity-details .charity-title a:hover {
    text-decoration: underline;
}

.charity-details .charity-type {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

.charity-details .charity-description {
    margin: 0 0 15px 0;
    line-height: 1.5;
    color: #333;
}

.charity-details .charity-link.button-style {
    display: inline-block;
    padding: 8px 16px;
    background-color: #007acc;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.charity-details .charity-link.button-style:hover {
    background-color: #005fa3;
    text-decoration: none;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .charity-item {
        flex-direction: column;
        text-align: center;
    }
    
    .charity-logo-container {
        align-self: center;
        margin-bottom: 10px;
    }
    
    .charity-details {
        text-align: left;
    }
}

/* === Auto-linked Aircraft Styling === */
.auto-linked-aircraft {
    color: #007acc; /* Blue text color */
    text-decoration: none;
    /* border-bottom: 1px dotted #007acc; */
    padding: 1px 2px;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.auto-linked-aircraft:hover {
    color: #005fa3; /* Darker blue on hover */
    text-decoration: none;
  /*  border-bottom: 1px solid #005fa3; */
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0, 122, 204, 0.2);
}

/* Ensure auto-linked aircraft don't interfere with other link styles */
.auto-linked-aircraft:visited {
    color: #007acc; /* Blue text color for visited links */
}

.auto-linked-aircraft:active {
    color: #005fa3; /* Darker blue for active links */
    transform: translateY(0);
}

/* Styles for Auto-linked Museums */
.auto-linked-museum {
    color: #007acc; /* Blue text color */
    text-decoration: none;
    /* border-bottom: 1px dotted #007acc; */
    padding: 1px 2px;
    border-radius: 2px;
    transition: all 0.2s ease;
    display: inline; /* Ensure inline display */
    white-space: nowrap; /* Prevent line breaks within museum names */
}

.auto-linked-museum:hover {
    color: #005fa3; /* Darker blue on hover */
    text-decoration: none;
  /*  border-bottom: 1px solid #005fa3; */
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0, 122, 204, 0.2);
}

.auto-linked-museum:visited {
    color: #007acc; /* Blue text color for visited links */
}

.auto-linked-museum:active {
    color: #005fa3; /* Darker blue for active links */
    transform: translateY(0);
}

/* Auto-linked museums are now prevented entirely in museum cards via render_content_with_links_no_museums() */

/* Styles for Auto-linked Squadrons */
.auto-linked-squadron {
    color: #d35400; /* Orange color to distinguish from aircraft/museums */
    text-decoration: none; /* No underline by default */
    font-weight: 500; /* Slightly bold */
    border-bottom: 1px dotted #d35400; /* Dotted underline */
    transition: all 0.2s ease; /* Smooth transition for hover effects */
}

.auto-linked-squadron:hover {
    color: #e67e22; /* Lighter orange on hover */
    text-decoration: none; /* Keep no underline */
    border-bottom: 1px solid #e67e22; /* Solid underline on hover */
    background-color: rgba(211, 84, 0, 0.05); /* Very light orange background on hover */
}

.auto-linked-squadron:visited {
    color: #d35400; /* Keep same orange color for visited links */
}

.auto-linked-squadron:active {
    color: #c0392b; /* Darker red-orange for active links */
    transform: translateY(0);
}

/* --- General Link Styling (if needed, or ensure it doesn't conflict) --- */

/* Alternative museums suggestions */
.aircraft-list-on-museum-page .no-results-message {
    border: none;
    margin: 10px 0;
    padding: 0;
    list-style: none; /* Remove bullet point */
}

.aircraft-list-on-museum-page .no-results-message .alternative-museums-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
}

.aircraft-list-on-museum-page .no-results-message .alternative-museums-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aircraft-list-on-museum-page .no-results-message .alternative-museums-list li {
    margin-bottom: 8px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.aircraft-list-on-museum-page .no-results-message .alternative-museums-list li:hover {
    background: #f0f8ff;
    border-color: #007acc;
}

.aircraft-list-on-museum-page .no-results-message .alternative-museums-list a {
    color: #007acc;
    text-decoration: none;
    font-weight: bold;
    display: block;
    margin-bottom: 2px;
}

.aircraft-list-on-museum-page .no-results-message .alternative-museums-list a:hover {
    text-decoration: underline;
}

.aircraft-list-on-museum-page .no-results-message .museum-meta-info {
    color: #777;
    font-size: 0.9em;
}

.aircraft-list-on-museum-page .aircraft-thumbnail-link {
}

/* === Reference Links Styles === */
.reference-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
}

.reference-link-item {
    padding: 0;
    border: none;
    margin: 0;
    margin-bottom: 6px;
}

.reference-link-item:last-child {
    border-bottom: none;
}

.reference-link-title {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.2;
    display: inline;
}

.reference-link-title a {
    color: #007acc;
    text-decoration: none;
    font-weight: 400;
}

.reference-link-title a:hover {
    color: #005fa3;
    text-decoration: underline;
}

.reference-link-type {
    display: none; /* Hide type badges for cleaner look */
}

.reference-link-description {
    display: none; /* Hide descriptions for compact view */
}

/* Make the reference links sections more subtle */
.master-aircraft-reference-links,
.aircraft-reference-links {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.master-aircraft-reference-links h2,
.aircraft-reference-links h2 {
    font-size: 1.1em;
    color: #666;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 500;
    padding-bottom: 0;
    border-bottom: none;
}

/* Museum reference links specific styling */
#museum-reference-links {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

#museum-reference-links h2 {
    font-size: 1.1em;
    color: #666;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 500;
    padding-bottom: 0;
    border-bottom: none;
}

#museum-reference-links .reference-links-list {
    margin-top: 10px;
}

/* Responsive adjustments for reference links */
@media (max-width: 768px) {
    .reference-links-list {
        flex-direction: column;
        gap: 6px 0;
    }
    
    .reference-link-item {
        margin-bottom: 4px;
    }
    
    .reference-link-title {
        font-size: 0.85em;
    }
}

/* ================================
   KNOWLEDGE BASE STYLES
   ================================ */

.kb-header {
    text-align: center;
    margin-bottom: 20px;
}

.kb-header h1 {
    margin-bottom: 10px;
}

.kb-intro {
    font-size: 1.1em;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.kb-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.kb-main-content {
    flex: 2;
    min-width: 0;
}

.kb-sidebar {
    flex: 1;
    min-width: 260px;
}

.kb-search-container {
    margin-bottom: 30px;
}

.kb-search-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
}

.kb-search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.kb-search-input:focus {
    outline: none;
    border-color: #007acc;
}

.kb-search-button {
    padding: 12px 20px;
    background-color: #007acc;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.kb-search-button:hover {
    background-color: #005fa3;
}

.kb-results-summary {
    margin-bottom: 25px;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    color: #666;
}

.kb-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.kb-article-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.kb-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.kb-article-card.featured {
    border-color: #007acc;
    border-width: 2px;
}

.featured-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background-color: #007acc;
    color: white;
    padding: 4px 12px;
    border-radius: 0 6px 0 6px;
    font-size: 0.8em;
    font-weight: bold;
}

.article-title {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.article-title a {
    color: #007acc;
    text-decoration: none;
}

.article-title a:hover {
    text-decoration: underline;
}

.article-question {
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tag {
    background-color: #f0f8ff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
}

.category-tag a {
    color: #007acc;
    text-decoration: none;
}

.article-stats {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: #888;
}

.kb-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.kb-pagination a,
.kb-pagination .current-page {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: #007acc;
    transition: all 0.3s ease;
}

.kb-pagination a:hover {
    background-color: #f0f8ff;
    border-color: #007acc;
}

.kb-pagination .current-page {
    background-color: #007acc;
    color: white;
    border-color: #007acc;
}

.no-articles-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* Sidebar Styles */
.kb-sidebar-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.kb-sidebar-section h3 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 1.05em;
}

.kb-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kb-categories-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.kb-categories-list li:last-child {
    border-bottom: none;
}

.kb-categories-list li.active a {
    color: #007acc;
    font-weight: bold;
}

.kb-categories-list a {
    color: #333;
    text-decoration: none;
    flex: 1;
}

.kb-categories-list a:hover {
    color: #007acc;
}

.kb-categories-list .count {
    background-color: #f0f0f0;
    color: #666;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8em;
}

.kb-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    background-color: #f8f9fa;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85em;
    transition: all 0.3s ease;
}

.tag-link:hover,
.tag-link.active {
    background-color: #007acc;
    color: white;
}

/* Individual Article Page */
.kb-article-layout {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.kb-article-content {
    flex: 2;
    min-width: 0;
}

.kb-article-sidebar {
    flex: 1;
    min-width: 260px;
}

.kb-article-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.kb-article-header h1 {
    margin: 0 0 15px 0;
    color: #333;
}

.kb-article-meta {
    margin-bottom: 15px;
}

.kb-category-tag {
    background-color: #f0f8ff;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 10px;
}

.kb-category-tag a {
    color: #007acc;
    text-decoration: none;
    font-weight: 500;
}

.kb-article-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    color: #666;
    flex-wrap: wrap;
}

.kb-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kb-tag-link {
    background-color: #f8f9fa;
    color: #666;
    padding: 4px 10px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.85em;
    transition: all 0.3s ease;
}

.kb-tag-link:hover {
    background-color: #007acc;
    color: white;
}

.kb-question-section,
.kb-answer-section {
    margin-bottom: 12px;
}

.kb-question-section {
    margin-bottom: 15px;
}

.kb-question,
.kb-answer {
    color: #007acc;
    margin-bottom: 12px;
    font-size: 1.2em;
}

.kb-question-text {
    font-size: 1.05em;
    color: #333;
    font-weight: 500;
    line-height: 1.5;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #007acc;
    border-radius: 0 6px 6px 0;
}

.kb-answer-content {
    line-height: 1.6;
    color: #333;
}

.kb-answer-content h3,
.kb-answer-content h4 {
    color: #007acc;
    margin-top: 15px;
    margin-bottom: 8px;
}

.kb-answer-content h3:first-child,
.kb-answer-content h4:first-child {
    margin-top: 0;
}

.kb-answer-content ul,
.kb-answer-content ol {
    margin: 12px 0;
    padding-left: 25px;
}

.kb-answer-content li {
    margin-bottom: 8px;
}

.kb-feedback-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.kb-feedback-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.kb-feedback-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.feedback-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
}

.feedback-btn.helpful:hover {
    border-color: #28a745;
    background-color: #28a745;
    color: white;
}

.feedback-btn.unhelpful:hover {
    border-color: #dc3545;
    background-color: #dc3545;
    color: white;
}

.detailed-feedback-form {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-top: 15px;
}

.detailed-feedback-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: inherit;
}

.submit-feedback-btn {
    background-color: #007acc;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.feedback-message.success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
}

.kb-related-articles {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.kb-related-article {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007acc;
}

.kb-related-article h4 {
    margin: 0 0 8px 0;
    font-size: 1em;
}

.kb-related-article h4 a {
    color: #007acc;
    text-decoration: none;
}

.kb-related-article h4 a:hover {
    text-decoration: underline;
}

.related-question {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.related-category {
    font-size: 0.8em;
    color: #888;
    font-style: italic;
}

.kb-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kb-sidebar-link {
    color: #007acc;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.kb-sidebar-link:hover {
    text-decoration: underline;
}

.kb-sidebar-link:last-child {
    border-bottom: none;
}

/* Responsive Design for Knowledge Base */
/* Knowledge Base specific container spacing */
.kb-article-layout .container,
.kb-layout .container {
    padding: 15px 20px;
}

/* Reduce margins for knowledge base content */
.kb-article-content,
.kb-main-content {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
}

/* Tighter spacing for content elements */
.kb-answer-content p {
    margin-bottom: 10px;
    margin-top: 0;
}

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

.kb-answer-content p:first-child {
    margin-top: 0;
}

/* Reduce spacing around lists */
.kb-answer-content ul,
.kb-answer-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.kb-answer-content li {
    margin-bottom: 4px;
}

/* Tighter spacing after headings that precede lists or paragraphs */
.kb-answer-content h3 + p,
.kb-answer-content h4 + p,
.kb-answer-content h3 + ul,
.kb-answer-content h4 + ul,
.kb-answer-content h3 + ol,
.kb-answer-content h4 + ol {
    margin-top: 0;
}

/* Override default browser margins for knowledge base content */
.kb-answer-content * {
    margin-top: 0;
}

.kb-answer-content h3,
.kb-answer-content h4 {
    margin-top: 15px !important;
    margin-bottom: 8px !important;
}

.kb-answer-content h3:first-child,
.kb-answer-content h4:first-child {
    margin-top: 0 !important;
}

.kb-answer-content p {
    margin: 0 0 10px 0 !important;
}

.kb-answer-content ul,
.kb-answer-content ol {
    margin: 8px 0 !important;
}

/* Limit excessive br tags visual impact */
.kb-answer-content br + br {
    display: none;
}

.kb-answer-content br + br + br,
.kb-answer-content br + br + br + br {
    display: none !important;
}

/* Additional aggressive spacing fixes for knowledge base articles */
.kb-article-content .kb-question-section {
    margin-bottom: 8px !important;
}

.kb-article-content .kb-answer-section {
    margin-bottom: 0 !important;
}

.kb-article-content .kb-question,
.kb-article-content .kb-answer {
    margin-bottom: 6px !important;
}

.kb-article-content .kb-question-text {
    margin-bottom: 8px !important;
    padding: 8px 12px !important;
    line-height: 1.4 !important;
}

.kb-article-content .kb-answer-content {
    line-height: 1.5 !important;
}

/* Even more aggressive spacing for content elements */
.kb-answer-content h3 {
    margin-top: 10px !important;
    margin-bottom: 4px !important;
    line-height: 1.3 !important;
}

.kb-answer-content h3:first-child {
    margin-top: 0 !important;
}

.kb-answer-content h4 {
    margin-top: 8px !important;
    margin-bottom: 3px !important;
    line-height: 1.3 !important;
}

.kb-answer-content p {
    margin: 0 0 6px 0 !important;
    line-height: 1.4 !important;
}

.kb-answer-content ul {
    margin: 4px 0 6px 0 !important;
    padding-left: 18px !important;
}

.kb-answer-content li {
    margin-bottom: 2px !important;
    line-height: 1.3 !important;
}

.kb-answer-content li:last-child {
    margin-bottom: 0 !important;
}

/* Reduce spacing after headings */
.kb-answer-content h3 + ul,
.kb-answer-content h4 + ul,
.kb-answer-content h3 + p,
.kb-answer-content h4 + p {
    margin-top: 2px !important;
}

/* Ultra-tight spacing - remove almost all gaps */
.kb-answer-content h3 {
    margin-top: 6px !important;
    margin-bottom: 2px !important;
}

.kb-answer-content p {
    margin: 0 0 3px 0 !important;
}

.kb-answer-content ul {
    margin: 2px 0 3px 0 !important;
}

.kb-answer-content li {
    margin-bottom: 1px !important;
}

/* Compress the main content sections */
.kb-article-content .kb-question-section {
    margin-bottom: 4px !important;
}

.kb-article-content .kb-answer-section {
    margin-bottom: 0 !important;
}

.kb-article-content .kb-question,
.kb-article-content .kb-answer {
    margin-bottom: 3px !important;
}

.kb-article-content .kb-question-text {
    margin-bottom: 4px !important;
    padding: 6px 10px !important;
}

/* Force minimal spacing on all elements */
.kb-answer-content * {
    margin-top: 0 !important;
    margin-bottom: 2px !important;
}

.kb-answer-content *:last-child {
    margin-bottom: 0 !important;
}

@media (max-width: 992px) {
    .kb-layout,
    .kb-article-layout {
        flex-direction: column;
    }
    
    .kb-sidebar,
    .kb-article-sidebar {
        min-width: 0;
        margin-top: 20px;
    }
    
    .kb-articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .kb-search-form {
        flex-direction: column;
    }
    
    .kb-search-input,
    .kb-search-button {
        width: 100%;
    }
    
    .kb-feedback-buttons {
        flex-direction: column;
    }
    
    .kb-article-stats {
        flex-direction: column;
        gap: 5px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== ADMIN INTERFACE STYLES ===== */

/* Admin Container */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Admin Header */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.admin-header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 28px;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

/* Admin Forms */
.admin-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-control[type="color"] {
    height: 48px;
    padding: 4px;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

/* Checkboxes */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 10px;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-label .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #007bff;
    border-color: #007bff;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark:after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Tags Container */
.tags-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    background: #f8f9fa;
}

.tag-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.tag-checkbox:hover {
    background: rgba(0, 123, 255, 0.1);
}

/* WYSIWYG Toolbar */
.wysiwyg-toolbar {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.wysiwyg-toolbar .btn {
    min-width: 40px;
    padding: 5px 10px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Admin Filters */
.admin-filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.filter-form {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group .form-control {
    margin-bottom: 0;
}

/* Bulk Actions */
.bulk-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.bulk-actions select {
    min-width: 150px;
}

/* Admin Table */
.admin-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

.admin-table .text-center {
    text-align: center;
    padding: 40px 20px;
}

/* Article/Item Display in Table */
.article-title strong {
    color: #2c3e50;
    font-size: 16px;
}

.article-question {
    color: #6c757d;
    font-size: 13px;
    margin-top: 5px;
    line-height: 1.4;
}

.article-stats {
    font-size: 12px;
    color: #6c757d;
}

.article-stats div {
    margin-bottom: 2px;
}

.date-info {
    font-size: 12px;
    color: #6c757d;
}

.date-info small {
    color: #999;
}

/* Status Badges */
.status-badges {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    min-width: auto;
}

/* Categories List */
.categories-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
}

.list-header {
    margin-bottom: 20px;
    text-align: center;
}

.list-header h3 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.list-header p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.sortable-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.category-item {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: move;
}

.category-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.drag-handle {
    margin-right: 15px;
    color: #6c757d;
    cursor: grab;
    font-size: 18px;
}

.drag-handle:active {
    cursor: grabbing;
}

.category-info {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 15px;
}

.category-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.category-details h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 18px;
}

.category-details p {
    margin: 0 0 10px 0;
    color: #6c757d;
    font-size: 14px;
}

.category-meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.article-count {
    color: #6c757d;
    font-size: 14px;
}

.category-actions {
    display: flex;
    gap: 10px;
}

/* Tags Grid */
.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.tag-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.tag-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.tag-checkbox {
    position: absolute;
    top: 15px;
    left: 15px;
}

.tag-content {
    margin-left: 30px;
}

.tag-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.tag-name {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.tag-usage {
    text-align: right;
    font-size: 12px;
}

.usage-count {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #007bff;
    line-height: 1;
}

.usage-label {
    color: #6c757d;
}

.tag-description {
    color: #6c757d;
    font-size: 14px;
    margin: 10px 0;
    line-height: 1.4;
}

.tag-meta {
    margin-bottom: 15px;
}

.created-date {
    color: #999;
}

.tag-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-icon {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Form Card */
.form-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.form-card h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: #000;
}

.modal-content form {
    padding: 20px 30px 30px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
}

.pagination .btn {
    min-width: 40px;
    text-align: center;
}

.pagination-info {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    margin-top: 10px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-container {
        padding: 10px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .admin-actions {
        width: 100%;
        justify-content: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .bulk-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-table-container {
        overflow-x: auto;
    }
    
    .admin-table {
        min-width: 800px;
    }
    
    .tags-grid {
        grid-template-columns: 1fr;
    }
    
    .category-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .category-info {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .admin-header h1 {
        font-size: 24px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .tag-content {
        margin-left: 0;
        margin-top: 30px;
    }
}

/* ===== AIRCRAFT KNOWLEDGE BASE ARTICLES SECTION ===== */

.aircraft-kb-articles {
    margin-top: 30px;
}

.aircraft-kb-articles h2 {
    color: #2c3e50;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.aircraft-kb-articles .section-intro {
    color: #666;
    font-style: italic;
    margin-bottom: 25px;
}

.kb-articles-list {
    display: grid;
    gap: 20px;
}

.kb-article-item {
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.kb-article-item:hover {
    border-color: #007bff;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.kb-article-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.kb-article-title a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.kb-article-title a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.kb-article-question {
    color: #495057;
    margin: 0 0 15px 0;
    line-height: 1.5;
    font-size: 14px;
}

.kb-article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #6c757d;
}

.kb-article-category a {
    background: #e7f3ff;
    color: #0066cc;
    padding: 4px 8px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.kb-article-category a:hover {
    background: #0066cc;
    color: white;
}

.kb-article-stats {
    color: #999;
}

.kb-section-footer {
    margin-top: 25px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.kb-section-footer .btn {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.kb-section-footer .btn:hover {
    background: #5a6268;
    text-decoration: none;
}

@media (max-width: 768px) {
    .kb-article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .kb-article-item {
        padding: 15px;
    }
    
    .kb-article-title {
        font-size: 16px;
    }
}

/* ===== MOBILE RESPONSIVE STYLES FOR NO-IMAGE AIRCRAFT CARDS ===== */
@media (max-width: 768px) {
    /* Mobile adjustments for no-image aircraft cards */
    .aircraft-card .aircraft-card-image-container.no-image {
        height: 50px; /* Even smaller on mobile */
    }
    
    .aircraft-card .aircraft-card-image-container.no-image::before {
        font-size: 20px; /* Smaller airplane symbol on mobile */
    }
    
    .aircraft-card.no-image-card .card-content {
        padding: 10px 12px; /* More compact padding on mobile */
    }
    
    .aircraft-card.no-image-card h3 {
        font-size: 1.05em; /* Slightly smaller title on mobile */
    }
    
    /* Mobile adjustments for compact museum cards */
    .museum-card .museum-card-image-container.no-image {
        height: 50px; /* Even smaller on mobile */
    }
    
    .museum-card .museum-card-image-container.no-image::before {
        font-size: 20px; /* Smaller museum symbol on mobile */
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }
    
    .museum-card.compact-museum-card .card-content {
        padding: 10px 12px; /* More compact padding on mobile */
    }
    
    .museum-card.compact-museum-card h3 {
        font-size: 1.05em; /* Slightly smaller title on mobile */
    }
    
    /* Adjust aircraft grid for better mobile display */
    .aircraft-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Smaller minimum width on mobile */
        gap: 15px; /* Smaller gap on mobile */
    }
}

/* ===== STYLES FOR SQUADRON CARDS WITH EMPTY DESCRIPTIONS ===== */
.squadron-description:empty {
    display: none !important; /* Hide empty description paragraphs completely */
}

.squadron-card .squadron-description:empty {
    margin: 0 !important; /* Remove any margin from empty descriptions */
    padding: 0 !important; /* Remove any padding from empty descriptions */
}

/* For featured squadron cards on homepage */
.squadron-card .meta:empty {
    display: none !important; /* Hide empty meta description paragraphs */
}

/* General empty paragraph handling */
p.squadron-description:empty,
p.meta:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* === Compact Museum Card Styling (similar to aircraft no-image cards) === */
/* Special styling for museum cards without images to match aircraft no-image compact appearance */
.museum-card .museum-card-image-container.no-image {
    height: 60px; /* Much smaller height for no-image museum cards */
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #dee2e6;
    position: relative;
    font-size: 0; /* Hide any text content */
}

.museum-card .museum-card-image-container.no-image::before {
    content: "🏛";
    font-size: 24px;
    color: #6c757d;
    opacity: 0.7;
    font-family: Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Hide the placeholder text inside no-image museum cards */
.museum-card .museum-card-image-container.no-image .placeholder-img {
    display: none !important;
}

/* Make the entire museum card more compact when there's no image */
.museum-card.compact-museum-card {
    min-height: auto;
}

.museum-card.compact-museum-card .card-content {
    padding: 12px 15px; /* Slightly reduced padding */
}

.museum-card.compact-museum-card h3 {
    font-size: 1.1em; /* Slightly smaller title */
    margin-bottom: 6px;
}

.museum-card.compact-museum-card .meta,
.museum-card.compact-museum-card .museum-description-snippet {
    font-size: 0.85em; /* Slightly smaller meta text */
}