/* ===== THE FIRST GROUP TRADING — FOOTER (matches header/hero colours) ===== */

.tf-footer {
  --blue: #1b39c7;
  --blue-l: #3d6bff;
  --orange: #ec1c24;   /* site red (buttons) */
  --navy: #061538;
  --text: #c9d3ee;

  position: relative;
  overflow: hidden;
  font-family: 'Inter', Arial, sans-serif;
  color: var(--text);
  /* glowing background picture */
  background:
    linear-gradient(180deg, rgba(6,21,56,.55) 0%, rgba(6,21,56,.8) 100%),
    url('images/footer-bg.jpg') center / cover no-repeat,
    var(--navy);
}
.tf-footer a { color: inherit; text-decoration: none; transition: color .25s; }

/* blue | orange top line with a running light */
.tf-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  z-index: 2;
  background: linear-gradient(90deg, var(--blue) 0 50%, var(--orange) 50% 100%);
  box-shadow: 0 0 14px rgba(61,107,255,.6), 0 0 14px rgba(236,28,36,.4);
}
.tf-footer::after {
  content: "";
  position: absolute;
  top: 0; left: -200px;
  width: 200px; height: 4px;
  z-index: 3;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  box-shadow: 0 0 16px #fff;
  animation: tfTopBeam 6s linear infinite;
}

/* soft moving light glows */
.tf-footer__glow,
.tf-footer__glow::after {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.tf-footer__glow {
  top: -120px; left: 30%;
  width: 420px; height: 300px;
  background: rgba(61,107,255,.35);
  animation: tfFloat 10s ease-in-out infinite alternate;
}
.tf-footer__glow::after {
  content: "";
  top: 260px; left: 600px;
  width: 360px; height: 260px;
  background: rgba(236,28,36,.16);
  animation: tfFloat 12s ease-in-out infinite alternate-reverse;
}

/* ---------- Main grid ---------- */
.tf-footer__main {
  position: relative;
  z-index: 1;
  width: min(var(--wrap, 1600px), 100% - 2 * var(--edge, 40px));
  margin: 0 auto;
  padding: 70px 0 44px;
  display: grid;
  grid-template-columns: 1.45fr .8fr 1fr 1.25fr 1.35fr;
  gap: 44px;
}

.tf-footer__logo {
  width: 320px;
  max-width: 100%;
  margin-bottom: 22px;
  filter: drop-shadow(0 0 12px rgba(61,107,255,.35));
}
.tf-footer__brand p {
  margin: 0 0 26px;
  font-size: 14.5px;
  line-height: 1.75;
}

/* social icons */
.tf-footer__social { display: flex; gap: 10px; flex-wrap: wrap; }
.tf-footer__social a {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  backdrop-filter: blur(6px);
  transition: transform .3s, background .3s, box-shadow .3s, border-color .3s;
}
.tf-footer__social a:first-child,
.tf-footer__social a:hover {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 0 18px rgba(236,28,36,.6);
}
.tf-footer__social a:hover { transform: translateY(-4px); }

/* headings with glowing underline */
.tf-footer h4 {
  position: relative;
  margin: 6px 0 26px;
  padding-bottom: 13px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}
.tf-footer h4::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 40px; height: 3px;
  border-radius: 3px;
  background: var(--orange);
  box-shadow: 0 0 10px var(--orange);
  animation: tfBar 3s ease-in-out infinite;
}

/* links */
.tf-footer__links { list-style: none; margin: 0; padding: 0; }
.tf-footer__links li { margin-bottom: 14px; font-size: 14.5px; }
.tf-footer__links a { display: inline-flex; align-items: center; gap: 10px; }
.tf-footer__links i { color: var(--orange); font-size: 13px; transition: transform .25s; }
.tf-footer__links a:hover { color: #fff; text-shadow: 0 0 10px rgba(140,180,255,.7); }
.tf-footer__links a:hover i { transform: translateX(4px); }

/* contact */
.tf-footer__contact { list-style: none; margin: 0; padding: 0; }
.tf-footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 14.5px;
  line-height: 1.5;
}
.tf-footer__contact b {
  display: block;
  margin-bottom: 2px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.tf-footer__contact a:hover { color: #fff; }
.tf-footer__ic {
  flex: 0 0 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0,39,204,.4);
  border: 1px solid rgba(110,140,255,.55);
  color: #fff;
  box-shadow: 0 0 14px rgba(0,60,255,.4);
  animation: tfIcon 3s ease-in-out infinite;
}
.tf-footer__contact li:nth-child(2) .tf-footer__ic { animation-delay: .5s; }
.tf-footer__contact li:nth-child(3) .tf-footer__ic { animation-delay: 1s; }

/* map card with glowing border */
.tf-footer__map {
  position: relative;
  height: 200px;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid rgba(110,140,255,.6);
  background: #0d1a4a;
  box-shadow: 0 0 18px rgba(61,107,255,.45), 0 10px 30px rgba(0,0,0,.35);
  animation: tfMapGlow 3.5s ease-in-out infinite;
}
.tf-footer__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: saturate(.9) contrast(1.05);
}
.tf-footer__dir {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--orange);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(236,28,36,.5);
  transition: transform .3s, box-shadow .3s;
}
.tf-footer__dir:hover { transform: translateY(-3px); box-shadow: 0 0 26px rgba(236,28,36,.8); }

/* ---------- Bottom bar ---------- */
.tf-footer__bar {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255,255,255,.12);
  background: rgba(5,11,32,.55);
  backdrop-filter: blur(6px);
}
.tf-footer__bar-in {
  width: min(var(--wrap, 1600px), 100% - 2 * var(--edge, 40px));
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13.5px;
}
.tf-footer__bar b { color: var(--orange); font-weight: 600; }
.tf-footer__bar nav { display: flex; gap: 26px; }
.tf-footer__bar nav a:hover { color: #fff; }

/* ---------- Animations ---------- */
@keyframes tfTopBeam { to { left: 100%; } }
@keyframes tfFloat {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(120px, 40px); }
}
@keyframes tfBar {
  0%, 100% { width: 40px; }
  50%      { width: 64px; }
}
@keyframes tfIcon {
  0%, 100% { box-shadow: 0 0 10px rgba(0,60,255,.35); }
  50%      { box-shadow: 0 0 22px rgba(61,107,255,.85); }
}
@keyframes tfMapGlow {
  0%, 100% { box-shadow: 0 0 14px rgba(61,107,255,.35), 0 10px 30px rgba(0,0,0,.35); }
  50%      { box-shadow: 0 0 28px rgba(61,107,255,.75), 0 10px 30px rgba(0,0,0,.35); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1300px) {
  .tf-footer__main { grid-template-columns: 1.3fr 1fr 1fr; }
  .tf-footer__brand { grid-column: span 3; display: grid; grid-template-columns: auto 1fr; column-gap: 40px; align-items: start; }
  .tf-footer__brand .tf-footer__social { grid-column: 2; }
  .tf-footer__brand p { grid-column: 2; grid-row: 1; }
  .tf-footer__logo { grid-row: span 2; }
}
@media (max-width: 900px) {
  .tf-footer__main { grid-template-columns: 1fr 1fr; gap: 36px; }
  .tf-footer__brand { grid-column: span 2; display: block; }
}
@media (max-width: 600px) {
  .tf-footer__main { grid-template-columns: 1fr; padding: 56px 0 36px; }
  .tf-footer__brand { grid-column: auto; }
  .tf-footer__logo { width: 260px; }
  .tf-footer__bar-in { flex-direction: column; text-align: center; padding: 18px 0; }
  .tf-footer__bar nav { gap: 18px; flex-wrap: wrap; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .tf-footer *, .tf-footer::after { animation: none !important; }
}

.tf-footer { scroll-margin-top: var(--header-h, 96px); }
.tf-footer__bar b { color: #fff; }
.tf-footer__bar b::first-letter { color: inherit; }

/* phone: Quick Links + Product Categories side by side */
@media (max-width: 600px) {
  .tf-footer__main { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .tf-footer__main > :nth-child(1),
  .tf-footer__main > :nth-child(4),
  .tf-footer__main > :nth-child(5) { grid-column: 1 / -1; }
  .tf-footer__links li { font-size: 14px; }
}

/* ===== Footer alignment on laptops (1024px – 1300px) =====
   The site is shown at 70% size there, so there is room for the full
   5-column footer: logo + text | Quick Links | Categories | Contact | Map */
@media (min-width: 1024px) and (max-width: 1300px) {
  .tf-footer__main { grid-template-columns: 1.45fr .8fr 1fr 1.25fr 1.35fr !important; gap: 36px !important; }
  .tf-footer__brand { grid-column: auto !important; display: block !important; }
  .tf-footer__brand p, .tf-footer__brand .tf-footer__social { grid-column: auto !important; grid-row: auto !important; }
}
/* ---------- branches (tabs + address + map) ---------- */
.tf-branches{display:flex;gap:8px;margin-bottom:12px;flex-wrap:wrap}
.tf-branch-tab{
  display:inline-flex;align-items:center;gap:7px;cursor:pointer;
  padding:7px 14px;border-radius:30px;font:inherit;font-size:13px;font-weight:600;
  color:#c9d6f2;background:rgba(255,255,255,.06);border:1px solid rgba(110,140,255,.45);
  transition:background .25s,color .25s,box-shadow .25s;
}
.tf-branch-tab:hover{color:#fff;background:rgba(61,107,255,.25)}
.tf-branch-tab.is-active{color:#fff;background:rgba(0,39,204,.55);border-color:rgba(140,170,255,.9);box-shadow:0 0 14px rgba(0,60,255,.45)}
.tf-branch-tab i{font-size:12px;color:#ff5a5f}
.tf-branch[hidden]{display:none}
.tf-branch__addr{margin:0 0 12px;font-size:14px;line-height:1.55;color:#dbe4ff}
.tf-footer__contact li:nth-child(4) .tf-footer__ic{animation-delay:1.5s}
.tf-footer__contact li:nth-child(5) .tf-footer__ic{animation-delay:2s}

/* =========================================================
   FOOTER ALIGNMENT – even contact rows, columns end on one line
   ========================================================= */
.tf-footer__main{align-items:stretch}
.tf-footer__main > .tf-footer__col h4{margin-top:0}
/* contact rows: same icon size, icon centred on the first two lines, equal gaps */
.tf-footer__contact li{align-items:center;gap:14px;margin-bottom:16px;line-height:1.45;min-height:42px}
.tf-footer__contact li:last-child{margin-bottom:0}
.tf-footer__ic{flex:0 0 40px;height:40px;font-size:15px}
.tf-footer__contact b{margin-bottom:1px;line-height:1.3}
/* branches column fills the same height: map grows, button sits on the bottom line */
.tf-footer__col:has(.tf-branches){display:flex;flex-direction:column}
.tf-branch.is-active{display:flex;flex-direction:column;flex:1}
.tf-branch .tf-footer__map{flex:1;min-height:170px;height:auto}
.tf-branch .tf-footer__dir{align-self:flex-start}
@media (max-width:900px){ .tf-branch .tf-footer__map{flex:none;height:200px} }
