﻿/* Footer */
.footer {
  background: var(--navy);
  padding: 28px 0 0;
  color: rgba(255, 255, 255, 0.85);
}
.footer .container {
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) repeat(4, minmax(0, 1fr));
  gap: 24px 20px;
  align-items: start;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.14);
}

.footer-brand .name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--gold);
  line-height: 1.2;
}
.footer-brand-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.footer-logo-link {
  flex-shrink: 0;
  display: block;
  line-height: 0;
  padding: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.footer-logo-link:hover {
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}
.footer-logo-link img {
  display: block;
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 4px;
}
.footer-brand .tagline {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.75;
  max-width: 320px;
}
.footer-connect {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  text-decoration: none;
}
.footer-social-link:hover {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.06);
}
.footer-gmb-link {
  display: block;
  line-height: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.22);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.footer-gmb-link:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}
.footer-gmb-link img {
  display: block;
  width: 118px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.footer-section {
  min-width: 0;
}
.footer-section summary {
  list-style: none;
  cursor: default;
  user-select: none;
}
.footer-section summary::-webkit-details-marker {
  display: none;
}
.footer-section h5,
.footer-section summary h5 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.footer-section a {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.52);
  margin-bottom: 9px;
  line-height: 1.45;
  transition: color 0.15s;
  text-decoration: none;
}
.footer-section a:last-child {
  margin-bottom: 0;
}
.footer-section a:hover {
  color: var(--gold);
}

.footer-bottom {
  padding: 16px 0 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.footer-copy {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.32);
  line-height: 1.75;
  max-width: 720px;
}
.footer-copy a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-copy a:hover {
  color: var(--gold);
}
.cc-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.32);
}
.cc-badge a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.32);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  transition: color 0.15s, border-color 0.15s;
}
.cc-badge a:hover {
  color: var(--gold);
  border-color: rgba(212, 175, 55, 0.35);
}

/* Desktop â€” keep columns always expanded, no accordion UI */
@media (min-width: 769px) {
  .footer-grid {
    grid-template-areas:
      "brand journal authors resources policies"
      "connect journal authors resources policies";
  }
  .footer-brand { grid-area: brand; }
  .footer-connect {
    grid-area: connect;
    margin-top: -6px;
  }
  .footer-section:nth-of-type(1) { grid-area: journal; }
  .footer-section:nth-of-type(2) { grid-area: authors; }
  .footer-section:nth-of-type(3) { grid-area: resources; }
  .footer-section:nth-of-type(4) { grid-area: policies; }

  .footer-section {
    display: block;
  }
  .footer-section summary {
    pointer-events: none;
  }
  .footer-section summary::after {
    display: none;
  }
  .footer-section .footer-links {
    display: block !important;
  }
}

/* Tablet */
@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas: none;
    gap: 22px 18px;
  }
  .footer-brand {
    grid-column: 1 / -1;
    grid-area: auto;
  }
  .footer-connect {
    grid-column: 1 / -1;
    grid-area: auto;
    justify-content: flex-start;
    margin-top: 0;
  }
  .footer-section {
    grid-area: auto;
  }
  .footer-brand .tagline {
    max-width: 560px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .footer {
    padding: 24px 0 0;
  }
  .footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding-bottom: 14px;
    align-items: start;
  }

  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4px 4px 20px;
    margin-bottom: 2px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  }
  .footer-brand-head {
    justify-content: center;
    margin-bottom: 12px;
  }
  .footer-brand .tagline {
    max-width: none;
    font-size: 12px;
    line-height: 1.7;
    padding: 0 2px;
  }

  .footer-connect {
    grid-column: 1 / -1;
    order: 10;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
    padding: 18px 14px;
    border: 1px solid rgba(212, 175, 55, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
  }
  .footer-connect .footer-gmb-link img {
    width: 108px;
  }

  .footer-section {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(212, 175, 55, 0.14);
    border-radius: 10px;
    overflow: hidden;
    min-height: 52px;
  }
  .footer-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .footer-section summary h5 {
    margin-bottom: 0;
    font-size: 10.5px;
    letter-spacing: 0.9px;
    line-height: 1.35;
  }
  .footer-section summary::after {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    transform: rotate(45deg);
    transition: transform 0.22s ease;
    flex-shrink: 0;
  }
  .footer-section[open] summary::after {
    transform: rotate(-135deg);
    margin-top: 3px;
  }
  .footer-section .footer-links {
    padding: 0 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
  .footer-section .footer-links a {
    padding: 9px 0;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12.5px;
    line-height: 1.4;
  }
  .footer-section .footer-links a:last-child {
    border-bottom: none;
    padding-bottom: 2px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 0 max(22px, env(safe-area-inset-bottom));
    gap: 14px;
  }
  .footer-copy {
    font-size: 11px;
    line-height: 1.65;
  }
  .cc-badge a {
    font-size: 12px;
    padding: 8px 14px;
  }
}

@media (max-width: 380px) {
  .footer-grid {
    gap: 10px;
  }
  .footer-logo-link img {
    width: 56px;
    height: 56px;
  }
  .footer-brand .name {
    font-size: 18px;
  }
  .footer-section summary {
    padding: 12px 10px;
  }
  .footer-section summary h5 {
    font-size: 10px;
    letter-spacing: 0.7px;
  }
  .footer-section .footer-links a {
    font-size: 12px;
  }
}
