/* ==========================================================================
   0. Omeka Admin Bar
   ========================================================================== */
#admin-bar {
  background-color: #2D3748; 
  color: #CCCCCC;
  padding: 8px 40px;
  font-size: 13px;
  display: flex;
  justify-content: flex-end; 
}

#admin-bar ul {
  list-style: none; 
  margin: 0;
  padding: 0;
  display: flex; 
  gap: 20px; 
  align-items: center;
}

#admin-bar li {
  margin: 0;
}

#admin-bar a {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

#admin-bar a:hover {
  color: #FFFFFF;
  opacity: 0.7;
}

/* ==========================================================================
   1. Base Reset & Modern Typography
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #FAFAFA; 
  color: #1A1A1A; 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em; 
  margin-bottom: 20px;
}

a {
  color: #0055FF; 
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #000000;
}

.modern-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 40px 20px;
}

.page-title {
  font-size: 32px;
  margin-top: 0; 
  margin-bottom: 30px;
  color: #1A1A1A;
}

/* ==========================================================================
   2. Modern Header (Image Banner) & Dedicated Nav Bar
   ========================================================================== */
.modern-header {
  background-image: url('../images/tmhma-istorias_cover.jpg');
  background-size: cover;
  background-position: center 25%; 
  background-color: #1A1A1A; 
  border-bottom: 3px solid #3498DB; 
  padding: 25px 40px; 
  position: relative; 
}

.modern-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: #A91C1C; 
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
}

.site-branding h1 {
  margin: 0;
  line-height: 0; 
}

.site-branding img {
  max-height: 80px; 
  width: auto;
  transition: opacity 0.3s ease;
}

.site-branding img:hover {
  opacity: 0.8;
}

.lower-nav-bar {
  background-color: #FFFFFF;
  border-bottom: 1px solid #E5E5E5;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  padding: 15px 40px;
  position: sticky; 
  top: 0;
  z-index: 100;
}

.nav-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; 
  gap: 20px;
}

.primary-nav ul {
  list-style: none;
  display: flex; 
  gap: 25px;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  color: #1A1A1A; 
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase; 
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.primary-nav a:hover,
.primary-nav .active a {
  color: #A91C1C; 
}

.header-search form {
  display: flex;
  margin: 0;
}

.header-search input[type="text"] {
  padding: 8px 15px;
  border: 1px solid #CCCCCC;
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-family: inherit;
  outline: none;
}

.header-search input[type="text"]:focus {
  border-color: #3498DB; 
}

.header-search button {
  padding: 8px 20px;
  background-color: #3498DB; 
  color: #FFFFFF;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.header-search button:hover {
  background-color: #A91C1C; 
}

/* ==========================================================================
   3. Taxonomy Layout & Sidebar
   ========================================================================== */
.browse-layout {
  display: grid;
  grid-template-columns: 260px 1fr; 
  gap: 40px;
  align-items: start; 
}

.taxonomy-sidebar {
  background-color: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  padding: 25px;
  position: sticky;
  top: 90px; 
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #1A1A1A;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.sidebar-header h2 {
  font-size: 18px;
  margin: 0;
}

.clear-filters {
  font-size: 12px;
  color: #A91C1C; 
  font-weight: 600;
  text-decoration: none;
}

.clear-filters:hover {
  text-decoration: underline;
}

.filter-section {
  margin-bottom: 30px;
}

.filter-section h3 {
  font-size: 14px;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

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

.filter-list li {
  margin-bottom: 8px;
}

.filter-list a {
  color: #1A1A1A;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
  display: block; 
}

.filter-list a:hover {
  color: #3498DB; 
  padding-left: 5px; 
}

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

.sidebar-tag-badge {
  background-color: #F4F4F4;
  color: #444444;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.sidebar-tag-badge:hover {
  background-color: #3498DB;
  color: #FFFFFF;
}

.year-dropdown {
  width: 100%;
  padding: 10px 15px;
  font-family: inherit;
  font-size: 14px;
  color: #1A1A1A;
  background-color: #F9F9F9;
  border: 1px solid #CCCCCC;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  appearance: none; 
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231A1A1A%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 15px top 50%;
  background-size: 10px auto;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.year-dropdown:focus {
  border-color: #3498DB;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
  background-color: #FFFFFF;
}

.year-dropdown option {
  padding: 5px;
}

/* ==========================================================================
   4. Active Filters Bar (Top Version)
   ========================================================================== */
.active-filters-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #E5E5E5;
}

.active-filters-label {
  font-size: 13px;
  color: #666666;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 5px;
}

.active-filter-pill {
  background-color: #3498DB; 
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.active-filter-pill:hover {
  background-color: #A91C1C; 
  color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(169, 28, 28, 0.2);
}

.pill-label {
  line-height: 1.3;
}

.remove-x {
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
}

.clear-all-filters {
  font-size: 13px;
  color: #A91C1C;
  text-decoration: none;
  font-weight: 600;
  margin-left: auto;
}

.clear-all-filters:hover {
  text-decoration: underline;
}

/* ==========================================================================
   5. Modern Card Grid (Browse Items Page)
   ========================================================================== */
.modern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px; 
}

.grid-card {
  background-color: #FFFFFF;
  border: 1px solid #E5E5E5; 
  border-radius: 6px;
  overflow: hidden; 
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
}

.grid-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.card-image {
  height: 250px; 
  background-color: #F4F4F4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  transition: transform 0.4s ease;
}

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

.card-text {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
  flex-grow: 1; 
}

.year-tag {
  background-color: #0055FF; 
  color: #FFFFFF; 
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px; 
  margin-bottom: 15px;
  display: inline-block;
}

.card-title {
  font-size: 14px; 
  font-weight: 600;
  margin: 0 0 8px 0; 
  line-height: 1.5;
}

.card-title a {
  color: #1A1A1A;
}

.card-collection {
  margin: 0;
  margin-top: auto; 
  border-top: 1px solid #EEEEEE;
  padding-top: 15px;
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap; 
  gap: 8px; 
}

.collection-label {
  font-size: 13px;
  color: #1A1A1A;
  font-weight: 500;
}

.collection-pill {
  background-color: #FDF2F2; 
  color: #A91C1C; 
  border: 1px solid #FAD4D4; 
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px; 
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
}

.collection-pill:hover {
  background-color: #A91C1C; 
  color: #FFFFFF; 
  border-color: #A91C1C;
}

.no-image {
  color: #999;
  font-size: 14px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px; 
  margin-bottom: 15px; 
}

.tag-badge {
  background-color: #F0F4F8; 
  color: #4A5568; 
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #E2E8F0; 
  text-decoration: none;
  transition: all 0.2s ease;
}

.tag-badge:hover {
  background-color: #E2E8F0; 
  color: #1A1A1A; 
}

/* ==========================================================================
   6. Single Item View (items/show.php)
   ========================================================================== */
/* --- Item Escape Hatch (Breadcrumb) --- */
.item-breadcrumb {
  max-width: 1100px;
  margin: 30px auto 0 auto; 
  padding: 0 30px;
}

.back-to-collection-btn {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #A91C1C;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  padding: 8px 16px;
  background-color: #FDF2F2;
  border: 1px solid #FAD4D4;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.back-to-collection-btn:hover {
  background-color: #A91C1C;
  color: #FFFFFF;
  border-color: #A91C1C;
  transform: translateX(-5px); 
}

.modern-item-show {
  max-width: 1100px; 
  margin: 20px auto 60px auto; 
  padding: 0 30px;
  display: grid;
  grid-template-columns: 1fr 1fr; 
  gap: 40px; 
  align-items: start;
}

/* --- Left Column: Media --- */
.item-media-gallery {
  background-color: #F4F4F4;
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  padding: 15px; 
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: 90px; 
}

.item-media-gallery .item-file {
  width: 100%;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
}

.item-media-gallery img {
  max-width: 100%;
  max-height: 550px; 
  width: auto;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* --- Right Column: Metadata Cards --- */
.item-metadata-sidebar {
  display: flex;
  flex-direction: column;
}

.item-show-title {
  font-size: 24px; 
  line-height: 1.25;
  color: #1A1A1A;
  margin-bottom: 15px; 
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: 12px; 
}

.item-show-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: #A91C1C; 
  border-radius: 2px;
}

.item-collection-link {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-metadata-list {
  background-color: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  padding: 15px 20px; 
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.item-metadata-list h2,
#dublin-core-title {
  display: none;
}

.item-metadata-list .element {
  margin-bottom: 0; 
  padding: 10px 0; 
  border-bottom: 1px dashed #E0E0E0; 
}

.item-metadata-list .element:first-child {
  padding-top: 0;
}

.item-metadata-list .element:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.item-metadata-list .element h3 {
  font-size: 11px; 
  color: #3498DB; 
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px; 
  font-weight: 700;
}

.item-metadata-list .element-text {
  font-size: 13.5px; 
  color: #333333; 
  line-height: 1.4; 
}

.item-tags-section {
  margin-top: 20px; 
  background-color: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  padding: 15px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.item-tags-section h3 {
  font-size: 11px;
  color: #A91C1C; 
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-weight: 700;
}

/* ==========================================================================
   7. Cinematic Collection Albums (collections/browse.php)
   ========================================================================== */
.collection-album-card {
  position: relative;
  height: 320px; 
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  background-color: #1A1A1A;
}

.album-link-wrapper {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

/* Background Image */
.album-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.album-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  transition: transform 0.8s ease; 
}

/* Fallback if a collection doesn't have an image */
.no-image-bg {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2C3E50, #A91C1C);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  font-weight: 600;
  font-size: 14px;
}

/* The Dark Gradient Overlay */
.album-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70%; 
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
  z-index: 2;
  transition: height 0.4s ease;
}

/* The Text Content */
.album-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 25px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: #FFFFFF;
}

/* Translucent Glassmorphism Pill for the Item Count */
.album-count {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.album-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px 0;
  line-height: 1.2;
  color: #FFFFFF;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.album-action {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #E0E0E0;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
}

.album-action .arrow {
  font-size: 16px;
  transition: transform 0.3s ease;
}

/* --- THE HOVER EFFECTS --- */
.collection-album-card:hover .album-image img {
  transform: scale(1.08); 
}

.collection-album-card:hover .album-overlay {
  height: 80%; 
}

.collection-album-card:hover .album-action {
  color: #FFFFFF; 
}

.collection-album-card:hover .album-action .arrow {
  transform: translateX(5px); 
  color: #A91C1C; 
}

/* ==========================================================================
   8. Individual Collection Page (collections/show.php)
   ========================================================================== */

/* --- TOP SECTION: The Metadata Card --- */
.collection-header-box {
  background-color: #FFFFFF;
  border: 1px solid #EAEAEA;
  border-radius: 10px;
  padding: 25px 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04); 
  margin-bottom: 30px; 
}

.collection-main-title {
  font-size: 28px; 
  color: #1A1A1A;
  margin-top: 0;
  margin-bottom: 15px; 
  padding-bottom: 10px;
  border-bottom: 3px solid #A91C1C; 
  display: inline-block; 
}

.collection-metadata-clean .element {
  margin-bottom: 15px; 
  padding-bottom: 15px;
  border-bottom: 1px dashed #EEEEEE;
}

.collection-metadata-clean .element:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.collection-metadata-clean .element h3 {
  font-size: 12px;
  color: #3498DB; 
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
  font-weight: 700;
}

.collection-metadata-clean .element-text {
  font-size: 14px;
  line-height: 1.6;
  color: #333333;
}

/* --- BOTTOM SECTION: The Darker Items Vault --- */
.collection-items-box {
  background-color: #EDF2F7; 
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 30px; 
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); 
}

.items-box-title {
  font-size: 20px;
  color: #1A1A1A;
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #CBD5E0; 
  display: flex;
  align-items: baseline;
  gap: 10px;
}

/* --- Quick Filter Tags inside the Vault --- */
.collection-quick-filters {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px dashed #CBD5E0;
}

.quick-filter-label {
  font-size: 13px;
  font-weight: 700;
  color: #4A5568;
  text-transform: uppercase;
  white-space: nowrap;
  margin-top: 8px;
}

.quick-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.quick-tag-badge {
  display: inline-flex !important; /* Forces the pill shape */
  align-items: center;
  background-color: #FFFFFF;
  color: #3498DB !important;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid #E2E8F0 !important;
  text-decoration: none !important; /* Strips default link underlines */
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  line-height: 1.2;
}

.quick-tag-badge .tag-count {
  color: #A0AEC0 !important;
  font-size: 11px;
  margin-left: 4px;
}

.quick-tag-badge:hover {
  background-color: #3498DB !important;
  color: #FFFFFF !important;
  border-color: #3498DB !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
}

.quick-tag-badge:hover .tag-count {
  color: #E2E8F0 !important; 
}

/* Highlights the currently selected live filter */
.quick-tag-badge.active-filter {
  background-color: #A91C1C !important;
  color: #FFFFFF !important;
  border-color: #A91C1C !important;
  box-shadow: 0 4px 12px rgba(169, 28, 28, 0.2);
  transform: translateY(-2px);
  opacity: 1 !important;
}

.quick-tag-badge.active-filter .tag-count {
  color: #FDF2F2 !important;
}

/* ==========================================================================
   9. Modern Footer
   ========================================================================== */
.modern-footer {
  background-color: #161B22; 
  color: #FFFFFF;
  border-top: 4px solid #A91C1C; 
  padding: 60px 40px 30px;
  margin-top: 60px; 
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr; 
  gap: 60px;
  margin-bottom: 40px;
}

.footer-brand .footer-title {
  color: #FFFFFF;
  font-size: 24px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.footer-brand .footer-subtitle {
  color: #A0AEC0; 
  font-size: 15px;
  line-height: 1.6;
  max-width: 400px;
}

.footer-links-group {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-nav-col h4 {
  color: #3498DB; 
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}

.footer-nav-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav-col li {
  margin-bottom: 12px;
}

.footer-nav-col a {
  color: #E2E8F0; 
  font-size: 14.5px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-nav-col a:hover {
  color: #3498DB; 
  padding-left: 5px; 
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1); 
  padding-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #718096;
}

.footer-credits a {
  color: #3498DB;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-credits a:hover {
  color: #A91C1C;
}

/* ==========================================================================
   10. Mobile Responsiveness
   ========================================================================== */
@media (max-width: 850px) {
  .modern-header {
    padding: 5px 20px; 
    min-height: 80px; 
    display: flex;
    align-items: center;
  }
  
  .header-inner {
    width: 100%;
    margin: 0;
  }

  .site-branding img {
    max-height: 50px; 
  }
  
  .lower-nav-bar {
    padding: 15px 20px;
  }
  
  .nav-bar-inner {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  
  .header-search {
    flex: 1; 
    max-width: none; 
    margin-left: 15px; 
  }
  
  .header-search form {
    width: 100%;
    display: flex;
  }
  
  .header-search input[type="text"] {
    width: 100%; 
  }

  .primary-nav {
    display: none; 
    width: 100%;
    order: 3; 
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #EEEEEE;
  }
  
  .primary-nav.is-open {
    display: block; 
  }
  
  .primary-nav ul {
    flex-direction: column;
    gap: 15px;
  }
  
  .primary-nav a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px dashed #E5E5E5;
  }

  /* =========================================
     Fix Homepage Hero on Mobile
     ========================================= */
  .modern-content h1,
  .modern-content h2 {
    font-size: 24px !important; 
    line-height: 1.2 !important;
    margin-bottom: 15px !important;
  }
  
  .modern-content p {
    font-size: 14px !important; 
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
  }

  .modern-content > div:first-child {
    padding: 30px 20px !important; 
  }
  
  .modern-content a.button, 
  .modern-content button {
    margin-bottom: 10px;
  }

  /* =========================================
     General Layout Mobile Stacks
     ========================================= */
  .browse-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .taxonomy-sidebar {
    position: static; 
  }

  .modern-item-show {
    grid-template-columns: 1fr; 
    padding: 0 20px;
    gap: 25px; 
  }
  
  .item-media-gallery {
    position: static; 
  }
  
  .item-show-title {
    font-size: 22px;
  }

  .collection-header-box,
  .collection-items-box {
    padding: 20px;
  }
  
  .collection-main-title {
    font-size: 24px;
  }

  .modern-footer {
    padding: 40px 20px 20px;
  }
  
  .footer-top {
    grid-template-columns: 1fr; 
    gap: 40px;
  }
  
  .footer-links-group {
    flex-direction: column; 
    gap: 30px;
  }
  
  .footer-bottom {
    flex-direction: column; 
    text-align: center;
    gap: 15px;
  }

  /* =========================================
     Fix Grid for Standard Archive Items
     ========================================= */
  .modern-grid {
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
  }
  
  .card-image {
    height: 140px; 
  }
  
  .card-text {
    padding: 12px;
  }
  
  .card-title {
    font-size: 13px;
  }
  
  .year-tag {
    font-size: 10px;
    padding: 3px 6px;
    margin-bottom: 8px;
  }

  /* =========================================
     Fix Omeka Collection Wrappers for Mobile (2 per row)
     ========================================= */
  
  .collection {
    width: 48% !important;
    float: left !important;
    margin-bottom: 15px !important;
  }
  
  .collection:nth-child(odd),
  .collection:nth-of-type(odd) {
    margin-right: 4% !important;
    clear: left !important;
  }
  
  .collection:nth-child(even),
  .collection:nth-of-type(even) {
    margin-right: 0 !important;
  }

  .collection-album-card {
    width: 100% !important;
    height: 180px !important;
    margin: 0 !important;
    float: none !important;
  }

  .album-content {
    padding: 12px !important; 
  }

  .album-title {
    font-size: 15px !important; 
    margin-bottom: 6px !important;
    line-height: 1.2 !important;
  }

  .album-count {
    font-size: 9px !important;
    padding: 3px 6px !important;
    margin-bottom: 6px !important;
  }

  .album-action {
    font-size: 10px !important;
  }
  
  .album-action .arrow {
    font-size: 12px !important;
  }
}