/* Open Source Software CSS - Professional Water Management Tools Design */

/* UNESCO Color Palette - Consistent with rapid-response design */
:root {
  --unesco-blue: #0072BC;
  --unesco-blue-dark: #005A9C;
  --unesco-blue-light: #009EE0;
  --unesco-blue-pale: #E3F2FD;
  --unesco-gray: #f8f9fa;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --shadow-light: 0 2px 8px rgba(0, 114, 188, 0.08);
  --shadow-medium: 0 4px 16px rgba(0, 114, 188, 0.12);
  --shadow-strong: 0 8px 32px rgba(0, 114, 188, 0.16);
  
  /* Category colors */
  --category-programming: #6f42c1;
  --category-collaboration: #17a2b8;
  --category-gis: #28a745;
  --category-modeling: #fd7e14;
  --category-data-collection: #20c997;
  --category-data-processing: #007bff;
  --category-viz: #dc3545;
  --category-mobile: #ffc107;
  --category-desktop: #6c757d;
}

/* Homepage row styling */
.homepage .row {
  border-radius: 25px;
}

/* Banner Section */
.section-title {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-strong);
}

.section-title-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.8);
  transition: transform 0.3s ease;
}

.section-title:hover .section-title-bg {
  transform: scale(1.02);
}

/* Gradient background for logo display modes */
.section-title-bg-gradient {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
  filter: none;
}

/* Lighter overlay for logo modes to make logo visible */
.section-title-bg-gradient + .section-title-overlay {
  background: linear-gradient(135deg, rgba(0, 114, 188, 0.15) 0%, rgba(0, 158, 224, 0.1) 100%);
}

.section-title-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 114, 188, 0.9) 0%, rgba(0, 158, 224, 0.8) 100%);
}

.section-title-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 10;
  width: 90%;
  max-width: 700px;
}

.section-title-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-title-description {
  font-size: 1.2rem;
  margin-bottom: 0;
  opacity: 0.95;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
  font-weight: 300;
  line-height: 1.4;
}

/* Header Display Modes for Software Entry View */
.header-logo-only {
  text-align: center;
  padding: 1rem 0;
}

.header-logo-only .header-logo-image {
  max-width: 300px;
  max-height: 120px;
  width: auto;
  height: auto;
  display: inline-block;
  background: rgba(255, 255, 255, 0.9);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-logo-text {
  text-align: center;
  padding: 1rem 0;
}

.header-logo-text .header-logo-image {
  max-width: 250px;
  max-height: 80px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto 1.5rem auto;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.75rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-logo-text h1 {
  margin-top: 0;
}

.section-title-meta-category {
  font-size: 1.2rem;
  color: white;
  opacity: 1;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 12px 24px;
  border-radius: 30px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  font-weight: 500;
}

/* Professional Breadcrumb */
.toolbar {
  margin-bottom: 3rem;
  padding: 1rem 0;
}

.breadcrumb {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 12px 20px;
  margin: 0;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  box-shadow: var(--shadow-light);
  font-size: 0.95rem;
}

.breadcrumb > li {
  display: inline-block;
}

.breadcrumb > li + li:before {
  content: "›";
  padding: 0 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.breadcrumb > li.active a {
  color: var(--unesco-blue);
  font-weight: 600;
}

.breadcrumb > li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb > li a:hover {
  color: var(--unesco-blue);
}

/* Professional Module Styling */
.module {
  background: #fff;
  border: none;
  border-radius: 20px;
  box-shadow: var(--shadow-medium);
  transition: all 0.3s ease;
  overflow: hidden;
  margin-bottom: 2rem;
}

.module:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.module-content {
  padding: 1.5rem;
}

.software-compact {
  padding: 1rem !important;
}

/* Modern Software Cards for List View */
.software-card-modern {
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.module-modern {
  background: #fff;
  border: none;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 114, 188, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  position: relative;
  z-index: 1;
}

.module-modern:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 114, 188, 0.16);
  border-color: var(--unesco-blue-pale);
  z-index: 2;
}

.software-card-content {
  padding: 1.5rem;
}

/* Modern Image Container */
.software-image-container {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.software-image-container:hover {
  border-color: var(--unesco-blue);
  box-shadow: 0 4px 16px rgba(0, 114, 188, 0.2);
}

.software-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform 0.3s ease;
  background: white;
}

.software-image-container:hover .software-image {
  transform: scale(1.05);
}

.software-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  text-align: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.software-placeholder i {
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.software-placeholder span {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.8;
}

/* Modern Header Layout */
.software-header-compact {
  margin-bottom: 1rem;
  position: relative;
  z-index: 1 !important;
}

.software-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  z-index: 1 !important;
}

.software-title-modern {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1 !important;
}

.software-title-modern a {
  color: var(--unesco-blue);
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
  z-index: 1 !important;
}

.software-title-modern a:hover {
  color: var(--unesco-blue-dark);
  text-decoration: none;
  z-index: 2 !important;
}

.software-subtitle-modern {
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.4;
  position: relative;
  z-index: 1 !important;
}

/* Modern Badges */
.software-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.badge-category,
.badge-access {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  color: white;
}

.badge-access {
  background: var(--unesco-blue);
}

.badge-open-source {
  background: #28a745;
}

/* Category Badges */
.category-programming { background: var(--category-programming); }
.category-collaboration { background: var(--category-collaboration); }
.category-gis { background: var(--category-gis); }
.category-modeling { background: var(--category-modeling); }
.category-data-collection { background: var(--category-data-collection); }
.category-data-processing { background: var(--category-data-processing); }
.category-viz { background: var(--category-viz); }
.category-mobile { background: var(--category-mobile); color: #212529; }
.category-desktop { background: var(--category-desktop); }
.category-default { background: var(--text-secondary); }

/* Compact Meta Information */
.software-meta-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.meta-item i {
  color: var(--unesco-blue);
  font-size: 0.8rem;
  width: 14px;
  text-align: center;
}

/* Modern Description */
.software-description-modern {
  margin-bottom: 1rem;
}

.software-excerpt-modern {
  margin: 0;
  line-height: 1.6;
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* Modern Action Row */
.software-actions-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

/* Modern Quick Links */
.quick-links-modern {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quick-link-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--unesco-blue-pale);
  color: var(--unesco-blue);
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--unesco-blue-pale);
  transition: all 0.3s ease;
}

.quick-link-modern:hover {
  background: var(--unesco-blue);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 114, 188, 0.3);
}

.quick-link-modern i {
  font-size: 0.75rem;
}

/* Modern Action Buttons */
.action-buttons-modern {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-modern {
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.btn-primary.btn-modern {
  background: linear-gradient(135deg, var(--unesco-blue) 0%, var(--unesco-blue-dark) 100%);
  border-color: var(--unesco-blue);
}

.btn-primary.btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 114, 188, 0.3);
  background: linear-gradient(135deg, var(--unesco-blue-dark) 0%, var(--unesco-blue) 100%);
}

.btn-default.btn-modern {
  background: white;
  border-color: #dee2e6;
  color: var(--text-primary);
}

.btn-default.btn-modern:hover {
  background: var(--unesco-blue-pale);
  border-color: var(--unesco-blue);
  color: var(--unesco-blue);
  transform: translateY(-1px);
}

.has-courses-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #28a745;
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.has-courses-badge i {
  font-size: 0.75rem;
}

/* Read More Button Styling */
.read-more-btn {
  color: var(--unesco-blue) !important;
  padding: 2px 6px !important;
  font-size: 0.85rem !important;
  text-decoration: none !important;
  border: none !important;
  background: none !important;
  transition: all 0.3s ease;
}

.read-more-btn:hover {
  color: var(--unesco-blue-dark) !important;
  background: var(--unesco-blue-pale) !important;
  border-radius: 4px;
}

.read-more-btn i {
  margin-right: 4px;
  transition: transform 0.3s ease;
}

.read-more-btn.expanded i {
  transform: rotate(45deg);
}

/* Software Summary */
.software-summary .module {
  background: linear-gradient(135deg, var(--unesco-blue-pale) 0%, #ffffff 100%);
  border-left: 6px solid var(--unesco-blue);
}

.status-metric {
  padding: 1rem 0;
}

.metric-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--unesco-blue);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Enhanced Button Styles */
.btn-primary {
  background: linear-gradient(135deg, var(--unesco-blue) 0%, var(--unesco-blue-dark) 100%);
  border: none;
  color: white;
  box-shadow: var(--shadow-light);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--unesco-blue-dark) 0%, var(--unesco-blue) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  color: white;
}

.btn-default {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #e9ecef;
  color: var(--text-primary);
  box-shadow: var(--shadow-light);
}

.btn-default:hover {
  background: var(--unesco-blue-pale);
  border-color: var(--unesco-blue);
  color: var(--unesco-blue);
  transform: translateY(-1px);
}

.btn-light {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: var(--unesco-blue);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.btn-light:hover {
  background: white;
  border-color: white;
  color: var(--unesco-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Professional Action buttons */
.action-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.action-buttons .btn {
  border-radius: 12px;
  padding: 10px 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: var(--shadow-light);
}

/* Filters for List View */
.software-filters .form-control {
  border-radius: 12px;
  border: 2px solid #e9ecef;
  padding: 12px 16px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  height: 3.3em;
}

.software-filters .form-control:focus {
  border-color: var(--unesco-blue);
  box-shadow: 0 0 0 0.2rem rgba(0, 114, 188, 0.25);
  background: #ffffff;
  transform: translateY(-1px);
}

.software-filters .btn-default {
  background: linear-gradient(135deg, var(--unesco-blue) 0%, var(--unesco-blue-dark) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-light);
  height: 3.3em;
}

.software-filters .btn-default:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Multi-Select Dropdown Styles */
.multi-select-dropdown {
  position: relative;
  width: 100%;
  z-index: 100; /* Base dropdown container z-index */
}

.multi-select-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 12px 16px;
  height: 3.3em;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
}

.multi-select-button:hover,
.multi-select-button:focus {
  border-color: var(--unesco-blue);
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 0 0.2rem rgba(0, 114, 188, 0.25);
}

.multi-select-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 10px;
}

.multi-select-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050 !important; /* Above other elements but below modal overlays */
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 114, 188, 0.2);
  max-height: 300px;
  overflow-y: auto;
  padding: 0;
  margin-top: 2px;
}

.multi-select-header {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
  background: #f8f9fa;
}

.multi-select-header .btn-link {
  padding: 2px 6px;
  font-size: 0.85rem;
  color: var(--unesco-blue);
  text-decoration: none;
}

.multi-select-header .btn-link:hover {
  color: var(--unesco-blue-dark);
  background: rgba(0, 114, 188, 0.1);
  border-radius: 4px;
}

.multi-select-option {
  display: block;
  padding: 8px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f8f9fa;
  transition: background-color 0.2s ease;
  font-weight: normal;
  margin-bottom: 0;
}

.multi-select-option:hover {
  background-color: var(--unesco-blue-pale);
}

.multi-select-option:last-child {
  border-bottom: none;
}

.multi-select-option input[type="checkbox"] {
  margin-right: 8px;
  margin-top: 0;
  vertical-align: middle;
}

.multi-select-option input[type="checkbox"]:checked {
  accent-color: var(--unesco-blue);
}

/* Keep dropdown open when interacting */
.multi-select-dropdown.open .dropdown-menu {
  display: block;
}

/* ================================================================ */
/* UNIFIED FILTER SYSTEM - RESPONSIVE & CONSISTENT */
/* ================================================================ */

.unified-filters-container {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #e9ecef;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-medium);
  margin-bottom: 2rem;
}

/* Search Section */
.search-section {
  margin-bottom: 2rem;
}

.search-input-group {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.unified-search-input {
  flex: 1;
  height: 3.5rem;
  padding: 1rem 1.5rem;
  border: 2px solid #e9ecef;
  border-radius: 16px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  background: white;
  box-shadow: var(--shadow-light);
}

.unified-search-input:focus {
  border-color: var(--unesco-blue);
  box-shadow: 0 0 0 0.25rem rgba(0, 114, 188, 0.15);
  transform: translateY(-1px);
}

.unified-search-btn {
  height: 3.5rem;
  padding: 0 2rem;
  background: linear-gradient(135deg, var(--unesco-blue) 0%, var(--unesco-blue-dark) 100%);
  border: none;
  border-radius: 16px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-light);
  white-space: nowrap;
}

.unified-search-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  background: linear-gradient(135deg, var(--unesco-blue-dark) 0%, var(--unesco-blue) 100%);
}

/* Filters Grid */
.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.filter-item {
  position: relative;
}

/* Unified Filter Buttons */
.unified-filter-btn {
  width: 100%;
  height: 3.2rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #e9ecef;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  box-shadow: var(--shadow-light);
}

.unified-filter-btn:hover {
  border-color: var(--unesco-blue);
  background: linear-gradient(135deg, var(--unesco-blue-pale) 0%, #ffffff 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.unified-filter-btn:focus,
.unified-filter-btn:active {
  border-color: var(--unesco-blue);
  box-shadow: 0 0 0 0.15rem rgba(0, 114, 188, 0.2);
}

.filter-icon {
  display: flex;
  align-items: center;
  margin-right: 0.75rem;
  color: var(--unesco-blue);
  font-size: 1rem;
  width: 16px;
}

.filter-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-caret {
  margin-left: 0.5rem;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
  font-size: 0.8rem;
}

.unified-dropdown.show .filter-caret {
  transform: rotate(180deg);
}

/* Ensure all software card elements stay below dropdowns */
.software-card-modern *,
.module-modern * {
  position: relative;
  z-index: 1 !important;
}

.software-card-modern:hover *,
.module-modern:hover * {
  z-index: 2 !important;
}

/* Unified Dropdown Menus - Must be higher than any content */
.unified-dropdown {
  position: relative;
  width: 100%;
  z-index: 100;
}

.unified-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050 !important;
  background: white;
  border: 2px solid var(--unesco-blue-pale);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 114, 188, 0.15);
  margin-top: 4px;
  max-height: 320px;
  overflow-y: auto;
  display: none;
}

.unified-dropdown.show .unified-dropdown-menu {
  display: block;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ensure dropdowns are not clipped by parent modules */
.software-filters .module,
.software-filters .module-content {
  overflow: visible;
}

/* Remove any global label decorations (like trailing colons) inside unified options */
.unified-dropdown .unified-option::after {
  content: none !important;
}

.unified-dropdown-header {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  background: var(--unesco-blue-pale);
}

.unified-dropdown-header .btn-link {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--unesco-blue);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.unified-dropdown-header .btn-link:hover {
  background: rgba(0, 114, 188, 0.1);
  text-decoration: none;
}

.unified-dropdown-content {
  padding: 0.5rem 0;
}

.unified-option {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.unified-option:last-child {
  border-bottom: none;
}

.unified-option:hover {
  background-color: var(--unesco-blue-pale);
}

.unified-option input {
  margin-right: 0.75rem;
  margin-top: 0;
  accent-color: var(--unesco-blue);
}

.unified-option span {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* Action Buttons */
.filter-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.unified-clear-btn,
.unified-apply-btn {
  height: 3.2rem;
  padding: 0 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-light);
  white-space: nowrap;
}

.unified-clear-btn {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #e9ecef;
  color: var(--text-secondary);
}

.unified-clear-btn:hover {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-color: #dc3545;
  color: #dc3545;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.unified-apply-btn {
  background: linear-gradient(135deg, var(--unesco-blue) 0%, var(--unesco-blue-dark) 100%);
  color: white;
  border: 2px solid var(--unesco-blue);
}

.unified-apply-btn:hover {
  background: linear-gradient(135deg, var(--unesco-blue-dark) 0%, var(--unesco-blue) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

/* Responsive Behavior */
@media (max-width: 768px) {
  .unified-filters-container {
    padding: 1.5rem;
    border-radius: 16px;
  }
  
  .search-input-group {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .unified-search-btn {
    width: 100%;
    justify-content: center;
  }
  
  .filters-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .filter-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .unified-clear-btn,
  .unified-apply-btn {
    width: 100%;
    justify-content: center;
  }
  
  .unified-dropdown-menu {
    max-height: 250px;
  }
}

@media (max-width: 480px) {
  .unified-filters-container {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .unified-search-input,
  .unified-filter-btn {
    height: 3rem;
    font-size: 0.9rem;
  }
  
  .unified-search-btn,
  .unified-clear-btn,
  .unified-apply-btn {
    height: 3rem;
    padding: 0 1.5rem;
  }
  
  .btn-text {
    display: none;
  }
}

/* Section Headers with Icons for Entry View */
.software-section-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 3px solid var(--unesco-blue-pale);
  position: relative;
}

.software-section-header::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--unesco-blue) 0%, var(--unesco-blue-light) 100%);
  border-radius: 2px;
}

.software-section-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--unesco-blue) 0%, var(--unesco-blue-light) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.5rem;
  color: white;
  font-size: 1.3rem;
  box-shadow: var(--shadow-light);
  flex-shrink: 0;
}

.software-section-header h2 {
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  border: none;
  padding: 0;
}

.software-content-body {
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 1.05rem;
}

/* Specialized Module Styles for Entry View */
.software-module-overview {
  border-left: 6px solid var(--unesco-blue);
}

.software-module-features {
  background: linear-gradient(135deg, var(--unesco-blue-pale) 0%, #ffffff 100%);
  border-left: 6px solid var(--unesco-blue-light);
}

.software-module-tech {
  border-left: 6px solid #17a2b8;
}

.software-module-install {
  border-left: 6px solid #28a745;
}

.software-module-learning {
  border-left: 6px solid #fd7e14;
}

.software-module-examples {
  border-left: 6px solid #6f42c1;
}

.software-module-gallery {
  border-left: 6px solid var(--unesco-blue);
}

.software-module-links {
  border-left: 6px solid var(--text-secondary);
}

/* Key Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.feature-item {
  background: white;
  padding: 1rem;
  border-radius: 12px;
  border-left: 4px solid var(--unesco-blue);
  box-shadow: var(--shadow-light);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  transition: transform 0.3s ease;
}

.feature-item:hover {
  transform: translateX(4px);
}

.feature-item i {
  color: var(--unesco-blue);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Technical Info Grid */
.tech-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.tech-info-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e9ecef;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease;
}

.tech-info-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.tech-info-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--unesco-blue);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.tech-info-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Difficulty and Status Badges */
.difficulty-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
}

.difficulty-beginner { background: #28a745; }
.difficulty-intermediate { background: #ffc107; color: #212529; }
.difficulty-advanced { background: #fd7e14; }
.difficulty-expert { background: #dc3545; }

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
}

.status-active {
  background: #28a745;
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
  animation: pulse-green 2s infinite;
}

.status-beta { 
  background: #ffc107; 
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.6);
}

.status-stable { 
  background: #28a745;
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
}

.status-maintained { 
  background: #17a2b8; 
  box-shadow: 0 0 8px rgba(23, 162, 184, 0.6);
}

.status-deprecated { 
  background: #fd7e14;
  box-shadow: 0 0 8px rgba(253, 126, 20, 0.6);
}

.status-archived { 
  background: #6c757d; 
}

/* Category and Tech Tags */
.category-tag,
.tech-tag {
  display: inline-block;
  background: var(--unesco-blue-pale);
  color: var(--unesco-blue);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 2px;
  border: 1px solid var(--unesco-blue);
}

.tech-tag.additional {
  background: #fff3cd;
  color: #856404;
  border-color: #ffeaa7;
}

.section-title-meta-category .category-tag {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 5px rgba(40, 167, 69, 0.5); }
  50% { box-shadow: 0 0 15px rgba(40, 167, 69, 0.8); }
}

/* Requirements Section */
.requirements-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
}

.requirements-section h4 {
  color: var(--unesco-blue);
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Links Grid for Entry View */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.resource-link {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #e9ecef;
  border-radius: 16px;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.resource-link:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
  border-color: var(--unesco-blue);
}

.link-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  flex-shrink: 0;
}

.resource-link.repository .link-icon {
  background: linear-gradient(135deg, #333 0%, #24292e 100%);
}

.resource-link.website .link-icon {
  background: linear-gradient(135deg, var(--unesco-blue) 0%, var(--unesco-blue-light) 100%);
}

.resource-link.documentation .link-icon {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.link-content {
  flex: 1;
}

.link-content h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.link-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.link-arrow {
  color: var(--unesco-blue);
  font-size: 1.2rem;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.resource-link:hover .link-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* Resource Cards System */
.resource-cards-section {
  margin-bottom: 2rem;
}

.resource-cards-title {
  color: var(--unesco-blue);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--unesco-blue-pale);
  position: relative;
}

.resource-cards-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--unesco-blue);
  border-radius: 1px;
}

.resource-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: stretch;
}

.links-card-section {
  margin-bottom: 2rem;
}

.links-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: stretch;
}

.resource-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #e9ecef;
  border-radius: 16px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.software-links .resource-card,
.software-links .links-card {
  min-height: 190px;
  height: 210px;
}

.resource-card:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
  border-color: var(--unesco-blue);
}

.links-card {
  height: 100%;
}

.resource-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--unesco-blue);
  transform: scaleY(0);
  transition: transform 0.3s ease;
  transform-origin: bottom;
}

.resource-card:hover::before {
  transform: scaleY(1);
}

.resource-card-icon,
.links-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: white;
  background: linear-gradient(135deg, var(--unesco-blue) 0%, var(--unesco-blue-light) 100%);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.resource-card:hover .resource-card-icon,
.resource-card:hover .links-card-icon {
  transform: scale(1.1);
}

.resource-card-youtube .resource-card-icon {
  background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
}

.resource-card-openlearning .resource-card-icon {
  background: linear-gradient(135deg, var(--unesco-blue) 0%, var(--unesco-blue-dark) 100%);
}

.resource-card-documentation .resource-card-icon,
.resource-card-document .resource-card-icon {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.resource-card-github .resource-card-icon {
  background: linear-gradient(135deg, #333 0%, #24292e 100%);
}

.resource-card-website .resource-card-icon,
.resource-card-web .resource-card-icon {
  background: linear-gradient(135deg, var(--unesco-blue) 0%, var(--unesco-blue-light) 100%);
}

.resource-card-download .resource-card-icon {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.resource-card-course .resource-card-icon {
  background: linear-gradient(135deg, #fd7e14 0%, #e55a00 100%);
}

.resource-card-blog .resource-card-icon,
.resource-card-guide .resource-card-icon {
  background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
}

.resource-card-content,
.links-card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.resource-card-title,
.links-card-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: block;
  overflow: hidden;
  white-space: normal;
  word-wrap: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.resource-card-description,
.links-card-description {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.resource-card-arrow,
.links-card-arrow {
  color: var(--unesco-blue);
  font-size: 1rem;
  opacity: 0.7;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.resource-card:hover .resource-card-arrow,
.resource-card:hover .links-card-arrow {
  opacity: 1;
  transform: translateX(4px);
}

.regular-content {
  margin-top: 1rem;
  font-size: inherit;
  line-height: inherit;
}

.regular-content h1,
.regular-content h2,
.regular-content h3,
.regular-content h4,
.regular-content h5,
.regular-content h6 {
  color: var(--text-primary);
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.regular-content h1 { font-size: 1.8rem; }
.regular-content h2 { font-size: 1.6rem; }
.regular-content h3 { font-size: 1.4rem; }
.regular-content h4 { font-size: 1.2rem; }
.regular-content h5 { font-size: 1.1rem; }
.regular-content h6 { font-size: 1rem; }

.regular-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.regular-content img,
.software-content-body img,
.learning-resources-content img,
.installation-content img,
.software-examples img,
.image-gallery-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
}

.regular-content ul,
.regular-content ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
  font-size: inherit;
  line-height: inherit;
}

.regular-content ul ul,
.regular-content ul ol,
.regular-content ol ul,
.regular-content ol ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.regular-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.regular-content li,
.regular-content li p,
.regular-content li span,
.regular-content li a,
.regular-content li strong,
.regular-content li em,
.regular-content li code {
  font-size: inherit !important;
  line-height: inherit;
  color: inherit;
}

.regular-content li p {
  margin-bottom: 0.35rem;
}

.regular-content blockquote {
  border-left: 4px solid var(--unesco-blue);
  background: var(--unesco-blue-pale);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

.regular-content code {
  background: #f8f9fa;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9rem;
  color: #e83e8c;
}

.regular-content pre {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
}

.regular-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Enhanced Image Gallery */
.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.gallery-image-item {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  transition: all 0.4s ease;
}

.gallery-image-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
}

.image-container {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  height: 220px;
}

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

.image-container:hover .gallery-image {
  transform: scale(1.15);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 114, 188, 0.9) 0%, rgba(0, 158, 224, 0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.4s ease;
}

.image-container:hover .image-overlay {
  opacity: 1;
}

.image-overlay i {
  color: white;
  font-size: 2.5rem;
  animation: pulse 2s infinite;
}

.image-caption {
  padding: 1.5rem;
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.5;
  text-align: center;
  font-weight: 500;
}

/* Image Modal - Enhanced */
.modal-dialog {
  margin: 30px auto;
  max-width: 90vw;
  width: auto;
}

.modal-content {
  border-radius: 20px;
  border: none;
  box-shadow: var(--shadow-strong);
}

.modal-header {
  background: linear-gradient(135deg, var(--unesco-blue) 0%, var(--unesco-blue-light) 100%);
  color: white;
  border-radius: 20px 20px 0 0;
  padding: 1.5rem 2rem;
}

.modal-title {
  font-weight: 700;
  font-size: 1.3rem;
}

.modal-body {
  padding: 2rem;
  max-height: 80vh;
  overflow: auto;
}

#modalImage {
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  display: block;
  object-fit: contain;
}

.image-modal-caption {
  margin-top: 1.5rem;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 500;
}

/* Remove duplicate pseudo-icons */
.learning-resources-content .resource-card[href*="youtube.com"]:before,
.learning-resources-content .resource-card[href*="youtu.be"]:before,
.learning-resources-content .resource-card[href*="openlearning.unesco.org"]:before,
.installation-content .resource-card[href*="blog"]:before,
.installation-content .resource-card[href*="tutorial"]:before {
  content: none !important;
}

/* Ensure horizontal layout for resource cards */
.learning-resources-content a.resource-card[href*="youtube.com"],
.learning-resources-content a.resource-card[href*="youtu.be"],
.learning-resources-content a.resource-card[href*="openlearning.unesco.org"],
.installation-content a.resource-card[href*="blog"],
.installation-content a.resource-card[href*="tutorial"] {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}

/* Responsive Design */
@media (max-width: 768px) {
  .section-title {
    height: 250px;
    margin-bottom: 2rem;
  }
  
  .section-title-content h1 {
    font-size: 2rem;
  }
  
  .section-title-description {
    font-size: 1.1rem;
  }
  
  .module-content {
    padding: 1.5rem;
  }
  
  .software-card-content {
    padding: 1rem;
  }
  
  .software-image-container {
    height: 100px;
    margin-bottom: 1rem;
  }
  
  .software-title-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .software-title-modern {
    font-size: 1.2rem;
  }
  
  .software-meta-compact {
    gap: 0.75rem;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .meta-item {
    font-size: 0.8rem;
  }
  
  .software-actions-modern {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .quick-links-modern {
    order: 2;
    width: 100%;
  }
  
  .action-buttons-modern {
    order: 1;
    width: 100%;
    justify-content: flex-start;
  }
  
  .btn-modern {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .software-section-header {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  
  .software-section-icon {
    margin-right: 0;
    margin-bottom: 1rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .tech-info-grid {
    grid-template-columns: 1fr;
  }
  
  .links-grid {
    grid-template-columns: 1fr;
  }
  
  .images-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .resource-cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
  }
  
  .resource-card {
    padding: 1.25rem;
  }
  
  .resource-card-icon {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
  
  .action-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .action-buttons .btn {
    width: 100%;
    text-align: center;
  }
  
  .multi-select-menu {
    max-height: 250px;
  }
}

@media (max-width: 480px) {
  .section-title {
    height: 200px;
  }
  
  .section-title-content h1 {
    font-size: 1.8rem;
  }
  
  .module-content {
    padding: 1rem;
  }
  
  .software-image-container {
    height: 80px;
  }
  
  .software-title-modern {
    font-size: 1.1rem;
  }
  
  .software-excerpt-modern {
    font-size: 0.9rem;
  }
  
  .quick-links-modern {
    flex-direction: column;
    gap: 0.4rem;
  }
  
  .quick-link-modern {
    justify-content: center;
  }
  
  .action-buttons-modern {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-modern {
    width: 100%;
    text-align: center;
  }
  
  .software-section-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  
  .software-section-header h2 {
    font-size: 1.5rem;
  }
  
  .images-grid {
    grid-template-columns: 1fr;
  }
  
  .image-container {
    height: 180px;
  }
  
  .resource-cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .resource-card {
    padding: 1rem;
  }
  
  .resource-card-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .resource-card-title {
    font-size: 1rem;
  }
  
  .resource-card-description {
    font-size: 0.85rem;
  }
  
  .modal-dialog {
    margin: 15px;
    max-width: 95vw;
  }
  
  .modal-body {
    padding: 1rem;
    max-height: 75vh;
  }
  
  #modalImage {
    max-height: 65vh;
  }
}

/* --- Z-Index Fixes for Filter Dropdowns (ensure always on top) --- */
/* Keep filters above any software cards and hovering elements */
.software-filters,
.software-filters .module,
.software-filters .module-content {
  position: relative;
  z-index: 10000; /* Above cards and hover states */
}

/* Local stacking context for each dropdown and its menu */
.software-filters .unified-dropdown {
  position: relative;
  z-index: auto;
}

.software-filters .unified-dropdown-menu {
  z-index: 10020 !important; /* Highest within filters */
  position: absolute !important;
}

/* Ensure the opened dropdown sits above neighboring filter items */
.software-filters .filters-grid {
  position: relative;
}

.software-filters .filters-grid .filter-item { 
  position: relative;
  z-index: 1; 
}

/* When a dropdown is open, elevate its container */
.software-filters .filters-grid .filter-item:has(.unified-dropdown.show) { 
  z-index: 1000 !important; 
}

/* Dropdown menus should be above everything in the filter area */
.software-filters .filters-grid .filter-item .unified-dropdown.show .unified-dropdown-menu {
  z-index: 1100 !important;
}

/* Ensure dropdowns don't get covered by adjacent filter items */
.software-filters .unified-dropdown.show {
  z-index: 1001 !important;
}

/* Multi-select dropdowns when open */
.software-filters .multi-select-dropdown.open {
  z-index: 1001 !important;
}

.software-filters .multi-select-dropdown.open .multi-select-menu {
  z-index: 1100 !important;
}

/* Fallback for browsers that don't support :has() */
@supports not selector(:has(*)) {
  .software-filters .filters-grid .filter-item {
    z-index: auto;
  }
  
  .software-filters .filters-grid .filter-item .unified-dropdown.show {
    position: relative;
    z-index: 1000 !important;
  }
}
