/* ==========================================================================
   FOOTER
   Casale Isidoro
   ========================================================================== */

/* --------------------------------------------------------------------------
   Footer Main
   -------------------------------------------------------------------------- */

.footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding-top: var(--space-2xl);
  padding-bottom: 0;
}

.footer a {
  color: var(--footer-text);
  transition: color var(--transition-base), opacity var(--transition-base);
}

.footer a:hover {
  color: var(--accent-light);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Footer Grid (4 Columns)
   -------------------------------------------------------------------------- */

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   Footer Columns
   -------------------------------------------------------------------------- */

.footer__col {
  /* individual column styling */
}

/* --- About Column --- */
.footer__about-logo {
  height: 36px;
  width: auto;
  margin-bottom: var(--space-md);
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

[data-theme="dark"] .footer__about-logo {
  filter: brightness(0) invert(0.7);
}

.footer__about-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: var(--fw-regular);
  color: #FFFFFF;
  margin-bottom: var(--space-xs);
}

[data-theme="dark"] .footer__about-name {
  color: var(--accent);
}

.footer__about-text {
  font-size: 0.95rem;
  font-weight: var(--fw-light);
  line-height: 1.8;
  color: var(--footer-text);
  opacity: 0.85;
  margin-bottom: var(--space-md);
}

/* --- Column Headings --- */
.footer__heading {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #FFFFFF;
  margin-bottom: var(--space-md);
  position: relative;
  padding-bottom: var(--space-sm);
}

[data-theme="dark"] .footer__heading {
  color: var(--accent);
}

.footer__heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 1px;
  background-color: var(--accent);
}

/* --- Links Column --- */
.footer__links {
  list-style: none;
}

.footer__links li {
  margin-bottom: 0.6rem;
}

.footer__links a {
  font-size: 0.95rem;
  font-weight: var(--fw-light);
  opacity: 0.85;
  display: inline-block;
  position: relative;
  text-decoration: none;
}

.footer__links a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent-light);
  transition: width var(--transition-base);
}

.footer__links a:hover {
  opacity: 1;
}

.footer__links a:hover::after {
  width: 100%;
}

/* --- Contact Column --- */
.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  font-weight: var(--fw-light);
  opacity: 0.85;
}

.footer__contact-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 3px;
  opacity: 0.85;
}

.footer__contact-item a {
  opacity: 1;
}

/* --- Legal Column / Codes --- */
.footer__legal-codes {
  margin-top: var(--space-md);
}

.footer__legal-code {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: var(--fw-light);
  opacity: 0.75;
  margin-bottom: 0.4rem;
  font-family: var(--font-body);
}

.footer__legal-code strong {
  font-weight: var(--fw-bold);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Social Icons
   -------------------------------------------------------------------------- */

.footer__social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: var(--space-md);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--footer-text);
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    transform var(--transition-fast);
}

.footer__social-link:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  transform: translateY(-2px);
}

[data-theme="dark"] .footer__social-link:hover {
  color: var(--bg-primary);
}

.footer__social-icon {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------------------
   Copyright Bar
   -------------------------------------------------------------------------- */

.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  margin-top: 0;
  font-size: 0.85rem;
  font-weight: var(--fw-regular);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

.footer__copyright {
  color: rgba(255, 255, 255, 0.85);
}

.footer__bottom-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
}

.footer__bottom-links a {
  opacity: 0.95;
  font-size: 0.85rem;
}

.footer__bottom-links a:hover {
  opacity: 1;
  color: var(--accent-light);
}

.footer__bottom-separator {
  color: rgba(255, 255, 255, 0.35);
}

.footer__credits {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  opacity: 1;
}

.footer__credits a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  text-underline-offset: 3px;
  transition: color var(--transition-base), text-decoration-color var(--transition-base);
}

.footer__credits a:hover {
  color: var(--accent-light);
  text-decoration-color: var(--accent-light);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
  }
}
