/* =========================================================================
   Web Gurus India Blog — brand layer over Twenty Twenty-Five.
   Mirrors webgurusindia.in: header nav, 4-column footer, WhatsApp + AI chat,
   Plus Jakarta Sans + Space Grotesk, brand blue/orange.
   ========================================================================= */

:root {
  --wgi-primary: #1e40af;
  --wgi-primary-bright: #1d4ed8;
  --wgi-primary-deep: #16308f;
  --wgi-secondary: #ea6a17;
  --wgi-secondary-bright: #f97316;
  --wgi-fg: #0f172a;
  --wgi-muted-fg: #5b6878;
  --wgi-border: #e3e8f0;
  --wgi-muted: #f1f5f9;
  --wgi-accent: #eef2fb;
  --wgi-shadow-soft: 0 1px 2px hsl(220 50% 18% / 0.06), 0 8px 24px -8px hsl(220 50% 18% / 0.12);
  --wgi-shadow-card: 0 1px 2px hsl(220 50% 18% / 0.05), 0 16px 40px -16px hsl(220 50% 18% / 0.18);
  --wgi-shadow-lift: 0 2px 4px hsl(220 50% 18% / 0.06), 0 28px 60px -24px hsl(220 50% 18% / 0.28);
  --wgi-shell: 1280px;
}

/* The hidden attribute must always win (the block theme sets svg{display:block}). */
[hidden] { display: none !important; }

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; color: var(--wgi-fg); }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: color-mix(in srgb, var(--wgi-primary) 22%, transparent); color: var(--wgi-fg); }
:focus-visible { outline: 2px solid var(--wgi-primary); outline-offset: 2px; }
.wgi-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.wgi-shell {
  width: 100%;
  max-width: var(--wgi-shell);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
  box-sizing: border-box;
}

/* Shared CTA (orange gradient) */
.wgi-cta, .wgi-cta:visited {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--wgi-secondary) 0%, var(--wgi-secondary-bright) 100%);
  color: #fff !important; text-decoration: none !important; font-weight: 600;
  border-radius: 0.6rem; box-shadow: var(--wgi-shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}
.wgi-cta:hover { transform: translateY(-1px); box-shadow: var(--wgi-shadow-lift); color: #fff; }
.wgi-cta--sm { padding: 0.6rem 1.15rem; font-size: 0.9rem; }
.wgi-cta--xl { padding: 0.85rem 1.6rem; font-size: 1rem; }

/* =========================================================================
   HEADER
   ========================================================================= */
.wgi-site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--wgi-border);
}
.wgi-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; min-height: 64px; }
@media (min-width: 1024px) { .wgi-header__inner { min-height: 80px; } }

.wgi-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.wgi-logo img { width: auto; }
.wgi-logo img.wgi-logo--full { display: block; height: 52px; }
.wgi-logo img.wgi-logo--icon { display: none; height: 44px; }
@media (max-width: 639px) {
  .wgi-logo img.wgi-logo--full { display: none; }
  .wgi-logo img.wgi-logo--icon { display: block; }
}

/* Desktop nav */
.wgi-nav { display: none; align-items: center; gap: 0.15rem; }
@media (min-width: 1024px) { .wgi-nav { display: flex; } }
.wgi-nav > a, .wgi-services__trigger {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.9rem; font-weight: 500; color: var(--wgi-fg);
  text-decoration: none; padding: 0.5rem 0.9rem; border-radius: 0.5rem;
  background: none; border: 0; cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
}
.wgi-nav > a:hover, .wgi-services__trigger:hover { background: var(--wgi-accent); color: var(--wgi-primary); }
.wgi-nav > a.is-active, .wgi-nav a[aria-current="page"] { color: var(--wgi-primary); }

/* Services dropdown */
.wgi-services { position: relative; }
.wgi-chevron { transition: transform 0.2s ease; }
.wgi-services[data-open] .wgi-chevron { transform: rotate(180deg); }
.wgi-services__menu {
  position: absolute; left: 0; top: 100%; padding-top: 0.5rem;
  opacity: 0; visibility: hidden; transform: translateY(-0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.wgi-services[data-open] .wgi-services__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.wgi-services__card {
  width: 20rem; background: #fff; border: 1px solid var(--wgi-border);
  border-radius: 1rem; box-shadow: var(--wgi-shadow-lift); padding: 0.75rem;
  display: grid; gap: 0.15rem;
}
.wgi-services__card a {
  display: block; padding: 0.7rem 1rem; border-radius: 0.5rem;
  font-size: 0.9rem; color: var(--wgi-fg); text-decoration: none; transition: background 0.15s ease, color 0.15s ease;
}
.wgi-services__card a:hover { background: var(--wgi-accent); color: var(--wgi-primary); }
.wgi-services__all { font-weight: 600; }
.wgi-services__divider { display: block; height: 1px; background: var(--wgi-border); margin: 0.25rem 1rem; }

/* Header actions */
.wgi-header__actions { display: flex; align-items: center; gap: 0.75rem; }
.wgi-header__phone {
  display: none; align-items: center; gap: 0.4rem;
  font-size: 0.875rem; font-weight: 500; color: var(--wgi-primary); text-decoration: none;
  transition: color 0.15s ease;
}
.wgi-header__phone:hover { color: var(--wgi-primary-bright); }
@media (min-width: 640px) { .wgi-header__phone { display: inline-flex; } }
.wgi-cta--sm { display: none; }
@media (min-width: 1024px) { .wgi-cta--sm { display: inline-flex; } }

/* Burger */
.wgi-burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; border: 0; background: none; cursor: pointer; border-radius: 0.5rem;
}
@media (min-width: 1024px) { .wgi-burger { display: none; } }
.wgi-burger span { display: block; height: 2px; width: 22px; margin-inline: auto; background: var(--wgi-fg); border-radius: 2px; transition: 0.2s ease; }
.wgi-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.wgi-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.wgi-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.wgi-mobile {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--wgi-border); background: #fff;
  padding: 0.5rem clamp(1rem, 4vw, 2rem) 1.25rem;
}
.wgi-mobile[hidden] { display: none; }
@media (min-width: 1024px) { .wgi-mobile { display: none !important; } }
.wgi-mobile > a, .wgi-mobile__services {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 1rem; font-weight: 500; color: var(--wgi-fg);
  text-decoration: none; padding: 0.8rem 0.25rem; border-bottom: 1px solid var(--wgi-border);
  background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
}
.wgi-mobile > a.is-active { color: var(--wgi-primary); }
.wgi-mobile__services[aria-expanded="true"] .wgi-chevron { transform: rotate(180deg); }
.wgi-mobile__sub { display: flex; flex-direction: column; padding-left: 0.75rem; }
.wgi-mobile__sub[hidden] { display: none; }
.wgi-mobile__sub a { padding: 0.6rem 0.25rem; font-size: 0.9rem; color: var(--wgi-muted-fg); text-decoration: none; border-bottom: 1px solid var(--wgi-border); }
.wgi-mobile__cta { margin-top: 1rem; padding: 0.8rem 1.2rem; border-bottom: 0 !important; }

/* =========================================================================
   POST / PAGE CONTENT
   ========================================================================= */
.wp-block-post-title, .wp-block-query-title { letter-spacing: -0.025em; }
.wp-block-post-content { font-size: 1.125rem; line-height: 1.75; }
.wp-block-post-content > * { margin-block: 1.4em; }
.wp-block-post-content :where(h2, h3) { margin-top: 1.8em; }
.wp-block-post-content :where(img, .wp-block-image img) { border-radius: 0.9rem; box-shadow: var(--wgi-shadow-card); }
.wp-block-quote { border-left: 3px solid var(--wgi-secondary); padding-left: 1.25rem; font-style: normal; color: var(--wgi-muted-fg); }
.wp-block-post-content a, .entry-content a { color: var(--wgi-primary); text-underline-offset: 3px; }
.wp-block-post-content a:hover { color: var(--wgi-secondary); }
.wp-element-button, .wp-block-button__link {
  background: linear-gradient(135deg, var(--wgi-secondary) 0%, var(--wgi-secondary-bright) 100%) !important;
  color: #fff !important; font-weight: 600; border-radius: 0.6rem; box-shadow: var(--wgi-shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease; text-decoration: none;
}
.wp-element-button:hover, .wp-block-button__link:hover { transform: translateY(-1px); box-shadow: var(--wgi-shadow-lift); }
.wp-block-post-terms a, .wp-block-tag-cloud a {
  background: var(--wgi-accent); color: var(--wgi-primary) !important; padding: 0.2rem 0.6rem;
  border-radius: 0.4rem; text-decoration: none; font-size: 0.8rem; font-weight: 600;
}

/* =========================================================================
   CTA BANNER (above footer)
   ========================================================================= */
.wgi-cta-banner {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  background: linear-gradient(135deg, #0f172a 0%, var(--wgi-primary) 60%, var(--wgi-primary-deep) 130%);
}
.wgi-cta-banner::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 80% at 50% 120%, rgba(249,115,22,0.25), transparent 60%);
}
.wgi-cta-banner__inner { position: relative; padding-block: clamp(3rem, 6vw, 5rem); max-width: 720px; }
.wgi-eyebrow { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.wgi-eyebrow--dark { color: #fdba74; margin-bottom: 1rem; }
.wgi-cta-banner__title { font-family: "Space Grotesk", system-ui, sans-serif; font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 600; letter-spacing: -0.02em; color: #fff; margin: 0 0 1rem; }
.wgi-cta-banner__text { font-size: 1.05rem; line-height: 1.6; color: rgba(255,255,255,0.78); margin: 0 auto 2rem; max-width: 34rem; }
.wgi-cta-banner__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.wgi-btn-wa {
  display: inline-flex; align-items: center; gap: 0.5rem; background: #25d366; color: #052e16 !important;
  font-weight: 600; padding: 0.85rem 1.5rem; border-radius: 0.6rem; text-decoration: none;
  box-shadow: var(--wgi-shadow-card); transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.wgi-btn-wa:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: var(--wgi-shadow-lift); }
.wgi-cta-banner__reassure { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: center; margin: 1.75rem 0 0; padding: 0; font-size: 0.8rem; color: rgba(255,255,255,0.6); }
.wgi-cta-banner__reassure li::before { content: "✓ "; color: #fdba74; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.wgi-site-footer { background: var(--wgi-fg); color: rgba(255,255,255,0.7); }
.wgi-footer__grid {
  display: grid; gap: 3rem; padding-block: clamp(3rem, 5vw, 4rem);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .wgi-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .wgi-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 3rem; } }

.wgi-wordmark { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 1.35rem; letter-spacing: -0.02em; margin: 0 0 1rem; }
.wgi-wordmark .wm-strong { font-weight: 700; color: #fff; }
.wgi-wordmark .wm-light { font-weight: 300; color: rgba(255,255,255,0.6); }
.wgi-footer__tag { max-width: 38ch; font-size: 0.875rem; line-height: 1.6; color: rgba(255,255,255,0.6); margin: 0 0 1.5rem; }

.wgi-social { display: flex; gap: 0.75rem; }
.wgi-social a {
  display: flex; align-items: center; justify-content: center; height: 40px; width: 40px;
  border-radius: 0.6rem; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.wgi-social a:hover { transform: translateY(-2px); background: rgba(255,255,255,0.2); color: #fff; }

.wgi-news { margin-top: 1.5rem; }
.wgi-news__label { font-size: 0.875rem; font-weight: 500; color: #fff; margin: 0 0 0.6rem; }
.wgi-news__form { display: flex; gap: 0.5rem; max-width: 320px; }
.wgi-news__form input {
  flex: 1; min-width: 0; border-radius: 0.5rem; border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06); color: #fff; padding: 0.6rem 0.8rem; font-size: 0.9rem;
}
.wgi-news__form input::placeholder { color: rgba(255,255,255,0.4); }
.wgi-news__form input:focus { outline: 2px solid var(--wgi-secondary-bright); outline-offset: 1px; }
.wgi-news__form button {
  flex-shrink: 0; border: 0; cursor: pointer; border-radius: 0.5rem; padding: 0.6rem 1rem;
  background: var(--wgi-primary); color: #fff; font-weight: 600; font-size: 0.875rem; transition: background 0.15s ease;
}
.wgi-news__form button:hover { background: var(--wgi-primary-bright); }
.wgi-news__msg { font-size: 0.8rem; margin: 0.5rem 0 0; min-height: 1em; color: #86efac; }
.wgi-news__msg.is-error { color: #fca5a5; }

.wgi-footer__col h3 { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; margin: 0 0 1.1rem; }
.wgi-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.wgi-footer__col a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.875rem; transition: color 0.15s ease; }
.wgi-footer__col a:hover { color: #fff; }

.wgi-footer__contact li { display: flex; gap: 0.75rem; font-size: 0.875rem; align-items: flex-start; }
.wgi-footer__contact svg { flex-shrink: 0; color: var(--wgi-secondary-bright); margin-top: 1px; }
.wgi-footer__contact strong { display: block; color: #fff; font-weight: 500; margin-bottom: 0.15rem; }
.wgi-footer__contact span { color: rgba(255,255,255,0.7); }
.wgi-footer__contact a { color: rgba(255,255,255,0.7); text-decoration: none; }
.wgi-footer__contact a:hover { color: #fff; }

.wgi-footer__bar {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between; align-items: center;
  padding-block: 2rem; margin-top: 0; border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.875rem; color: rgba(255,255,255,0.4);
}
.wgi-footer__bar p { margin: 0; }
.wgi-footer__legal { display: flex; gap: 1.5rem; }
.wgi-footer__legal a { color: rgba(255,255,255,0.4); text-decoration: none; transition: color 0.15s ease; }
.wgi-footer__legal a:hover { color: #fff; }

/* =========================================================================
   FLOATING WIDGETS
   ========================================================================= */
.wgi-fabs { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; }
.wgi-fab {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 56px; width: 56px; border-radius: 50%; border: 0; cursor: pointer;
  box-shadow: var(--wgi-shadow-card); color: #fff; transition: transform 0.2s ease;
}
.wgi-fab:hover { transform: scale(1.05); }
.wgi-fab:active { transform: scale(0.95); }
.wgi-fab--wa { background: #25d366; text-decoration: none; }
.wgi-fab--chat { background: var(--wgi-primary); }
.wgi-fab--chat:hover { background: var(--wgi-primary-bright); }
.wgi-fab__ping { position: absolute; inset: 0; border-radius: 50%; background: #25d366; opacity: 0.3; }
.wgi-fab__ping--blue { background: var(--wgi-primary); }
@media (prefers-reduced-motion: no-preference) {
  .wgi-fab__ping { animation: wgi-ping 1.4s cubic-bezier(0,0,0.2,1) 3; }
}
@keyframes wgi-ping { 75%, 100% { transform: scale(1.8); opacity: 0; } }

/* Chat window */
.wgi-chat {
  position: fixed; right: 1.5rem; bottom: 6.25rem; z-index: 95;
  width: calc(100vw - 2rem); max-width: 360px; height: min(520px, calc(100dvh - 7rem));
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--wgi-border); border-radius: 1rem; box-shadow: var(--wgi-shadow-lift);
}
.wgi-chat[hidden] { display: none; }
.wgi-chat__head { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: var(--wgi-primary); color: #fff; flex-shrink: 0; }
.wgi-chat__avatar { display: flex; align-items: center; justify-content: center; height: 32px; width: 32px; border-radius: 50%; background: rgba(255,255,255,0.2); font-weight: 700; font-size: 0.85rem; }
.wgi-chat__avatar--lg { height: 56px; width: 56px; font-size: 1.5rem; background: var(--wgi-accent); color: var(--wgi-primary); }
.wgi-chat__id { flex: 1; min-width: 0; }
.wgi-chat__id p { margin: 0; font-size: 0.875rem; font-weight: 600; line-height: 1.2; }
.wgi-chat__status { font-size: 0.75rem !important; font-weight: 400 !important; color: rgba(255,255,255,0.7); }
.wgi-chat__min { border: 0; background: none; color: #fff; cursor: pointer; padding: 0.4rem; border-radius: 0.5rem; transition: background 0.15s ease; }
.wgi-chat__min:hover { background: rgba(255,255,255,0.2); }
.wgi-chat__body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.wgi-chat__intro { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; margin: auto 0; padding: 1rem 0; }
.wgi-chat__hi { font-size: 0.875rem; font-weight: 600; color: var(--wgi-fg); margin: 0.5rem 0 0; }
.wgi-chat__sub { font-size: 0.8rem; color: var(--wgi-muted-fg); margin: 0; }
.wgi-chat__suggest { display: flex; flex-direction: column; gap: 0.4rem; width: 100%; margin-top: 0.75rem; }
.wgi-chat__suggest button {
  font-size: 0.8rem; padding: 0.5rem 0.75rem; border-radius: 0.75rem; border: 1px solid var(--wgi-border);
  background: var(--wgi-muted); color: var(--wgi-fg); text-align: left; cursor: pointer; transition: background 0.15s ease;
}
.wgi-chat__suggest button:hover { background: #e7ebf1; }
.wgi-msg { max-width: 85%; padding: 0.55rem 0.85rem; border-radius: 1rem; font-size: 0.875rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.wgi-msg--user { align-self: flex-end; background: var(--wgi-primary); color: #fff; border-bottom-right-radius: 0.25rem; }
.wgi-msg--bot { align-self: flex-start; background: var(--wgi-muted); color: var(--wgi-fg); border-bottom-left-radius: 0.25rem; }
.wgi-msg--bot a { color: var(--wgi-primary); }
.wgi-chat__err { font-size: 0.8rem; color: #dc2626; text-align: center; }
.wgi-typing { display: inline-flex; gap: 3px; }
.wgi-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--wgi-muted-fg); opacity: 0.5; animation: wgi-bounce 1.2s infinite; }
.wgi-typing span:nth-child(2) { animation-delay: 0.15s; }
.wgi-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes wgi-bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }
.wgi-chat__foot { flex-shrink: 0; border-top: 1px solid var(--wgi-border); padding: 0.6rem 0.75rem 0.3rem; display: flex; gap: 0.5rem; align-items: flex-end; }
.wgi-chat__foot textarea {
  flex: 1; resize: none; border: 1px solid var(--wgi-border); border-radius: 0.75rem; background: var(--wgi-muted);
  padding: 0.5rem 0.75rem; font-size: 16px; line-height: 1.4; max-height: 6rem; min-height: 2.25rem;
  font-family: inherit; color: var(--wgi-fg);
}
@media (min-width: 640px) { .wgi-chat__foot textarea { font-size: 0.875rem; } }
.wgi-chat__foot textarea:focus { outline: none; border-color: var(--wgi-primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--wgi-primary) 25%, transparent); }
.wgi-chat__foot button[data-wgi-chat-send] {
  flex-shrink: 0; height: 36px; width: 36px; border: 0; border-radius: 0.75rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; background: var(--wgi-primary); color: #fff; transition: background 0.15s ease;
}
.wgi-chat__foot button[data-wgi-chat-send]:disabled { background: var(--wgi-muted); color: var(--wgi-muted-fg); cursor: not-allowed; }
.wgi-chat__powered { text-align: center; font-size: 10px; color: var(--wgi-muted-fg); margin: 0 0 0.5rem; }

@media (prefers-reduced-motion: reduce) {
  .wgi-cta, .wp-element-button, .wp-block-button__link, .wgi-nav a, .wgi-fab, .wgi-social a { transition: none; }
  .wgi-fab__ping { animation: none; opacity: 0; }
}
