/* Urdu font for the card. Same Alvi Nastaleeq files as the site, but with
   font-display: block so the text never flashes in a different fallback font. */
@font-face {
    font-family: "WaNastaleeq";
    src: url("/fonts/AlviNastaleeq.woff2") format("woff2"),
         url("/fonts/AlviNastaleeq.woff") format("woff");
    font-display: block;
}
/* =========================================================
   Join WhatsApp Group - card (shared design, mobile first)
   Real text + vector icon (Font Awesome "fa-brands fa-whatsapp",
   inlined as SVG so no extra icon library is loaded).
   The wording is the same as the old banner image.
   ========================================================= */
.wa-ico {
    width: 1em;
    height: 1em;
    display: inline-block;
    fill: currentColor;
    flex: none;
}
.wa-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 14px 14px 16px;
    border-radius: 16px;
    background:
        radial-gradient(circle at 12% 0%, rgba(37, 211, 102, .35) 0, rgba(37, 211, 102, 0) 55%),
        linear-gradient(140deg, #064e46 0%, #075e54 45%, #0b7a6d 100%);
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(6, 78, 70, .28);
    text-decoration: none !important;
    overflow: hidden;
    isolation: isolate;
    -webkit-tap-highlight-color: transparent;
    transition: transform .25s ease, box-shadow .25s ease;
}
/* soft chat-pattern texture */
.wa-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, .07) 1.2px, transparent 1.3px);
    background-size: 14px 14px;
}
/* light sweep across the card when it appears */
.wa-card::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 45%;
    z-index: -1;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .16) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-18deg);
    opacity: 0;
}
.wa-card:hover,
.wa-card:focus-visible {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(6, 78, 70, .36);
}
.wa-card:focus-visible { outline: 3px solid #25d366; outline-offset: 3px; }

.wa-card__text {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    direction: rtl;
    text-align: right;
    font-family: "WaNastaleeq", "AlviNastaleeq", "JameelNooriNastaleeq", "jameel_noori_nastaleeqregular", serif;
    font-size: 18px;
    line-height: 2;
    color: #ffffff;
}
.wa-card__text b {
    font-weight: normal;
    color: #a8f5c4;
}
.wa-card__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #ffffff;
    color: #075e54;
    font-family: "Lato", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    transition: background .2s ease;
}
.wa-card__btn .wa-ico { font-size: 20px; color: #25d366; }
.wa-card__btn b { color: #128c7e; }
.wa-card:hover .wa-card__btn { background: #f0fff5; }
.wa-card__timer {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: #25d366;
    transform-origin: left;
    transform: scaleX(0);
}
.wa-is-counting .wa-card__timer { animation: waTimer 3s linear forwards; }
.wa-is-paused .wa-card__timer { animation-play-state: paused; }

/* entrance: badge pops, text and button rise in, light sweeps across */
.wa-reveal .wa-card__btn .wa-ico { animation: waPopIn .55s cubic-bezier(.34, 1.56, .64, 1) .55s both; }
.wa-reveal .wa-card__text  { animation: waRise .5s ease-out .25s both; }
.wa-reveal .wa-card__btn   { animation: waRise .5s ease-out .38s both; }
.wa-reveal .wa-card::after { animation: waSweep 1.1s ease-in-out .5s both; }

@keyframes waTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes waPopIn { from { transform: scale(0) rotate(-30deg); } to { transform: scale(1) rotate(0); } }
@keyframes waRise  { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes waSweep { 0% { left: -60%; opacity: 1; } 100% { left: 130%; opacity: 1; } }
@keyframes waRing  { from { transform: scale(1); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
@keyframes waWiggle {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(-14deg); }
    40% { transform: rotate(12deg); }
    60% { transform: rotate(-8deg); }
    80% { transform: rotate(5deg); }
}

@media (min-width: 992px) {
    .wa-card__text { font-size: 17px; }
}

/* Urdu text: centered, two lines like the original banner */
.wa-card__text {
    text-align: center;
    font-size: 23px;
    line-height: 2.05;
    padding: 2px 4px 0;
    word-spacing: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.wa-card__line {
    display: block;
    text-wrap: balance;
}
.wa-card__text b { color: #b9f8cf; }
@media (max-width: 374px) {
    .wa-card__text { font-size: 20px; }
}
@media (min-width: 992px) {
    .wa-card__text { font-size: 21px; }
}

/* =========================================================
   Drawer style
   Every page load:
   - Mobile/tablet: the drawer opens under the search bar, holds 3s,
     then closes upward and the page content moves up into its place.
     A WhatsApp tab stays on the right edge; tapping it slides the
     card in from the right as an overlay (no page jump).
   - Desktop: the card slides in from the right screen edge, holds 3s,
     then slides out leaving the tab. Hover the tab to slide it back.
   ========================================================= */
.wa-dock {
    display: grid;
    grid-template-rows: 1fr;
    margin: 12px 15px 16px;
    transition: grid-template-rows .65s cubic-bezier(.65, 0, .35, 1), margin .65s cubic-bezier(.65, 0, .35, 1);
}
.wa-dock__panel {
    min-height: 0;
    overflow: hidden;
}
.wa-dock__inner {
    padding-bottom: 4px;
    transition: transform .65s cubic-bezier(.65, 0, .35, 1), opacity .45s ease;
}
.wa-dock.is-collapsed {
    grid-template-rows: 0fr;
    margin-top: 0;
    margin-bottom: 0;
}
.wa-dock.is-collapsed .wa-dock__inner {
    transform: translateY(-100%);
    opacity: 0;
}

/* edge tab */
.wa-dock__tab {
    position: fixed;
    right: 0;
    top: 50%;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px 14px;
    border: 0;
    border-radius: 14px 0 0 14px;
    background: linear-gradient(160deg, #25d366 0%, #128c7e 100%);
    color: #ffffff;
    box-shadow: -4px 6px 16px rgba(6, 78, 70, .3);
    cursor: pointer;
    transform: translate(110%, -50%);
    transition: transform .45s cubic-bezier(.34, 1.3, .64, 1) .4s, padding .2s ease;
    -webkit-tap-highlight-color: transparent;
}
.wa-dock__tab .wa-ico { font-size: 24px; }
.wa-dock__tab span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: "Lato", Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
}
.wa-dock__tab:focus-visible { outline: 3px solid #075e54; outline-offset: 2px; }
.wa-dock.is-collapsed .wa-dock__tab { transform: translate(0, -50%); }
.wa-dock.is-collapsed .wa-dock__tab .wa-ico { animation: waWiggle .9s ease-in-out 1s 1; }
.wa-dock.wa-no-anim .wa-dock__tab { transform: translate(110%, -50%); }

/* mobile: re-open as an overlay that slides in from the tab */
.wa-dock.is-overlay .wa-dock__panel {
    position: fixed;
    top: 50%;
    right: 12px;
    left: 12px;
    z-index: 1041;
    overflow: visible;
    transform: translateY(-50%);
    animation: waSlideIn .45s cubic-bezier(.22, 1, .36, 1) both;
}
.wa-dock.is-overlay .wa-dock__inner { transform: none; opacity: 1; transition: none; }
.wa-dock.is-overlay .wa-card { box-shadow: 0 18px 44px rgba(0, 0, 0, .35); }
.wa-dock.is-overlay .wa-dock__tab { transform: translate(110%, -50%); transition-delay: 0s; }

@keyframes waSlideIn {
    from { transform: translate(40px, -50%); opacity: 0; }
    to   { transform: translate(0, -50%); opacity: 1; }
}

/* ---------- desktop: the drawer opens after the intro box (moved there by the script).
   The WhatsApp icon in that row is its tab (the edge tab is not used on desktop). ---------- */
@media (min-width: 992px) {
    .wa-dock { margin: 12px 0 18px; }
    .wa-dock.is-collapsed { margin: 0; }
    .wa-dock.is-peek { grid-template-rows: 1fr; margin: 12px 0 18px; }
    .wa-dock.is-peek .wa-dock__inner { transform: none; opacity: 1; }
    .wa-dock.wa-has-social .wa-dock__tab { display: none !important; }
    .wa-dock .wa-card { max-width: 460px; }
}

.wa-dock.wa-no-anim,
.wa-dock.wa-no-anim * { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
    .wa-dock, .wa-dock *, .wa-dock *::before, .wa-dock *::after { transition: none !important; animation: none !important; }
    .wa-card__timer { display: none; }
}
@media print {
    .wa-dock { display: none !important; }
}

/* ---------- Blink: soft green glow that pulses so the icon is noticed ---------- */
@keyframes waBlink {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, .65), 0 4px 12px rgba(6, 78, 70, .3); }
    70%  { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0), 0 4px 12px rgba(6, 78, 70, .3); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 4px 12px rgba(6, 78, 70, .3); }
}
@keyframes waIconBlink {
    0%, 60%, 100% { opacity: 1; transform: scale(1); }
    75% { opacity: .55; transform: scale(.88); }
    88% { opacity: 1; transform: scale(1.08); }
}
.wa-dock.is-collapsed:not(.is-peek):not(.is-overlay) .wa-dock__tab { animation: waBlink 1.8s ease-out 1.2s infinite; }
.wa-dock.is-collapsed:not(.is-peek):not(.is-overlay) .wa-dock__tab .wa-ico { animation: waIconBlink 1.8s ease-in-out 1.2s infinite; }

/* ---------- Mobile/tablet: icon-only tab at the top-right (where the banner was) ---------- */
@media (max-width: 991px) {
    .wa-dock .wa-dock__tab {
        top: calc(215px + env(safe-area-inset-top, 0px));
        width: 40px;
        height: 40px;
        padding: 0 0 0 4px;
        gap: 0;
        justify-content: center;
        border-radius: 20px 0 0 20px;
    }
    .wa-dock .wa-dock__tab span { display: none; }
    .wa-dock .wa-dock__tab .wa-ico { font-size: 21px; }
    /* re-opened from the icon: the card grows out of the icon, at the icon's height */
    .wa-dock.is-overlay .wa-dock__panel {
        top: calc(215px + env(safe-area-inset-top, 0px));
        left: 10px;
        right: 10px;
        transform: translateY(-50%);
        transform-origin: right center;
        animation: waGrowFromIcon .45s cubic-bezier(.22, 1, .36, 1) both;
    }
}
@keyframes waGrowFromIcon {
    from { transform: translate(30px, -50%) scale(.2); opacity: 0; }
    to   { transform: translate(0, -50%) scale(1); opacity: 1; }
}

/* ---------- Desktop: WhatsApp icon with the Facebook / YouTube / Twitter / Instagram icons ---------- */
.share_post-right a.wa-social {
    width: 52px;
    height: 52px;
    margin: 0 6px 0 2px;
    vertical-align: middle;
    background: linear-gradient(160deg, #25d366 0%, #128c7e 100%);
    border-radius: 50%;
    animation: waBlink 1.8s ease-out infinite;
}
.share_post-right a.wa-social svg {
    width: 28px;
    height: 28px;
    fill: #ffffff;
    animation: waIconBlink 1.8s ease-in-out infinite;
}
.share_post-right a.wa-social:hover { background: linear-gradient(160deg, #1ebe5a 0%, #0e7266 100%); }

@media (prefers-reduced-motion: reduce) {
    .wa-dock .wa-dock__tab, .wa-dock .wa-dock__tab .wa-ico,
    .share_post-right a.wa-social, .share_post-right a.wa-social svg { animation: none !important; }
}
/* the social icons centre their svg with translate(-50%,-50%), so keep it in the blink */
@keyframes waIconBlinkCentered {
    0%, 60%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    75% { opacity: .55; transform: translate(-50%, -50%) scale(.88); }
    88% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}
.share_post-right a.wa-social svg { animation-name: waIconBlinkCentered; }
