/* ==========================================================================
   CIA India — Footer, Policy Popup & Floating Buttons
   Theme from logo: Red / Royal Blue / Gold
   ========================================================================== */
:root {
    --cia-red: #e31b23;
    --cia-red-dk: #b8121a;
    --cia-red-lt: #ff4d55;
    --cia-blue: #2b2f8f;
    --cia-blue-dk: #1d2068;
    --cia-navy: #12144a;
    --cia-gold: #c39a57;
    --cia-gold-dk: #9c7637;
    --cia-gold-lt: #e6c88f;
    --cia-soft: #f3f4fb;
    --sf-font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --sf-head: 'Oswald', 'Poppins', sans-serif;
}

/* ---------------- Footer shell ---------------- */
.cia-footer { position: relative; overflow: hidden; background: #101236; color: #c8cbe6; font-family: var(--sf-font); }
.cia-footer a { text-decoration: none; }
.sf-stripe { height: 5px; background: linear-gradient(90deg, var(--cia-red) 0 40%, var(--cia-gold) 40% 60%, var(--cia-blue) 60% 100%); }

.sf-scene {
    position: relative; padding: 64px 0 44px;
    background:
        radial-gradient(circle at 8% 0, rgba(227, 27, 35, .20), transparent 42%),
        radial-gradient(circle at 100% 100%, rgba(43, 47, 143, .55), transparent 55%),
        linear-gradient(165deg, #1b1e63 0%, #12144a 55%, #0d0f33 100%);
}
.sf-scene::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 22px 22px;
}
.sf-watermark {
    position: absolute; right: -30px; bottom: 30px; width: min(340px, 50vw);
    opacity: .05; pointer-events: none; filter: grayscale(1) brightness(2);
}
.sf-wrap { position: relative; z-index: 1; max-width: 1360px; margin: 0 auto; padding: 0 20px; }

/* ---------------- Brand ---------------- */
.sf-brand { display: flex; align-items: center; gap: 14px; }
.sf-logo {
    flex: 0 0 auto; width: 84px; height: 84px; padding: 6px; border-radius: 18px; background: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .35), 0 0 0 3px rgba(195, 154, 87, .45);
}
.sf-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sf-name { display: flex; flex-direction: column; font: 700 21px/1.15 var(--sf-head); text-transform: uppercase; letter-spacing: .6px; }
.sf-name-1 { color: #fff; }
.sf-name-2 { color: var(--cia-red-lt); }
.sf-tagline { margin: 16px 0 18px; color: var(--cia-gold-lt); font-size: 13.5px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; }

.sf-social { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-social a {
    width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    color: #fff; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
    transition: background .25s, border-color .25s, transform .25s;
}
.sf-social a:hover { background: var(--cia-red); border-color: var(--cia-red); transform: translateY(-3px); color: #fff; }

.sf-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.sf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 40px;
    font: 600 14px/1.2 var(--sf-font); border: 2px solid transparent; cursor: pointer; white-space: nowrap;
    transition: background .25s, color .25s, transform .25s, box-shadow .25s;
}
.sf-btn-main { background: linear-gradient(135deg, var(--cia-red), var(--cia-red-dk)); color: #fff; box-shadow: 0 8px 20px rgba(227, 27, 35, .35); }
.sf-btn-main:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(227, 27, 35, .45); }
.sf-btn-ghost { background: transparent; border-color: var(--cia-gold); color: var(--cia-gold-lt); }
.sf-btn-ghost:hover { background: var(--cia-gold); color: var(--cia-navy); }

/* ---------------- Link columns ---------------- */
.sf-title {
    position: relative; margin: 0 0 18px; padding-bottom: 10px; color: #fff;
    font: 600 17px/1.3 var(--sf-head); text-transform: uppercase; letter-spacing: 1px;
}
.sf-title::after {
    content: ""; position: absolute; left: 0; bottom: 0; width: 42px; height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, var(--cia-red), var(--cia-gold));
}
.sf-links { list-style: none; margin: 0; padding: 0; }
.sf-links li { break-inside: avoid; margin-bottom: 4px; }
.sf-links a {
    position: relative; display: inline-block; padding: 4px 0 4px 16px;
    color: #c8cbe6; font-size: 14px; line-height: 1.45; transition: color .2s, transform .2s;
}
.sf-links a::before {
    content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px;
    background: var(--cia-gold); transform: rotate(45deg); transition: background .2s;
}
.sf-links a:hover { color: #fff; transform: translateX(4px); }
.sf-links a:hover::before { background: var(--cia-red-lt); }
@media (min-width: 420px) { .sf-links.cols-2 { columns: 2; column-gap: 24px; } }

.sf-sub { margin-top: 44px; padding-top: 36px; border-top: 1px dashed rgba(255, 255, 255, .14); }

.sf-help {
    display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 14px 16px; border-radius: 14px;
    background: rgba(255, 255, 255, .05); border: 1px solid rgba(195, 154, 87, .35);
}
.sf-help-ic {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--cia-red); color: #fff; font-size: 17px; box-shadow: 0 0 0 6px rgba(227, 27, 35, .18);
}
.sf-help small { display: block; color: var(--cia-gold-lt); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.sf-help a { color: #fff; font-size: 16px; font-weight: 600; }
.sf-help a:hover { color: var(--cia-gold-lt); }

/* ---------------- Bottom bar ---------------- */
.sf-bar { background: #0a0b28; border-top: 1px solid rgba(255, 255, 255, .06); padding: 18px 0; }
.sf-bar-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.sf-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.sf-contact li { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sf-ico {
    flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(227, 27, 35, .16); color: var(--cia-red-lt); font-size: 13px;
}
.sf-contact a { color: #d4d7ee; font-size: 13.5px; word-break: break-word; }
.sf-contact a:hover { color: #fff; }
.sf-copy { text-align: right; color: #9ea3c7; font-size: 13px; line-height: 1.7; }
.sf-credit a { color: var(--cia-gold-lt); font-weight: 600; }
.sf-credit a:hover { color: #fff; }

@media (max-width: 991.98px) {
    .sf-bar-in { flex-direction: column; align-items: flex-start; }
    .sf-copy { text-align: left; }
}
@media (max-width: 575.98px) {
    .sf-scene { padding: 48px 0 32px; }
    .sf-contact { flex-direction: column; }
    .sf-bar { padding-bottom: 96px; } /* room for floating buttons */
    .sf-logo { width: 72px; height: 72px; }
}

/* ---------------- Reveal animation ---------------- */
.cia-footer.f-armed .f-reveal { opacity: 0; transform: translateY(26px); }
.cia-footer.f-armed.f-in .f-reveal {
    opacity: 1; transform: none;
    transition: opacity .7s ease, transform .7s ease;
    transition-delay: calc(var(--i, 0) * 90ms);
}

/* ==========================================================================
   Policy popup
   ========================================================================== */
.spm {
    position: fixed; inset: 0; z-index: 2100; display: flex; align-items: center; justify-content: center; padding: 16px;
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; font-family: var(--sf-font);
}
.spm.open { opacity: 1; visibility: visible; }
.spm-backdrop { position: absolute; inset: 0; background: rgba(10, 11, 40, .62); backdrop-filter: blur(3px); }
.spm-dialog {
    position: relative; width: min(780px, 100%); max-height: 88vh; display: flex; flex-direction: column;
    background: #fff; border-radius: 18px; overflow: hidden; outline: none;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
    transform: translateY(24px) scale(.97); transition: transform .3s ease;
}
.spm.open .spm-dialog { transform: none; }
.spm-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; color: #fff;
    background: linear-gradient(135deg, var(--cia-blue-dk), var(--cia-blue)); border-bottom: 3px solid var(--cia-gold);
}
.spm-head-title { margin: 0; color: #fff; font: 600 20px/1.3 var(--sf-head); text-transform: uppercase; letter-spacing: .6px; }
.spm-x {
    flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(255, 255, 255, .14); color: #fff; font-size: 17px; transition: background .25s, transform .25s;
}
.spm-x:hover { background: var(--cia-red); transform: rotate(90deg); }
.spm-body { flex: 1; overflow-y: auto; padding: 22px 26px; color: #3a3f5c; font-size: 14.5px; line-height: 1.75; }
.spm-body h3 { margin: 0 0 12px; color: var(--cia-blue); font: 600 22px/1.3 var(--sf-head); }
.spm-body h4 { margin: 20px 0 6px; color: var(--cia-red); font-size: 16px; font-weight: 600; }
.spm-body p { margin: 0 0 10px; }
.spm-body ul { margin: 0 0 10px; padding-left: 20px; }
.spm-body li { margin-bottom: 4px; }
.spm-body li::marker { color: var(--cia-gold); }
.spm-contact {
    display: flex; flex-direction: column; gap: 6px; margin: 10px 0 14px; padding: 14px 16px; border-radius: 12px;
    background: var(--cia-soft); border-left: 4px solid var(--cia-gold);
}
.spm-contact strong { color: var(--cia-blue); }
.spm-contact i { width: 18px; margin-right: 6px; color: var(--cia-red); }
.spm-thanks { font-style: italic; color: #6a7090; }
.spm-foot { padding: 12px 22px; border-top: 1px solid #e4e6f2; background: #fafbff; text-align: right; }
body.spm-lock { overflow: hidden; }

@media (max-width: 575.98px) {
    .spm { padding: 0; align-items: flex-end; }
    .spm-dialog { max-height: 92vh; border-radius: 18px 18px 0 0; }
    .spm-body { padding: 18px; }
}

/* ==========================================================================
   Floating action buttons
   ========================================================================== */
.sfab {
    position: fixed; right: 18px; bottom: 18px; z-index: 1045;
    display: flex; flex-direction: column; align-items: flex-end; gap: 12px; font-family: var(--sf-font);
}
.sfab-list { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }

.sfab-item {
    position: relative; width: 48px; height: 48px; margin-right: 5px; border: 0; border-radius: 50%; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--c, #2b2f8f); color: #fff; font-size: 19px; text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
    opacity: 0; visibility: hidden; transform: translateY(16px) scale(.6);
    transition: opacity .25s, transform .3s cubic-bezier(.3, 1.4, .6, 1), visibility .25s;
    transition-delay: calc(var(--i, 0) * 45ms);
}
.sfab.open .sfab-item { opacity: 1; visibility: visible; transform: none; }
.sfab-item:hover { color: #fff; filter: brightness(1.08); }

.sfab-tip, .sfab-dtip {
    position: absolute; right: calc(100% + 10px); top: 50%; transform: translate(6px, -50%);
    padding: 6px 11px; border-radius: 8px; background: var(--cia-navy); color: #fff;
    font-size: 12.5px; font-weight: 500; white-space: nowrap; pointer-events: none;
    opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
}
.sfab-item:hover .sfab-tip, .sfab-donate:hover .sfab-dtip { opacity: 1; visibility: visible; transform: translate(0, -50%); }
@media (hover: none) { .sfab.open .sfab-tip { opacity: 1; visibility: visible; transform: translate(0, -50%); } }

.sfab-main {
    position: relative; width: 58px; height: 58px; border: 0; border-radius: 50%; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--cia-red), var(--cia-red-dk)); color: #fff; font-size: 23px;
    box-shadow: 0 10px 26px rgba(227, 27, 35, .45); transition: background .3s;
}
.sfab-main::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--cia-red);
    animation: sfabPulse 2.2s ease-out infinite;
}
.sfab.open .sfab-main { background: linear-gradient(135deg, var(--cia-blue), var(--cia-blue-dk)); }
.sfab.open .sfab-main::before { animation: none; opacity: 0; }
.sfab-main i { position: absolute; transition: transform .3s, opacity .3s; }
.sfab-ic-close { opacity: 0; transform: rotate(-90deg); }
.sfab.open .sfab-ic-open { opacity: 0; transform: rotate(90deg); }
.sfab.open .sfab-ic-close { opacity: 1; transform: none; }
@keyframes sfabPulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.sfab-donate {
    position: relative; width: 50px; height: 50px; margin-right: 4px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--cia-gold-lt), var(--cia-gold)); color: var(--cia-red-dk);
    font-size: 20px; text-decoration: none; box-shadow: 0 8px 20px rgba(156, 118, 55, .4);
}
.sfab-donate:hover { color: var(--cia-red); }
.sfab-donate i { animation: sfabBeat 1.4s ease-in-out infinite; }
@keyframes sfabBeat { 0%, 100% { transform: scale(1); } 20% { transform: scale(1.22); } 40% { transform: scale(1); } }

.sfab-top {
    position: relative; width: 52px; height: 52px; margin-right: 3px; padding: 0; border: 0; border-radius: 50%;
    background: #fff; cursor: pointer; box-shadow: 0 8px 20px rgba(18, 20, 74, .25);
    opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s, transform .3s, visibility .3s;
}
.sfab.scrolled .sfab-top { opacity: 1; visibility: visible; transform: none; }
.sfab-top svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sfab-top .trk { fill: none; stroke: #e6e8f5; stroke-width: 3; }
.sfab-top .bar {
    fill: none; stroke: var(--cia-red); stroke-width: 3; stroke-linecap: round;
    stroke-dasharray: 131.95; stroke-dashoffset: 131.95; transition: stroke-dashoffset .15s linear;
}
.sfab-top-in {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--cia-blue); line-height: 1;
}
.sfab-top-in i { font-size: 13px; }
.sfab-top-in b { margin-top: 2px; font-size: 9.5px; font-weight: 700; }

.sfab-toast {
    position: absolute; right: 72px; bottom: 0; width: max-content; max-width: min(270px, 70vw);
    padding: 10px 14px; border-radius: 10px; border-left: 3px solid var(--cia-gold);
    background: var(--cia-navy); color: #fff; font-size: 13px; line-height: 1.45;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
    opacity: 0; visibility: hidden; transform: translateX(8px); transition: opacity .25s, transform .25s, visibility .25s;
}
.sfab-toast.show { opacity: 1; visibility: visible; transform: none; }

@media (max-width: 575.98px) {
    .sfab { right: 12px; bottom: 12px; gap: 10px; }
    .sfab-main { width: 52px; height: 52px; font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
    .sfab-main::before, .sfab-donate i { animation: none; }
    .cia-footer.f-armed .f-reveal { opacity: 1; transform: none; }
}