:root {
  --primary-blue: #0d47a1;
  --accent-orange: #f26822;
  --bg-gradient: linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%);
}

body {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  background-color: #f8fafc;
  color: #111827;
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-brand img {
  height: 35px;
}

@media all and (min-width: 992px) {
  .navbar .dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

@media (max-width: 991px) {
  .sticky-header .container-fluid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 15px 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e5e7eb;
  }
}

/* Custom styling for smooth transition from 3-line menu to X icon */
.navbar-toggler {
  border: none;
  background: transparent !important;
  padding: 0;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Base state: Bootstrap's default 3-line hamburger icon */
.navbar-toggler .navbar-toggler-icon {
  transition: background-color 0.2s ease-in-out;
}

/* Open state: Animate into an X icon */
.navbar-toggler:not(.collapsed) .navbar-toggler-icon {
  background-image: none !important;
  position: relative;
  width: 24px;
  height: 2px;
  background-color: transparent !important;
  display: inline-block;
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon::before,
.navbar-toggler:not(.collapsed) .navbar-toggler-icon::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: #333;
  left: 0;
  transition:
    transform 0.3s ease-in-out,
    top 0.3s ease-in-out;
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon::after {
  top: 0;
  transform: rotate(-45deg);
}
.nav-link {
  color: #333 !important;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--primary-blue) !important;
}

.btn-outline-custom {
  color: var(--primary-blue);
  border-color: var(--primary-blue);
  font-weight: 500;
}
.btn-outline-custom:hover {
  background-color: var(--primary-blue);
  color: #fff;
}

.btn-primary-custom {
  background-color: var(--primary-blue);
  border-color: var(--primary-blue);
  color: #fff;
  font-weight: 500;
}
.btn-primary-custom:hover {
  background-color: #0b3c8c;
  color: #fff;
}

.btn-orange-custom {
  background-color: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #fff;
  font-weight: 500;
}
.btn-orange-custom:hover {
  background-color: #d9571b;
  color: #fff;
}

.hero-section {
  background: linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%);
  padding: 50px 0 70px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-weight: 800;
  color: #111827;
  font-size: 2.75rem;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-subtitle {
  color: #4b5563;
  font-size: 1.05rem;
  margin-bottom: 35px;
}

.search-box-card {
  border-radius: 12px;
  padding: 16px;
  max-width: 740px;
  margin: 0 auto;
}

.search-input-group {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 4px;
  margin-bottom: 12px;
}

.search-input-group .search-icon {
  color: #9ca3af;
  padding-left: 14px;
  font-size: 1.1rem;
}

.search-input-group input {
  border: none;
  box-shadow: none !important;
  padding: 10px 12px;
  font-size: 1rem;
  color: #374151;
  background: transparent;
}

.search-input-group input::placeholder {
  color: #9ca3af;
}

.btn-search-main {
  background-color: #0d47a1;
  border-color: #0d47a1;
  color: #ffffff;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s;
}

.btn-search-main:hover {
  background-color: #0b3c8c;
  color: #ffffff;
}

.select-row {
  display: flex;
  gap: 12px;
}

.custom-select-box {
  flex: 1;
  position: relative;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0px 20px;
  text-align: left;
  color: #374151;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.custom-select-box select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  width: 100%;
  outline: none;
  color: #374151;
  font-size: 0.95rem;
  cursor: pointer;
}

.custom-select-box i {
  color: #4b5563;
  font-size: 0.85rem;
}

.popular-searches-wrapper {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.popular-label {
  font-weight: 700;
  color: #111827;
  font-size: 0.9rem;
  margin-right: 4px;
}

.search-pill {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #374151;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.search-pill:hover {
  border-color: #0d47a1;
  color: #0d47a1;
}
.hero-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,120 L1200,120 L1200,80 L1180,80 L1180,60 L1170,60 L1170,80 L1150,80 L1150,40 L1140,40 L1140,80 L1110,80 L1110,30 L1100,30 L1100,80 L1070,80 L1070,50 L1060,50 L1060,80 L1010,80 L1010,20 L990,20 L990,80 L950,80 L950,70 L940,70 L940,80 L910,80 L910,40 L900,40 L900,80 L860,80 L860,60 L850,60 L850,80 L810,80 L810,30 L800,30 L800,80 L760,80 L760,50 L750,50 L750,80 L700,80 L700,10 L680,10 L680,80 L630,80 L630,40 L620,40 L620,80 L570,80 L570,25 L560,25 L560,80 L510,80 L510,60 L500,60 L500,80 L450,80 L450,20 L430,20 L430,80 L390,80 L390,50 L380,50 L380,80 L340,80 L340,30 L330,30 L330,80 L290,80 L290,60 L280,60 L280,80 L230,80 L230,15 L210,15 L210,80 L160,80 L160,45 L150,45 L150,80 L100,80 L100,25 L90,25 L90,80 L40,80 L40,55 L30,55 L30,80 L0,80 Z" fill="%23e3ecfc" opacity="0.6"/></svg>');
  background-repeat: repeat-x;
  background-position: bottom;
  pointer-events: none;
  z-index: 1;
}

.hero-section > .container {
  position: relative;
  z-index: 2;
}

.ad-banner-wrapper {
  max-width: 850px;
  margin: 50px auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: linear-gradient(90deg, #e0c3fc 0%, #8ec5fc 100%);
}

.ad-content {
  background: linear-gradient(135deg, #2c1654 0%, #4c2885 100%);
  color: white;
  padding: 20px 30px;
  position: relative;
}

.ad-badge {
  position: absolute;
  top: 10px;
  right: 15px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.categories-section {
  padding: 40px 0;
  background-color: #f8fafc;
}

.featured-portals-section {
  padding: 40px 0;
  background-color: #f8fafc;
}

/* Section Titles & Links */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-weight: 700;
  font-size: 1.35rem;
  color: #111827;
  margin: 0;
}

.view-all-link {
  color: #0d47a1;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}

.view-all-link:hover {
  opacity: 0.8;
}

/* Popular Categories Cards Grid/Scroll Layout */
.categories-section {
  padding: 40px 0;
  background-color: #f8fafc;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-weight: 700;
  font-size: 1.35rem;
  color: #111827;
  margin: 0;
}

.view-all-link {
  color: #0d47a1;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}

.view-all-link:hover {
  opacity: 0.8;
}

/* Categories Grid Layout */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(110px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.categories-grid::-webkit-scrollbar {
  display: none;
}

.category-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 10px;
  text-align: center;
  text-decoration: none;
  color: #374151;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 105px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.category-card:hover {
  border-color: #0d47a1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 71, 161, 0.06);
  color: #0d47a1;
}

/* Unique Soft-Glow Gradients & Realistic Icon Colors */
.categories-section {
  padding: 40px 0;
  background-color: #f8fafc;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-weight: 700;
  font-size: 1.35rem;
  color: #111827;
  margin: 0;
}

.view-all-link {
  color: #0d47a1;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}

.view-all-link:hover {
  opacity: 0.8;
}

/* Categories Grid Layout */
.categories-section {
  padding: 40px 0;
  background-color: #f8fafc;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-weight: 700;
  font-size: 1.35rem;
  color: #111827;
  margin: 0;
}

.view-all-link {
  color: #0d47a1;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}

.view-all-link:hover {
  opacity: 0.8;
}

/* Categories Grid Layout: Forces all items into one single horizontal scroll row */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(110px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-top: 10px;
  padding-bottom: 8px;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}
.categories-grid::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome, Safari, Opera */
}

.category-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 10px;
  text-align: center;
  text-decoration: none;
  color: #374151;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 105px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  flex-shrink: 0;
}

.category-card:hover {
  border-color: #0d47a1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 71, 161, 0.06);
  color: #0d47a1;
}

/* Unique Soft-Glow Gradients & Realistic Icon Colors */
.category-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 8px;
}

/* Individual Card Accents */
.cat-gov .category-icon {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}
.cat-edu .category-icon {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}
.cat-jobs .category-icon {
  background: rgba(180, 83, 9, 0.1);
  color: #b45309;
}
.cat-health .category-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}
.cat-finance .category-icon {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}
.cat-shopping .category-icon {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}
.cat-business .category-icon {
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
}
.cat-news .category-icon {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}
.cat-tech .category-icon {
  background: rgba(79, 70, 229, 0.1);
  color: #4338ca;
}
.cat-more .category-icon {
  background: rgba(107, 114, 128, 0.1);
  color: #4b5563;
}

.category-name {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  color: #1f2937;
}

/* Mobile View: Show 4 columns per row layout */
@media (max-width: 991px) {
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
    overflow-x: visible;
    gap: 8px;
  }
  .category-card {
    padding: 10px 4px;
    min-height: 90px;
  }
  .category-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    margin-bottom: 6px;
  }
  .category-name {
    font-size: 0.72rem;
  }
  .cat-news {
    display: none;
  }
}
@media (max-width: 1399px) {
  .categories-grid {
    grid-template-columns: repeat(10, 1fr);
  }
}

@media (max-width: 576px) {
  .categories-grid {
    grid-template-columns: repeat(4, minmax(80px, 1fr));
    overflow-x: visible;
  }
  /* Hide items 8 and 9 (News & Media, Technology) on mobile screens so it shows 7 + More */
  .cat-news,
  .cat-tech {
    display: none;
  }
}

/* Featured Portals Horizontal Scroll / Grid */
.portals-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.portals-grid::-webkit-scrollbar {
  display: none;
}

.portal-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.01);
  transition: all 0.2s ease;
  min-height: 235px;
  flex-shrink: 0;
}

.portal-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.portal-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.portal-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}

.portal-info {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.portal-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.portal-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #111827;
  margin: 0;
  line-height: 1.25;
}

.verified-badge {
  color: #0d6efd;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.portal-domain {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 2px 0 0 0;
}

.portal-meta {
  font-size: 0.78rem;
  color: #4b5563;
  margin-bottom: 14px;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
  padding: 8px 0;
}

.portal-stats {
  font-size: 0.78rem;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.portal-stats i {
  color: #6b7280;
}

.btn-view-portal {
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  color: #0d47a1;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 8px;
  width: 100%;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-view-portal:hover {
  background-color: #f0f4ff;
  border-color: #0d47a1;
  color: #0d47a1;
}

/* Mobile View: Shows exactly 3 cards matching the provided mobile image screenshot */
@media (max-width: 1399px) {
  .portals-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
@media (max-width: 991px) {
  .portals-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 12px;
  }
  .portal-card {
    padding: 16px;
  }
}
@media (max-width: 576px) {
  .portals-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
  .portal-title {
    font-size: 0.82rem;
  }
  .portal-domain,
  .portal-meta,
  .portal-stats {
    font-size: 0.7rem;
  }
  .btn-view-portal {
    font-size: 0.75rem;
    padding: 6px 8px;
  }
}
.site-footer {
  background-color: #0b192c;
  color: #b0c4de;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.site-footer h6 {
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 1.2rem;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
  display: inline-block;
}

.footer-links a:hover {
  color: #ffffff;
  transform: translateX(6px);
}

.footer-divider {
  border-color: rgba(255, 255, 255, 0.1);
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-radius: 50%;
  margin-right: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background: #0d6efd;
  transform: translateY(-4px) scale(1.1);
  color: #fff;
}

.mobile-accordion .accordion-item {
  background-color: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-accordion .accordion-button {
  background-color: transparent;
  color: #ffffff;
  font-weight: 600;
  box-shadow: none;
  padding: 1rem 0;
}

.mobile-accordion .accordion-button:not(.collapsed) {
  color: #60a5fa;
  background-color: transparent;
}

.mobile-accordion .accordion-button::after {
  filter: invert(1);
  transition: transform 0.3s ease;
}

.mobile-accordion .accordion-body {
  padding: 0.5rem 0 1rem 0;
}
.text-muted {
  color: white !important;
}
