/* ===== HUB SPECIFIC STYLES ===== */

/* Main Content - No side-nav margin */
.main-content {
  margin-top: 80px;
  /* Navbar height */
  padding: 2rem 0;
  min-height: calc(100vh - 80px);
}

.main-content .card {
  border: none;
}

/* Hub Hero Section */
.hub-hero {
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.hub-hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.hub-hero-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.hub-hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  z-index: 2;
}

/* Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: radial-gradient(circle at 50% 0%, #3a3a3a 0%, #1a1a1a 64%);
  padding: 4rem;
  border-radius: 10px;
  text-align: center;
  position: relative;
  max-width: 600px;
  width: 90%;
  animation: popOut 0.3s ease-out;
}

.modal-content p {
  color: white;
  font-size: 1.5rem;
  font-family: var(--font-heading);
  margin: 0;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  z-index: 1001;
}

.close-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
}

/* Blog-specific arc-card overrides */
.blog .arc-card {
  background: #222;
  height: auto;
  padding: 1.5rem;
  border: 2px solid var(--uni--color);
  box-shadow:
    0 0 10px var(--shadow-color),
    0 0 20px var(--shadow-glow);
}

.blog .arc-card::before {
  display: none;
}

.blog .arc-card:hover {
  transform: none;
}

/* Section and Grid Utilities */
.section {
  padding: 5rem 0 4rem 0;
  min-height: 60vh;
}

.section h2 {
  text-align: center;
  color: var(--uni--color);
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

/* Sidebar toggle button */
#sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 100;
  background: transparent;
  border: none;
  padding: 8px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

#sidebar-toggle:focus {
  outline: none;
}

#sidebar-toggle i {
  pointer-events: none;
}

/* Force show toggle on mobile */
@media (max-width: 768px) {
  #sidebar-toggle {
    display: flex !important;
  }
}

/* Hide toggle on desktop */
@media (min-width: 769px) {
  #sidebar-toggle {
    display: none !important;
  }
}

/* Ensure toggle is hidden on larger screens */
@media (min-width: 1024px) {
  #sidebar-toggle {
    display: none !important;
  }
}

/* Responsive adjustments for hub styles */
@media (max-width: 768px) {
  /* Adjust main content for mobile */
  .main-content {
    margin-left: 0;
    margin-top: 80px;
    padding: 1rem 0;
  }

  .main-content h2 {
    font-size: 2rem;
  }

  .main-content p {
    font-size: 1rem;
  }

  .section h2 {
    font-size: 2rem;
  }

  .advertise-section {
    flex-direction: column !important;
    text-align: center;
  }

  .advertise-section img {
    width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 1rem;
  }

  .advertise-section .text-left {
    text-align: center !important;
  }
}

@media (max-width: 480px) {
  .section h2 {
    font-size: 1.8rem;
  }

  .blog div.flex.bg-gray {
    flex-direction: column !important;
  }

  .blog div.flex.bg-gray > div:first-child {
    width: 100% !important;
    padding: 1rem !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .blog div.flex.bg-gray > div:nth-child(2) {
    width: 100% !important;
    padding: 1rem !important;
  }

  .blog div.flex.bg-gray img {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    display: block !important;
    border-radius: 5px !important;
  }

}

/* Blog cards gradient background */
.blog .grid .bg-gray,
.blog div.flex.bg-gray {
  background: radial-gradient(
    circle at 50% 0%,
    #3a3a3a 0%,
    #1a1a1a 64%
  ) !important;
}

/* Blog card image container padding */
.blog .grid .bg-gray > div:first-child,
.blog div.flex.bg-gray > div:first-child {
  padding: 1.5rem;
  background: none !important;
}

/* Blog card image margin and aspect ratio */
.blog .grid .bg-gray img,
.blog div.flex.bg-gray img {
  margin: 0.5rem;
  margin-left: 0;
  border-radius: 5px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}

/* Search button background */
#search-form button[type="submit"] {
  background-color: var(--uni--color) !important;
  color: white !important;
}

/* Blog card image hover effect */
.blog .grid .bg-gray:hover img,
.blog .flex.bg-gray:hover img {
  filter: brightness(0.8);
}

/* Blog card title underline on hover */
.blog .grid .bg-gray:hover h4,
.blog .flex.bg-gray:hover h4 {
  text-decoration: underline;
}

/* Blog post card backgrounds */
.blog .download-card .bg-gray {
  border-radius: 5px;
  background: radial-gradient(
    circle at 50% 0%,
    #3a3a3a 0%,
    #1a1a1a 64%
  ) !important;
}

/* YouTube iframe aspect ratio */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 5px;
}

/* Hub Hero Button */
.hub-hero-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--uni--color);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  margin-top: 10px;
  transition: background-color 0.3s;
}

.hub-hero-btn:hover {
  background-color: #cc0000;
}

html.modal-open {
  overflow: hidden !important;
}

/* ===== HUB SIDE NAVIGATION - PC/TABLET ONLY ===== */
.hub-side-nav {
  position: fixed;
  left: 0;
  top: 80px;
  width: 220px;
  height: calc(100vh - 80px);
  background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 55%), rgba(15, 15, 15, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  padding: 16px 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  margin: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hub-side-nav-list {
  list-style: none;
  padding: 6px 12px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hub-side-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.05s ease;
  border: 1px solid transparent;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.hub-side-nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  transition: width 0.2s ease;
}

.hub-side-nav-link:hover::before,
.hub-side-nav-link.active::before {
  width: 100%;
}

.hub-side-nav-link:hover,
.hub-side-nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.30) 0%, rgba(204, 0, 0, 0.16) 100%);
  border-color: rgba(255, 0, 0, 0.40);
  box-shadow: inset 3px 0 0 rgba(255, 0, 0, 0.9);
}

.hub-side-nav-link i {
  font-size: 1rem;
  width: 22px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hub-side-nav-link span {
  position: relative;
  z-index: 1;
}

.hub-side-nav-link--button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
}

.hub-side-nav-link--child {
  margin-left: 16px;
  padding-left: 20px;
  background: transparent;
  box-shadow: none;
}

.hub-side-nav-link--child::before {
  left: -16px;
  width: calc(100% + 16px);
}

.hub-side-nav-link--child:not(:hover):not(.active) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.hub-side-nav-link--child.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.30) 0%, rgba(204, 0, 0, 0.16) 100%);
  border-color: rgba(255, 0, 0, 0.40);
  box-shadow: inset 3px 0 0 rgba(255, 0, 0, 0.9);
}

/* Main content with side nav */
.hub-main-content {
  margin-left: 220px;
  min-height: calc(100vh - 80px);
}

/* Hide side nav on mobile */
@media (max-width: 768px) {
  .hub-side-nav {
    display: none;
  }
  
  .hub-main-content {
    margin-left: 0;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .hub-side-nav {
    width: 200px;
  }
  
  .hub-main-content {
    margin-left: 200px;
  }
}

/* ===== END HUB SIDE NAVIGATION =====



/* Navbar scroll effect */
.navbar {
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

@media (max-width: 767px) {

  .hub-toggle-btn {
    padding: 0 20px;
  }
}
