/* =========================================================
   eLocalInfo – MAIN GLOBAL CSS
   Used by: HOME, 404, static pages
   Excludes: search.php specific styles
========================================================= */

/* ---------- ROOT & BASE ---------- */
:root{
  --primary-1:#079bf9;
  --primary-2:#ce8a0c;
  --bg:#ffffff;
  --muted:#6b7280;
  --card-bg:#f5f8fb;
  --text:#0F1A2C;
  --text-white:#FFFFFF;
  --radius:14px;
  --shadow-lg:0 20px 40px rgba(8,14,30,0.12);
  --shadow-sm:0 6px 18px rgba(12,20,40,0.06);
  --newsletter-grad-a:#6d63f0;
  --newsletter-grad-b:#7b6ff6;
  --footer-bg:#07233a;
  font-family:"Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}

html,body{
  height:100%;
  margin:0;
  overflow-x: hidden;   /* THIS IS THE REAL FIX */
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
}

body.menu-open{
  overflow:hidden;
}

/* eLocal Loader UI */
/* eLocal Loader UI */
.elocal-loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;           /* LOWER than chat */
  pointer-events: none;   /* KEY FIX */
}

.container{
  width:92%;
  max-width:1300px;
  margin:0 auto;
  padding:16px;
}

/* ---------- NAVBAR ---------- */
.navbar-wrap{
  position:sticky;
  top:0;
  z-index:300;
  background:#07233a;
  color:#fff;
  box-shadow:0 3px 10px rgba(10,20,30,0.03);
}

.navbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 0;
}

.nav-left{
  display:flex;
  align-items:center;
  gap:18px;
}

.nav-left img{
  height:44px;
}

.nav-menu{
  display:flex;
  gap:18px;
  align-items:center;
  font-weight:600;
}

.nav-item{
  cursor:pointer;
  padding:8px 6px;
  border-radius:8px;
}

.nav-right{
  display:flex;
  align-items:center;
  gap:10px;
}

.btn-add{
  background:var(--primary-1);
  border:none;
  color:#fff;
  padding:10px 18px;
  border-radius:24px;
  font-weight:700;
  cursor:pointer;
}

.btn-login{
  background: transparent;
  border: 1px solid var(--primary-1);
  color: var(--primary-1);

  padding: 8px 18px;
  border-radius: 24px;   /* same as Join */

  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-login:hover{
  background:var(--primary-1);
  color:#fff;
}

.profile-pic{
  width:36px;
  height:36px;
  border-radius:50%;
  background:#eee;
  border:2px solid rgba(255,255,255,0.6);
  cursor:pointer;

  display:flex;
  align-items:center;     /* vertical center */
  justify-content:center; /* horizontal center */

  font-weight:700;
  font-size:12px;
  color:#333;
}


/* ---------- HAMBURGER ---------- */
.hamburger{
  display:flex;
  flex-direction:column;
  gap:4px;
  width:34px;
  height:28px;
  cursor:pointer;
}

.hamburger span{
  height:3px;
  background:#fff;
  border-radius:3px;
}

/* ---------- MOBILE NAV PANEL ---------- */
.mobile-nav-panel{
  position: fixed;
  top: 68px;
  right: 0;

  width: 85vw;
  max-width: 160px;
  height: calc(50vh - 68px);

  background: #ffffff;
  border-radius: 12px 0 0 12px;
  padding: 16px;

  box-shadow: -10px 0 30px rgba(0,0,0,0.15);
  z-index: 9999;

  overflow-y: auto;

  transform: translateX(100%);
  transition: transform 0.3s ease;
}

/* THIS LINE FIXES EVERYTHING */
.mobile-nav-panel.open{
  transform: translateX(0);
}


/* ---------- RIGHT ALIGN TEXT ---------- */
.mobile-nav-panel{
  text-align: right;
}

.mobile-nav-panel .nav-item,
.mobile-nav-panel .profile-menu-item,
.mobile-nav-panel .account-title, .mobile-account-list{
  text-align: right;
  width: auto;
  color: #333;
  padding: 5px;
}
.mobile-join {
	margin-top:12px;
	display:flex;
	justify-content:right;
}


/* ---------- HERO (HOME) ---------- */
.hero-wrap{
  background:linear-gradient(180deg, rgba(7,155,249,0.03), rgba(206,138,12,0.01));
  border-radius:18px;
  margin:12px 0;
  padding:36px 18px;
}

.hero-content{
  max-width:1100px;
  margin:0 auto;
}

.hero h1{
  font-size:36px;
  margin-bottom:18px;
  font-weight:800;
}

/* ---------- TOP CATEGORIES ---------- */
.top-cats{
  display:flex;
  gap:10px;
  margin-top:18px;
  overflow-x:auto;
}

.top-cat-btn{
  background:var(--card-bg);
  padding:10px 16px;
  border-radius:10px;
  font-weight:700;
  border:none;
  cursor:pointer;
}

.more-btn{
  background:#fff;
  border:1px solid #eef4fb;
  padding:10px 14px;
  border-radius:10px;
  font-weight:700;
}

/* ---------- PANELS (CITY / CATEGORY / PROFILE) ---------- */
.panel{
  position: fixed;
  width: 320px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 12px;
  z-index: 2000;
  display: none;

  max-height: 80vh;      /* IMPORTANT */
  overflow-y: auto;      /* IMPORTANT */
}

.panel.active{
  display:block;
}

/* ===============================
   PANEL SEARCH (INPUT + CLEAR)
================================ */
.panel-search{
  position: relative;
  width: 100%;
}

/* input */
.panel-search input[type="search"]{
  width: 100%;
  padding: 10px 38px 10px 12px;
  border-radius: 8px;
  border: 1px solid #eef4fb;
  font-size: 14px;
}

/* clear inside input */
.panel-search .clear-btn{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);

  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f3f6fb;
  border: none;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
  font-weight: 700;
  color: #445;
  cursor: pointer;
}

.panel-search .clear-btn:hover{
  background: #e8eef7;
}

/* top-right panel close button */
.close-x{
  margin-left: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f5f8fb;
  font-size: 16px;
  cursor: pointer;
}

/* hover */
.panel .close-btn:hover{
  background: #e8eef7;
}

.panel .item{
  padding:10px;
  border-radius:8px;
  font-weight:600;
  cursor:pointer;
}

.panel .item:hover{
  background:#f6fbff;
  color:var(--primary-1);
}

/* ---------- CARDS / SCROLL ---------- */
.scroll-section{
  margin-top:28px;
  position:relative;
}

.scroll-wrapper{
  display:flex;
  gap:16px;
  overflow-x:hidden;
}

.card{
  min-width:300px;
  height:200px;
  border-radius:14px;
  background-size:cover;
  display:flex;
  align-items:flex-end;
  padding:12px;
  color:#fff;
  box-shadow:0 8px 24px rgba(5,15,30,0.08);
}

/* ---------- NEWSLETTER ---------- */
.newsletter-strip{
  padding:48px 0;
}

.newsletter-card{
  max-width:1150px;
  margin:auto;
  padding:34px 44px;
  border-radius:28px;
  background:linear-gradient(90deg,var(--newsletter-grad-a),var(--newsletter-grad-b));
  color:#fff;
}

/* =====================================
   NAV / MENU LINK FIX (ANCHOR SUPPORT)
===================================== */

.profile-menu-item,
.nav-item,
.mobile-account-list .profile-menu-item,
.main-menu a{
  display:block;          /* anchor behave like div */
  text-decoration:none;   /* remove underline */
  color:inherit;          /* keep same color */
  cursor:pointer;
}

.profile-menu-item:hover,
.nav-item:hover{
  background:#f6fbff;
  color:var(--primary-1);
}

cc a {
	color: #0F1A2C;
}

/* ---------- FOOTER ---------- */
footer{
  margin-top:34px;
  padding:40px 0;
  background:var(--footer-bg);
  color:#d7e9ff;
}

.footer-main{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:40px;
}

.footer-main h3{
  color:#fff;
  font-weight:800;
}

.footer-main a{
  color:#cfe8ff;
  text-decoration:none;
  display:block;
  margin-bottom:8px;
}

.footer-bottom{
  border-top:1px solid rgba(255,255,255,0.06);
  padding:16px 0;
}

.footer-bottom-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
}

.footer-social{
  display: flex;
  gap: 12px;
}

.footer-social a{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-social i{
  font-size: 16px;
  color: #ffffff;
  line-height: 1;
}

/* ---- optical balance (micro adjustments) ---- */
.footer-social .bi-youtube    { transform: scale(1.53); }
.footer-social .bi-facebook   { transform: scale(1.21); }
.footer-social .bi-instagram  { transform: scale(1.06); }
.footer-social .bi-twitter-x  { transform: scale(0.91); }
.footer-social .bi-linkedin   { transform: scale(1.04); }
.footer-social .bi-pinterest  { transform: scale(1.11); }



.footer-social i:hover{
  color: #ffffff;
}

/* dev line */
.footer-dev{
  text-align: center;
  font-size: 14px;
  color: #cfe8ff;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-dev a {
	color: #cfe8ff;
}

/* MOBILE FIX */
@media (max-width:600px){
  .footer-bottom-inner{
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}


/* ---------- 404 PAGE ---------- */
.error-404-wrap{
  min-height:70vh;
  display:flex;
  align-items:center;
  justify-content:center;
}

.error-404-card{
  background:#fff;
  padding:48px 36px;
  border-radius:18px;
  text-align:center;
  box-shadow:var(--shadow-lg);
}

.error-code{
  font-size:96px;
  font-weight:900;
  color:var(--primary-1);
}

.error-title{
  font-size:28px;
  font-weight:800;
}

.error-actions{
  margin-top:24px;
  display:flex;
  gap:14px;
  justify-content:center;
}

.error-btn{
  padding:12px 20px;
  border-radius:999px;
  font-weight:700;
  text-decoration:none;
  border:1px solid #dce3ef;
  color:#071428;
}

.error-btn.primary{
  background:var(--primary-1);
  color:#fff;
  border:none;
}

/* ---------- RESPONSIVE ---------- */

/* ---------- NAV SEARCH BAR (Search Page Only) ---------- */

.nav-search-small {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 40px;
  background: #fff;
  padding: 6px 12px;
  border-radius: 50px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  position: relative;
  z-index: 500;
}

.nav-search-small input {
  border: none;
  outline: none;
  padding: 8px 12px;
  width: 200px;
  font-size: 15px;
}

.nav-search-small button {
  background: #071428;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
}

/* hide nav search on mobile */
@media (max-width:760px){
  .nav-search-small {
    display: none !important;
  }
}

/* ---------- MOBILE SEARCH BLOCK (search.php only) ---------- */

.mobile-search-block {
  display: none;
  padding: 14px;
  background: #fff;
  position: relative;
}

@media (max-width:760px){
  .mobile-search-block {
    display: block;
  }

  .mobile-search-block input {
    width: 94%;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 10px;
    border: 1px solid #dce3ef;
    font-size: 15px;
  }

  .mobile-select-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #f3f6fb;
    border: 1px solid #dce3ef;
    text-align: left;
    font-weight: 600;
    color: #445;
  }

  .mobile-search-btn {
    width: 100%;
    padding: 12px;
    border-radius: 999px;
    background: #071428;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
  }
}

.results-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  margin-top: 30px;
  align-items: flex-start;
}

@media (max-width:900px) {
  .results-container {
    grid-template-columns: 1fr;
  }
}

.results-left {
  padding-right: 10px;
}

.result-item {
  padding: 18px 0;
}

.result-item h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: #071428;
}

.result-item a {
  font-size: 14px;
  color: #0582e3;
  text-decoration: none;
}

.result-item p {
  margin: 6px 0 0;
  font-size: 15px;
  color: #444;
  line-height: 1.5;
}

/* ---------- SEARCH SUGGESTIONS (Desktop + Mobile) ---------- */

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  margin-top: 6px;
  z-index: 3000;
  max-height: 320px;
  overflow-y: auto;
}

.search-suggestions .item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
}

.search-suggestions .item:hover {
  background: #f5f8fb;
}

/* mobile suggestions */
#m-search-suggestions {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  z-index: 9999;
  max-height: 260px;
  overflow-y: auto;
  display: none;
}

/* ---------- SEARCH RESULTS LAYOUT ---------- */
/* ================================
   COOKIE BANNER – BASE (DESKTOP)
================================ */
.cookie-banner{
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 520px;
  width: calc(100% - 24px);   /* prevents edge-to-edge */
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  padding: 16px;
  z-index: 6000;
  display: none;
}

/* text */
.cookie-text{
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #071428;
}

.cookie-text a{
  color: #079bf9;
  font-weight: 600;
  text-decoration: none;
}

/* buttons */
.cookie-actions{
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.cookie-btn{
  flex: 1;
  padding: 10px 0;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
}

.cookie-btn--ghost{
  background: #f5f8fb;
  border: 1px solid #d9e3ef;
  color: #071428;
}

.cookie-btn--primary{
  background: #079bf9;
  color: #ffffff;
}

/* ===============================
   AdBlock Popup
=============================== */

.adblock-popup{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483647;
}

.adblock-box{
  background: #fff;
  max-width: 420px;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  text-align: center;
}

.adblock-box h3{
  font-size: 18px;
  margin-bottom: 10px;
}

.adblock-box p{
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

.adblock-actions{
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
}

.adblock-actions button{
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
}

.adblock-ok{
  background: #2563eb;
  color: #fff;
}

.adblock-close{
  background: #f3f4f6;
  color: #333;
}

/* Mobile */
@media(max-width:760px){
  .adblock-box{
    margin: 0 16px;
  }
}


/* ===== eLocal Z-Index System (LOCKED) ===== */
.elocal-loader    { z-index: 3000; }
.mobile-nav-panel { z-index: 4000; }
.panel            { z-index: 5000; }
.cookie-banner    { z-index: 6000; }
.floating-widgets { z-index: 7000; }
.chatbot-panel    { z-index: 8000; }

/* ================================
   MOBILE FIX (MOVE TO TOP)
================================ */
@media (max-width: 600px){
  .cookie-banner{
    position: sticky;     /* NOT fixed */
    top: 64px;            /* below navbar */
    left: auto;
    right: auto;
    transform: none;

    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;     /* looks like notice bar */
    box-shadow: none;    /* optional, cleaner */

    z-index: 50;
  }

  .cookie-actions{
    flex-direction: column;
  }
}


@media (max-width:760px){

  .navbar{
    display:flex;      /* 🔥 KEEP FLEX, NOT GRID */
    align-items:center;
    justify-content:space-between;
  }

  .nav-menu{
    display:none;
  }

  .hamburger{
    display:flex !important;
    position:static;
  }
}
@media (min-width:761px){
  .hamburger{
    display:none;
  }
}

.form-alert{
  padding:12px 14px;
  border-radius:10px;
  font-size:14px;
  font-weight:600;
  margin-bottom:16px;
}

.form-alert.success{
  background:#ecfdf5;
  color:#047857;
  border:1px solid #6ee7b7;
}

.form-alert.error{
  background:#fef2f2;
  color:#b91c1c;
  border:1px solid #fecaca;
}


