/* ========================================================================
   Peeaar Securities — Glassmorphism Visual Layer
   ------------------------------------------------------------------------
   MATERIAL-ONLY OVERRIDES. Loaded last on every page.

   theme.css and the other custom/*.css files own structure: layout, sizes,
   spacing, colours of text, the magenta brand accent and all behaviour.
   This file only turns existing surfaces into frosted glass. Rules here must
   never change an element's box, so:
     - no width/height/margin/padding/display/position-flow changes
     - borders only recolour an existing border (border-color), never add one;
       outlines that need to appear use box-shadow rings instead
     - decorative layers are absolutely positioned pseudo-elements
   The magenta brand accent (#f70e88) is untouched; glass is tinted to it.
   ======================================================================== */

:root {
  --gm-pink-rgb: 247, 14, 136;              /* existing brand magenta */
  --gm-ink-rgb: 58, 22, 44;                 /* warm neutral for shadows */

  --gm-surface: rgba(255, 255, 255, 0.66);
  --gm-surface-strong: rgba(255, 255, 255, 0.82);
  --gm-edge: rgba(255, 255, 255, 0.78);
  --gm-edge-tint: rgba(var(--gm-pink-rgb), 0.09);
  --gm-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  /* Pink-tinted, low-opacity shadows: dark neutral shadows read as grey
     smudges on a white page. */
  --gm-shadow:
    0 1px 2px rgba(var(--gm-ink-rgb), 0.03),
    0 10px 30px -14px rgba(var(--gm-pink-rgb), 0.14);
  --gm-shadow-hover:
    0 2px 4px rgba(var(--gm-ink-rgb), 0.05),
    0 22px 48px -16px rgba(var(--gm-pink-rgb), 0.22);
  --gm-blur: 18px;
}

/* ------------------------------------------------------------------------
   Canvas: warm white with a faint magenta glow. Painted on a fixed layer
   behind everything so it costs one composited surface, not a repaint.
   ------------------------------------------------------------------------ */
html {
  background: #fff;
}

body {
  background: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 0% 0%, rgba(var(--gm-pink-rgb), 0.075), transparent 62%),
    radial-gradient(48rem 34rem at 100% 18%, rgba(255, 95, 174, 0.065), transparent 62%),
    radial-gradient(56rem 38rem at 72% 100%, rgba(var(--gm-pink-rgb), 0.05), transparent 62%),
    #fff;
}

/* Full-width bands that were opaque now let the canvas through. */
section.bg-light {
  background-color: rgba(255, 255, 255, 0.42) !important;
}

/* ------------------------------------------------------------------------
   Header. The glass lives on a pseudo-element: an element with
   backdrop-filter becomes a "backdrop root", and the dropdowns inside it
   would then have nothing to blur.
   ------------------------------------------------------------------------ */
/* Full-width bar: the glass spans the whole fixed header (edge to edge);
   the navbar inside keeps its container width and layout. */
.fixed-header {
  isolation: isolate;
  background: transparent !important;
  /* replaces theme.css's heavy slate shadow (rgba(15,23,42,.35)) */
  box-shadow: 0 8px 24px -14px rgba(var(--gm-pink-rgb), 0.22) !important;
}

.fixed-header .navbar {
  background: transparent !important;
}

.fixed-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 -1px 0 var(--gm-edge-tint);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
}

/* Between 992px and the xl breakpoint the opened menu expands the navbar
   itself over the page; a denser glass keeps the links legible. */
.fixed-header:has(.navbar-collapse.show)::before {
  background: rgba(255, 255, 255, 0.95);
}

.navbar .dropdown-menu {
  background: rgba(255, 255, 255, 0.93) !important;
  border-color: var(--gm-edge) !important;
  box-shadow:
    0 0 0 1px var(--gm-edge-tint),
    0 18px 40px -14px rgba(var(--gm-pink-rgb), 0.2),
    var(--gm-highlight) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
}

/* theme.css drops the collapsed menu below the navbar as its own white panel
   (position:absolute, same breakpoint); frost it. Its dropdowns sit on it. */
@media (max-width: 991.98px) {
  .fixed-header .navbar-collapse {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0 0 18px 18px;
    box-shadow:
      0 0 0 1px var(--gm-edge-tint),
      0 24px 48px -20px rgba(var(--gm-pink-rgb), 0.24);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
  }

  .navbar .dropdown-menu {
    background: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Log-in (ghost) button: transparent -> frosted. Hover keeps its own colours. */
.navbar-nav .btn.cta-ghost {
  background-color: rgba(255, 255, 255, 0.6);
}

/* Feature strip under the hero: opaque white band -> glass band. */
.feature-strip {
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 1px 0 var(--gm-edge-tint), var(--gm-highlight);
  -webkit-backdrop-filter: blur(var(--gm-blur)) saturate(150%);
  backdrop-filter: blur(var(--gm-blur)) saturate(150%);
}

/* ------------------------------------------------------------------------
   Cards and panels. Only existing surfaces; the hover shadows each
   component already defines (e.g. .investment-card:focus-within) are more
   specific and still win.
   ------------------------------------------------------------------------ */
.card,
.investment-card,
.account-type-card,
.about-tile,
.platform-card,
.form-panel,
.calc-card,
.calc-tile,
.ap-card,
.product-card,
.cs-card,
.ft-card,
.detail-panel {
  background-color: var(--gm-surface);
  border-color: var(--gm-edge-tint);
  box-shadow: var(--gm-shadow), var(--gm-highlight);
  -webkit-backdrop-filter: blur(var(--gm-blur)) saturate(150%);
  backdrop-filter: blur(var(--gm-blur)) saturate(150%);
}

/* Bootstrap's .card and .bg-white / .shadow-sm utilities are !important. */
.card {
  background-color: var(--gm-surface) !important;
  box-shadow: var(--gm-shadow), var(--gm-highlight) !important;
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: var(--gm-shadow-hover), var(--gm-highlight) !important;
}

.investment-card,
.account-type-card,
.about-tile,
.calc-tile,
.ap-card,
.product-card {
  background: var(--gm-surface);
}

.about-tile:hover,
.calc-tile:hover,
.ap-card:hover,
.product-card:hover {
  box-shadow: var(--gm-shadow-hover), var(--gm-highlight);
}

.card-header.bg-white,
.card-footer.bg-white {
  background-color: rgba(255, 255, 255, 0.45) !important;
}

.card-header,
.card-footer {
  border-color: var(--gm-edge-tint) !important;
}

/* Surfaces that sit over other content get a denser glass for legibility. */
.modal-content,
.accordion-item {
  background-color: var(--gm-surface-strong);
  border-color: var(--gm-edge);
  box-shadow: 0 0 0 1px var(--gm-edge-tint), 0 24px 60px -18px rgba(var(--gm-ink-rgb), 0.3), var(--gm-highlight);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
}

.accordion-item {
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.modal-backdrop.show {
  background-color: rgb(var(--gm-ink-rgb));
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* ------------------------------------------------------------------------
   Tables: transparent cells on the glass panel, header row lightly tinted.
   Cell text colours are left alone.
   ------------------------------------------------------------------------ */
.table {
  --bs-table-bg: transparent;
  border-color: rgba(var(--gm-ink-rgb), 0.08);
}

.table > thead > tr > *,
.table-light > * > * {
  background-color: rgba(var(--gm-pink-rgb), 0.035) !important;
}

.doc-table {
  background: var(--gm-surface);
  box-shadow: var(--gm-shadow);
}

.doc-table td {
  border-color: rgba(var(--gm-ink-rgb), 0.08);
}

/* ------------------------------------------------------------------------
   Forms: frosted inputs; the existing magenta focus ring stays.
   ------------------------------------------------------------------------ */
.form-control,
.form-select {
  background-color: rgba(255, 255, 255, 0.72);
  border-color: rgba(var(--gm-ink-rgb), 0.13);
  box-shadow: inset 0 1px 2px rgba(var(--gm-ink-rgb), 0.04);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.form-control:focus,
.form-select:focus {
  background-color: rgba(255, 255, 255, 0.92);
  border-color: rgba(var(--gm-pink-rgb), 0.45);
  box-shadow: 0 0 0 0.2rem rgba(var(--gm-pink-rgb), 0.12);
}

.form-control.is-invalid,
.was-validated .form-control:invalid {
  border-color: var(--bs-form-invalid-border-color, #dc3545);
}

/* ------------------------------------------------------------------------
   Buttons: keep the existing magenta fills, shapes and sizes; add a glass
   sheen under the label. isolation keeps the sheen above the fill and
   below the text, so the label is never washed out.
   ------------------------------------------------------------------------ */
.btn-primary,
.navbar-nav .btn.cta-primary {
  isolation: isolate;
}

.btn-primary::before,
.navbar-nav .btn.cta-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.05) 52%, rgba(255, 255, 255, 0) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Outline buttons: transparent -> frosted. Their hover fill still applies. */
.btn-outline-primary,
.btn-outline-secondary,
.btn-light {
  background-color: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* ------------------------------------------------------------------------
   Footer: the existing dark footer as smoked glass with a faint brand glow.
   No backdrop-filter — nothing behind it to blur.
   ------------------------------------------------------------------------ */
footer.bg-dark {
  background:
    radial-gradient(42rem 22rem at 8% 0%, rgba(var(--gm-pink-rgb), 0.14), transparent 70%),
    radial-gradient(36rem 20rem at 100% 100%, rgba(255, 95, 174, 0.07), transparent 70%),
    linear-gradient(180deg, #1b1620 0%, #141117 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

footer.bg-dark .social-icon2 li a {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

footer.bg-dark .social-icon2 li a:hover {
  background-color: #f70e88;
  border-color: #f70e88;
}

/* Contact list (phone, email, address) icons as round badges matching the
   social icons above. Requested change: this one does resize the icons. */
footer.bg-dark .col-lg-3 > ul > li > i.fas {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin: 0 .75rem 0 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.06);
  color: #f6f9fc !important;
  font-size: 13px;
  transition: background-color .2s ease, border-color .2s ease;
}

footer.bg-dark .col-lg-3 > ul > li {
  align-items: center !important;
}

footer.bg-dark .col-lg-3 > ul > li:hover > i.fas {
  background-color: #f70e88;
  border-color: #f70e88;
}

/* ------------------------------------------------------------------------
   Small screens: lighter blur for scroll performance. Layout untouched.
   ------------------------------------------------------------------------ */
@media (max-width: 767.98px) {
  :root {
    --gm-blur: 12px;
  }
}

/* Browsers without backdrop-filter get solid-enough surfaces to stay legible. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --gm-surface: rgba(255, 255, 255, 0.94);
  }

  .fixed-header::before,
  .navbar .dropdown-menu {
    background: rgba(255, 255, 255, 0.97) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
}

/* Footer credit: a frosted pill on the dark footer. Text is part-transparent
   white so it reads quieter than the copyright beside it; the name gets a
   faint brand tint. */
.footer-credit {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.38);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 24px -12px rgba(var(--gm-pink-rgb), 0.12);
  -webkit-backdrop-filter: blur(var(--gm-blur)) saturate(150%);
  backdrop-filter: blur(var(--gm-blur)) saturate(150%);
}
.footer-credit span {
  color: rgba(255, 255, 255, 0.52);
  font-weight: 500;
}
