/*
Theme Name: Adivert Theme
Theme URI: https://www.adivert.co.uk
Author: Adivert
Description: Simple Bootstrap 5 theme for LocalDir directory layouts.
Version: 1.0.0
Text Domain: localdir
*/

/* ---------------------------------------
   Base / Page Background
--------------------------------------- */
.bg-light{
  background: radial-gradient(1200px 600px at 15% 0%, rgba(13,110,253,.06), transparent 60%),
              linear-gradient(180deg, #f7f8fb, #f3f5f9) !important;
}

/* Premium cards */
.card.border-0.shadow-sm{
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(15,23,42,.08) !important;
  border: 1px solid rgba(15,23,42,.06);
  overflow: hidden;
}

/* ---------------------------------------
   Top Bar / Header
--------------------------------------- */
.localdir-topbar{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: radial-gradient(1200px 500px at 20% 0%, rgba(255,255,255,.10), transparent 60%),
              linear-gradient(90deg, #0b1020, #0f1b3a 55%, #101a2f);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(2,6,23,.35);
}

/* Optional subtle glow */
.localdir-topbar:after{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(600px 80px at 50% 0%, rgba(13,110,253,.22), transparent 70%);
  pointer-events:none;
}

/* Ensure header content stays above :after */
.localdir-topbar .container{
  position: relative;
  z-index: 1;
}

/* Brand/logo container */
.localdir-brand-logo{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.10);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.localdir-brand-logo--sm{
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

/* WordPress custom logo output */
.localdir-brand-logo .custom-logo-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
}

.localdir-brand-logo .custom-logo{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
}

/* Brand name */
.localdir-brand-name{
  letter-spacing: .2px;
}

/* ---------------------------------------
   Desktop Navigation (Premium)
--------------------------------------- */
.localdir-nav{
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px; /* tighter looks more premium */
  margin: 0;
  padding: 0;
}

.localdir-nav li{
  margin: 0;
  padding: 0;
  position: relative;
}

.localdir-nav a{
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  color: rgba(255,255,255,.86);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: .1px;
  transition: transform .18s ease, background .18s ease, color .18s ease;
  outline: none;
}

.localdir-nav a:hover{
  color: #fff;
  background: rgba(255,255,255,.10);
  transform: translateY(-1px);
}

/* Active/current menu item */
.localdir-nav .current-menu-item > a,
.localdir-nav .current_page_item > a{
  color: #fff;
  background: rgba(255,255,255,.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

/* Active menu indicator line */
.localdir-nav .current-menu-item > a:after,
.localdir-nav .current_page_item > a:after{
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(255,255,255,.85), rgba(255,255,255,.35));
  opacity: .9;
}

/* Premium account button */
.localdir-account-btn{
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 750;
  color: #fff;
  background: linear-gradient(180deg, #1a75ff, #0b5ed7);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 14px 30px rgba(13,110,253,.30);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.localdir-account-btn:hover{
  transform: translateY(-1px);
  color: #fff;
  box-shadow: 0 18px 36px rgba(13,110,253,.40);
}

.localdir-account-btn:active{
  transform: translateY(0);
  box-shadow: 0 10px 22px rgba(13,110,253,.28);
}

/* ---------------------------------------
   Mobile Menu Button (Animated Hamburger Morph)
   (Use a custom hamburger spans rather than dashicons)
--------------------------------------- */
.localdir-menu-btn{
  border-radius: 12px;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.22) !important;
  background: rgba(255,255,255,.06);
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
}

/* Hide dashicon if present */
.localdir-menu-btn .dashicons{
  display: none;
}

/* Hamburger */
.localdir-hamburger{
  width: 20px;
  height: 14px;
  position: relative;
  display: inline-block;
}

.localdir-hamburger span{
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 99px;
  background: rgba(255,255,255,.92);
  transition: transform .18s ease, top .18s ease, opacity .18s ease, width .18s ease;
}

.localdir-hamburger span:nth-child(1){ top: 0; }
.localdir-hamburger span:nth-child(2){ top: 6px; width: 86%; }
.localdir-hamburger span:nth-child(3){ top: 12px; }

/* When menu is open, morph into X */
.localdir-menu-btn[aria-expanded="true"] .localdir-hamburger span:nth-child(1){
  top: 6px;
  transform: rotate(45deg);
}
.localdir-menu-btn[aria-expanded="true"] .localdir-hamburger span:nth-child(2){
  opacity: 0;
  width: 0;
}
.localdir-menu-btn[aria-expanded="true"] .localdir-hamburger span:nth-child(3){
  top: 6px;
  transform: rotate(-45deg);
}

/* ---------------------------------------
   Offcanvas Mobile Menu (Dark Blue like Desktop)
--------------------------------------- */
.offcanvas.localdir-mobile-menu{
  background: radial-gradient(1200px 500px at 20% 0%, rgba(255,255,255,.08), transparent 60%),
              linear-gradient(90deg, #0b1020, #0f1b3a 55%, #101a2f);
  color: #fff;
  border-left: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
}

/* Header inside offcanvas */
.offcanvas.localdir-mobile-menu .offcanvas-header{
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* Close button visibility fix */
.offcanvas.localdir-mobile-menu .btn-close{
  filter: invert(1) brightness(2);
  opacity: .85;
}

.offcanvas.localdir-mobile-menu .btn-close:hover{
  opacity: 1;
}

/* Mobile nav list */
.localdir-mobile-menu .localdir-mobile-nav{
  list-style: none;
  padding: 0;
  margin: 0 0 14px 0;
}

.localdir-mobile-menu .localdir-mobile-nav li{
  margin-bottom: 8px;
}

/* Mobile nav links */
.localdir-mobile-menu .localdir-mobile-nav a{
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(255,255,255,.88);
  font-weight: 650;
  transition: background .15s ease, transform .15s ease;
  background: rgba(255,255,255,.04);
}

.localdir-mobile-menu .localdir-mobile-nav a:hover{
  background: rgba(255,255,255,.12);
  color: #fff;
  transform: translateY(-1px);
}

/* Active item in mobile menu */
.localdir-mobile-menu .localdir-mobile-nav .current-menu-item > a,
.localdir-mobile-menu .localdir-mobile-nav .current_page_item > a{
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

/* Account button inside menu */
.localdir-mobile-menu .btn.btn-primary{
  background: linear-gradient(180deg, #1a75ff, #0b5ed7);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 14px 30px rgba(13,110,253,.35);
  font-weight: 750;
  border-radius: 12px;
}

/* ---------------------------------------
   Misc / Legacy (keep if referenced elsewhere)
--------------------------------------- */
.localdir-link{
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-weight: 600;
}
.localdir-link:hover{ color: #fff; text-decoration: underline; }


/* --------------------------------------------------
   Logo System (Clean + Predictable)
-------------------------------------------------- */

/* Logo wrapper */
.localdir-brand-logo{
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  width: auto;
  height: auto;
}

/* Fix WordPress custom logo link */
.localdir-brand-logo .custom-logo-link{
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

/* Desktop logo size */
.localdir-brand-logo img.custom-logo{
  height: 76px;        /* ← DESKTOP SIZE (adjust only this) */
  width: auto;
  display: block;
}

/* Mobile / Offcanvas logo */
.localdir-brand-logo--sm img.custom-logo{
  height: 36px;
  width: auto;
}

/* Hide site name when custom logo exists */
body.wp-custom-logo .localdir-brand-name{
  display: none !important;
}