/**
 * HEADER SCOPED CSS
 * Only affects header and navbar elements - does NOT leak into page content
 * Created: December 27, 2025
 */

/* ============================================
   HEADER VARIABLES (scoped to header only)
   ============================================ */
.header-blue,
.top-brand-bar,
.header-container {
  --header-primary-blue: #172a74;
  --header-primary-teal: #21a9af;
  --header-gradient: linear-gradient(135deg, #172a74, #21a9af) !important;
  --header-text-light: #ffffff;
  --header-transition: all 0.3s ease;
}

/* ============================================
   TOP BRAND BAR
   ============================================ */
.top-brand-bar {
  background: var(--header-gradient);
  padding: 12px 0;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-brand-bar a,
.top-brand-bar a:link,
.top-brand-bar a:visited,
.top-brand-bar a:hover,
.top-brand-bar a:active {
  color: var(--header-text-light)  ;
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  letter-spacing: 1px;
}

.top-brand-bar a:hover {
  opacity: 0.9;
}

/* ============================================
   HEADER BLUE CONTAINER
   ============================================ */
.header-blue {
  background: var(--header-gradient);
  padding: 0;
  position: relative;
  z-index: 1010;
}

.header-container {
  width: 100%;
  padding: 0;
}

/* ============================================
   NAVBAR STYLING (scoped to header)
   ============================================ */
.header-blue .navbar {
  background: transparent;
  padding: 0.5rem 1rem;
  color: var(--header-text-light);
  border-radius: 0;
  box-shadow: none;
  border: none;
}

.header-blue .navbar .container,
.header-container .navbar .container {
  width: 100%;
  max-width: 1400px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  padding: 0 30px;
  margin: 0 auto;
}

@media (max-width: 991px) {
  .header-blue .navbar .container,
  .header-container .navbar .container {
    justify-content: space-between;
  }
}

.header-blue .navbar-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--header-text-light)  ;
  text-decoration: none;
  padding-right: 20px;
}

.header-blue .navbar-brand:hover {
  color: #f0f0f0  ;
}

/* ============================================
   NAVIGATION LINKS (scoped)
   ============================================ */
.header-blue .navbar-nav,
.header-container .navbar-nav {
  display: flex;
  flex-grow: 1;
  align-items: center;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
}

.header-blue .nav-item,
.header-container .nav-item {
  padding: 0;
  flex-shrink: 0;
}

.header-blue .nav-link,
.header-container .nav-link {
  color: rgba(255, 255, 255, 0.9)  ;
  font-weight: 500;
  padding: 10px 18px  ;
  transition: var(--header-transition);
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  font-size: 1rem;
}

/* Larger screens - more spacing */
@media (min-width: 1400px) {
  .header-blue .nav-link,
  .header-container .nav-link {
    padding: 10px 24px  ;
    font-size: 1.05rem;
  }
}

@media (min-width: 1200px) and (max-width: 1399px) {
  .header-blue .nav-link,
  .header-container .nav-link {
    padding: 10px 20px  ;
    font-size: 1rem;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .header-blue .nav-link,
  .header-container .nav-link {
    padding: 8px 14px  ;
    font-size: 0.95rem;
  }
}

.header-blue .nav-link:hover {
  color: var(--header-text-light)  ;
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   HAMBURGER TOGGLE (mobile only)
   ============================================ */
.header-blue .navbar-toggler {
  border: 2px solid rgba(255, 255, 255, 0.8);
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  width: 42px;
  height: 42px;
  display: none;
  align-items: center;
  justify-content: center;
}

@media (max-width: 991px) {
  .header-blue .navbar-toggler {
    display: flex;
  }
}

.header-blue .navbar-toggler:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 1);
}

.header-blue .navbar-toggler:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.header-blue .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  width: 24px;
  height: 24px;
}

/* ============================================
   HEADER BUTTONS (scoped)
   ============================================ */
.header-blue .btn-success {
  background-color: #28a745;
  border-color: #28a745;
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--header-transition);
  box-shadow: 0 2px 5px rgba(40, 167, 69, 0.2);
  white-space: nowrap;
}

.header-blue .btn-success:hover {
  background-color: #218838;
  border-color: #1e7e34;
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
  transform: translateY(-1px);
}

.header-blue .action-button,
.header-blue #login-button {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 25px;
  color: #ebeff1;
  box-shadow: none;
  padding: 0.5rem 1rem;
  background: transparent;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--header-transition);
}

.header-blue #login-button {
  background: rgba(255, 255, 255, 0.95);
  color: var(--header-primary-blue)  ;
  border: 1px solid rgba(255, 255, 255, 0.9);
  margin-right: 0.75rem;
}

.header-blue #login-button:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   HEADER DROPDOWNS (scoped)
   ============================================ */
.header-blue .dropdown {
  position: relative;
}

.header-blue .dropdown-menu {
  border: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 0.5rem 0;
  min-width: 160px;
  z-index: 1030;
}

.header-blue .dropdown-item {
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  transition: var(--header-transition);
  border-bottom: 1px solid #f8f9fa;
  color: #333;
}

.header-blue .dropdown-item:last-child {
  border-bottom: none;
}

.header-blue .dropdown-item:hover {
  background: var(--header-gradient);
  color: white;
  transform: translateX(4px);
}

/* Language dropdown button */
.header-blue .lang-dropdown-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 25px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.95);
  color: #1f2937  ;
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: var(--header-transition);
}

.header-blue .lang-dropdown-btn:hover {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* User dropdown button */
.header-blue .user-dropdown-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 25px;
  font-weight: 500;
  background: white;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: var(--header-transition);
  color: #1f2937  ;
}

.header-blue .user-dropdown-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

/* ============================================
   HEADER ACTIONS CONTAINER
   ============================================ */
.header-blue .header-actions {
  gap: 12px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 0;
}

.header-blue .auth-buttons {
  gap: 10px;
  display: flex;
  align-items: center;
}

/* Navbar collapse - full width on desktop */
.header-blue .navbar-collapse {
  flex-basis: 100%;
  flex-grow: 1;
  align-items: center;
}

@media (min-width: 992px) {
  .header-blue .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
}

/* Mobile sidebar menu */
@media (max-width: 991px) {
  .header-blue .navbar-collapse {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #172a74, #21a9af);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
    transition: left 0.3s ease;
    z-index: 99999;
    overflow-y: auto;
    display: block;
  }
  
  .header-blue .navbar-collapse.show {
    left: 0;
  }

  /* Overlay backdrop */
  .header-blue .navbar-collapse.show::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }
}

/* Post Ad button container */
.header-blue .ml-auto.mr-3 {
  margin-left: 15px  ;
  margin-right: 12px  ;
  flex-shrink: 0;
}

/* Language dropdown wrapper */
.header-blue .lang-dropdown-wrapper {
  flex-shrink: 0;
  margin-right: 10px;
}

/* ============================================
   HEADER RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 991px) {
  .header-blue .navbar-collapse {
    padding: 20px 0;
    margin-top: 0;
    border-radius: 0;
  }

  .header-blue .navbar-nav {
    flex-direction: column;
    width: 100%;
    padding: 0;
    margin-right: 0;
  }

  .header-blue .nav-item {
    width: 100%;
    padding: 0;
    margin: 0;
  }

  .header-blue .nav-link {
    padding: 14px 20px;
    display: block;
    border-radius: 0;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
  }

  .header-blue .nav-item:last-child .nav-link {
    border-bottom: none;
  }

  .header-blue .nav-link:hover,
  .header-blue .nav-link:active {
    background: rgba(255, 255, 255, 0.15);
    padding-left: 24px;
  }

  .header-blue .ml-auto.mr-3 {
    margin: 0;
    width: 100%;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .header-blue .btn-success {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    border-radius: 8px;
  }

  .header-blue .header-actions {
    flex-direction: column;
    width: 100%;
    margin-top: 0;
    gap: 0;
    margin-left: 0;
    padding: 12px 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .header-blue .lang-dropdown-wrapper {
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
  }

  .header-blue .lang-dropdown-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    font-weight: 600;
  }

  .header-blue .auth-buttons {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .header-blue .auth-buttons .btn,
  .header-blue #login-button {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: 8px;
    margin-right: 0;
  }

  .header-blue .user-dropdown-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .header-blue .dropdown-menu {
    width: 100%;
    margin-top: 8px;
  }
}

@media (max-width: 768px) {
  .top-brand-bar {
    padding: 12px 0;
  }

  .top-brand-bar a {
    font-size: 1.3rem;
  }

  .header-blue .navbar {
    padding: 10px 0;
  }

  .header-blue .navbar .container {
    padding: 0 12px;
  }

  .header-blue .nav-link {
    padding: 13px 18px;
    font-size: 0.93rem;
  }
}

@media (max-width: 576px) {
  .top-brand-bar {
    padding: 10px 0;
  }

  .top-brand-bar a {
    font-size: 1.15rem;
  }

  .header-blue .navbar .container {
    padding: 0 10px;
  }

  .header-blue .nav-link {
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .header-blue .btn-success {
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  .header-blue .lang-dropdown-btn,
  .header-blue #login-button,
  .header-blue .user-dropdown-btn {
    padding: 11px 14px;
    font-size: 0.9rem;
  }
}

/* ============================================
   DASHBOARD PAGE HEADER OVERRIDES
   ============================================ */
body.dashboard-page .header-blue {
  padding: 0;
  margin: 0;
}

body.dashboard-page .top-brand-bar {
  display: none;
}

body.dashboard-page .header-blue .navbar {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

/* ============================================
   HERO SECTION (inside header-blue)
   ============================================ */
.header-blue .hero {
  margin-top: 30px;
  margin-bottom: 40px;
  text-align: left;
  padding: 0 15px;
}

.header-blue .hero h1 {
  color: #fff;
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 300;
  line-height: 1.3;
}

.header-blue .hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  margin-bottom: 20px;
  font-weight: 300;
  line-height: 1.5;
  max-width: 100%;
}

/* Phone mockup positioning */
.header-blue .phone-holder {
  text-align: right;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding-right: 0;
  padding-left: 20px;
}

.header-blue .iphone-mockup {
  position: relative;
  max-width: 320px;
  margin: 0;
  display: inline-block;
  margin-right: -30px;
}

.header-blue .iphone-mockup img.device {
  width: 100%;
  height: auto;
}

.header-blue .iphone-mockup .screen {
  position: absolute;
  width: 88%;
  height: 77%;
  top: 12%;
  border-radius: 2px;
  left: 6%;
  border: 1px solid #444;
  background-color: #aaa;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.header-blue .iphone-mockup .screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Custom list in hero */
.header-blue .custom-list {
  list-style-type: none;
  padding-left: 0;
  margin-top: 20px;
  margin-bottom: 25px;
}

.header-blue .custom-list li {
  position: relative;
  padding-left: 22px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
  line-height: 1.5;
}

.header-blue .custom-list li:before {
  content: "•";
  color: #21a9af;
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
}

.header-blue .custom-list li a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s ease;
}

.header-blue .custom-list li a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Download buttons in hero */
.header-blue .download-buttons {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.header-blue .store-button {
  max-width: 200px;
  width: 100%;
  height: auto;
  transition: transform 0.2s ease;
}

.header-blue .store-button:hover {
  transform: scale(1.05);
}

/* ============================================
   HERO RESPONSIVE
   ============================================ */
@media (min-width: 1200px) {
  .header-blue .hero {
    margin-top: 50px;
    margin-bottom: 50px;
  }
  
  .header-blue .hero h1 {
    font-size: 2.25rem;
    margin-bottom: 15px;
  }
  
  .header-blue .hero p {
    font-size: 1.05rem;
  }
  
  .header-blue .iphone-mockup {
    max-width: 340px;
    margin-right: -50px;
  }
  
  .header-blue .custom-list li {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }
  
  .header-blue .store-button {
    max-width: 180px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .header-blue .hero {
    margin-top: 40px;
  }
  
  .header-blue .hero h1 {
    font-size: 1.9rem;
  }
  
  .header-blue .hero p {
    font-size: 0.95rem;
  }
  
  .header-blue .iphone-mockup {
    max-width: 300px;
    margin-right: -40px;
  }
  
  .header-blue .custom-list li {
    font-size: 1rem;
  }
  
  .header-blue .store-button {
    max-width: 160px;
  }
}

@media (max-width: 991px) {
  .header-blue .hero {
    text-align: center;
    margin-top: 25px;
    margin-bottom: 30px;
  }
  
  .header-blue .hero p {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .header-blue .custom-list {
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .header-blue .download-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .header-blue .hero h1 {
    font-size: 1.6rem;
  }
  
  .header-blue .hero p {
    font-size: 0.9rem;
  }
  
  .header-blue .custom-list li {
    font-size: 0.85rem;
    margin-bottom: 5px;
  }
  
  .header-blue .store-button {
    max-width: 120px;
  }
}

@media (max-width: 576px) {
  .header-blue .hero {
    margin-top: 20px;
    margin-bottom: 25px;
  }
  
  .header-blue .hero h1 {
    font-size: 1.4rem;
  }
  
  .header-blue .hero p {
    font-size: 0.85rem;
  }
}
