/* =========================================================
   PakGovSchemes — Essential Legacy / Custom Content CSS
   Use with the PakGov Portal redesign theme.
   Global typography, header, footer, generic buttons and theme
   layout are intentionally NOT included here.
   ========================================================= */

/* ---------------------------------------------------------
   1) WhatsApp floating button
   --------------------------------------------------------- */
.whatsapp-float {
    position: fixed;
    bottom: 22px;
    right: 20px;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
    animation: premiumFloat 3s ease-in-out infinite;
}

.whatsapp-float::before {
    content: "";
    position: absolute;
    right: 2px;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196,30,58,.35) 0%, rgba(196,30,58,0) 70%);
    z-index: -1;
    animation: premiumPulse 2.4s ease-out infinite;
}

.whatsapp-float img {
    width: 50px;
    height: 50px;
    display: block;
    border-radius: 50%;
    border: 2px solid #f3d27a;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0,0,0,.25);
    transition: transform .35s ease, box-shadow .35s ease;
}

.whatsapp-float span {
    position: relative;
    display: inline-block;
    padding: 13px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg,#7a0018 0%,#b3122f 45%,#d61f45 100%);
    color: #fff;
    border: 2px solid #f3d27a;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .9px;
    white-space: nowrap;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(122,0,24,.35), inset 0 1px 0 rgba(255,255,255,.25), inset 0 -1px 0 rgba(0,0,0,.15);
    transition: all .35s ease;
}

.whatsapp-float span::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 6%;
    width: 88%;
    height: 45%;
    border-radius: 999px;
    background: linear-gradient(to bottom,rgba(255,255,255,.30),rgba(255,255,255,.05));
    pointer-events: none;
}

.whatsapp-float span::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 34%;
    height: 100%;
    background: rgba(255,255,255,.20);
    transform: skewX(-24deg);
    animation: premiumShine 3.6s infinite;
}

.whatsapp-float:hover span {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 16px 38px rgba(122,0,24,.45), 0 0 18px rgba(243,210,122,.18), inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 0 rgba(0,0,0,.15);
    background: linear-gradient(135deg,#8d001d 0%,#c91538 45%,#e02650 100%);
}

.whatsapp-float:hover img {
    transform: scale(1.08) rotate(-4deg);
    box-shadow: 0 14px 30px rgba(0,0,0,.32);
}

@keyframes premiumFloat {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes premiumPulse {
    0% { transform: scale(.92); opacity: .65; }
    70%,100% { transform: scale(1.35); opacity: 0; }
}

@keyframes premiumShine {
    0% { left: -80%; }
    55%,100% { left: 140%; }
}

/* ---------------------------------------------------------
   2) WhatsApp channel strip
   --------------------------------------------------------- */
.whatsapp-link {
    text-decoration: none;
    display: block;
}

.whatsapp-channel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
    background: #c5ffcc;
    padding: 7px 24px;
    border-radius: 12px;
    border: 2px solid #034f29;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    transition: box-shadow .3s ease;
    cursor: pointer;
}

.whatsapp-channel:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,.2);
}

.channel-text {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.join-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    background: #034f29;
    color: #fff !important;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 8px;
    border: 2px solid #25d366;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
    transition: background-color .3s ease, transform .2s ease, box-shadow .2s ease;
}

.join-button:hover {
    background: #25d366;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
}

/* ---------------------------------------------------------
   3) WhatsApp chat-style card
   --------------------------------------------------------- */
.wa-container {
    --wa-dark-green: #075e54;
    --wa-light-green: #25d366;
    --wa-bg-color: #e5ddd5;
    width: 100%;
    max-width: 350px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    margin: 20px auto;
    box-sizing: border-box;
}

.wa-header {
    background: var(--wa-dark-green);
    color: #fff;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.wa-avatar-container { position: relative; flex-shrink: 0; }
.wa-avatar { width: 55px; height: 55px; border-radius: 50%; object-fit: cover; }
.wa-online-dot { position: absolute; bottom: 3px; right: 3px; width: 12px; height: 12px; background: #4ad504; border: 2px solid var(--wa-dark-green); border-radius: 50%; }
.wa-name { font-weight: 700; font-size: 18px; }
.wa-status { font-size: 13px; opacity: .9; }

.wa-body {
    background-color: var(--wa-bg-color);
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    background-size: 200px;
    padding: 15px;
    position: relative;
    text-align: center;
    box-sizing: border-box;
}

.wa-time { font-size: 11px; color: rgba(0,0,0,.3); margin-bottom: 10px; }

.wa-chat-bubble {
    background: #fff;
    padding: 12px 15px;
    border-radius: 0 15px 15px 15px;
    margin: 0 0 20px 10px;
    text-align: left;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
    font-size: 14px;
    line-height: 1.4;
    color: #111;
    width: fit-content;
    max-width: 90%;
}

.wa-chat-bubble::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 10px 10px 0;
    border-color: transparent #fff transparent transparent;
}

.wa-footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    background: var(--wa-light-green);
    color: #fff !important;
    text-decoration: none !important;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    transition: .3s;
}

.wa-footer-btn svg { width: 20px; height: 20px; fill: #fff; margin-right: 10px; }
.wa-footer-btn:hover { transform: scale(1.02); filter: brightness(1.1); }

/* ---------------------------------------------------------
   4) Legacy scheme / portal blocks used inside old posts only
   Scoped to .prose so they cannot alter the new theme UI.
   --------------------------------------------------------- */
.prose .wapda-portal-container {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
}

.prose .wapda-portal-header {
    background: #0f172b;
    color: #fff;
    padding: 20px;
    border-bottom: 4px solid #006633;
}

.prose .portal-tag {
    display: inline-block;
    background: #006633;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 3px;
    color: #fff;
}

.prose .portal-table { width: 100%; border-collapse: collapse; }
.prose .portal-table th { background: #f1f5f0; color: #006633; padding: 12px; border: 1px solid #ddd; text-align: left; }
.prose .portal-table td { padding: 12px; border: 1px solid #ddd; }

/* ---------------------------------------------------------
   5) Legacy custom job content blocks inside old posts only
   --------------------------------------------------------- */
.prose .job-portal-wrapper {
    --legacy-primary: #1a2a6c;
    --legacy-accent: #006633;
    --legacy-warning: #f1c40f;
    background: #f0f2f5;
    padding: 20px;
    color: #2d3436;
    line-height: 1.7;
}

.prose .job-portal-wrapper .content-card {
    max-width: 850px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,.1);
    overflow: hidden;
    border: 0;
}

.prose .job-portal-wrapper .hero-header {
    background: linear-gradient(135deg,var(--legacy-primary),var(--legacy-accent));
    color: #fff;
    padding: 50px 40px;
    text-align: center;
}

.prose .job-portal-wrapper .hero-header h1 {
    color: #fff;
    font-size: 2.2rem;
    margin: 0 0 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prose .job-portal-wrapper .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
    gap: 15px;
    padding: 30px;
    background: #fff;
}

.prose .job-portal-wrapper .stat-box {
    padding: 20px;
    border-radius: 12px;
    background: #f8f9fa;
    border-bottom: 4px solid var(--legacy-accent);
}

.prose .job-portal-wrapper .stat-label {
    display: block;
    font-weight: 800;
    font-size: .8rem;
    color: #636e72;
    margin-bottom: 5px;
}

.prose .job-portal-wrapper .main-body { padding: 40px; }
.prose .job-portal-wrapper h2,
.prose .job-portal-wrapper h3 { color: var(--legacy-primary); border-left: 5px solid var(--legacy-accent); padding-left: 15px; }

.prose .benefit-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.prose .benefit-table th { background: #f1f2f6; text-align: left; padding: 12px; }
.prose .benefit-table td { padding: 12px; border-bottom: 1px solid #eee; }

.prose .alert-note {
    background: #fff9e6;
    border: 1px solid #f1c40f;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
    font-style: italic;
}

.prose .apply-container { text-align: center; margin: 30px 0; }

.prose .rangers-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg,#00b894,#00a8ff);
    color: #fff !important;
    padding: 18px 35px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none !important;
    transition: all .3s ease;
    box-shadow: 0 10px 20px rgba(0,184,148,.3);
    border: 0;
    animation: legacyPulseBorder 2s infinite;
}

.prose .rangers-apply-btn:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(0,168,255,.4); background: linear-gradient(135deg,#00a8ff,#00b894); }
.prose .rangers-apply-btn svg { transition: transform .3s ease; }
.prose .rangers-apply-btn:hover svg { transform: translateX(5px); }

@keyframes legacyPulseBorder {
    0% { box-shadow: 0 0 0 0 rgba(0,184,148,.7); }
    70% { box-shadow: 0 0 0 15px rgba(0,184,148,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,184,148,0); }
}

.prose .job-positions-container {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid #00b894;
    margin: 20px 0;
}

.prose .job-positions-container h3 { margin-top: 0; color: #2d3436; font-size: 1.4rem; border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 20px; }
.prose .roles-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); gap: 20px; }
.prose .category-header { background: #00b894; color: #fff; padding: 8px 15px; border-radius: 6px; font-weight: 700; font-size: .95rem; margin-bottom: 12px; }
.prose .role-category ul { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.prose .role-category ul li { padding: 8px 0; border-bottom: 1px dashed #ddd; font-size: .95rem; color: #444; display: flex; align-items: center; }
.prose .role-category ul li::before { content: "✓"; color: #00b894; font-weight: 700; margin-right: 10px; }
.prose .role-category ul li:last-child { border-bottom: 0; }

/* ---------------------------------------------------------
   6) Chughtai test table — keep only if that existing post uses it
   --------------------------------------------------------- */
.prose .chughtai-table-wrap { overflow-x: auto; margin: 20px 0; }
.prose .chughtai-test-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.prose .chughtai-test-table th,
.prose .chughtai-test-table td { border: 1px solid #ddd; padding: 9px 10px; text-align: left; vertical-align: top; }
.prose .chughtai-test-table thead th { background: #0f5132; color: #fff; font-weight: 700; }
.prose .chughtai-test-table .category-row td { background: #e9f7ef; color: #0f5132; font-size: 16px; }
.prose .chughtai-test-table tbody tr:nth-child(even):not(.category-row) { background: #fafafa; }

/* ---------------------------------------------------------
   7) Mobile fixes only for retained custom blocks
   --------------------------------------------------------- */
@media (max-width: 768px) {
    .whatsapp-float { bottom: 18px; right: 14px; gap: 9px; }
    .whatsapp-float img { width: 44px; height: 44px; }
    .whatsapp-float span { font-size: 13px; padding: 11px 17px; letter-spacing: .6px; }
    .whatsapp-float::before { width: 54px; height: 54px; }

    .whatsapp-channel { padding: 10px 12px; gap: 10px; }
    .channel-text { font-size: 15px; }
    .join-button { padding: 7px 12px; font-size: 13px; }

    .prose .wapda-portal-container,
    .prose .job-positions-container { width: 100%; max-width: 100%; box-sizing: border-box; }

    .prose .portal-table,
    .prose .benefit-table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    .prose .job-portal-wrapper { padding: 0; }
    .prose .job-portal-wrapper .hero-header,
    .prose .job-portal-wrapper .main-body,
    .prose .job-portal-wrapper .stats-grid { padding-left: 15px; padding-right: 15px; }
}

@media (max-width: 600px) {
    .prose .roles-grid { grid-template-columns: 1fr; }
}
