/*
Theme Name: WPPlugi Pro V3
Theme URI: https://wpplugi.com/
Author: WPPlugi
Description: Modern WordPress block theme for WPPlugi.com with fixed light CTA/footer, flexible cards, Speed Test showcase and clean content pages.
Version: 3.0.5
Requires at least: 6.1
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: wpplugi-pro-v3
*/

:root {
  --wpplugi-dark: #07111f;
  --wpplugi-text: #132033;
  --wpplugi-muted: #5b6b82;
  --wpplugi-blue: #0077ff;
  --wpplugi-green: #18c67a;
  --wpplugi-light: #f6f9fc;
  --wpplugi-border: #e0e8f2;
  --wpplugi-shadow: 0 20px 55px rgba(7, 17, 31, 0.09);
}

html { scroll-behavior: smooth; }
body { background: #ffffff; color: var(--wpplugi-text); }
.wp-site-blocks { overflow-x: hidden; }

/* Header fix: remove the pale strip, but keep the mint/green brand background. */
.wp-site-blocks > header.wpplugi-header {
  margin-top: 0 !important;
  padding-top: 0 !important;
  background: #ffffff !important;
}

.wpplugi-header {
  min-height: 74px !important;
  box-shadow: 0 1px 0 rgba(24, 198, 122, 0.18);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: none;
}
.admin-bar .wpplugi-header { top: 32px; }
.wpplugi-header-inner { min-height: 50px; }

.wpplugi-header .custom-logo,
.wpplugi-header .wp-block-site-logo img {
  width: auto !important;
  max-width: 230px !important;
  max-height: 58px !important;
  object-fit: contain !important;
  display: block;
}
.wpplugi-header .wp-block-navigation a { text-decoration: none; }

.wpplugi-hero { position: relative; isolation: isolate; }
.wpplugi-hero:before {
  content: "";
  position: absolute;
  inset: -120px -20% auto -20%;
  height: 440px;
  background:
    radial-gradient(circle at 35% 30%, rgba(0,119,255,.22), transparent 36%),
    radial-gradient(circle at 65% 28%, rgba(24,198,122,.22), transparent 34%);
  filter: blur(20px);
  z-index: -1;
}

.wpplugi-products-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 24px;
}


/* Product grid fix: WordPress block spacing can add top margin to every card after the first one.
   Reset child margins so all cards start on the same horizontal line. */
.wpplugi-products-grid {
  align-items: stretch;
}
.wpplugi-products-grid > * {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
}

.wpplugi-card,
.wpplugi-feature-card,
.wpplugi-light-cta,
.wpplugi-footer {
  background: #ffffff;
  border: 1px solid var(--wpplugi-border);
  border-radius: 24px;
  box-shadow: 0 1px 0 rgba(224,232,242,.9);
}

.wpplugi-card,
.wpplugi-feature-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  height: 100%;
}
.wpplugi-card:hover,
.wpplugi-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--wpplugi-shadow);
  border-color: rgba(0,119,255,.25) !important;
}

.wpplugi-product-link a { font-weight: 800; text-decoration: none; }

.wpplugi-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--wpplugi-border);
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  color: var(--wpplugi-muted);
  font-size: 13px;
  font-weight: 800;
}

.wpplugi-benefit {
  border: 1px solid var(--wpplugi-border);
  border-radius: 999px;
  padding: 10px 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(7,17,31,.04);
  font-weight: 700;
}

.wpplugi-fake-browser {
  background: linear-gradient(180deg, #ffffff, #f9fbfe);
  border: 1px solid var(--wpplugi-border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(7,17,31,.08);
}
.wpplugi-browser-bar {
  background: #f1f5f9;
  border-bottom: 1px solid var(--wpplugi-border);
  padding: 12px 16px;
  color: #7b8aa0;
  font-size: 13px;
}
.wpplugi-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.wpplugi-score {
  border: 1px solid var(--wpplugi-border);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
}
.wpplugi-score strong {
  font-size: 38px;
  line-height: 1;
  color: var(--wpplugi-dark);
}
.wpplugi-meter {
  height: 8px;
  background: #e8eef6;
  border-radius: 999px;
  overflow: hidden;
}
.wpplugi-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--wpplugi-blue), var(--wpplugi-green));
}

.wpplugi-content-card {
  background: #ffffff;
  border: 1px solid var(--wpplugi-border);
  border-radius: 26px;
  box-shadow: var(--wpplugi-shadow);
}
.wpplugi-content-card > *:first-child { margin-top: 0; }
.wpplugi-content-card > *:last-child { margin-bottom: 0; }

.wpplugi-page-hero { position: relative; isolation: isolate; }
.wpplugi-page-hero:before {
  content: "";
  position: absolute;
  inset: -80px 0 0 0;
  background:
    radial-gradient(circle at 40% 10%, rgba(0,119,255,.18), transparent 38%),
    radial-gradient(circle at 60% 0%, rgba(24,198,122,.16), transparent 32%);
  z-index: -1;
}

/* Fixed lower section: no dark text on dark background */
.wpplugi-light-cta {
  background:
    radial-gradient(circle at 8% 10%, rgba(0,119,255,.10), transparent 32%),
    radial-gradient(circle at 92% 18%, rgba(24,198,122,.12), transparent 34%),
    #ffffff !important;
  color: var(--wpplugi-text) !important;
  box-shadow: var(--wpplugi-shadow);
}
.wpplugi-light-cta h1,
.wpplugi-light-cta h2,
.wpplugi-light-cta h3,
.wpplugi-light-cta p {
  color: inherit !important;
}
.wpplugi-light-cta .wpplugi-muted {
  color: var(--wpplugi-muted) !important;
}

.wpplugi-footer-wrap {
  background: #f6f9fc !important;
  color: var(--wpplugi-text) !important;
}
.wpplugi-footer {
  color: var(--wpplugi-text) !important;
}
.wpplugi-footer h1,
.wpplugi-footer h2,
.wpplugi-footer h3,
.wpplugi-footer p,
.wpplugi-footer a {
  color: var(--wpplugi-text) !important;
}
.wpplugi-footer .wpplugi-footer-muted {
  color: var(--wpplugi-muted) !important;
}
.wpplugi-footer .wp-block-navigation a {
  color: var(--wpplugi-text) !important;
}

@media (max-width: 782px) {
  .admin-bar .wpplugi-header { top: 46px; }
  .wpplugi-header { position: relative; top: auto; min-height: auto !important; }
  .wpplugi-header-inner { flex-direction: column; align-items: flex-start !important; gap: 14px !important; }
  .wpplugi-header .custom-logo,
  .wpplugi-header .wp-block-site-logo img { max-width: 200px !important; max-height: 54px !important; }
  .wpplugi-hero-title { font-size: 42px !important; }
  .wpplugi-page-title { font-size: 42px !important; }
  .wpplugi-score-grid { grid-template-columns: 1fr; }
}


/* Brand-green top area fix v3.0.3
   Keeps the logo-like mint/green colour while removing the separate light strip. */
html,
body {
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
}

body .wp-site-blocks,
body .wp-site-blocks > *:first-child,
body .wp-site-blocks > header:first-child,
body .wp-site-blocks > .wp-block-template-part:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.wp-site-blocks > * + * {
  margin-block-start: 0 !important;
}

header.wpplugi-header,
.wpplugi-header,
.wp-block-template-part .wpplugi-header {
  margin-top: 0 !important;
  padding-top: 0 !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.wpplugi-hero,
.wpplugi-page-hero {
  margin-top: 0 !important;
  background:
    radial-gradient(circle at 24% 0%, rgba(24,198,122,.24), transparent 34%),
    radial-gradient(circle at 76% 0%, rgba(0,119,255,.10), transparent 34%),
    linear-gradient(180deg, #e2fbf1 0%, #f6f9fc 72%) !important;
}

.wpplugi-hero::before,
.wpplugi-page-hero::before {
  content: none !important;
  display: none !important;
}


/* Final header + card alignment fix v3.0.5 */
html,
body {
  background: #ffffff !important;
}

.wp-site-blocks > header.wpplugi-header,
header.wpplugi-header,
.wpplugi-header,
.wp-block-template-part .wpplugi-header {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-bottom: 1px solid rgba(224,232,242,.95) !important;
  box-shadow: 0 1px 0 rgba(224,232,242,.75) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.wpplugi-hero,
.wpplugi-page-hero {
  background:
    radial-gradient(circle at 24% 0%, rgba(24,198,122,.24), transparent 34%),
    radial-gradient(circle at 76% 0%, rgba(0,119,255,.10), transparent 34%),
    linear-gradient(180deg, #ecfff7 0%, #f6f9fc 72%) !important;
}

.wpplugi-products-grid,
.wpplugi-products-grid.wp-block-group,
.wpplugi-products-grid.is-layout-constrained,
.wpplugi-products-grid.is-layout-flow {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)) !important;
  grid-auto-rows: 1fr !important;
  align-items: stretch !important;
  gap: 24px !important;
}

.wpplugi-products-grid > *,
.wpplugi-products-grid > .wp-block-group,
.wpplugi-products-grid > .wpplugi-card,
.wpplugi-products-grid > .wp-block-group.wpplugi-card,
.wpplugi-products-grid.is-layout-constrained > * + *,
.wpplugi-products-grid.is-layout-flow > * + * {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
  align-self: stretch !important;
  position: relative !important;
  top: auto !important;
}

.wpplugi-products-grid > .wpplugi-card {
  display: flex !important;
  flex-direction: column !important;
}

.wpplugi-products-grid > .wpplugi-card > *:first-child {
  margin-top: 0 !important;
}
