/* NextJS Style Migration CSS */
/* This file contains styles to make Django templates match the NextJS header and footer design */

/* Color variables matching NextJS design */
:root {
  --cleanifiq-light-gray: #F7F7FA;
  --cleanifiq-yellow: #F7BA57;
  --cleanifiq-green: #2D9E65;
  --cleanifiq-dark-gray: #525252;
  --cleanifiq-border-gray: #E7E7E7;
}

/* Header Styles - NextJS Style */
.nextjs-style-header {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1030 !important;
  background-color: var(--cleanifiq-light-gray) !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
  padding: 0.5rem 0 !important;
  width: 100% !important;
  transform: translateZ(0) !important;
}

/* Ensure sticky positioning works by preventing overflow issues */
body.nextjs-style-layout {
  overflow-x: hidden !important;
}

/* Ensure parent containers don't interfere with sticky positioning */
.nextjs-style-layout #main {
  position: relative !important;
}

/* Additional sticky header support */
.nextjs-style-header.navbar {
  position: -webkit-sticky !important;
  position: sticky !important;
}

/* Header mobile-specific adjustments */
.nextjs-style-header .container {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  height: 45px !important;
}

/* Logo responsive sizing to match NextJS */
.nextjs-style-header .navbar-brand img {
  width: 162px !important;
  height: 42px !important;
}

@media (min-width: 768px) {
  .nextjs-style-header .navbar-brand img {
    width: 108px !important;
    height: 28px !important;
  }
}

.nextjs-style-header .container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
  width: 100% !important;
}

@media (min-width: 1024px) {
  .nextjs-style-header .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.nextjs-style-header .navbar {
  height: 45px;
  padding: 0;
  background-color: transparent !important;
  box-shadow: none !important;
}

.nextjs-style-header .navbar-brand {
  margin-right: 0;
  padding: 0;
}

.nextjs-style-header .navbar-brand img {
  height: 28px;
  width: 108px;
}

@media (max-width: 767px) {
  .nextjs-style-header .navbar-brand img {
    height: 42px;
    width: 162px;
  }
}

/* Navigation Links Styling */
.nextjs-style-header .navbar-nav .nav-link {
  color: black !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  padding: 0.5rem 0 !important;
  margin: 0 2.75rem 0 0 !important;
  position: relative;
  transition: color 0.2s ease;
}

/* Hide all icons from navigation links */
.nextjs-style-header .navbar-nav .nav-link i,
.nextjs-style-header .nav-link i {
  display: none !important;
}

.nextjs-style-header .navbar-nav .nav-link:hover {
  color: black !important;
}

.nextjs-style-header .navbar-nav .nav-link:hover::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -20px;
  width: 59px;
  height: 2px;
  background-color: var(--cleanifiq-green);
  opacity: 0.5;
}

/* Active link styling */
.nextjs-style-header .navbar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -20px;
  width: 59px;
  height: 2px;
  background-color: var(--cleanifiq-green);
}

/* Button styling for "Become a provider" */
.nextjs-style-header .btn-info {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
}

/* User profile and notifications */
.nextjs-style-header .dropdown img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* Notification badge styling */
.nextjs-style-header .badge-notification {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #F5C237 !important;
  color: black !important;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile menu styling */
.nextjs-style-header .navbar-toggler {
  border: none;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.nextjs-style-header .navbar-toggler-icon {
  background-image: none;
  width: 20px;
  height: 0.5px;
  background-color: black;
  position: relative;
  transition: all 0.3s ease;
}

.nextjs-style-header .navbar-toggler-icon::before,
.nextjs-style-header .navbar-toggler-icon::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 0.5px;
  background-color: black;
  left: 0;
  transition: all 0.3s ease;
}

.nextjs-style-header .navbar-toggler-icon::before {
  top: -6px;
}

.nextjs-style-header .navbar-toggler-icon::after {
  bottom: -6px;
}

/* Desktop navigation styles */
@media (min-width: 992px) {
  .nextjs-style-header .navbar-nav {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    gap: 2.75rem !important;
  }
  
  .nextjs-style-header .navbar-nav .nav-item {
    margin-bottom: 0 !important;
  }
  
  .nextjs-style-header .navbar-nav .nav-link {
    padding: 0.5rem 0 !important;
    margin: 0 !important;
    font-weight: 600 !important;
  }
  
  .nextjs-style-header .navbar-nav .nav-link i {
    display: none !important;
  }
  
  .nextjs-style-header .navbar-toggler {
    display: none !important;
  }
  
  .nextjs-style-header .navbar-collapse {
    display: flex !important;
    flex-basis: auto !important;
    justify-content: center !important;
  }
}

/* Mobile dropdown menu */
@media (max-width: 991px) {
  .nextjs-style-header .navbar-toggler {
    display: block !important;
    border: none !important;
    padding: 0 !important;
  }
  
  .nextjs-style-header .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--cleanifiq-light-gray);
    border-top: 1px solid var(--cleanifiq-border-gray);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 50;
    padding: 1rem 1.5rem;
    margin-top: 0;
  }

  .nextjs-style-header .navbar-nav {
    flex-direction: column;
  }

  .nextjs-style-header .navbar-nav .nav-link {
    padding: 0.5rem 0;
    margin: 0;
    border-bottom: none;
    font-weight: 600;
  }

  .nextjs-style-header .navbar-nav .nav-link::after {
    display: none;
  }
  
  /* Mobile menu item spacing */
  .nextjs-style-header .navbar-nav .nav-item {
    margin-bottom: 0.5rem;
  }
  
  /* Mobile icon spacing - icons are hidden */
  .nextjs-style-header .navbar-nav .nav-link i {
    display: none !important;
  }
}

/* Footer Styles - NextJS Style */
.nextjs-style-footer {
  width: 100%;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .nextjs-style-footer {
    margin-top: 2.5rem;
  }
}

.nextjs-style-footer .footer-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 767px) {
  .nextjs-style-footer .footer-container {
    padding: 0 1rem;
  }
}

@media (min-width: 768px) {
  .nextjs-style-footer .footer-content {
    padding: 2rem;
  }
}

@media (min-width: 1024px) {
  .nextjs-style-footer .footer-container {
    padding: 0 2rem;
  }
  
  .nextjs-style-footer .footer-content {
    padding: 2rem;
  }
}

.nextjs-style-footer .footer-content {
  background-color: var(--cleanifiq-light-gray);
  border-radius: 28px;
  padding: 2rem;
  text-align: left;
}

/* Mobile adjustments for better matching NextJS Footer */
@media (max-width: 767px) {
  .nextjs-style-footer .footer-content {
    padding: 1rem;
  }
  
  .nextjs-style-footer .footer-nav {
    gap: 1.5rem 1rem;
  }
  
  .nextjs-style-footer .footer-left {
    margin-bottom: 1.5rem;
  }
  
  /* Mobile social media sizing */
  .nextjs-style-footer .footer-social a {
    width: 28px;
    height: 28px;
  }
  
  /* Mobile contact section spacing */
  .nextjs-style-footer .footer-contact {
    gap: 0.5rem;
  }
  
  /* Mobile navigation section spacing */
  .nextjs-style-footer .footer-nav-section {
    margin-bottom: 1rem;
  }
  
  /* Reduce footer bottom spacing on mobile */
  .nextjs-style-footer .footer-bottom {
    margin-top: 1.5rem;
  }
}

.nextjs-style-footer .footer-main {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .nextjs-style-footer .footer-main {
    flex-direction: row;
  }
}

/* Logo and copyright section */
.nextjs-style-footer .footer-left {
  width: 100%;
  margin-bottom: 2rem;
  padding-right: 0;
}

@media (min-width: 768px) {
  .nextjs-style-footer .footer-left {
    width: 25%;
    margin-bottom: 0;
    padding-right: 2rem;
  }
  
  .nextjs-style-footer .footer-logo {
    margin-bottom: 1.5rem;
  }
  
  .nextjs-style-footer .footer-copyright {
    margin-bottom: 1.5rem;
  }
}

.nextjs-style-footer .footer-logo {
  margin-bottom: 1rem;
}

.nextjs-style-footer .footer-logo img {
  width: 174px;
  height: 45px;
}

.nextjs-style-footer .footer-copyright {
  color: black;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.nextjs-style-footer .footer-copyright p {
  margin: 0;
  margin-bottom: 0.25rem;
}

@media (max-width: 767px) {
  .nextjs-style-footer .footer-copyright {
    margin-bottom: 0.75rem;
  }
  
  .nextjs-style-footer .footer-copyright p {
    margin-bottom: 0.125rem;
    font-size: 0.8rem;
  }
}

/* Social media icons */
.nextjs-style-footer .footer-social {
  display: flex;
  gap: 1rem;
}

.nextjs-style-footer .footer-social a {
  width: 32px;
  height: 32px;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nextjs-style-footer .footer-social img {
  width: 18px;
  height: 18px;
}

.nextjs-style-footer .footer-social a:first-child img {
  width: 10px;
  height: 20px;
}

.nextjs-style-footer .footer-social a:nth-child(2) img {
  width: 18px;
  height: 14px;
}

/* Navigation sections */
.nextjs-style-footer .footer-right {
  width: 100%;
}

@media (min-width: 768px) {
  .nextjs-style-footer .footer-right {
    width: 75%;
  }
}

.nextjs-style-footer .footer-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1rem;
  text-align: left;
}

@media (min-width: 768px) {
  .nextjs-style-footer .footer-nav {
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem 1rem;
  }
}

.nextjs-style-footer .footer-nav-section {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.nextjs-style-footer .footer-nav-section h3 {
  color: black;
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 1rem;
  text-align: left;
}

@media (max-width: 767px) {
  .nextjs-style-footer .footer-nav-section h3 {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
  }
}

.nextjs-style-footer .footer-nav-section a {
  color: black;
  font-size: 0.875rem;
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
  text-align: left;
}

@media (max-width: 767px) {
  .nextjs-style-footer .footer-nav-section a {
    margin-bottom: 0.375rem;
    font-size: 0.85rem;
  }
}

.nextjs-style-footer .footer-nav-section a:hover {
  color: #6b7280;
  text-decoration: none;
}

/* Contact section styling */
.nextjs-style-footer .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.nextjs-style-footer .footer-contact .contact-item {
  display: flex;
  align-items: flex-start;
}

.nextjs-style-footer .footer-contact .contact-label {
  color: black;
  font-size: 0.875rem;
  margin-right: 0.5rem;
}

.nextjs-style-footer .footer-contact .contact-link {
  color: black;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nextjs-style-footer .footer-contact .contact-link:hover {
  color: #6b7280;
  text-decoration: none;
}

/* Bottom section */
.nextjs-style-footer .footer-bottom {
  width: 100%;
  border-top: 1px solid #d1d5db;
  margin-top: 2rem;
}

.nextjs-style-footer .footer-bottom-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

@media (min-width: 768px) {
  .nextjs-style-footer .footer-bottom-content {
    flex-direction: row;
    justify-content: flex-end;
    gap: 1.5rem;
  }
  
  .nextjs-style-footer .footer-bottom {
    margin-top: 2rem;
  }
}

.nextjs-style-footer .footer-bottom a {
  color: var(--cleanifiq-dark-gray);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nextjs-style-footer .footer-bottom a:hover {
  color: #6b7280;
  text-decoration: none;
}

/* Adjust body padding for new header height */
/* body.nextjs-style-layout {
  padding-top: 75px !important;
} */

/* Hide default Bootstrap navbar styles when using NextJS style */
.nextjs-style-header .navbar-light .navbar-nav .nav-link {
  color: black !important;
}

.nextjs-style-header .navbar-light .navbar-nav .nav-link:hover,
.nextjs-style-header .navbar-light .navbar-nav .nav-link:focus {
  color: black !important;
}

/* Ensure dropdown menus work properly */
.nextjs-style-header .dropdown-menu {
  border: 1px solid var(--cleanifiq-border-gray);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

/* User initials fallback styling */
.nextjs-style-header .user-initials {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #d1d5db;
  color: black;
  font-size: 0.75rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Override base.css footer conflicts */
.nextjs-style-footer,
.nextjs-style-footer.main-footer,
footer.nextjs-style-footer {
  background-color: transparent !important;
  color: black !important;
  border-color: transparent !important;
  text-align: left !important;
}

.nextjs-style-footer .footer-content {
  background-color: var(--cleanifiq-light-gray) !important;
  text-align: left !important;
}

/* Override base.css footer link colors */
.nextjs-style-footer a,
.nextjs-style-footer a:hover,
.nextjs-style-footer .footer-nav-section a,
.nextjs-style-footer .footer-nav-section a:hover,
.nextjs-style-footer .contact-link,
.nextjs-style-footer .contact-link:hover,
.nextjs-style-footer .footer-bottom a,
.nextjs-style-footer .footer-bottom a:hover {
  color: black !important;
  text-decoration: none !important;
}

.nextjs-style-footer .footer-nav-section a:hover,
.nextjs-style-footer .contact-link:hover,
.nextjs-style-footer .footer-bottom a:hover {
  color: #6b7280 !important;
}

/* Override base.css footer headings */
.nextjs-style-footer h3,
.nextjs-style-footer h4,
.nextjs-style-footer .footer-nav-section h3 {
  color: black !important;
  font-weight: bold !important;
  font-size: 1rem !important;
}

/* Ensure copyright text is black */
.nextjs-style-footer .footer-copyright,
.nextjs-style-footer .footer-copyright p {
  color: black !important;
} 