/* Footer — moderan izgled (neutralna tamna pozadina + brend akcenti) */

:root {
  --footer-bg-top: #2a2d32;
  --footer-bg-mid: #222428;
  --footer-bg-bottom: #1a1c1f;
  --footer-text: rgba(255, 255, 255, 0.92);
  --footer-text-muted: rgba(255, 255, 255, 0.68);
  --footer-border: rgba(255, 255, 255, 0.1);
  --footer-accent: var(--secondary-color, #66af12);
  --footer-accent-soft: rgba(102, 175, 18, 0.22);
}

footer {
  background: linear-gradient(
    180deg,
    var(--footer-bg-top) 0%,
    var(--footer-bg-mid) 55%,
    var(--footer-bg-bottom) 100%
  );
  border-top: 3px solid transparent;
  border-image: linear-gradient(
      90deg,
      transparent,
      var(--footer-accent) 20%,
      var(--primary-color, #b32025) 50%,
      var(--footer-accent) 80%,
      transparent
    )
    1;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 120px;
  background: radial-gradient(
    ellipse 80% 100% at 50% -20%,
    rgba(255, 255, 255, 0.08),
    transparent 70%
  );
  pointer-events: none;
}

footer .main {
  position: relative;
  z-index: 1;
  padding-bottom: 0;
}

.footer-container {
  margin: var(--footer-top-margin) 0 28px;
  gap: 32px;
  align-items: flex-start;
}

.footer-info-container {
  flex: 1 1 220px;
  min-width: 0;
}

.footer-info-container > h2,
.footer-info-container > .footer-info-title {
  font-size: 1.25rem;
  font-weight: var(--font-bold-weight, 800);
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: none;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--footer-accent-soft);
  position: relative;
}

.footer-info-container > .footer-info-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 48px;
  height: 2px;
  background: var(--footer-accent);
  border-radius: 2px;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-list-item,
.footer-link {
  padding-bottom: 0;
  font-weight: var(--font-light-weight, 400);
  text-shadow: none;
  color: var(--footer-text-muted);
  font-size: 13px;
  line-height: 1.5;
  transition: color var(--transition-base, 250ms ease);
}

.footer-link:hover {
  color: var(--footer-accent-hover, var(--button-hover-color, #aad165));
}

.footer-bold-text {
  font-weight: var(--font-medium-weight, 600);
  color: rgba(255, 255, 255, 0.82);
}

.footer-sofija {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--footer-border);
  border-radius: var(--border-radius-lg, 10px);
  width: fit-content;
  max-width: 100%;
}

.footer-avatar {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-sofija .footer-link {
  word-break: break-word;
}

.logo-bank-container {
  background: #f7f8f6;
  margin: 0 calc(-1 * var(--header-padding-right-left, 50px));
  padding: 18px var(--header-padding-right-left, 50px);
  border-left: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.bank-info {
  gap: 12px 16px;
}

.bank-img-wide {
  max-width: 120px;
  height: 32px;
  width: auto;
}

.bank-img {
  height: 32px;
  width: auto;
  max-width: 72px;
  filter: grayscale(0.15);
  opacity: 0.92;
  transition:
    opacity var(--transition-base, 250ms ease),
    filter var(--transition-base, 250ms ease);
}

.bank-info a:hover .bank-img {
  opacity: 1;
  filter: grayscale(0);
}

/* Mobilni accordion */
@media screen and (max-width: 769px) {
  .footer-container {
    gap: 0;
    margin-bottom: 16px;
  }

  .footer-info-container {
    width: 100%;
    border-bottom: 1px solid var(--footer-border);
  }

  .footer-info-container:last-of-type {
    border-bottom: none;
  }

  .footer-info-container:first-of-type {
    order: 0;
    border-bottom: none;
    padding-bottom: 8px;
  }

  .footer-info-container:first-of-type > .footer-info-title {
    border-bottom: 2px solid var(--footer-accent-soft);
    margin-bottom: 10px;
    font-size: 0.95rem;
    padding-bottom: 8px;
  }

  .footer-info-container > h2,
  .footer-info-container > .footer-info-title {
    font-size: 0.95rem;
    margin-bottom: 0;
    padding-bottom: 0;
    font-weight: var(--font-medium-weight, 600);
  }

  .footer-toggle-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
    font-weight: var(--font-medium-weight, 600);
    padding: 10px 8px;
    margin: 0 -8px 0;
    border-bottom: none !important;
    border-radius: var(--border-radius-lg, 10px);
    transition:
      background var(--transition-base, 250ms ease),
      color var(--transition-base, 250ms ease);
  }

  .footer-toggle-title::after {
    display: none;
  }

  .footer-toggle-title:hover,
  .footer-toggle-title.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
  }

  .toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 10px;
    color: var(--footer-accent);
    background: var(--footer-accent-soft);
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.3s ease;
  }

  .footer-toggle-title.active .toggle-icon {
    transform: rotate(180deg);
    background: rgba(102, 175, 18, 0.28);
  }

  .footer-toggle-title + .footer-list {
    max-height: 0;
    overflow: hidden;
    transition:
      max-height 0.4s ease,
      padding 0.3s ease;
    padding: 0 4px;
  }

  .footer-toggle-title.active + .footer-list {
    max-height: 1000px;
    padding: 4px 4px 16px;
  }

  .footer-sofija {
    width: 100%;
    flex-wrap: wrap;
    padding: 8px 10px;
    gap: 10px;
  }

  .footer-avatar {
    width: 44px;
    height: 44px;
  }

  .footer-list-item,
  .footer-link {
    font-size: 12px;
    line-height: 1.45;
  }

  .logo-bank-container {
    padding: 10px 12px;
  }

  .bank-info {
    gap: 8px 10px;
  }

  .bank-img {
    height: 22px;
    max-width: 52px;
  }

  .bank-img-wide {
    max-width: 88px;
    height: 22px;
    width: auto;
  }
}

@media screen and (max-width: 909px) {
  .logo-bank-container {
    margin: 0 calc(10px - calc(10px * 2));
    padding: 16px 20px;
  }
}

@media screen and (max-width: 550px) {
  footer .main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .footer-info-container > h2,
  .footer-info-container > .footer-info-title,
  .footer-toggle-title {
    font-size: 0.88rem;
  }

  .footer-list-item,
  .footer-link {
    font-size: 11.5px;
  }

  .bank-img {
    height: 20px;
    max-width: 46px;
  }

  .bank-img-wide {
    max-width: 76px;
    height: 20px;
  }

  .logo-bank-container {
    padding: 8px 10px;
  }
}
