/* Homepage: growth & digital infrastructure (sections/growthGrid.blade.php).
   Live CSS scenes; loops run only while the section has .is-live. Text >= 13px. */
.hg-section { position: relative; padding: 90px 0; background: linear-gradient(180deg, #f7f9ff, #fff 60%); color: #10155c; direction: rtl; text-align: right; overflow: hidden; }
.hg-section *, .hg-section *::before, .hg-section *::after { box-sizing: border-box; }
.hg-section:not(.is-live) *, .hg-section:not(.is-live) *::before, .hg-section:not(.is-live) *::after { animation-play-state: paused !important; }
.hg-head { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.hg-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; margin-bottom: 16px; border-radius: 30px; background: #ffe9ea; color: #d23a42; font-size: 13px; font-weight: 600; }
.hg-section h2 { margin: 0 0 14px; color: #10155c; font-size: clamp(26px, 2.5vw, 38px); font-weight: 800; line-height: 1.6; letter-spacing: -.5px; }
.hg-section h2 span { color: #7057e8; }
.hg-head p { margin: 0; color: #6f7693; font-size: 15px; line-height: 2.05; }

.hg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.hg-card { --t: #7057e8; --w: #f1eeff; display: flex; flex-direction: column; min-width: 0; padding: 16px; border-radius: 24px; background: #fff; border: 1px solid #eceff8; box-shadow: 0 24px 50px -34px #5b6fb099; }
.hg-card--ads { --t: #f45158; --w: #fff1f2; }
.hg-card--seo { --t: #7057e8; --w: #f3f0ff; }
.hg-card--infra { --t: #d9a90c; --w: #fff8e3; grid-column: 1 / -1; }
.hg-body { display: flex; flex-direction: column; align-items: flex-start; padding: 22px 12px 6px; }
.hg-card-badge { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px; padding: 5px 13px; border-radius: 30px; background: var(--w); color: var(--t); font-size: 13px; font-weight: 700; }
.hg-section .hg-body h3 { margin: 0 0 10px; color: #10155c; font-size: clamp(19px, 1.6vw, 23px); font-weight: 800; line-height: 1.7; }
.hg-body p { margin: 0 0 14px; color: #6f7693; font-size: 14px; line-height: 2.05; }
.hg-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: auto; color: var(--t); font-size: 14px; font-weight: 700; text-decoration: none; }
.hg-link:hover { color: #10155c; text-decoration: none; }
.hg-link i { transition: transform .2s; }
.hg-link:hover i { transform: translateX(-3px); }
.hg-section a:focus-visible { outline: 3px solid #8b78ee; outline-offset: 3px; border-radius: 10px; }

/* Shared scene parts */
.hg-scene { position: relative; overflow: hidden; border-radius: 18px; background: linear-gradient(135deg, var(--w), #fff 80%); border: 1px solid #f0f2f9; }
.hg-ads, .hg-seo { height: 274px; padding: 18px; }
.hg-search { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; margin-bottom: 14px; border-radius: 30px; background: #fff; box-shadow: 0 8px 20px -14px #3b4f9a66; color: #4b5476; font-size: 14px; }
.hg-search b { color: #9aa1c4; }
.hg-result { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; margin-bottom: 10px; border-radius: 14px; background: #fff; border: 1px solid #eef1f8; }
.hg-result i { display: block; width: 90%; height: 8px; border-radius: 6px; background: #e4e7f2; }
.hg-result i.hg-short { width: 60%; }
.hg-r-url { color: #2c8a45; font-size: 13px; font-weight: 600; direction: ltr; text-align: right; }
.hg-r-url--muted { color: #8a90ad; }
.hg-result--ad { flex-direction: column; }
.hg-result--ad strong { color: #1a3fd1; font-size: 14px; font-weight: 700; line-height: 1.7; }
.hg-ad-tag { position: absolute; top: 12px; left: 14px; padding: 0 8px; border-radius: 6px; background: #10155c; color: #fff; font-size: 13px; font-weight: 700; line-height: 1.7; }

/* Ads: cursor clicks the sponsored result, a click pops up */
.hg-cursor { position: absolute; z-index: 3; top: 82%; left: 18%; color: #10155c; font-size: 22px; filter: drop-shadow(0 2px 3px #0004); animation: hg-cursor 6s ease-in-out infinite; }
.hg-result--ad { animation: hg-adhit 6s ease-in-out infinite; }
.hg-pop { position: absolute; z-index: 3; top: 40%; left: 30%; padding: 4px 12px; border-radius: 30px; background: #f45158; color: #fff; font-size: 14px; font-weight: 800; opacity: 0; animation: hg-pop 6s ease-out infinite; }
@keyframes hg-cursor { 0% { top: 88%; left: 12%; } 38% { top: 44%; left: 46%; } 44% { top: 44%; left: 46%; transform: scale(.82); } 50%, 82% { top: 44%; left: 46%; transform: none; } 100% { top: 88%; left: 12%; } }
@keyframes hg-adhit { 0%, 42%, 90%, 100% { box-shadow: none; border-color: #eef1f8; } 46%, 80% { box-shadow: 0 0 0 2px #f45158, 0 14px 26px -16px #f45158aa; border-color: transparent; } }
@keyframes hg-pop { 0%, 46% { opacity: 0; transform: translateY(10px) scale(.8); } 52% { opacity: 1; transform: translateY(0) scale(1.08); } 70% { opacity: 1; transform: translateY(-14px); } 82%, 100% { opacity: 0; transform: translateY(-26px); } }

/* Live Google Ads rates (real data) */
.hg-rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; width: 100%; margin-bottom: 6px; }
.hg-rate { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 8px; padding: 10px 12px; border-radius: 14px; background: #fff7f7; border: 1px solid #ffe0e2; }
.hg-rate-live { position: absolute; top: 10px; left: 10px; width: 8px; height: 8px; border-radius: 50%; background: #42d3a1; box-shadow: 0 0 0 0 #42d3a180; animation: hg-live 2s infinite; }
.hg-rate-sym { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #fff; color: #f45158; font-size: 15px; font-weight: 800; }
.hg-rate-label { color: #6f7693; font-size: 13px; }
.hg-rate strong { color: #10155c; font-size: 15px; font-weight: 800; }
.hg-rate strong small { color: #6f7693; font-size: 13px; font-weight: 500; }
.hg-rate em { grid-column: 2; color: #9aa1bd; font-size: 13px; font-style: normal; }
@keyframes hg-live { 70% { box-shadow: 0 0 0 7px #42d3a100; } 100% { box-shadow: 0 0 0 0 #42d3a100; } }

/* SEO: yourbrand climbs from 4th to 1st */
.hg-serp { position: relative; height: 176px; margin: 0; padding: 0; list-style: none; }
.hg-serp li { position: absolute; right: 0; left: 0; display: flex; align-items: center; gap: 10px; height: 38px; margin: 0; padding: 0 12px; border-radius: 12px; background: #fff; border: 1px solid #eef1f8; }
.hg-serp li i { flex: 1; height: 8px; border-radius: 6px; background: #e4e7f2; }
.hg-pos { display: grid; place-items: center; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: #e7eaf4; color: #6f7693; font-size: 13px; font-weight: 700; }
.hg-serp-a { top: 0; animation: hg-down1 7s ease-in-out infinite; }
.hg-serp-b { top: 46px; animation: hg-down2 7s ease-in-out infinite; }
.hg-serp-c { top: 92px; animation: hg-down3 7s ease-in-out infinite; }
.hg-serp-us { top: 138px; z-index: 2; border-color: #d9d2ff !important; background: #f6f3ff !important; animation: hg-up 7s ease-in-out infinite; }
.hg-serp-us .hg-r-url { flex: 1; color: #5a43d6; font-size: 14px; font-weight: 800; }
.hg-pos--us { position: relative; border-radius: 8px; background: #7057e8; color: #fff; overflow: hidden; }
.hg-pos--us em { position: absolute; font-style: normal; }
.hg-pos--us em:first-child { animation: hg-numa 7s infinite; }
.hg-pos--us em:last-child { opacity: 0; animation: hg-numb 7s infinite; }
.hg-rank1 { padding: 2px 10px; border-radius: 20px; background: #f2c21a; color: #10155c; font-size: 13px; font-weight: 800; opacity: 0; animation: hg-badge 7s infinite; }
.hg-trend { position: absolute; left: 18px; top: 22px; width: 90px; height: 30px; }
.hg-trend path { stroke-dasharray: 100; stroke-dashoffset: 100; animation: hg-draw 7s ease-out infinite; }
@keyframes hg-up { 0%, 25% { top: 138px; } 50%, 88% { top: 0; } 100% { top: 138px; } }
@keyframes hg-down1 { 0%, 25% { top: 0; } 50%, 88% { top: 46px; } 100% { top: 0; } }
@keyframes hg-down2 { 0%, 25% { top: 46px; } 50%, 88% { top: 92px; } 100% { top: 46px; } }
@keyframes hg-down3 { 0%, 25% { top: 92px; } 50%, 88% { top: 138px; } 100% { top: 92px; } }
@keyframes hg-numa { 0%, 42% { opacity: 1; } 46%, 92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes hg-numb { 0%, 42% { opacity: 0; } 46%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hg-badge { 0%, 52% { opacity: 0; transform: scale(.6); } 58%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes hg-draw { 0%, 20% { stroke-dashoffset: 100; } 60%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 100; } }

/* Infrastructure: domain search + servers */
.hg-infra-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.hg-card--infra .hg-body { padding-bottom: 12px; }
.hg-infra { padding: 22px; }
.hg-domain { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; margin-bottom: 16px; border-radius: 14px; background: #fff; box-shadow: 0 10px 24px -16px #3b4f9a66; direction: ltr; }
.hg-domain > b { color: #d9a90c; font-size: 18px; }
.hg-type { display: inline-block; overflow: hidden; width: 0; white-space: nowrap; color: #10155c; font-family: Consolas, 'Courier New', monospace; font-size: 15px; font-weight: 700; border-right: 2px solid #10155c; animation: hg-type 6s steps(12) infinite; }
.hg-free { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 3px 10px; border-radius: 20px; background: #e3f8ef; color: #12806a; font-size: 13px; font-style: normal; font-weight: 700; direction: rtl; opacity: 0; animation: hg-free 6s infinite; }
@keyframes hg-type { 0% { width: 0; } 35%, 90% { width: 12.2ch; } 100% { width: 0; } }
@keyframes hg-free { 0%, 38% { opacity: 0; transform: translateX(-6px); } 44%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.hg-servers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hg-server { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 10px; padding: 14px; border-radius: 16px; background: #10155c; color: #fff; }
.hg-server strong { font-size: 14px; font-weight: 700; }
.hg-flag { display: flex; flex-direction: column; width: 26px; height: 18px; overflow: hidden; border-radius: 4px; }
.hg-flag i { flex: 1; }
.hg-flag--ir i:nth-child(1) { background: #239f40; } .hg-flag--ir i:nth-child(2) { background: #fff; } .hg-flag--ir i:nth-child(3) { background: #da0000; }
.hg-flag--de i:nth-child(1) { background: #000; } .hg-flag--de i:nth-child(2) { background: #dd0000; } .hg-flag--de i:nth-child(3) { background: #ffce00; }
.hg-rack { grid-column: 1 / -1; display: grid; gap: 5px; }
.hg-rack i { position: relative; height: 12px; border-radius: 4px; background: #ffffff1c; }
.hg-rack i::after { content: ''; position: absolute; top: 3px; left: 6px; width: 6px; height: 6px; border-radius: 50%; background: #42d3a1; animation: hg-led 1.6s steps(2) infinite; }
.hg-rack i:nth-child(2)::after { animation-delay: -.5s; background: #f2c21a; }
.hg-rack i:nth-child(3)::after { animation-delay: -1s; }
.hg-status { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 6px; color: #9ff0cf; font-size: 13px; font-weight: 600; }
.hg-status i { width: 8px; height: 8px; border-radius: 50%; background: #42d3a1; animation: hg-live 2s infinite; }
@keyframes hg-led { 50% { opacity: .25; } }

/* Hosting links */
.hg-hosting { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.hg-hosting li { margin: 0; }
.hg-host { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px; border-radius: 16px; background: #fffbef; border: 1px solid #f6ead0; color: #6f7693; font-size: 13px; line-height: 1.8; text-decoration: none; transition: transform .2s, border-color .2s, box-shadow .2s; }
.hg-host:hover { transform: translateY(-3px); border-color: #f2c21a; box-shadow: 0 14px 26px -18px #d9a90caa; color: #6f7693; text-decoration: none; }
.hg-host strong { color: #10155c; font-size: 14px; font-weight: 700; }
.hg-host-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 4px; border-radius: 12px; background: #fff; color: #d9a90c; font-size: 18px; }
.hg-host--wordpress .hg-host-icon { color: #21759b; }
.hg-host--linux .hg-host-icon { color: #10155c; }
.hg-host--email .hg-host-icon { color: #f45158; }
.hg-host--vps .hg-host-icon { color: #7057e8; }

@media (max-width: 1199px) {
    .hg-hosting { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .hg-section { padding: 64px 0; }
    .hg-grid { grid-template-columns: minmax(0, 1fr); }
    .hg-infra-top { grid-template-columns: minmax(0, 1fr); }
    .hg-infra { order: -1; }
}
@media (max-width: 575px) {
    .hg-section { padding: 48px 0; }
    .hg-section h2 { font-size: 25px; }
    .hg-head { margin-bottom: 28px; }
    .hg-head p { font-size: 14px; }
    .hg-card { padding: 12px; border-radius: 20px; }
    .hg-body { padding: 18px 6px 4px; }
    .hg-ads, .hg-seo { height: 266px; padding: 14px; }
    .hg-trend { display: none; }
    .hg-hosting { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hg-hosting li:last-child { grid-column: 1 / -1; }
    .hg-infra { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .hg-section *, .hg-section *::before, .hg-section *::after { animation: none !important; transition: none !important; }
    .hg-serp-us { top: 0; } .hg-serp-a { top: 46px; } .hg-serp-b { top: 92px; } .hg-serp-c { top: 138px; }
    .hg-pos--us em:first-child { opacity: 0; } .hg-pos--us em:last-child, .hg-rank1, .hg-free { opacity: 1; }
    .hg-type { width: 12.2ch; }
    .hg-trend path { stroke-dashoffset: 0; }
}
