/* CQG Mobile Home — mobile ONLY; existing desktop hero untouched */
.cqgmh { display:none !important; }
@media (max-width:767px) {
  html body .cqgmh[hidden] {display:none!important}
  html body .cqgmh:not([hidden]) { display:block !important; box-sizing:border-box; width:100%; max-width:100%; margin:14px auto 22px; padding:0 17px; position:relative; z-index:1; clear:both; }
  .cqgmh *, .cqgmh *::before, .cqgmh *::after {box-sizing:border-box}
  .cqgmh__card {position:relative; border:3px solid rgba(255,255,250,.94); background:#f9f5e9; border-radius:24px; overflow:hidden; isolation:isolate; box-shadow:0 9px 25px rgba(29,55,33,.13),0 2px 6px rgba(45,59,33,.07);will-change:auto;}
  .cqgmh__visual {position:absolute;inset:0;background-image:linear-gradient(180deg,rgba(13,43,26,.01) 5%,rgba(18,46,27,.06) 23%,rgba(12,38,22,.70) 64%,rgba(12,35,19,.94) 100%),var(--cqgmh-image);background-size:cover;background-position:center;transform:translateZ(0);}
  .cqgmh__body {position:relative;height:clamp(348px,99vw,405px);min-height:0;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-end;gap:7px;padding:14px 15px 15px;color:#fffaf1;text-shadow:0 1px 9px rgba(1,22,10,.25);}
  .cqgmh__eyebrow {align-self:flex-start; max-width:100%;font-size:9px!important;font-weight:700;letter-spacing:.025em;line-height:1.25;border:1px solid rgba(255,255,255,.48);padding:5px 9px;border-radius:99px;background:rgba(17,65,37,.31);color:white;}
  .cqgmh .cqgmh__heading {margin:1px 0 0!important;padding:0!important;font-size:clamp(23px,6.4vw,29px)!important;line-height:1.1!important;font-weight:700;color:#fffaf0!important;letter-spacing:-.015em;text-transform:none!important;text-shadow:0 2px 8px rgba(0,0,0,.16);}
  .cqgmh__description {margin:0!important;line-height:1.35;font-size:12px!important;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;color:#f3f3e9!important;max-width:37ch;}
  .cqgmh__actions {display:grid;grid-template-columns:1fr;gap:7px;margin-top:3px;}
  .cqgmh__button {min-height:39px;display:flex;align-items:center;justify-content:center;gap:8px;padding:8px 12px;text-align:center;text-decoration:none!important;border-radius:50px;font-size:12px!important;font-weight:700;line-height:1.2;white-space:normal;box-shadow:none;text-shadow:none;transition:background-color .18s ease,transform .18s ease;}
  .cqgmh__button:focus-visible {outline:3px solid #faf2ac;outline-offset:3px}
  .cqgmh__button--primary {background:#fbf7e8;color:#204d2d!important;border:1px solid #fbf7e8;}
  .cqgmh__button--secondary {background:rgba(12,55,32,.28);color:#fff!important;border:1px solid rgba(255,255,255,.85)}
  .cqgmh__button:active {transform:scale(.99)}
  html body .cqgmh-original-hero-hidden {display:none!important; height:0!important; min-height:0!important; margin:0!important; padding:0!important;}
}
@media (max-width:374px) {.cqgmh__body {height:348px;padding:12px 13px 13px;gap:6px}.cqgmh__eyebrow {font-size:8px!important}.cqgmh .cqgmh__heading{font-size:22px!important}.cqgmh__description{font-size:11px!important}}
@media (min-width:768px){.cqgmh{display:none!important}}
@media (prefers-reduced-motion:reduce){.cqgmh__button{transition:none}}

/* Subtle mobile animation. Only this card, not the desktop/tablet slider. */
@media (max-width:767px) and (prefers-reduced-motion:no-preference) {
  .cqgmh--entered .cqgmh__card { animation:cqgmh-card-in .72s cubic-bezier(.19,1,.28,1) both; }
  .cqgmh--entered .cqgmh__visual { animation:cqgmh-photo-breathe 16s ease-in-out infinite alternate; }
  .cqgmh--entered .cqgmh__eyebrow {animation:cqgmh-copy-in .62s .15s both;}
  .cqgmh--entered .cqgmh__heading {animation:cqgmh-copy-in .7s .24s both;}
  .cqgmh--entered .cqgmh__description {animation:cqgmh-copy-in .7s .34s both;}
  .cqgmh--entered .cqgmh__button--primary {animation:cqgmh-copy-in .65s .44s both;}
  .cqgmh--entered .cqgmh__button--secondary {animation:cqgmh-copy-in .65s .54s both;}
  .cqgmh__button {position:relative;overflow:hidden;isolation:isolate;transition:transform .22s ease,box-shadow .25s ease,background .25s ease!important;}
  .cqgmh__button::after {content:'';position:absolute;inset:-50% auto -50% -45%;width:30%;transform:translateX(-180%) rotate(23deg);background:linear-gradient(90deg,transparent,rgba(255,255,255,.25),transparent);pointer-events:none;z-index:0;animation:cqgmh-button-gleam 7s ease-in-out 2.4s infinite;}
  .cqgmh__button--secondary::after{animation-delay:3.45s;}
  .cqgmh__button:active {transform:scale(.975)!important;}
  .cqgmh__button--primary span {display:inline-block;transition:transform .25s ease;}
  .cqgmh__button--primary:hover span,.cqgmh__button--primary:focus-visible span{transform:translateX(4px);}
  .cqgmh__button:hover {transform:translateY(-2px);box-shadow:0 5px 14px rgba(4,24,12,.2);}
  @keyframes cqgmh-card-in{from{opacity:.35;transform:translateY(12px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
  @keyframes cqgmh-copy-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
  @keyframes cqgmh-photo-breathe{from{transform:scale(1.015) translate3d(0,0,0)}to{transform:scale(1.08) translate3d(-1%, -.8%,0)}}
  @keyframes cqgmh-button-gleam{0%,16%,100%{transform:translateX(-180%) rotate(23deg);opacity:0}20%{opacity:1}31%{transform:translateX(530%) rotate(23deg);opacity:0}}
}
@media (max-width:767px) and (prefers-reduced-motion:reduce) {
 .cqgmh,.cqgmh *,.cqgmh *::before,.cqgmh *::after{animation:none!important;transition:none!important;}
}

/* v1.0.4: botanical motion inspired by the original CQG Home Hero decorations.
   Fully isolated to the mobile replacement card. */
@media (max-width:767px) {
  html body .cqgmh:not([hidden]) {margin-top:13px!important;margin-bottom:23px!important;}
  .cqgmh__decor {position:absolute;inset:0;pointer-events:none;z-index:1;overflow:hidden;border-radius:inherit;}
  .cqgmh__sun {position:absolute;width:74px;height:74px;right:10%;top:11%;border-radius:50%;background:radial-gradient(circle,rgba(255,236,160,.36) 0%,rgba(255,238,178,.1) 39%,transparent 70%);opacity:.68;}
  .cqgmh__flower {position:absolute;right:12%;top:37%;width:48px;height:48px;opacity:.75;filter:drop-shadow(0 3px 6px rgba(0,0,0,.16));}
  .cqgmh__flower i {position:absolute;left:17px;top:2px;width:15px;height:26px;background:rgba(247,145,174,.88);border-radius:80% 80% 48% 48%;transform-origin:50% 22px;}
  .cqgmh__flower i:nth-child(2){transform:rotate(90deg)}
  .cqgmh__flower i:nth-child(3){transform:rotate(180deg)}
  .cqgmh__flower i:nth-child(4){transform:rotate(270deg)}
  .cqgmh__flower b {position:absolute;width:14px;height:14px;left:17px;top:18px;border-radius:50%;background:#f6db79;}
  .cqgmh__spark {position:absolute;width:8px;height:8px;border-radius:50%;background:rgba(255,226,148,.8);box-shadow:0 0 14px rgba(255,235,163,.55);}
  .cqgmh__spark--one{top:20%;left:16%}
  .cqgmh__spark--two{top:40%;right:22%;width:5px;height:5px}
  .cqgmh__body {z-index:2;}
  .cqgmh__button {touch-action:manipulation;}
}
@media (max-width:767px) and (prefers-reduced-motion:no-preference) {
  .cqgmh--entered .cqgmh__flower{animation:cqgmh-flower-sway 6s ease-in-out infinite alternate;}
  .cqgmh--entered .cqgmh__sun{animation:cqgmh-sun-glow 6s ease-in-out infinite alternate;}
  .cqgmh--entered .cqgmh__spark--one{animation:cqgmh-spark-float 4.2s ease-in-out infinite alternate;}
  .cqgmh--entered .cqgmh__spark--two{animation:cqgmh-spark-float 5.1s ease-in-out .7s infinite alternate-reverse;}
  .cqgmh__button--primary:active,.cqgmh__button--secondary:active{transform:scale(.975)!important;}
  @keyframes cqgmh-flower-sway{from{transform:translateY(0) rotate(-8deg) scale(.94)}to{transform:translateY(-10px) rotate(10deg) scale(1.03)}}
  @keyframes cqgmh-sun-glow{from{opacity:.3;transform:scale(.88)}to{opacity:.78;transform:scale(1.15)}}
  @keyframes cqgmh-spark-float{from{transform:translate3d(0,8px,0);opacity:.25}to{transform:translate3d(10px,-14px,0);opacity:.9}}
}
