:root {
  --tab-main: #823733;
  --tab-gray: #f0f0f0;
  --tab-height: 300px;
}

/* Tab Navigation */
.red-tab {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 0.5rem;
  background: #fff;
  border-bottom: 2px solid var(--tab-gray);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
  gap: 0.25rem;
}
.red-tab::-webkit-scrollbar {
  display: none;
}
.red-tab .tab-title {
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  white-space: nowrap;
  transition: all 0.3s;
  flex-shrink: 0;
  min-width: fit-content;
}
.red-tab .tab-title.active {
  border-bottom: 3px solid var(--tab-main);
  color: var(--tab-main);
  font-weight: bold;
}
.red-tab .tab-title a {
  text-decoration: none;
  color: inherit;
}

/* General Tab Content Styles */
.tab-content,
.holiday-tab,
.tender-tab {
  height: var(--tab-height);
  background: #fff;
  padding: 1rem;
  border-radius: 0 0 10px 10px;
  overflow-y: auto;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease;
  opacity: 0;
  position: absolute;
  width: 100%;
  left: 0;
  top: 100%;
}
.tab-content.active,
.holiday-tab.active,
.tender-tab.active {
  display: block;
  opacity: 1;
  position: relative;
}

/* Holiday Iframe Container */
.holiday-iframe-container {
  height: 100%;
  width: 100%;
}
.holiday-iframe-container iframe {
  width: 100%;
  height: var(--tab-height);
  border: none;
}

/* Tender tab explicitly */
.tender-tab {
  height: var(--tab-height);
}

/* Post List Styles */
.wp-tab-post-list {
  list-style: none;
  padding-left: 1rem;
  margin: 0;
}
.wp-tab-post-list li {
  margin: 0.75rem 0;
}
.wp-tab-post-list a {
  text-decoration: none;
  color: #1a4c93;
}
.wp-tab-post-list a:hover {
  color: #823733;
}

/* Desktop */
@media (min-width: 1025px) {
  .tab-content,
  .holiday-tab,
  .tender-tab {
    padding: 1rem;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
  .tab-content,
  .holiday-tab,
  .tender-tab {
    padding: 0.875rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --tab-height: 252px; 
  }

  .red-tab {
    padding: 0.25rem;
    gap: 0.15rem;
  }
  .red-tab .tab-title {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .tab-content,
  .holiday-tab,
  .tender-tab {
    padding: 0.75rem;
  }
}


/* Extra Small Devices */
@media (max-width: 480px) {
  .red-tab {
    gap: 0.1rem;
  }
  .red-tab .tab-title {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
  .tab-content,
  .holiday-tab,
  .tender-tab {
    padding: 0.5rem;
  }
}
