/*
 Theme Name:   Hostim Child
 Theme URI:    https://hostim.themetags.com/
 Description: Hostim is a modern and clean WordPress theme suitable for any kind of Domain-Hosting provider and Digital Agency.
 Author:       ThemeTags
 Author URI:   https://themetags.com/
 Template:     hostim
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  hostim
*/

/* === IAMEM Custom Nav CSS === */

/* ════════════════════════════════════════════════════════
   IAMEM HOSTING — Custom Navigation
   Desktop: full mega-menu bar
   Mobile (< 1024 px): hamburger + slide-in drawer
   ════════════════════════════════════════════════════════ */

/* Hide original theme header */
header.header-section { display: none !important; }
body { padding-top: 0 !important; }

* { box-sizing: border-box; }

/* ── Nav wrapper ─────────────────────────────────────── */
#iamem-nav {
  font-family: 'Nunito Sans', 'DM Sans', sans-serif;
  background: linear-gradient(90deg, #00d264 0%, #00b4aa 35%, #0e82d3 75%, #1565c0 100%);
  position: sticky;
  z-index: 9999;
  box-shadow: 0 2px 20px rgba(0,0,0,.18);
}
body.admin-bar #iamem-nav { top: 32px; }
body:not(.admin-bar) #iamem-nav { top: 0; }

#iamem-nav .nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  padding: 0 24px;
  gap: 2px;
}

/* ── Logo ────────────────────────────────────────────── */
#iamem-nav .nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 0;
  margin-right: 10px;
  border-right: 1px solid rgba(255,255,255,.2);
  text-decoration: none;
  flex-shrink: 0;
}
#iamem-nav .nav-logo img { height: 36px; width: auto; }
#iamem-nav .nav-logo span {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  letter-spacing: .4px;
  white-space: nowrap;
}

/* ── Desktop nav items ───────────────────────────────── */
#iamem-nav .ni { position: static; display: flex; align-items: center; }
#iamem-nav .nl {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 16px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
  user-select: none;
  text-decoration: none;
}
#iamem-nav .nl svg { width:11px; height:11px; fill:none; stroke:#fff; stroke-width:2.5; transition: transform .22s; flex-shrink:0; }
#iamem-nav .ni.open > .nl,
#iamem-nav .nl:hover {
  color: #fff;
  border-bottom-color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.1);
}
#iamem-nav .ni.open > .nl svg { transform: rotate(180deg); }

/* ── CTA button ──────────────────────────────────────── */
#iamem-nav .nav-cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  padding-left: 14px;
}
#iamem-nav .nav-cta a {
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.5);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
#iamem-nav .nav-cta a:hover { background: rgba(255,255,255,.28); }

/* ── Hamburger button (hidden on desktop) ────────────── */
#iamem-hamburger {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 4px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  position: relative;
  z-index: 10002;              /* above overlay (10000) and drawer (10001) */
}
#iamem-hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
#iamem-hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
#iamem-hamburger.open span:nth-child(2) { opacity: 0; }
#iamem-hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ── Desktop mega panel ──────────────────────────────── */
#iamem-nav .mega {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 3px solid #0e82d3;
  box-shadow: 0 16px 48px rgba(0,0,0,.14);
  z-index: 9998;
  animation: imFadeDown .18s ease;
}
@keyframes imFadeDown {
  from { opacity:0; transform:translateY(-8px); }
  to   { opacity:1; transform:translateY(0); }
}
#iamem-nav .ni.open .mega { display: block; }

.im-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 32px 18px;
  display: grid;
  gap: 0;
}
.im-section {
  font-size: 10px; font-weight: 900; text-transform: uppercase;
  letter-spacing: 1.4px; color: #0e82d3;
  padding: 0 0 10px;
  border-bottom: 1px solid #e8edf5;
  margin-bottom: 12px;
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 8px;
}
.im-section::after { content:''; flex:1; height:1px; background:#e8edf5; }
.im-grid { display: grid; gap: 4px; }
.im-grid.c2 { grid-template-columns: repeat(2,1fr); }
.im-grid.c3 { grid-template-columns: repeat(3,1fr); }
.im-grid.c4 { grid-template-columns: repeat(4,1fr); }
.im-item {
  display:flex; align-items:flex-start; gap:12px;
  padding:11px 13px; border-radius:10px;
  cursor:pointer; text-decoration:none;
  transition: background .15s, transform .15s;
}
.im-item:hover { background:#f3f7ff; transform:translateX(3px); }
.im-ico {
  width:38px; height:38px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  font-size:17px; flex-shrink:0;
}
.ic-t { background:#e1f5ee; color:#0a7a5a; }
.ic-b { background:#e6f1fb; color:#185fa5; }
.ic-p { background:#eeedfe; color:#534ab7; }
.ic-a { background:#faeeda; color:#854f0b; }
.ic-c { background:#faece7; color:#993c1d; }
.ic-g { background:#f0fdf4; color:#15803d; }
.ic-n { background:#eef2ff; color:#3730a3; }
.im-title { font-size:13.5px; font-weight:800; color:#0a1a3b; line-height:1.3; margin-bottom:2px; }
.im-desc  { font-size:11.5px; color:#888; font-weight:600; line-height:1.4; }
.im-footer {
  border-top:1px solid #f0f4f8; margin-top:16px; padding-top:14px;
  grid-column: 1/-1;
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px;
}
.im-fl {
  font-size:12px; font-weight:800; color:#0e82d3;
  text-decoration:none; display:flex; align-items:center; gap:5px; transition:gap .18s;
}
.im-fl:hover { gap:9px; }
.im-badges { display:flex; gap:8px; flex-wrap:wrap; }
.im-badge { font-size:10px; font-weight:800; padding:3px 10px; border-radius:20px; }
.bd-g { background:#e1f5ee; color:#0a7a5a; }
.bd-b { background:#e6f1fb; color:#185fa5; }
.bd-a { background:#faeeda; color:#854f0b; }
.im-hero-card {
  background: linear-gradient(135deg,#e1f5ee,#e6f1fb);
  border-radius:12px; padding:16px 18px;
  display:flex; align-items:center; gap:14px;
  grid-column: 1/-1; margin-bottom:16px;
}
.im-hero-title { font-size:14px; font-weight:900; color:#0a1a3b; margin-bottom:3px; }
.im-hero-sub   { font-size:12px; color:#555; font-weight:600; }

/* ═══════════════════════════════════════════════════════
   MOBILE DRAWER (< 1024 px)
   ═══════════════════════════════════════════════════════ */
#iamem-mobile-nav {
  display: none; /* shown only on mobile */
  position: fixed;
  top: 0; left: 0;
  width: min(340px, 100vw);
  height: 100dvh;
  height: 100vh; /* fallback */
  background: #fff;
  z-index: 10001;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  box-shadow: 4px 0 32px rgba(0,0,0,.18);
}
#iamem-mobile-nav.open { transform: translateX(0); }

/* Mobile overlay backdrop */
#iamem-mob-overlay {
  display: block;              /* always in DOM */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;        /* KEY FIX: never intercept clicks when invisible */
  visibility: hidden;
  transition: opacity .28s, visibility .28s;
}
#iamem-mob-overlay.open {
  opacity: 1;
  pointer-events: auto;        /* capture clicks only when open */
  visibility: visible;
}

/* Mobile drawer header */
.imm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(90deg, #00d264 0%, #0e82d3 100%);
  position: sticky;
  top: 0;
  z-index: 1;
}
.imm-head-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.imm-head-logo img { height: 30px; width: auto; }
.imm-head-logo span { font-size: 14px; font-weight: 900; color: #fff; letter-spacing: .3px; }
.imm-close {
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.4);
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.imm-close:hover { background: rgba(255,255,255,.28); }

/* Mobile nav body */
.imm-body { padding: 8px 0 80px; }

/* Plain links (Home) */
.imm-plain {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #0a1a3b;
  text-decoration: none;
  border-bottom: 1px solid #f0f4f8;
  transition: background .15s;
}
.imm-plain:hover { background: #f8faff; }

/* Accordion sections */
.imm-acc { border-bottom: 1px solid #f0f4f8; }
.imm-acc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #0a1a3b;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.imm-acc-toggle:hover { background: #f8faff; }
.imm-acc-toggle .imm-arr {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #e8edf5;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  color: #0e82d3;
  font-weight: 900;
  transition: transform .22s, background .15s;
  flex-shrink: 0;
}
.imm-acc.open .imm-acc-toggle { background: #f0f8ff; color: #0e82d3; }
.imm-acc.open .imm-arr { transform: rotate(180deg); background: #0e82d3; color: #fff; }

/* Accordion content */
.imm-acc-body {
  display: none;
  background: #fafbff;
  padding: 6px 0 10px;
}
.imm-acc.open .imm-acc-body { display: block; }

/* Section label inside accordion */
.imm-sub-label {
  font-size: 9.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: #0e82d3;
  padding: 12px 20px 6px;
}

/* Sub-links inside accordion */
.imm-sub-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  text-decoration: none;
  transition: background .15s;
}
.imm-sub-link:hover { background: #edf3ff; }
.imm-sub-ico {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.imm-sub-title { font-size: 13.5px; font-weight: 700; color: #0a1a3b; line-height: 1.3; }
.imm-sub-desc  { font-size: 11px; color: #888; font-weight: 600; line-height: 1.3; }

/* CTA at bottom of drawer */
.imm-cta-wrap {
  padding: 16px 20px;
  margin-top: 4px;
}
.imm-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(90deg,#00d264,#0e82d3);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  padding: 14px 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity .2s;
}
.imm-cta-btn:hover { opacity: .9; }

/* ── Responsive breakpoints ──────────────────────────── */
@media (max-width: 1023px) {
  /* Hide desktop nav items and CTA */
  #iamem-nav .ni,
  #iamem-nav .nav-cta { display: none !important; }
  /* Show hamburger */
  #iamem-hamburger { display: flex; }
  /* Reduce nav padding on mobile */
  #iamem-nav .nav-inner { padding: 0 16px; }
  /* Mobile drawer becomes visible (overlay is always in DOM) */
  #iamem-mobile-nav { display: block; }
}
@media (max-width: 1023px) {
  body.admin-bar #iamem-mobile-nav { padding-top: 0; }
}
/* Prevent body scroll when mobile menu is open */
body.iamem-mob-open {
  overflow: hidden;
  width: 100%;
}

/* === END IAMEM Custom Nav === */
