/* ============================ */
/* ===== FOOTER =============== */
/* ============================ */

.footer {
  background: rgba(1,1,1,.5);
  color: #f0f0f0;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  margin-top: auto; /* stick to bottom when page is short */
}

.footer a { color: #f0f0f0; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.footer-section {
  text-align: center;
  width: 100%;
}

.footer-section b {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 5px;
}

/* Lists */
.footer-section ul { list-style: none; padding: 0; margin: 0 0 10px; }
.footer-section ul li { position: relative; margin-bottom: 10px; }

/* Brand block */
.footer .logo img {
  width: 120px;
  height: auto;
  border-radius: 10px;
  margin-bottom: 10px;
}
.footer .brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.footer .brand b { font-size: 1.2rem; display: block; }
.footer .brand p { color: #ccc; font-size: .9rem; margin: 4px; }

/* Bottom strip */
.footer-bottom {
  width: 100%;
  border-top: 1px solid #333;
  padding-top: 15px;
}
.footer-bottom ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-bottom li { display: inline-flex; align-items: center; gap: 8px; }
.footer-bottom .sep { opacity: .7; }

/* ============================ */
/* ===== SUB-MENUS ============ */
/* ============================ */

/* Toggle button for submenus */
.footer .footer-section li > button {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0 8px;
  inline-size: 100%;
  text-align: center; /* matches centered footer layout */
}

.footer .footer-section li > button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 6px;
}

/* Caret */
.footer .footer-section .caret {
  margin-left: 6px;
  display: inline-block;
  transition: transform .2s ease;
}

/* Submenu hidden by default */
.footer .footer-section li > ul {
  display: none;
  margin-top: 8px;
  padding-left: 0;
}

/* Open states (via JS .open OR keyboard focus) */
.footer .footer-section li.open > ul,
.footer .footer-section li:focus-within > ul { display: block; }

.footer .footer-section li.open > button .caret,
.footer .footer-section li:focus-within > button .caret { transform: rotate(180deg); }

/* Desktop hover open */
@media (hover: hover) and (pointer: fine) {
  .footer .footer-section li:hover > ul {
    display: block;
    background: rgba(0,0,0,.5);
    padding: 5px 0;
  }
  .footer .footer-section li:hover > button .caret { transform: rotate(180deg); }
}

/* Submenu item spacing */
.footer .footer-section li > ul > li { margin: 4px 0; }

/* Motion preference */
@media (prefers-reduced-motion: reduce) {
  .footer .footer-section .caret { transition: none; }
}

/* ============================ */
/* ===== DESKTOP LAYOUT ======= */
/* ============================ */

@media (min-width: 1025px) {
  .footer {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    text-align: center;
    padding: 50px 60px;
  }
  .footer-section { flex: 1 1 200px; max-width: 250px; }
  .footer-bottom { order: 5; text-align: center; }
}
