body {
  font-family: Arial, sans-serif;
  background: #fff;
  color: #222;
  margin: 0; padding: 0;
}

.topbar {
  background: #0b172a;
  color: #fff;
  padding: 6px 15px;
  font-size: 12px;
}

.topbar a {
  color: #ccc;
  text-decoration: none;
}

.topbar a:hover {
  text-decoration: underline;
}

header {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  border-bottom: 1px solid #ccc;
  background: #fff;
}

.header-left img {
  height: 40px;
  margin-right: 10px;
}

.header-left span {
  font-weight: 600;
  font-size: 16px;
  color: #222;
  align-self: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* User Info and Auth Buttons */
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.user-info .username {
  color: #222;
}

.user-info .username a {
  color: #003399;
  font-weight: 600;
  text-decoration: none;
}

.user-info .username a:hover {
  text-decoration: underline;
}

.pm-link {
  position: relative;
  color: #003399;
  font-size: 16px;
  text-decoration: none;
  padding: 5px 8px;
}

.pm-link:hover {
  background: #f0f0f0;
  border-radius: 3px;
}

.pm-count {
  position: absolute;
  top: 0;
  right: 0;
  background: #dc3545;
  color: white;
  border-radius: 10px;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: bold;
  min-width: 16px;
  text-align: center;
}

.btn-logout {
  background: #6c757d;
  color: white;
  padding: 6px 12px;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.2s;
}

.btn-logout:hover {
  background: #5a6268;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-login,
.btn-register {
  padding: 6px 14px;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-login {
  background: #003399;
  color: white;
}

.btn-login:hover {
  background: #002570;
}

.btn-register {
  background: white;
  color: #003399;
  border: 2px solid #003399;
}

.btn-register:hover {
  background: #003399;
  color: white;
}

#search-box input[type=search] {
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 2px 0 0 2px;
  width: 180px;
}

#search-box button {
  padding: 5px 12px;
  border: none;
  background: #003399;
  color: white;
  cursor: pointer;
  border-radius: 0 2px 2px 0;
}

.main-nav {
  background: #003399;
  padding: 10px 15px;
  font-weight: 600;
  overflow-x: auto;
  white-space: nowrap;
}

.main-nav a {
  color: white;
  margin-right: 20px;
  text-decoration: none;
  display: inline-block;
  padding: 6px 0;
  transition: opacity 0.2s;
}

.main-nav a:hover {
  color: #fff !important;
  opacity: 0.8;
  text-decoration: underline;
}

.main-nav a.admin-link {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 3px;
}

.main-nav a.admin-link:hover {
  background: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  opacity: 1;
}

.breadcrumb {
  font-size: 12px;
  margin: 12px 15px 20px;
  color: #444;
}

.breadcrumb a {
  color: #0071bc;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto 50px;
  padding: 0 15px;
}

.sidebar {
  flex: 0 0 200px;
  font-size: 14px;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  height: fit-content;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar nav a {
  display: block;
  color: #003399;
  padding: 8px 12px;
  text-decoration: none;
  border-radius: 3px;
  transition: all 0.2s;
  font-weight: 500;
}

.sidebar nav a:hover {
  background: #e9ecef;
  text-decoration: none;
  padding-left: 16px;
}

.sidebar nav a.active {
  background: #003399;
  color: white;
  font-weight: 600;
}

.sidebar nav a.gallery-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
}

.sidebar nav a.gallery-link:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  color: white;
  padding-left: 16px;
}

.community-member-box {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-left: 4px solid #003399;
  padding: 12px 15px;
  margin-bottom: 25px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.community-member {
  background: #003399;
  color: white;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  display: inline-block;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.leave-community {
  cursor: pointer;
  color: #dc3545;
  font-weight: 600;
  background: white;
  border: 1px solid #dc3545;
  padding: 6px 12px;
  border-radius: 3px;
  font-size: 13px;
  transition: all 0.2s;
}

.leave-community:hover {
  background: #dc3545;
  color: white;
}

.content {
  display: flex;
  width: 100%;
  gap: 30px;
  margin-top: 20px;
  align-items: flex-start;
  overflow: visible;
}

.main-content {
  flex: 1;
  font-size: 14px;
  color: #222;
  min-width: 0;
  width: 100%;
  overflow: visible;
}

.main-content > h2 {
  color: #003399;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #003399;
}

.page-header {
  margin-bottom: 20px;
}

.page-header h1 {
  font-size: 28px;
  margin-bottom: 8px;
  color: #003399;
  font-weight: 700;
}

.page-header p {
  max-width: 700px;
  margin: 0 0 15px;
  color: #555;
  font-size: 15px;
  line-height: 1.5;
}

.btn-upload-event {
  background: #003399;
  color: white;
  border: none;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 2px;
  font-size: 14px;
  margin-bottom: 15px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 10px;
  margin-bottom: 30px;
  font-size: 14px;
  align-items: center;
}

.filters label {
  font-weight: 600;
  white-space: nowrap;
}

.filters input[type="text"],
.filters select {
  padding: 5px 8px;
  border-radius: 2px;
  border: 1px solid #ccc;
  width: 140px;
}

.filters input[type="checkbox"] {
  margin-right: 5px;
}

.filters button {
  padding: 7px 14px;
  border: none;
  background: #003399;
  color: white;
  font-weight: 600;
  cursor: pointer;
  border-radius: 2px;
}

.filters button.clear {
  background: #666;
  margin-left: 8px;
}

.events-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 650px;
}

.event-item {
  display: flex;
  margin-bottom: 18px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 12px;
}

.event-date {
  background: #ededed;
  color: #444;
  min-width: 60px;
  text-align: center;
  padding: 6px 6px;
  font-weight: 600;
  line-height: 1;
  border-radius: 2px;
  margin-right: 15px;
  font-size: 12px;
  user-select: none;
}

.event-date .days {
  font-size: 18px;
}

.event-date .month {
  font-size: 12px;
  text-transform: uppercase;
}

.event-date .year {
  font-size: 10px;
}


.event-date.color-primary { background-color: #003399; color: #fff; }

.event-content {
  flex: 1;
}

.event-organization {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin-bottom: 4px;
}

.event-title {
  font-weight: bold;
  font-size: 14px;
  color: #003399;
  text-decoration: none;
}

.event-title:hover, .event-title:focus {
  text-decoration: underline;
}

.event-location {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.event-location svg {
  width: 12px;
  height: 12px;
  fill: #666;
}

footer {
  background: #003399;
  color: #e6e6e6;
  padding: 25px 15px 40px;
  font-size: 12px;
  text-align: left;
}

.footer-wrap {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-section {
  flex: 1 1 220px;
}

.footer-section h4 {
  margin: 0 0 10px;
  font-weight: 600;
  color: #c7d6fb;
}

.footer-section a {
  color: #c7d6fb;
  text-decoration: none;
}

.footer-section a:hover, .footer-section a:focus {
  text-decoration: underline;
}

.ec-logo-footer img {
  height: 38px;
  margin-top: 20px;
}

.footer-bottom {
  max-width: 1000px;
  margin: 20px auto 0;
  font-size: 11px;
  color: #b0b9d4;
  line-height: 1.4;
  text-align: center;
}

/* Old recent topics styles - kept for backwards compatibility if needed elsewhere */
.recent-topics {
  margin-bottom: 30px;
  width: 100%;
  overflow: visible;
  display: block;
}

.topic-item {
  background: #f9f9f9;
  border-left: 3px solid #003399;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.topic-item:hover {
  background: #f0f0f0;
}

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

.topic-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}

.topic-header h3 a {
  color: #003399;
  text-decoration: none;
}

.topic-header h3 a:hover {
  text-decoration: underline;
}

.topic-forum {
  background: #003399;
  color: white;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.topic-forum a {
  color: white;
  text-decoration: none;
}

.topic-forum a:hover {
  text-decoration: underline;
}

.topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 15px;
  font-size: 13px;
  color: #666;
  align-items: center;
}

.topic-author {
  color: #444;
}

.topic-time {
  color: #888;
  font-style: italic;
}

.topic-stats {
  display: flex;
  gap: 15px;
  margin-left: auto;
}

.topic-stats .replies,
.topic-stats .views {
  color: #666;
  font-weight: 500;
}

.no-topics {
  padding: 20px;
  text-align: center;
  color: #888;
  background: #f9f9f9;
  border-radius: 4px;
}

.forum-list-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #ddd;
  width: 100%;
  overflow: visible;
  display: block;
  clear: both;
}

.forum-list-section > * {
  width: 100%;
  max-width: 100%;
}

.forum-list-section h2 {
  color: #003399;
  font-size: 20px;
  margin-bottom: 15px;
}

/* Forum List Styling */
.forabg {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: visible;
  display: block !important;
  width: 100%;
  clear: both;
}

.forabg .inner {
  padding: 0;
  display: block;
  width: 100%;
}

.topiclist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
  width: 100%;
}

.topiclist.forums {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
  width: 100%;
}

.topiclist li.header {
  background: #003399;
  color: white;
  padding: 10px 15px;
  border-bottom: 1px solid #002570;
}

.topiclist li.header dl.row-item {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.topiclist li.header dt {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: white;
}

.topiclist li.header dd {
  width: 80px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  color: white;
  margin: 0;
}

.topiclist li.header dd.lastpost {
  width: 200px;
}

.topiclist li.row {
  border-bottom: 1px solid #e9e9e9;
  transition: background 0.2s ease;
  display: block;
  width: 100%;
  min-height: 50px;
}

.topiclist li.row:hover {
  background: #f9f9f9;
}

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

.topiclist dl.row-item {
  display: flex;
  align-items: center;
  padding: 15px;
  margin: 0;
  position: relative;
}

.topiclist dl.row-item dt {
  flex: 1;
  padding-right: 15px;
}

.topiclist dl.row-item dd {
  width: 80px;
  text-align: center;
  font-size: 14px;
  margin: 0;
  color: #666;
}

.topiclist dl.row-item dd.lastpost {
  width: 200px;
  text-align: left;
  font-size: 12px;
}

.list-inner {
  padding-left: 50px;
  position: relative;
}

.forum-image {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forum-image img {
  max-width: 40px;
  max-height: 40px;
}

a.forumtitle {
  font-size: 16px;
  font-weight: 600;
  color: #003399;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 5px;
}

a.forumtitle:hover {
  text-decoration: underline;
  color: #002570;
}

.topiclist .row-item dt {
  color: #666;
  font-size: 13px;
  line-height: 1.6;
}

.subforum {
  display: inline-block;
  margin-right: 8px;
  padding: 3px 8px;
  background: #f0f0f0;
  border-radius: 3px;
  text-decoration: none;
  font-size: 12px;
  color: #003399;
  transition: background 0.2s;
}

.subforum:hover {
  background: #e0e0e0;
  text-decoration: none;
}

.subforum.unread {
  background: #fff3cd;
  color: #856404;
  font-weight: 600;
}

.subforum i {
  margin-right: 3px;
}

dd.topics, dd.posts {
  font-weight: 600;
  color: #444;
}

dd.topics dfn, dd.posts dfn {
  display: none;
}

dd.lastpost span {
  display: block;
  line-height: 1.5;
}

dd.lastpost a.lastsubject {
  font-weight: 600;
  color: #003399;
  text-decoration: none;
  display: block;
  margin-bottom: 5px;
}

dd.lastpost a.lastsubject:hover {
  text-decoration: underline;
}

dd.lastpost time {
  color: #888;
  font-size: 11px;
}

/* Responsive forum list */
@media (max-width: 768px) {
  .topiclist li.header dd.topics,
  .topiclist li.header dd.posts {
    display: none;
  }
  
  .topiclist dl.row-item dd.topics,
  .topiclist dl.row-item dd.posts {
    display: none;
  }
  
  .topiclist li.header dd.lastpost {
    width: 120px;
  }
  
  .topiclist dl.row-item dd.lastpost {
    width: 120px;
    font-size: 11px;
  }
  
  .list-inner {
    padding-left: 0;
  }
  
  .forum-image {
    display: none;
  }
}

@media (max-width: 480px) {
  .topiclist li.header dd.lastpost {
    display: none;
  }
  
  .topiclist dl.row-item dd.lastpost {
    display: none;
  }
  
  .topiclist dl.row-item {
    padding: 10px;
  }
  
  a.forumtitle {
    font-size: 14px;
  }
}

/* General Responsive styles */
@media (max-width: 768px) {
  .content {
    flex-direction: column;
    gap: 20px;
  }
  
  .sidebar {
    flex: 1 1 auto;
    width: 100%;
  }
  
  .sidebar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .sidebar nav a {
    flex: 0 0 auto;
    padding: 5px 10px;
    background: #f0f0f0;
    border-radius: 3px;
    margin-bottom: 0;
  }
  
  .topic-header {
    flex-direction: column;
  }
  
  .topic-forum {
    align-self: flex-start;
  }
  
  .topic-stats {
    margin-left: 0;
  }
  
  header {
    flex-direction: column;
    gap: 10px;
  }
  
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .user-info {
    flex-wrap: wrap;
    font-size: 12px;
  }
  
  .auth-buttons {
    width: 100%;
    justify-content: flex-end;
  }
  
  #search-box input[type=search] {
    width: 120px;
  }
  
  .page-header h1 {
    font-size: 22px;
  }
  
  .main-content > h2 {
    font-size: 18px;
  }
  
  .container {
    padding: 0 10px;
  }
  
  /* Cards responsive on tablet */
  .topics-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 480px) {
  .user-info .username {
    font-size: 12px;
  }
  
  .btn-login,
  .btn-register,
  .btn-logout {
    padding: 5px 10px;
    font-size: 12px;
  }
}

/* ==================================================
   VIEWTOPIC ENHANCED STYLING
   ================================================== */

/* Topic Title */
.topic-title {
  color: #003399;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 3px solid #003399;
  background: linear-gradient(to right, #f8f9fa 0%, #fff 100%);
  padding: 20px 25px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.topic-title a {
  color: #003399;
  text-decoration: none;
  transition: color 0.3s ease;
}

.topic-title a:hover {
  color: #002570;
}

/* Post Container */
.post {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 25px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  border: 1px solid #e9ecef;
}

.post:hover {
  box-shadow: 0 4px 16px rgba(0, 51, 153, 0.12);
  transform: translateY(-2px);
}

.post .inner {
  display: flex;
  gap: 0;
  position: relative;
}

/* Post Profile Sidebar */
.post .postprofile {
  background: linear-gradient(to bottom, #f8f9fa 0%, #fff 100%);
  padding: 25px 20px;
  width: 220px;
  flex-shrink: 0;
  border-right: 2px solid #e9ecef;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.post .postprofile::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent 0%, #003399 20%, #003399 80%, transparent 100%);
  opacity: 0.3;
}

/* Avatar Container */
.post .avatar-container {
  margin-bottom: 15px;
  position: relative;
}

.post .avatar-container .avatar {
  display: inline-block;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 51, 153, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 3px solid #fff;
  background: #fff;
}

.post .avatar-container .avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 51, 153, 0.3);
}

.post .avatar-container img {
  display: block;
  width: 100px;
  height: 100px;
  object-fit: cover;
}

/* Profile Username */
.post .postprofile dt {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  width: 100%;
}

.post .postprofile dt a,
.post .postprofile dt strong {
  color: #003399;
  text-decoration: none;
  word-break: break-word;
  transition: color 0.2s ease;
}

.post .postprofile dt a:hover {
  color: #002570;
  text-decoration: underline;
}

/* Profile Rank */
.post .postprofile .profile-rank {
  background: #003399;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 51, 153, 0.3);
}

.post .postprofile dd {
  margin: 8px 0;
  font-size: 13px;
  color: #666;
  width: 100%;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
}

.post .postprofile dd:last-child {
  border-bottom: none;
}

.post .postprofile dd strong {
  color: #003399;
  font-weight: 600;
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post .postprofile dd a {
  color: #003399;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post .postprofile dd a:hover {
  color: #002570;
  text-decoration: underline;
}

/* Online Indicator */
.post.online .postprofile::before {
  content: '';
  position: absolute;
  top: 25px;
  right: 25px;
  width: 12px;
  height: 12px;
  background: #28a745;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
  animation: pulse-online 2s infinite;
}

@keyframes pulse-online {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(40, 167, 69, 0.1);
  }
}

/* Post Body */
.post .postbody {
  flex: 1;
  padding: 25px 30px;
  background: #fff;
  min-width: 0;
}

.post .postbody h3 {
  margin: 0 0 15px 0;
  font-size: 20px;
  font-weight: 700;
  color: #003399;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e9ecef;
}

.post .postbody h3 a {
  color: #003399;
  text-decoration: none;
  transition: color 0.2s ease;
  flex: 1;
}

.post .postbody h3 a:hover {
  color: #002570;
}

/* Post Buttons */
.post-buttons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.post-buttons li {
  margin: 0;
}

.post-buttons .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  color: #495057;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 14px;
  min-width: 38px;
  min-height: 38px;
  position: relative;
  overflow: hidden;
}

.post-buttons .button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(0, 51, 153, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.post-buttons .button:hover::before {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.post-buttons .button:hover {
  background: #003399;
  color: white;
  border-color: #003399;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 51, 153, 0.2);
}

.post-buttons .button i {
  position: relative;
  z-index: 1;
}

/* Post Author Info */
.post .author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 13px;
  color: #666;
}

.post .author i {
  color: #003399;
}

.post .author strong {
  color: #003399;
  font-weight: 600;
}

.post .author time {
  margin-left: auto;
  font-style: italic;
  color: #888;
}

/* Post Content */
.post .content {
  line-height: 1.8;
  color: #333;
  font-size: 15px;
  margin: 20px 0;
  word-wrap: break-word;
}

.post .content p {
  margin: 12px 0;
}

.post .content blockquote {
  background: #f8f9fa;
  border-left: 4px solid #003399;
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #555;
}

.post .content code {
  background: #f8f9fa;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #d63384;
  border: 1px solid #e9ecef;
}

.post .content pre {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin: 20px 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.post .content pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: #333;
}

.post .content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 15px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post .content ul,
.post .content ol {
  margin: 15px 0;
  padding-left: 30px;
}

.post .content li {
  margin: 8px 0;
}

/* Signature */
.post .signature {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px dashed #dee2e6;
  font-size: 13px;
  color: #666;
  font-style: italic;
  opacity: 0.9;
}

/* Post Notices */
.post .notice,
.post-notice {
  padding: 12px 18px;
  border-radius: 8px;
  margin: 15px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid;
}

.post .notice {
  background: #d1ecf1;
  border-left-color: #17a2b8;
  color: #0c5460;
}

.post-notice.unapproved {
  background: #fff3cd;
  border-left-color: #ffc107;
  color: #856404;
}

.post-notice.deleted {
  background: #f8d7da;
  border-left-color: #dc3545;
  color: #721c24;
}

.post-notice.reported {
  background: #ffe5e5;
  border-left-color: #ff6b6b;
  color: #c92a2a;
}

.post-notice i {
  font-size: 18px;
}

/* Attachments */
.post .attachbox {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px 20px;
  margin: 20px 0;
}

.post .attachbox dt {
  font-weight: 700;
  color: #003399;
  margin-bottom: 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post .attachbox dd {
  margin: 8px 0;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

.post .attachbox dd:last-child {
  border-bottom: none;
}

/* Back to Top */
.post .back2top {
  padding: 15px 30px 15px 15px;
  background: linear-gradient(to right, transparent 0%, #f8f9fa 100%);
  border-top: 1px solid #e9ecef;
  text-align: right;
  margin-top: 20px;
}

.post .back2top a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #003399;
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 51, 153, 0.2);
}

.post .back2top a:hover {
  background: #002570;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 51, 153, 0.3);
}

.post .back2top i {
  font-size: 16px;
}

/* Alternating Post Backgrounds */
.post.bg1 {
  border-left: 4px solid #003399;
}

.post.bg2 {
  border-left: 4px solid #6c757d;
}

/* Unread Post Highlight */
.post.unreadpost {
  border-left: 4px solid #ffc107;
  background: linear-gradient(to right, #fffbf0 0%, #fff 15%);
}

.post.unreadpost .postbody h3::before {
  content: 'NEW';
  background: #ffc107;
  color: #856404;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Reported Post */
.post.reported {
  border-left: 4px solid #dc3545;
}

/* Deleted Post */
.post.deleted {
  opacity: 0.7;
  background: #f8f9fa;
}

/* Poll Styling */
.topic_poll .panel {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border: 2px solid #003399;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 51, 153, 0.1);
  margin-bottom: 30px;
}

.topic_poll .poll-title {
  color: #003399;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #003399;
}

.topic_poll .polls dl {
  margin: 12px 0;
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
}

.topic_poll .polls dl:last-child {
  border-bottom: none;
}

.topic_poll .polls dt {
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
  font-size: 15px;
}

.topic_poll .polls .resultbar {
  background: #f8f9fa;
  border-radius: 20px;
  overflow: hidden;
  height: 30px;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.topic_poll .polls .resultbar div {
  height: 100%;
  background: linear-gradient(to right, #003399, #0056b3);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 13px;
  transition: width 0.5s ease;
  box-shadow: 0 2px 4px rgba(0, 51, 153, 0.3);
}

.topic_poll .polls .poll_option_percent {
  font-weight: 700;
  color: #003399;
  margin-top: 5px;
}

/* Quick Reply */
#qr_postform {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border: 2px solid #003399;
  border-radius: 12px;
  padding: 25px;
  margin-top: 30px;
  box-shadow: 0 4px 12px rgba(0, 51, 153, 0.1);
}

#qr_postform h3 {
  color: #003399;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #003399;
}

#qr_postform textarea {
  width: 100%;
  min-height: 150px;
  padding: 15px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  font-family: inherit;
}

#qr_postform textarea:focus {
  border-color: #003399;
  box-shadow: 0 0 0 4px rgba(0, 51, 153, 0.1);
  outline: none;
}

#qr_postform .submit-buttons {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Contact Dropdown */
.post .dropdown-container {
  position: relative;
  display: inline-block;
}

.post .dropdown-trigger {
  color: #003399;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post .dropdown-trigger:hover {
  background: #e9ecef;
  color: #002570;
}

.post .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  min-width: 200px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.post .dropdown-container:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.post .dropdown .contact-icons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
}

.post .dropdown .contact-icons a {
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.post .dropdown .contact-icons a:hover {
  background: #f8f9fa;
  color: #003399;
}

/* Responsive Viewtopic */
@media (max-width: 768px) {
  .post .inner {
    flex-direction: column;
  }
  
  .post .postprofile {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #e9ecef;
    padding: 20px;
  }
  
  .post .postprofile::after {
    display: none;
  }
  
  .post .postbody {
    padding: 20px;
  }
  
  .post-buttons {
    margin: 10px 0;
  }
  
  .post .author {
    flex-wrap: wrap;
  }
  
  .post .author time {
    margin-left: 0;
    width: 100%;
  }
  
  .topic-title {
    font-size: 22px;
    padding: 15px 20px;
  }
  
  .post .back2top {
    padding: 15px 20px;
  }
}

@media (max-width: 480px) {
  .post {
    border-radius: 8px;
    margin-bottom: 20px;
  }
  
  .post .postbody h3 {
    font-size: 18px;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .post-buttons {
    width: 100%;
  }
  
  .post-buttons .button {
    flex: 1;
  }
  
  .post .content {
    font-size: 14px;
  }
}

/* Search Results Page Styling */
.searchresults-title,
h2.solo {
  color: #003399;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #003399;
}

.advanced-search-link,
.return-link {
  margin: 15px 0;
}

.advanced-search-link a,
.return-link a {
  color: #003399;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.advanced-search-link a:hover,
.return-link a:hover {
  text-decoration: underline;
}

.action-bar {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.action-bar.bar-top {
  margin-top: 20px;
}

.action-bar.bottom {
  margin-top: 20px;
  margin-bottom: 20px;
}

.action-bar .search-box {
  flex: 0 0 auto;
}

.action-bar .search-box input {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 3px 0 0 3px;
  font-size: 14px;
}

.action-bar .search-box button,
.action-bar .search-box a.button {
  padding: 8px 12px;
  background: #003399;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.action-bar .search-box button {
  border-radius: 0;
}

.action-bar .search-box a.button {
  border-radius: 0 3px 3px 0;
  display: inline-block;
  text-decoration: none;
}

.action-bar .search-box button:hover,
.action-bar .search-box a.button:hover {
  background: #002570;
}

.action-bar .pagination {
  flex: 1;
  text-align: right;
  font-size: 14px;
}

.mark-read {
  color: #003399;
  text-decoration: none;
  font-weight: 600;
}

.mark-read:hover {
  text-decoration: underline;
}

/* Search results topics list */
.forumbg {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}

.forumbg .inner {
  padding: 0;
}

.topiclist.topics li.row {
  border-bottom: 1px solid #e9e9e9;
  transition: background 0.2s ease;
}

.topiclist.topics li.row:hover {
  background: #f9f9f9;
}

.topiclist.topics .topictitle {
  font-size: 16px;
  font-weight: 600;
  color: #003399;
  text-decoration: none;
}

.topiclist.topics .topictitle:hover {
  text-decoration: underline;
  color: #002570;
}

.topiclist.topics .left-box {
  color: #666;
  font-size: 13px;
  margin-top: 5px;
}

.topiclist.topics dd.posts,
.topiclist.topics dd.views {
  font-weight: 600;
  color: #444;
}

.topiclist.topics dd.views {
  width: 100px;
}

/* Search results posts */
.search.post {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 15px;
  overflow: hidden;
}

.search.post .inner {
  padding: 20px;
  display: flex;
  gap: 20px;
}

.search.post.bg1 {
  background: #fff;
}

.search.post.bg2 {
  background: #f9f9f9;
}

.search.post dl.postprofile {
  flex: 0 0 200px;
  margin: 0;
  padding: 0;
  border-right: 1px solid #e0e0e0;
  padding-right: 20px;
}

.search.post dl.postprofile dt {
  font-weight: 600;
  color: #003399;
  margin-bottom: 10px;
  font-size: 14px;
}

.search.post dl.postprofile dd {
  margin: 5px 0;
  padding: 5px 0;
  font-size: 13px;
  color: #666;
}

.search.post .postbody {
  flex: 1;
  min-width: 0;
}

.search.post .postbody h3 {
  margin: 0 0 15px;
  font-size: 18px;
}

.search.post .postbody h3 a {
  color: #003399;
  text-decoration: none;
  font-weight: 600;
}

.search.post .postbody h3 a:hover {
  text-decoration: underline;
}

.search.post .postbody .content {
  color: #444;
  line-height: 1.6;
  margin-bottom: 15px;
}

.search.post ul.searchresults {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.search.post ul.searchresults li {
  display: inline-block;
}

.search.post ul.searchresults a {
  color: #003399;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.search.post ul.searchresults a:hover {
  text-decoration: underline;
}

/* FAQ Page Styling */
.faq-title {
  color: #003399;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #003399;
}

/* Ensure FAQ content is centered and wide */
body .container {
  max-width: 1200px;
  width: 100%;
}

#faqlinks {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 30px;
}

#faqlinks .inner {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

#faqlinks .column1,
#faqlinks .column2 {
  width: 100%;
}

#faqlinks dl.faq {
  margin-bottom: 20px;
}

#faqlinks dl.faq dt {
  font-size: 16px;
  font-weight: 700;
  color: #003399;
  margin-bottom: 10px;
}

#faqlinks dl.faq dd {
  margin: 5px 0 5px 15px;
}

#faqlinks dl.faq dd a {
  color: #666;
  text-decoration: none;
  display: block;
  padding: 5px 0;
  transition: all 0.2s;
}

#faqlinks dl.faq dd a:hover {
  color: #003399;
  padding-left: 5px;
}

.panel {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 20px;
  max-width: 100%;
}

.panel .inner {
  padding: 20px;
  max-width: 100%;
}

.panel .content {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: block;
}

.panel.bg1 {
  background: #fff;
}

.panel.bg2 {
  background: #fff;
  border: 1px solid #dee2e6;
}

.panel.bg3 {
  background: #f8f9fa;
}

/* Ensure FAQ panels are full width and single column */
.panel .inner .content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.panel h3 {
  color: #003399;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
}

.panel h2.faq-title:not(.page-header h2) {
  color: white;
  background: #003399;
  font-size: 18px;
  font-weight: 700;
  margin: -20px -20px 20px -20px;
  padding: 15px 20px;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* FAQ Accordion Styling */
.faq-accordion-item {
  margin-bottom: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.faq-accordion-item:hover {
  border-color: #003399;
  box-shadow: 0 2px 4px rgba(0, 51, 153, 0.1);
}

.faq-question {
  padding: 15px 20px;
  background: #f8f9fa;
  border-left: 4px solid #003399;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  user-select: none;
}

.faq-question:hover {
  background: #e9ecef;
}

.faq-accordion-item.active .faq-question {
  background: #003399;
  color: white;
}

.faq-accordion-item.active .faq-question strong {
  color: white;
}

.faq-question strong {
  font-size: 16px;
  font-weight: 600;
  color: #003399;
  flex: 1;
  transition: color 0.3s ease;
}

.faq-icon {
  font-size: 14px;
  color: #003399;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}

.faq-accordion-item.active .faq-icon {
  color: white;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: white;
}

.faq-accordion-item.active .faq-answer {
  border-top: 1px solid #e0e0e0;
}

.faq-answer > *:first-child {
  margin-top: 0;
}

.faq-answer {
  padding: 0 20px;
  line-height: 1.7;
  color: #444;
  font-size: 14px;
}

.faq-accordion-item.active .faq-answer {
  padding: 20px;
}

.faq-answer p {
  margin: 10px 0;
}

.faq-answer ul, .faq-answer ol {
  margin: 10px 0;
  padding-left: 25px;
}

.faq-answer li {
  margin: 5px 0;
}

.panel a.top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #003399;
  text-decoration: none;
  font-weight: 600;
  margin: 15px 0;
}

.panel a.top:hover {
  text-decoration: underline;
}

.panel hr.dashed {
  border: none;
  border-top: 1px dashed #ccc;
  margin: 20px 0;
}

/* Search form styling */
.panel fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

.panel fieldset dl {
  margin: 15px 0;
}

.panel fieldset dt {
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.panel fieldset dt span {
  font-weight: normal;
  color: #666;
  font-size: 13px;
}

.panel fieldset dd {
  margin: 5px 0;
}

.panel fieldset input[type="search"],
.panel fieldset input[type="text"],
.panel fieldset input[type="number"],
.panel fieldset select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 14px;
  font-family: inherit;
}

.panel fieldset input.inputbox {
  width: 100%;
  max-width: 400px;
}

.panel fieldset select {
  width: 100%;
  max-width: 400px;
}

.panel fieldset input[type="radio"] {
  margin-right: 5px;
}

.panel fieldset label {
  display: inline-block;
  margin-right: 15px;
}

.panel .submit-buttons {
  text-align: center;
  padding: 20px 0 10px;
}

.panel .submit-buttons input[type="submit"],
.button1 {
  background: #003399;
  color: white;
  border: none;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.panel .submit-buttons input[type="submit"]:hover,
.button1:hover {
  background: #002570;
}

/* New Topic / Reply Buttons */
.btn-new-topic {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #28a745;
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.btn-new-topic:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
  color: white;
  text-decoration: none;
}

.btn-new-topic i {
  font-size: 16px;
}

.btn-new-topic.locked {
  background: #6c757d;
  cursor: not-allowed;
}

/* Reply Button */
.btn-reply {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #007bff;
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.btn-reply:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
  color: white;
  text-decoration: none;
}

.btn-reply i {
  font-size: 16px;
}

.btn-reply.locked {
  background: #6c757d;
  cursor: not-allowed;
}

/* Gallery Button */
.btn-gallery {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #6c757d;
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.btn-gallery:hover {
  background: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
  color: white;
  text-decoration: none;
}

.btn-gallery i {
  font-size: 16px;
}

.forum-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-bar .forum-actions {
  flex: 0 0 auto;
}

/* Forum rules box */
.forum-rules {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-left: 4px solid #ffc107;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;
}

.forum-rules .inner {
  padding: 0;
}

.forum-rules strong {
  color: #856404;
}

.forum-rules a {
  color: #856404;
  font-weight: 600;
}

/* Moderators info */
.moderators {
  color: #666;
  font-size: 14px;
  margin-top: 10px;
}

.moderators strong {
  color: #003399;
}

/* ==================================================
   ENHANCED DROPDOWN BUTTONS STYLING
   ================================================== */

/* All dropdown buttons */
.button-secondary.dropdown-trigger {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
  position: relative;
  overflow: hidden;
}

.button-secondary.dropdown-trigger::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.button-secondary.dropdown-trigger:hover::before {
  width: 300px;
  height: 300px;
}

.button-secondary.dropdown-trigger:hover {
  background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.button-secondary.dropdown-trigger:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.button-secondary.dropdown-trigger i {
  font-size: 16px;
  position: relative;
  z-index: 1;
}

.button-secondary.dropdown-trigger span {
  position: relative;
  z-index: 1;
}

.button-secondary.dropdown-trigger .caret {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  transition: transform 0.3s ease;
}

.dropdown-container.dropdown-visible .button-secondary.dropdown-trigger .caret,
.dropdown-container:hover .button-secondary.dropdown-trigger .caret {
  transform: rotate(180deg);
}

/* Topic Tools Button - Special Blue Styling */
.topic-tools .button-secondary.dropdown-trigger {
  background: linear-gradient(135deg, #003399 0%, #002570 100%);
  box-shadow: 0 2px 6px rgba(0, 51, 153, 0.3);
}

.topic-tools .button-secondary.dropdown-trigger::before {
  background: rgba(255, 255, 255, 0.15);
}

.topic-tools .button-secondary.dropdown-trigger:hover {
  background: linear-gradient(135deg, #002570 0%, #001a4d 100%);
  box-shadow: 0 4px 12px rgba(0, 51, 153, 0.5);
}

/* Quick Mod Button - Special Red/Orange Styling */
.quickmod .button-secondary.dropdown-trigger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

.quickmod .button-secondary.dropdown-trigger::before {
  background: rgba(255, 255, 255, 0.15);
}

.quickmod .button-secondary.dropdown-trigger:hover {
  background: linear-gradient(135deg, #c82333 0%, #a71d2a 100%);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.5);
}

/* Jumpbox Button - Special Green Styling */
.jumpbox .button-secondary.dropdown-trigger {
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
  box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.jumpbox .button-secondary.dropdown-trigger::before {
  background: rgba(255, 255, 255, 0.15);
}

.jumpbox .button-secondary.dropdown-trigger:hover {
  background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.5);
}

/* Sort Tools Button - Keep Gray but Enhanced */
.sort-tools .button-secondary.dropdown-trigger {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
}

.sort-tools .button-secondary.dropdown-trigger:hover {
  background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

/* Display Options / Sort Tools */
.sort-tools {
  position: relative;
  display: inline-block;
}

.sort-tools .button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
}

.sort-tools .button:hover {
  background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.sort-tools .caret {
  display: inline-flex;
  align-items: center;
}

/* Enhanced Dropdown Menus */
.dropdown-container .dropdown {
  position: absolute;
  top: 100%;
  margin-top: 10px;
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  min-width: 250px;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-15px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.dropdown-container.dropdown-visible .dropdown,
.dropdown-container:hover .dropdown {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dropdown-container .dropdown.hidden {
  display: block;
}

.dropdown-container .dropdown .pointer {
  position: absolute;
  top: -8px;
  width: 16px;
  height: 16px;
  background: white;
  border-left: 2px solid #dee2e6;
  border-top: 2px solid #dee2e6;
  transform: rotate(45deg);
  z-index: -1;
}

/* Position pointer based on dropdown alignment */
.dropdown-container-left .dropdown .pointer {
  left: 30px;
}

.dropdown-container-right .dropdown .pointer {
  right: 30px;
}

/* Dropdowns that open upward */
.dropdown-up .dropdown {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 10px;
  transform: translateY(15px) scale(0.95);
}

.dropdown-up.dropdown-visible .dropdown,
.dropdown-up:hover .dropdown {
  transform: translateY(0) scale(1);
}

.dropdown-up .dropdown .pointer {
  top: auto;
  bottom: -8px;
  transform: rotate(225deg);
}

/* Adjust pointer for up dropdowns */
.dropdown-up.dropdown-container-left .dropdown .pointer {
  left: 30px;
}

.dropdown-up.dropdown-container-right .dropdown .pointer {
  right: 30px;
}

/* Sort Tools Dropdown */
.sort-tools .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 10px;
  min-width: 280px;
}

.sort-tools.dropdown-visible .dropdown,
.sort-tools:hover .dropdown {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.sort-tools .dropdown .pointer {
  left: 20px;
}

/* Dropdown Contents Styling */
.dropdown-contents {
  padding: 8px 0;
  max-height: 400px;
  overflow-y: auto;
}

/* Custom scrollbar for dropdowns */
.dropdown-contents::-webkit-scrollbar {
  width: 8px;
}

.dropdown-contents::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 0 12px 12px 0;
}

.dropdown-contents::-webkit-scrollbar-thumb {
  background: #dee2e6;
  border-radius: 4px;
}

.dropdown-contents::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}

/* Dropdown Links/Items */
.dropdown-contents a,
.dropdown-contents li a {
  display: block;
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 14px;
  border-left: 3px solid transparent;
}

.dropdown-contents a:hover,
.dropdown-contents li a:hover {
  background: linear-gradient(to right, #f8f9fa 0%, #fff 100%);
  color: #003399;
  border-left-color: #003399;
  padding-left: 24px;
}

.dropdown-contents a i,
.dropdown-contents li a i {
  margin-right: 10px;
  width: 18px;
  text-align: center;
  color: #6c757d;
}

.dropdown-contents a:hover i,
.dropdown-contents li a:hover i {
  color: #003399;
}

/* Quick Mod specific dropdown styling */
.quickmod .dropdown-contents a:hover {
  border-left-color: #dc3545;
  color: #dc3545;
}

.quickmod .dropdown-contents a:hover i {
  color: #dc3545;
}

/* Topic Tools specific dropdown styling */
.topic-tools .dropdown-contents a:hover {
  border-left-color: #003399;
  color: #003399;
}

.topic-tools .dropdown-contents a:hover i {
  color: #003399;
}

/* Jumpbox specific dropdown styling */
.jumpbox .dropdown-contents a:hover {
  border-left-color: #28a745;
  color: #28a745;
}

.jumpbox .dropdown-contents a:hover i {
  color: #28a745;
}

/* Dropdown list items */
.dropdown-contents ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dropdown-contents li {
  margin: 0;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown-contents li:last-child {
  border-bottom: none;
}

/* Category headers in dropdowns */
.dropdown-contents .jumpbox-cat-link {
  font-weight: 700;
  color: #003399;
  background: #f8f9fa;
  padding: 10px 20px;
  margin-top: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-left: 3px solid #003399;
}

.dropdown-contents .jumpbox-cat-link:hover {
  background: #e9ecef;
  padding-left: 20px;
}

.dropdown-contents .jumpbox-sub-link {
  padding-left: 35px;
  font-size: 13px;
  color: #666;
}

.dropdown-contents .jumpbox-sub-link:hover {
  padding-left: 39px;
}

.sort-tools .dropdown-contents {
  padding: 15px;
}

/* Loading State for Dropdowns */
.dropdown-container.loading .button-secondary.dropdown-trigger {
  pointer-events: none;
  opacity: 0.7;
}

.dropdown-container.loading .button-secondary.dropdown-trigger::after {
  content: '';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* Dividers in Dropdowns */
.dropdown-contents hr {
  border: none;
  border-top: 1px solid #e9ecef;
  margin: 8px 0;
}

/* Disabled items in dropdowns */
.dropdown-contents a.disabled,
.dropdown-contents li.disabled a {
  color: #adb5bd;
  cursor: not-allowed;
  opacity: 0.6;
}

.dropdown-contents a.disabled:hover,
.dropdown-contents li.disabled a:hover {
  background: transparent;
  border-left-color: transparent;
  padding-left: 20px;
}

/* Icon animations on hover */
.dropdown-contents a:hover i {
  animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(3px);
  }
}

/* Button press effect */
.button-secondary.dropdown-trigger:active {
  transform: translateY(0) scale(0.98);
}

/* Improve focus state for accessibility */
.button-secondary.dropdown-trigger:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.25);
}

.topic-tools .button-secondary.dropdown-trigger:focus {
  box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.3);
}

.quickmod .button-secondary.dropdown-trigger:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
}

.jumpbox .button-secondary.dropdown-trigger:focus {
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

/* Smooth entry animation for dropdown items */
.dropdown-contents a,
.dropdown-contents li {
  animation: slideIn 0.2s ease backwards;
}

.dropdown-contents li:nth-child(1) { animation-delay: 0.05s; }
.dropdown-contents li:nth-child(2) { animation-delay: 0.1s; }
.dropdown-contents li:nth-child(3) { animation-delay: 0.15s; }
.dropdown-contents li:nth-child(4) { animation-delay: 0.2s; }
.dropdown-contents li:nth-child(5) { animation-delay: 0.25s; }

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

.display-options {
  border: none;
  margin: 0;
  padding: 0;
}

.display-options label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.display-options select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 14px;
  margin-top: 5px;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s;
}

.display-options select:hover {
  border-color: #003399;
}

.display-options select:focus {
  outline: none;
  border-color: #003399;
  box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.1);
}

.display-options hr.dashed {
  border: none;
  border-top: 1px dashed #dee2e6;
  margin: 15px 0;
}

.display-options input[type="submit"].button2,
.display-options input[type="submit"] {
  width: 100%;
  padding: 10px;
  background: #003399;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.display-options input[type="submit"]:hover {
  background: #002570;
}

/* Jumpbox Styling */
.actions-jump {
  margin: 30px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.jumpbox-return {
  margin: 0;
}

.jumpbox-return a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #003399;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  transition: all 0.2s;
}

.jumpbox-return a:hover {
  background: #003399;
  color: white;
  border-color: #003399;
  text-decoration: none;
}

.jumpbox-return a i {
  font-size: 16px;
}

/* Jumpbox Dropdown */
.jumpbox.dropdown-container {
  position: relative;
  display: inline-block;
}

.jumpbox .button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #003399;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.jumpbox .button:hover {
  background: #002570;
}

.jumpbox .caret {
  display: inline-flex;
  align-items: center;
}

.jumpbox .dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 5px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 250px;
  max-width: 350px;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.jumpbox.dropdown-container.dropdown-visible .dropdown,
.jumpbox.dropdown-container.is-open .dropdown {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* Alternative: show dropdown on hover if JavaScript doesn't work */
.jumpbox.dropdown-container:hover .dropdown {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.jumpbox .dropdown .pointer {
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: white;
  border-left: 1px solid #dee2e6;
  border-top: 1px solid #dee2e6;
  transform: rotate(45deg);
}

.jumpbox .dropdown-contents {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  max-height: 400px;
  overflow-y: auto;
}

.jumpbox .dropdown-contents li {
  margin: 0;
}

.jumpbox .dropdown-contents a {
  display: block;
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s;
  font-size: 14px;
}

.jumpbox .dropdown-contents a:hover {
  background: #f8f9fa;
  color: #003399;
}

.jumpbox .dropdown-contents a.jumpbox-cat-link {
  font-weight: 700;
  color: #003399;
  background: #f0f0f0;
  margin-top: 5px;
}

.jumpbox .dropdown-contents a.jumpbox-sub-link {
  padding-left: 30px;
  font-size: 13px;
  color: #666;
}

.jumpbox .dropdown-contents a.jumpbox-sub-link:hover {
  color: #003399;
}

.jumpbox .dropdown-contents .spacer {
  display: inline-block;
  width: 15px;
}

/* Memberlist Page Styling */
.group-title {
  color: #003399;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
}

.group-description {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-left: 4px solid #003399;
  border-radius: 4px;
}

.member-search {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
}

.member-search a {
  color: #003399;
  text-decoration: none;
  font-weight: 600;
}

.member-search a:hover {
  text-decoration: underline;
}

.member-search strong a {
  display: inline-block;
  padding: 4px 8px;
  margin: 2px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  color: #003399;
  font-size: 13px;
}

.member-search strong a:hover {
  background: #003399;
  color: white;
  text-decoration: none;
}

/* Memberlist Table */
.forumbg-table {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}

.forumbg-table .inner {
  padding: 0;
}

.table1.memberlist {
  width: 100%;
  border-collapse: collapse;
}

.table1 {
  width: 100%;
  border-collapse: collapse;
}

.table1 thead tr {
  background: #003399;
  color: white;
}

.table1 thead th {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 2px solid #002570;
}

.table1 thead th a {
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.table1 thead th a:hover {
  text-decoration: underline;
}

.table1 tbody tr {
  border-bottom: 1px solid #e9e9e9;
  transition: background 0.2s ease;
}

.table1 tbody tr:hover {
  background: #f9f9f9;
}

.table1 tbody tr.bg1 {
  background: #fff;
}

.table1 tbody tr.bg2 {
  background: #f8f9fa;
}

.table1 tbody tr.bg1:hover,
.table1 tbody tr.bg2:hover {
  background: #e9ecef;
}

.table1 tbody tr.inactive {
  opacity: 0.6;
}

.table1 tbody td {
  padding: 12px 15px;
  vertical-align: middle;
  font-size: 14px;
}

.table1 tbody td.name {
  font-weight: 600;
}

.table1 tbody td.name a {
  color: #003399;
  text-decoration: none;
  font-weight: 600;
}

.table1 tbody td.name a:hover {
  text-decoration: underline;
}

.table1 tbody td.posts {
  text-align: center;
  font-weight: 600;
  color: #444;
}

.table1 tbody td.posts a {
  color: #003399;
  text-decoration: none;
}

.table1 tbody td.posts a:hover {
  text-decoration: underline;
}

.table1 tbody td.info {
  color: #666;
  font-size: 13px;
}

.table1 tbody td.joined,
.table1 tbody td.active {
  color: #666;
  font-size: 13px;
}

.rank-img {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
}

.rank-img img {
  max-height: 20px;
  margin-right: 5px;
}

th.name,
th.posts,
th.info,
th.joined,
th.active {
  white-space: nowrap;
}

th.name {
  width: auto;
}

th.posts {
  width: 100px;
  text-align: center;
}

th.info {
  width: 200px;
}

th.joined,
th.active {
  width: 150px;
}

/* Responsive for search/FAQ pages */
@media (max-width: 768px) {
  #faqlinks .inner {
    flex-direction: column;
    gap: 20px;
  }
  
  .search.post .inner {
    flex-direction: column;
    gap: 15px;
  }
  
  .search.post dl.postprofile {
    flex: 1 1 auto;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    padding-right: 0;
    padding-bottom: 15px;
  }
  
  .action-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .action-bar .pagination {
    text-align: center;
  }
  
  .topiclist.topics dd.views {
    display: none;
  }
  
  .btn-new-topic,
  .btn-reply {
    padding: 10px 18px;
    font-size: 14px;
    justify-content: center;
    width: 100%;
  }
  
  .forum-actions {
    width: 100%;
  }
  
  /* Memberlist responsive */
  .table1 thead th.info,
  .table1 tbody td.info {
    display: none;
  }
  
  .table1 thead th.joined,
  .table1 tbody td.joined {
    display: none;
  }
  
  .member-search {
    flex-direction: column;
    align-items: stretch;
  }
  
  .member-search strong {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }
}

@media (max-width: 480px) {
  .table1 thead th.active,
  .table1 tbody td.active {
    display: none;
  }
  
  .table1 thead th,
  .table1 tbody td {
    padding: 8px;
    font-size: 12px;
  }
  
  .rank-img {
    display: none;
  }
  
  /* Jumpbox responsive */
  .actions-jump {
    flex-direction: column;
    align-items: stretch;
  }
  
  .jumpbox-return a,
  .jumpbox .button {
    width: 100%;
    justify-content: center;
  }
  
  .jumpbox.dropdown-container {
    width: 100%;
  }
  
  .jumpbox .dropdown {
    left: 0;
    right: 0;
    max-width: 100%;
  }
  
  /* Sort tools responsive */
  .sort-tools .dropdown {
    left: 0;
    right: auto;
    min-width: 250px;
  }
  
  .display-options label {
    font-size: 13px;
  }
  
  .display-options select {
    font-size: 13px;
    padding: 6px 10px;
  }
  
  /* Enhanced dropdown buttons responsive */
  .button-secondary.dropdown-trigger {
    padding: 8px 14px;
    font-size: 13px;
    gap: 8px;
  }
  
  .button-secondary.dropdown-trigger i {
    font-size: 14px;
  }
  
  .action-bar {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
  }
  
  .dropdown-container {
    width: 100%;
  }
  
  .button-secondary.dropdown-trigger {
    width: 100%;
    justify-content: center;
  }
  
  .dropdown-container .dropdown {
    left: 0 !important;
    right: 0 !important;
    width: calc(100% - 20px);
    margin: 10px 10px 0 10px;
  }
  
  .dropdown-container .dropdown .pointer {
    left: 50% !important;
    transform: translateX(-50%) rotate(45deg) !important;
  }
}

/* ==================================================
   FONT AWESOME ICONS FIX
   ================================================== */

.icon, .fa, [class^="fa-"], [class*=" fa-"] {
  display: inline-block;
  font-family: 'FontAwesome' !important;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure icons in buttons display correctly */
button .icon, button .fa,
.button .icon, .button .fa {
  pointer-events: none;
}

/* ==================================================
   POSTING PAGE STYLES
   ================================================== */

/* Posting Title */
.posting-title {
  color: #003399;
  font-size: 24px;
  font-weight: 600;
  margin: 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #003399;
}

.posting-title a {
  color: #003399;
  text-decoration: none;
}

.posting-title a:hover {
  color: #002570;
  text-decoration: underline;
}

/* Posting Form Fields */
.fields1 {
  margin: 0;
  padding: 0;
  border: none;
}

.fields1 dl {
  margin: 0 0 15px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.fields1 dt {
  width: 150px;
  padding: 8px 10px 8px 0;
  font-weight: 700;
  color: #003399;
  flex-shrink: 0;
  font-size: 15px;
}

.fields1 dt label {
  color: #003399;
  font-weight: 700;
}

.fields1 dd {
  flex: 1;
  min-width: 0;
  padding: 5px 0;
}

.fields1 dd label {
  display: inline-flex;
  align-items: center;
  margin-right: 15px;
  margin-bottom: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.fields1 dd label:hover {
  background: #f0f5ff;
}

.fields1 dd label img {
  margin-left: 5px;
  vertical-align: middle;
}

.fields1 input[type="text"],
.fields1 input[type="number"],
.fields1 textarea.inputbox {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  background: white;
}

.fields1 input[type="text"]:hover,
.fields1 input[type="number"]:hover {
  border-color: #999;
}

.fields1 input[type="text"]:focus,
.fields1 input[type="number"]:focus,
.fields1 textarea.inputbox:focus {
  border-color: #003399;
  outline: none;
}

.fields1 input[type="radio"],
.fields1 input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #003399;
}

/* Format Buttons */
.format-buttons {
  margin: 15px 0;
  padding: 10px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.format-buttons button,
.format-buttons .button {
  background: white;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  line-height: 1;
}

.format-buttons button:hover,
.format-buttons .button:hover {
  background: #003399;
  color: white;
  border-color: #003399;
}

.format-buttons button i,
.format-buttons button .icon {
  font-size: 15px;
  line-height: 1;
}

.format-buttons select {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: white;
  font-size: 14px;
  cursor: pointer;
  min-height: 36px;
}

.format-buttons select:hover {
  border-color: #003399;
}

#colour_palette {
  margin: 10px 0;
}

#color_palette_placeholder {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

/* Message Box and Smiley Box Container */
.panel .inner > fieldset {
  display: block;
}

/* Message Box */
.message-box {
  width: 100%;
  margin-bottom: 20px;
}

.message-box textarea {
  width: 100%;
  min-height: 300px;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s;
  background: white;
  color: #333;
}

.message-box textarea:hover {
  border-color: #999;
}

.message-box textarea:focus {
  border-color: #003399;
  outline: none;
}

/* Smiley Box */
.smiley-box {
  width: 100%;
  padding: 15px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  max-height: 300px;
  overflow-y: auto;
}

.smiley-box strong {
  display: block;
  margin-bottom: 10px;
  color: #003399;
  font-size: 14px;
  font-weight: 600;
}

.smiley-box a {
  display: inline-block;
  margin: 3px;
  transition: transform 0.2s;
}

.smiley-box a:hover {
  transform: scale(1.1);
}

.smiley-box img {
  vertical-align: middle;
}

.bbcode-status {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #dee2e6;
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

.bbcode-status hr {
  margin: 10px 0;
  border: none;
  border-top: 1px solid #dee2e6;
}

/* Submit Buttons */
.submit-buttons {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid #dee2e6;
  margin-top: 20px;
}

.submit-buttons input[type="submit"],
.submit-buttons .button1,
.submit-buttons .button2 {
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  margin: 0 5px;
}

.button1,
input.button1 {
  background: #003399;
  color: white;
}

.button1:hover,
input.button1:hover {
  background: #002570;
}

.button2,
input.button2 {
  background: #6c757d;
  color: white;
}

.button2:hover,
input.button2:hover {
  background: #5a6268;
}

/* Tabs for Options/Attachments/Poll */
.tabs {
  margin: 20px 0 0 0;
}

.tabs ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 2px solid #003399;
  gap: 5px;
}

.tabs li {
  margin: 0;
}

.tabs li a {
  display: block;
  padding: 12px 24px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: all 0.2s;
}

.tabs li a:hover {
  background: #e9ecef;
  color: #003399;
}

.tabs li.activetab a {
  background: white;
  color: #003399;
  border-color: #003399;
  border-bottom: 2px solid white;
  position: relative;
  bottom: -2px;
}

.tabs .tab {
  position: relative;
}

/* Options Panel */
#options-panel,
#attach-panel,
#poll-panel {
  margin-top: -2px;
  border-radius: 0 0 4px 4px;
  border: 1px solid #003399;
  border-top: 2px solid #003399;
  background: white;
  display: none;
}

#options-panel .inner,
#attach-panel .inner,
#poll-panel .inner {
  padding: 20px;
}

#options-panel fieldset {
  border: none;
}

#options-panel fieldset > div {
  margin: 10px 0;
}

#options-panel fieldset label {
  display: flex;
  align-items: center;
  padding: 8px 0;
  cursor: pointer;
}

#options-panel fieldset input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

#options-panel dl {
  margin: 15px 0;
}

#options-panel dt {
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

#options-panel dd {
  margin: 5px 0 5px 0;
  color: #666;
  font-size: 13px;
}

#options-panel dd label {
  display: inline-flex;
  align-items: center;
  margin-right: 15px;
}

#options-panel hr.dashed {
  border: none;
  border-top: 1px dashed #ccc;
  margin: 20px 0;
}

/* Forum Rules */
.rules {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  padding: 15px;
  margin: 20px 0;
}

.rules strong {
  color: #856404;
  font-size: 16px;
  display: block;
  margin-bottom: 10px;
}

.rules-link {
  background: #d1ecf1;
  border-color: #17a2b8;
}

.rules-link a {
  color: #0c5460;
  font-weight: 600;
  text-decoration: none;
}

.rules-link a:hover {
  text-decoration: underline;
}

/* Posting Box Panel */
#postingbox {
  border: 1px solid #ddd;
}

#postingbox .inner {
  padding: 20px;
}

/* Draft & Preview Messages */
.panel h3 {
  color: #003399;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #003399;
}

.panel p.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 12px;
  border-radius: 4px;
  margin: 0 0 15px 0;
}

/* Posting Page Responsive */
@media (max-width: 768px) {
  .fields1 dl {
    flex-direction: column;
  }
  
  .fields1 dt {
    width: 100%;
    padding-bottom: 5px;
  }
  
  .fields1 dd {
    width: 100%;
  }
  
  .message-box {
    width: 100%;
  }
  
  .smiley-box {
    width: 100%;
    max-height: 250px;
  }
  
  .format-buttons {
    justify-content: center;
  }
  
  .tabs ul {
    flex-wrap: wrap;
  }
  
  .tabs li a {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .submit-buttons {
    padding: 15px 0;
  }
  
  .submit-buttons input[type="submit"],
  .submit-buttons .button1,
  .submit-buttons .button2 {
    padding: 10px 16px;
    font-size: 14px;
    margin: 5px;
    display: block;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ============================================
   TAGCLOUD SECTION - Cloud Style Design
   ============================================ */

.tagcloud-section {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tagcloud-section h2 {
  color: #003399;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #003399;
}

/* Tagcloud Container */
.rh_topictags_tagcloud {
  text-align: center;
  padding: 15px 10px;
}

.rh_topictags_tagcloud ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 12px;
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 1.8;
}

.rh_topictags_tagcloud li {
  display: inline-block;
  margin: 0;
}

/* Tag Styling - Cloud Style */
.rh_topictags_tagcloud li a {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  white-space: nowrap;
}

.rh_topictags_tagcloud li a:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Tag Count Styling */
.rh_topictags_count {
  color: rgba(255,255,255,0.8);
  font-size: 0.85em;
  font-weight: 400;
  margin-left: 5px;
}

/* Different Tag Sizes - Cloud Effect */
.rh_topictags_tagcloud li a.rh_topictags_tag_size_1 {
  font-size: 12px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #a8c0ff 0%, #3f2b96 100%);
}

.rh_topictags_tagcloud li a.rh_topictags_tag_size_2 {
  font-size: 13px;
  padding: 5px 11px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rh_topictags_tagcloud li a.rh_topictags_tag_size_3 {
  font-size: 14px;
  padding: 6px 13px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.rh_topictags_tagcloud li a.rh_topictags_tag_size_4 {
  font-size: 16px;
  padding: 7px 15px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.rh_topictags_tagcloud li a.rh_topictags_tag_size_5 {
  font-size: 18px;
  padding: 8px 17px;
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  font-weight: 600;
}

/* Alternative: Simple Blue Theme (uncomment if you prefer)
.rh_topictags_tagcloud li a {
  background: #003399;
}

.rh_topictags_tagcloud li a:hover {
  background: #0055cc;
}
*/

/* Responsive Tagcloud */
@media (max-width: 768px) {
  .tagcloud-section {
    padding: 20px 15px;
  }
  
  .tagcloud-section h2 {
    font-size: 18px;
  }
  
  .rh_topictags_tagcloud ul {
    gap: 6px 8px;
  }
  
  .rh_topictags_tagcloud li a {
    padding: 5px 12px;
    font-size: 13px !important;
  }
  
  .rh_topictags_tagcloud li a.rh_topictags_tag_size_5 {
    font-size: 15px !important;
  }
}

/* ==================================================
   CARDS GRID LAYOUT FOR TOPICS
   ================================================== */

.topics-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
  width: 100%;
}

.topic-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
  border: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 51, 153, 0.15);
  border-color: #003399;
}

/* Card Thumbnail */
.card-thumbnail {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Different gradient backgrounds for cards - varied colors */
.topic-card:nth-child(6n+1) .card-thumbnail {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.topic-card:nth-child(6n+2) .card-thumbnail {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.topic-card:nth-child(6n+3) .card-thumbnail {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.topic-card:nth-child(6n+4) .card-thumbnail {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.topic-card:nth-child(6n+5) .card-thumbnail {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.topic-card:nth-child(6n+6) .card-thumbnail {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.card-thumbnail::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
  z-index: 1;
}

.card-thumbnail a {
  display: block;
  width: 100%;
  height: 100%;
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 2;
}

.topic-card:hover .card-thumbnail img {
  transform: scale(1.05);
}

/* Icon placeholder for cards - shows by default, hidden when image present */
.card-thumbnail::before {
  content: '\f03e';
  font-family: 'FontAwesome';
  font-size: 64px;
  color: rgba(255, 255, 255, 0.3);
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Hide icon when image is present */
.card-thumbnail:has(img)::before {
  display: none;
}

/* Fallback for browsers without :has() support */
.card-thumbnail img ~ ::before {
  display: none;
}

/* Card Content */
.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-header {
  margin-bottom: 12px;
}

.card-forum-badge {
  display: inline-block;
  background: #003399;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-forum-badge a {
  color: white;
  text-decoration: none;
}

.card-forum-badge a:hover {
  text-decoration: underline;
}

/* Card Title */
.card-title {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.card-title a {
  color: #222;
  text-decoration: none;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a:hover {
  color: #003399;
}

/* Card Excerpt */
.card-excerpt {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 15px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Card Footer */
.card-footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.card-author {
  font-size: 13px;
  color: #666;
}

.card-author a {
  color: #003399;
  text-decoration: none;
  font-weight: 600;
}

.card-author a:hover {
  text-decoration: underline;
}

.card-time {
  font-size: 12px;
  color: #999;
  font-style: italic;
}

.card-stats {
  display: flex;
  gap: 15px;
  align-items: center;
}

.card-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #666;
  font-weight: 600;
}

.card-stats i {
  color: #003399;
  font-size: 14px;
}

/* Card without thumbnail - fallback for better browser support */
.topic-card .card-content {
  padding-top: 20px;
}

.topic-card .card-thumbnail + .card-content {
  padding-top: 20px;
}

/* No Topics Message */
.topics-cards-grid .no-topics {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  color: #888;
  background: #f9f9f9;
  border-radius: 8px;
  font-size: 16px;
}

/* Responsive Cards */
@media (max-width: 1200px) {
  .topics-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .topics-cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .card-thumbnail {
    height: 180px;
  }
  
  .card-content {
    padding: 15px;
  }
  
  .card-title {
    font-size: 16px;
  }
  
  .card-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .card-stats {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .card-thumbnail {
    height: 160px;
  }
  
  .card-title {
    font-size: 15px;
  }
  
  .card-excerpt {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }
}

/* ==================================================
   GALLERY PAGE STYLES
   ================================================== */

/* Gallery Header */
.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 25px;
  background: linear-gradient(135deg, #003399 0%, #0055cc 100%);
  border-radius: 12px;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 51, 153, 0.2);
}

.gallery-title-section h1.gallery-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.gallery-title i {
  font-size: 28px;
}

.gallery-subtitle {
  margin: 0;
  font-size: 16px;
  opacity: 0.9;
  color: white;
}

.gallery-actions .btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.gallery-actions .btn-back:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateX(-4px);
}

/* Gallery Filters */
.gallery-filters {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  border: 1px solid #dee2e6;
}

.gallery-filters form {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  font-weight: 600;
  color: #003399;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.filter-group select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-group select:hover {
  border-color: #003399;
}

.filter-group select:focus {
  outline: none;
  border-color: #003399;
  box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.1);
}

/* Gallery Container */
.gallery-container {
  width: 100%;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

/* Gallery Item */
.gallery-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 51, 153, 0.15);
  border-color: #003399;
}

/* Gallery Item Image */
.gallery-item-image {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gallery-item-image a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

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

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

/* Gallery Overlay */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 51, 153, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
  gap: 8px;
}

.gallery-item-image a:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay i {
  font-size: 48px;
  color: white;
}

.overlay-text {
  font-size: 16px;
  font-weight: 600;
  color: white;
}

/* Gallery Item Info */
.gallery-item-info {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.gallery-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-type-badge {
  background: #003399;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.file-size {
  font-size: 12px;
  color: #666;
  font-weight: 600;
}

.gallery-item-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.gallery-item-title a {
  color: #222;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.gallery-item-title a:hover {
  color: #003399;
}

/* Gallery Item Meta */
.gallery-item-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #666;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.gallery-item-meta > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gallery-item-meta i {
  color: #003399;
  width: 14px;
  text-align: center;
}

.gallery-item-meta a {
  color: #003399;
  text-decoration: none;
  font-weight: 600;
}

.gallery-item-meta a:hover {
  text-decoration: underline;
}

/* Gallery Item Actions */
.gallery-item-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

.btn-view-post {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: #003399;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-view-post:hover {
  background: #002570;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 51, 153, 0.3);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #28a745;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-download:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

/* Gallery Empty State */
.gallery-empty {
  text-align: center;
  padding: 80px 20px;
  background: #f9f9f9;
  border-radius: 12px;
  border: 2px dashed #dee2e6;
}

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

.gallery-empty h2 {
  color: #003399;
  font-size: 28px;
  margin: 0 0 15px 0;
}

.gallery-empty p {
  color: #666;
  font-size: 16px;
  margin: 0 0 25px 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #003399;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s;
}

.btn-primary:hover {
  background: #002570;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 51, 153, 0.3);
}

/* Gallery Pagination */
.gallery-pagination {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e9ecef;
}

.pagination-wrapper {
  display: flex;
  justify-content: center;
}

/* ==================================================
   LIGHTBOX MODAL STYLES
   ================================================== */

.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
}

.lightbox-content {
  position: relative;
  z-index: 10001;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 10002;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover {
  transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next:hover {
  transform: translateY(-50%) scale(1.1);
}

.lightbox-close i,
.lightbox-prev i,
.lightbox-next i {
  font-size: 24px;
}

.lightbox-image-container {
  max-width: 90vw;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.lightbox-image-container img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
  text-align: center;
  color: white;
  padding: 0 20px;
}

.lightbox-info h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: white;
}

.lightbox-info p {
  font-size: 14px;
  margin: 0;
  opacity: 0.8;
  color: white;
}

/* Gallery Responsive */
@media (max-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .gallery-header {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  
  .gallery-title-section h1.gallery-title {
    font-size: 26px;
  }
  
  .gallery-filters form {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group select {
    width: 100%;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .gallery-item-image {
    height: 220px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
  
  .lightbox-close {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  .gallery-header {
    padding: 20px;
  }
  
  .gallery-title-section h1.gallery-title {
    font-size: 22px;
  }
  
  .gallery-item-image {
    height: 200px;
  }
  
  .gallery-item-title {
    font-size: 15px;
  }
  
  .lightbox-close,
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
  }
  
  .lightbox-close i,
  .lightbox-prev i,
  .lightbox-next i {
    font-size: 18px;
  }
  
  .lightbox-info h3 {
    font-size: 16px;
  }
}

/* ==================================================
   DARKEN WRAPPER & LOADING INDICATOR - DISABLED
   ================================================== */

.darkenwrapper,
#darkenwrapper {
  display: none !important;
  position: relative;
  z-index: 44;
  visibility: hidden !important;
}

.darken,
#darken {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0 !important;
  z-index: 45;
  background: none !important;
}

.loading_indicator,
#loading_indicator {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}