/* ================================================================
   TARGETED FIXES FILE — home_fixes.css
   
   CREATE a new file called home_fixes.css in your static/css/ folder
   Then add this ONE line at the bottom of your home.html <head>:
   
   <link rel="stylesheet" href="{% static 'css/home_fixes.css' %}">
   
   Put it LAST — after all other CSS links so it takes priority.
   Do NOT touch home.css, header.css, or qr_home.css.
================================================================ */


/* ════════════════════════════════════════════════════════════
   FIX 1 — FULL WIDTH SECTIONS (removes the "box" appearance)
   
   Cause: body has padding-top from header.css, and the dark
   sections have a max-width container limiting them.
   This forces every section to bleed edge-to-edge.
════════════════════════════════════════════════════════════ */

/* Make ALL major sections truly full width */
.qrpromo-section,
.pkg-wrapper,
.services-section,
.mecf-wrapper {
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  position: relative;
}

/* Remove any inherited max-width on the section itself */
.qrpromo-section {
  max-width: none !important;
}


/* ════════════════════════════════════════════════════════════
   FIX 2 — HEADER DARK THEME COMPATIBILITY
   
   Makes header text, dropdowns, and mobile menu work
   cleanly against the dark page without touching header.css
════════════════════════════════════════════════════════════ */

/* Make header slightly more transparent/dark-compatible */
body:not(.blog-page) .sticky-header {
  background: rgba(13, 13, 20, 0.96) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: 0 1px 24px rgba(0,0,0,0.35) !important;
}

/* Force blog page nav to dark */
body.blog-page .main-nav a {
    color: #1a1a1a !important;
}

body.blog-page .main-nav a:hover {
    color: #667eea !important;
}

body.blog-page .sticky-header {
    background: rgba(255,255,255,0.97) !important;
    box-shadow: 0 1px 12px rgba(0,0,0,0.08) !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

body.blog-page .blog-nav-toggle {
    color: #1a1a1a !important;
}

body.blog-page .mobile-menu-btn {
    color: #1a1a1a !important;
}

body:not(.blog-page) .main-nav a:hover,
body:not(.blog-page) .main-nav a.active {
  color: #ffffff !important;
}

.main-nav a::after {
  background: linear-gradient(90deg, #5b3df5, #00d4ff) !important;
}

/* Login / Signup buttons */
body:not(.blog-page) .login-btn {
  border-color: rgba(255,255,255,0.35) !important;
  color: rgba(255,255,255,0.85) !important;
}

.login-btn:hover {
  background: rgba(255,255,255,0.10) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,0.60) !important;
}

body:not(.blog-page) .signup-btn {
  background: linear-gradient(135deg, #5b3df5, #3b1fc9) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.signup-btn:hover {
  background: linear-gradient(135deg, #6d52f7, #4d2fe0) !important;
  box-shadow: 0 6px 20px rgba(91,61,245,0.45) !important;
}

/* Profile avatar pill on dark bg */
body:not(.blog-page) .profile-avatar {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.14) !important;
}

body:not(.blog-page) .profile-name {
  color: rgba(255,255,255,0.88) !important;
}

body:not(.blog-page) .profile-avatar i:first-child {
  color: #a78bfa !important;
}

body:not(.blog-page) .dropdown-arrow {
  color: rgba(255,255,255,0.45) !important;
}
/*
.profile-toggle:hover .profile-avatar {
  background: rgba(91,61,245,0.20) !important;
  border-color: rgba(91,61,245,0.50) !important;
}

.profile-name {
  color: rgba(255,255,255,0.88) !important;
}

.profile-avatar i:first-child {
  color: #a78bfa !important;
}

.dropdown-arrow {
  color: rgba(255,255,255,0.45) !important;
}*/

/* Dark pages — dark dropdown */
body:not(.blog-page) .dropdown-menu {
    background: #12121e !important;
    border-color: rgba(102,126,234,0.3) !important;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5) !important;
}

body:not(.blog-page) .dropdown-user-info {
    background: linear-gradient(135deg, #1e2a3a 0%, #1a2236 100%) !important;
    border-bottom: 1px solid rgba(102,126,234,0.2) !important;
}

body:not(.blog-page) .dropdown-item {
    color: rgba(255,255,255,0.78) !important;
    border-left: 3px solid transparent !important;
}

body:not(.blog-page) .dropdown-item:hover {
    background: rgba(102,126,234,0.18) !important;
    color: #fff !important;
    border-left-color: #667eea !important;
    padding-left: 23px !important;
}

body:not(.blog-page) .dropdown-item i {
    color: rgba(255,255,255,0.45) !important;
}

body:not(.blog-page) .dropdown-item:hover i {
    color: #667eea !important;
}

body:not(.blog-page) .dropdown-divider {
    background: rgba(255,255,255,0.07) !important;
}

body:not(.blog-page) .logout-btn {
    color: rgba(255,255,255,0.78) !important;
}

body:not(.blog-page) .logout-btn:hover {
    background: rgba(239,68,68,0.15) !important;
    color: #ff6060 !important;
    border-left-color: #ff6060 !important;
}

body:not(.blog-page) .logout-btn:hover i {
    color: #ff6060 !important;
}

/* Blog pages — keep white dropdown */
.blog-page .dropdown-menu {
    background: #ffffff !important;
    border-color: #eaeaea !important;
}

/* Mobile menu button */
.mobile-menu-btn {
  color: rgba(255,255,255,0.85) !important;
}

.mobile-menu-btn:hover {
  background: rgba(255,255,255,0.08) !important;
}


/* ════════════════════════════════════════════════════════════
   FIX 3 — SERVICES RESPONSIVE ORDER
   
   On mobile, EVERY service item must follow:
   Image FIRST (top), Text SECOND (bottom)
   No exceptions — no alternating.
════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {

  /* Force ALL service items — including .reverse — to stack
     image on top, content below */
  .service-item,
  .service-item.reverse {
    display: flex !important;
    flex-direction: column !important;
    direction: ltr !important;
    gap: 20px !important;
  }

  /* Image always comes first visually */
  .service-item .service-image,
  .service-item.reverse .service-image {
    order: 1 !important;
    width: 100% !important;
    height: 230px !important;
  }

  /* Content always comes second visually */
  .service-item .service-content,
  .service-item.reverse .service-content {
    order: 2 !important;
    direction: ltr !important;
    text-align: left !important;
  }

  .service-content p {
    text-align: left !important;
  }

}

@media (max-width: 480px) {
  .service-item .service-image,
  .service-item.reverse .service-image {
    height: 200px !important;
  }
}


/* ════════════════════════════════════════════════════════════
   FIX 4 — CONTACT FORM DROPDOWN TEXT COLOR
   
   The country select was showing invisible text on dark bg
════════════════════════════════════════════════════════════ */

.mecf-country-select,
#mecf-country {
  color: rgba(255,255,255,0.85) !important;
  background: rgba(255,255,255,0.06) !important;
}

/* Browser can't fully style <select> options, but this helps */
.mecf-country-select option,
#mecf-country option {
  background: #1a1a2e !important;
  color: #ffffff !important;
}


/* ════════════════════════════════════════════════════════════
   FIX 5 — REMOVE EXCESS EMPTY SPACE BETWEEN SECTIONS
   
   The gap between sections was from conflicting padding/margin
════════════════════════════════════════════════════════════ */

/* Tighten section spacing so page feels cohesive */
.qrpromo-section {
  margin-top: 0 !important;
}

.pkg-wrapper {
  margin-top: 0 !important;
}

.services-section {
  padding-top: 45px !important;
  margin-top: 0 !important;
}

.mecf-wrapper {
  margin-top: 0 !important;
}

/* Remove any gap between carousel and QR section */
#home-page > .carousel-section + * {
  margin-top: 0 !important;
}


/* ════════════════════════════════════════════════════════════
   FIX 6 — PAGE BACKGROUND COLOR
   
   Ensures the body background matches the dark sections
   so there's no white flash between elements
════════════════════════════════════════════════════════════ */

body:not(.blog-page) {
  background-color: #09090f !important;
}

/* page content wrapper must not add white bg */
#home-page,
.page-content {
  background: transparent !important;
}

.main-content,
.content-wrapper {
  background: transparent !important;
}

/* Dark pages — purple badge */
body:not(.blog-page) .af-badge-float {
    background: #a78bfa !important;
    color: #fff !important;
}

/* Blog/affiliate pages — match theme */
body.blog-page .af-badge-float {
    background: #667eea !important;
    color: #fff !important;
}

/* ════════════════════════════════════════════════════════════
   BLOG PAGE — PROFILE DROPDOWN & AVATAR THEME
════════════════════════════════════════════════════════════ */

body.blog-page .profile-avatar {
    background: #f0f2ff !important;
    border-color: #d0d7f5 !important;
}

body.blog-page .profile-name {
    color: #1a1a1a !important;
}

body.blog-page .profile-avatar i:first-child {
    color: #667eea !important;
}

body.blog-page .dropdown-arrow {
    color: #888 !important;
}

body.blog-page .profile-toggle:hover .profile-avatar {
    background: #e8ecff !important;
    border-color: #667eea !important;
}

body.blog-page .dropdown-menu {
    background: #fff !important;
    border: 1px solid #e8e8e8 !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.1) !important;
    border-radius: 12px !important;
}

body.blog-page .dropdown-menu .dropdown-header .dropdown-user-info {
    background: #ffffff !important;
    border-bottom: 2px solid #f0f0f0 !important;
    padding: 16px 20px !important;
}

body.blog-page .dropdown-menu .dropdown-header .dropdown-user-info .user-icon {
    color: #667eea !important;
    font-size: 32px !important;
}

body.blog-page .dropdown-menu .dropdown-header .dropdown-user-info strong {
    color: #1a1a1a !important;
    font-size: 0.92rem !important;
}

body.blog-page .dropdown-menu .dropdown-header .dropdown-user-info small {
    color: #888 !important;
    font-size: 0.78rem !important;
}

body.blog-page .dropdown-item {
    color: #2c3e50 !important;
    border-left: 3px solid transparent !important;
}

body.blog-page .dropdown-item:hover {
    background: #f0f2ff !important;
    color: #667eea !important;
    border-left-color: #667eea !important;
    padding-left: 23px !important;
}

body.blog-page .dropdown-item i {
    color: #aaa !important;
}

body.blog-page .dropdown-item:hover i {
    color: #667eea !important;
}

body.blog-page .dropdown-divider {
    background: #f0f0f0 !important;
}

body.blog-page .logout-btn {
    color: #2c3e50 !important;
}

body.blog-page .logout-btn:hover {
    background: #fef2f2 !important;
    color: #e74c3c !important;
    border-left-color: #e74c3c !important;
}

/* Fix global overrides bleeding into blog pages */
body.blog-page .profile-toggle:hover .profile-avatar {
    background: #e8ecff !important;
    border-color: #667eea !important;
}

/* ── Mobile profile dropdown — blog pages ── */
body.blog-page .dropdown-menu {
    position: fixed !important;
    top: 70px !important;
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    max-width: 360px !important;
    margin: 0 auto !important;
    z-index: 1100 !important;
}

@media(max-width: 600px) {
    body.blog-page .dropdown-menu {
        right: 8px !important;
        left: auto !important;
        width: 280px !important;
    }

    /* Profile user info — remove gradient on blog mobile */
    body.blog-page .dropdown-user-info {
        background: #f8f9ff !important;
        border-bottom: 1px solid #e8e8f0 !important;
        padding: 14px 16px !important;
    }

    body.blog-page .dropdown-user-info .user-icon {
        color: #667eea !important;
        font-size: 28px !important;
    }

    body.blog-page .dropdown-user-info strong {
        color: #1a1a1a !important;
        font-size: 0.9rem !important;
    }

    body.blog-page .dropdown-user-info small {
        color: #888 !important;
        font-size: 0.75rem !important;
    }

    /* Profile avatar on blog mobile */
    body.blog-page .profile-avatar {
        background: #f0f2ff !important;
        border-color: #d0d7f5 !important;
        padding: 5px 10px !important;
    }

    body.blog-page .profile-name {
        color: #1a1a1a !important;
        font-size: 0.82rem !important;
    }

    body.blog-page .profile-avatar i:first-child {
        color: #667eea !important;
        font-size: 18px !important;
    }
}