/* Glory Theme — Footer (production) */

.site-footer{
  position: relative;
  border-top: 1px solid var(--border);
  padding: clamp(1.5rem, 4vw, 2.75rem) 0 clamp(1rem, 3vw, 1.25rem);
  overflow: hidden;
}

/* background glow */
.site-footer::before{
  content:"";
  position:absolute;
  inset: -40% -20%;
  background:
    radial-gradient(45% 35% at 15% 15%, rgba(16,185,129,.18) 0%, transparent 60%),
    radial-gradient(40% 35% at 85% 25%, rgba(8,77,59,.14) 0%, transparent 60%),
    radial-gradient(30% 30% at 60% 90%, rgba(16,185,129,.10) 0%, transparent 60%);
  pointer-events:none;
  z-index:0;
}

.footer-inner{
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.4rem;
}

/* =========================
   Top strip (brand + CTA)
========================== */
.footer-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: clamp(1rem, 3vw, 1.15rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow2);
}
@media (max-width: 720px){
  .footer-top{
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .footer-brand{ justify-content: center; }
  .footer-cta{
    justify-content: center;
    min-width: 0;
    text-align: center;
  }
  .footer-cta-copy{ max-width: none; }
  .footer-cta-actions{ justify-content: center; }
}

.footer-brand{
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.footer-logo-mark,
.footer-brand-logo,
.footer-brand .logo-mark,
.footer-brand .brand-logo{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow2);
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
  display: inline-grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 20% 10%, rgba(16,185,129,.45) 0%, transparent 60%),
    radial-gradient(120% 120% at 90% 100%, rgba(8,77,59,.35) 0%, transparent 58%),
    var(--chip);
}

.footer-brand-logo .logo,
.footer-brand .brand-logo .logo{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  padding:6px;
  object-fit: contain;
  display:none;
}
.footer-brand-logo.has-light .logo-light,
.footer-brand .brand-logo.has-light .logo-light{ display:block; }
html[data-theme="dark"] .footer-brand-logo.has-dark .logo-dark,
html[data-theme="dark"] .footer-brand .brand-logo.has-dark .logo-dark{ display:block; }
html[data-theme="dark"] .footer-brand-logo.has-light .logo-light,
html[data-theme="dark"] .footer-brand .brand-logo.has-light .logo-light{ display:none; }
html[data-theme="dark"] .footer-brand-logo.has-light:not(.has-dark) .logo-light,
html[data-theme="dark"] .footer-brand .brand-logo.has-light:not(.has-dark) .logo-light{ display:block; }

.footer-brand-text{
  display: grid;
  line-height: 1.12;
  min-width: 0;
}
.footer-brand-text strong{
  font-size: clamp(0.95rem, 1.5vw, 1.02rem);
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.footer-brand-text span{
  font-size: clamp(0.8rem, 1.2vw, 0.88rem);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-cta{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex: 1 1 auto;
  min-width: min(520px, 100%);
}

.footer-cta-copy{
  min-width: 180px;
  max-width: 520px;
}
.footer-cta-title{
  font-weight: 950;
  letter-spacing: .2px;
  color: var(--text);
}
.footer-cta-sub{
  color: var(--muted);
  font-weight: 400;
  font-size: .92rem;
  margin-top: .15rem;
}

.footer-cta-actions{
  display: inline-flex;
  gap: .6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* If header.css isn't loaded for some reason, keep footer buttons usable */
.site-footer .btn{
  text-decoration: none;
}
.site-footer .btn:visited{ color: inherit; }

/* =========================
   Columns
========================== */
.footer-cols{
  display: grid;
  gap: 1rem;
  margin-top: .25rem;
}

@media (min-width: 900px){
  .footer-cols{
    grid-template-columns: 1fr 1fr 1.1fr;
    gap: 1.6rem;
  }
}

.footer-col{
  padding: 1.15rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.42);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

html[data-theme="dark"] .footer-col{
  background: rgba(15,27,51,.42);
}

.footer-col-title{
  font-weight: 950;
  letter-spacing: .2px;
  margin: 0 0 .75rem;
  color: var(--text);
  font-size: clamp(0.9rem, 1.2vw, 0.95rem);
}

/* menus */
.footer-menu{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .5rem;
}

.footer-menu a{
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.5rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 400;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  border-radius: 10px;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.footer-menu a:hover{
  color: var(--text);
  background: rgba(8,77,59,.08);
  transform: translateY(-1px);
}
html[data-theme="dark"] .footer-menu a:hover{
  background: rgba(52,211,153,.12);
}

/* contact list */
.footer-contact{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .6rem;
  color: var(--muted);
  font-weight: 400;
}

.footer-contact li{
  display: flex;
  align-items: center;
  gap: .55rem;
}

.footer-chip{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--chip);
  color: var(--text);
  font-size: .9rem;
}

.footer-contact a{
  color: var(--muted);
  text-decoration: none;
}
.footer-contact a:hover{ color: var(--text); }

/* social menu (simple) */
.footer-social-menu{
  list-style: none;
  margin: .65rem 0 0;
  padding: 0;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.footer-social-menu li{ margin: 0; padding: 0; }

.footer-social-menu a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0 .75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.45);
  color: var(--text);
  font-weight: 400;
  font-size: clamp(0.875rem, 1.1vw, 0.95rem);
  text-decoration: none;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
html[data-theme="dark"] .footer-social-menu a{
  background: rgba(15,27,51,.55);
}
.footer-social-menu a:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.75);
}
html[data-theme="dark"] .footer-social-menu a:hover{
  background: rgba(15,27,51,.78);
}

@media (max-width: 900px){
  .footer-cols{
    grid-template-columns: 1fr;
  }

  .footer-col{
    padding: 1rem;
  }
}

@media (max-width: 720px){
  .site-footer{
    padding: 1rem 0 calc(1rem + var(--safe-bottom));
  }

  .footer-top{
    border-radius: 24px;
    padding: 1rem;
  }

  .footer-brand{
    flex-direction: column;
    text-align: center;
  }

  .footer-brand-text span{
    white-space: normal;
  }

  .footer-cta{
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .footer-cta-copy{
    max-width: none;
  }

  .footer-cta-actions{
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .footer-cta-actions .btn{
    width: 100%;
    min-height: 48px;
    border-radius: 18px;
  }

  .footer-col{
    border-radius: 22px;
    background: rgba(255,255,255,.55);
    box-shadow: 0 10px 24px rgba(15,23,42,.06);
  }

  html[data-theme="dark"] .footer-col{
    background: rgba(15,27,51,.58);
    box-shadow: 0 16px 28px rgba(0,0,0,.2);
  }

  .footer-menu{
    gap: 0.35rem;
  }

  .footer-menu a{
    padding: 0.65rem 0.7rem;
    border-radius: 14px;
    background: rgba(255,255,255,.3);
  }

  html[data-theme="dark"] .footer-menu a{
    background: rgba(255,255,255,.04);
  }

  .footer-contact li{
    align-items: flex-start;
  }

  .footer-social-menu{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-social-menu a{
    width: 100%;
    min-height: 48px;
    height: auto;
    border-radius: 16px;
  }

  .footer-bottom{
    gap: 0.55rem;
  }

  .footer-legal{
    justify-content: center;
  }
}

@media (max-width: 420px){
  .footer-top,
  .footer-col,
  .footer-trust-card{
    border-radius: 20px;
  }

  .footer-social-menu{
    grid-template-columns: 1fr;
  }

  .footer-bottom-left{
    flex-direction: column;
    gap: 0.3rem;
  }

  .footer-dot{
    display: none;
  }
}

/* =========================
   Bottom bar
========================== */
.footer-bottom{
  margin-top: .2rem;
  padding-top: clamp(0.75rem, 2vw, 1rem);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  flex-wrap: wrap;
}
@media (max-width: 520px){
  .footer-bottom{ flex-direction: column; align-items: center; text-align: center; }
  .footer-bottom-left{ flex-wrap: wrap; justify-content: center; }
  .footer-legal{ justify-content: center; }
}

.footer-bottom-left{
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--muted);
  font-weight: 400;
}

.footer-dot{ opacity: .8; }
.footer-muted{ color: var(--muted); }

.footer-legal{
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  gap: .75rem;
  flex-wrap: wrap;
}
.footer-legal a{
  color: var(--muted);
  font-weight: 400;
  text-decoration: none;
}
.footer-legal a:hover{ color: var(--text); }

/* trust note */
.footer-trust{
  margin-top: .85rem;
}
.footer-trust-card{
  border: 1px dashed rgba(8,77,59,.28);
  background: rgba(8,77,59,.06);
  border-radius: var(--radius);
  padding: .95rem 1.1rem;
  display: grid;
  gap: .3rem;
}
html[data-theme="dark"] .footer-trust-card{
  border-color: rgba(52,211,153,.22);
  background: rgba(52,211,153,.08);
}
.footer-trust-card strong{
  color: var(--text);
  font-weight: 950;
}
.footer-trust-card span{
  color: var(--muted);
  font-weight: 400;
  font-size: .92rem;
}

/* RTL helpers */
html[dir="rtl"] .footer-top,
html[dir="rtl"] .footer-bottom{
  direction: rtl;
}
