/* =========================================================
   Footer CSS
   ASP.NET Core Razor Pages frontend starter

   Purpose:
   - Provide reusable footer styles for business websites,
     boutique hotels, cafe/chocolate websites and small projects.
   - Use with DesignSystem/design-tokens.css.
   - Adapt links, address, social media and CTA to the current brand.
========================================================= */

/* =========================================================
   1. Base Footer
========================================================= */

.site-footer {
  position: relative;
  overflow: hidden;

  padding-top: var(--space-9, 6rem);
  padding-bottom: var(--space-5, 1.5rem);

  color: color-mix(in srgb, var(--color-text-light, #ffffff) 88%, transparent);
  background: var(--color-primary-dark, #142740);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at 10% 10%,
      rgba(255, 255, 255, 0.1),
      transparent 28%
    ),
    radial-gradient(
      circle at 90% 90%,
      rgba(201, 162, 39, 0.16),
      transparent 30%
    );

  pointer-events: none;
}

.footer-container {
  position: relative;
  z-index: 2;

  width: min(var(--container-lg, 1120px), calc(100% - 2rem));
  margin-inline: auto;
}

/* =========================================================
   2. Footer Main Grid
========================================================= */

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 0.8fr));
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: var(--space-7, 3rem);
}

/* =========================================================
   3. Footer Brand
========================================================= */

.footer-brand {
  max-width: 360px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3, 0.75rem);

  margin-bottom: var(--space-4, 1rem);

  color: #ffffff;
  font-size: var(--text-xl, 1.5rem);
  font-weight: var(--weight-bold, 700);
  line-height: 1;
  text-decoration: none;
}

.footer-logo:hover {
  color: #ffffff;
  text-decoration: none;
}

.footer-logo img {
  width: auto;
  max-width: 170px;
  max-height: 54px;
  object-fit: contain;
}

.footer-logo-mark {
  width: 46px;
  height: 46px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: var(--color-primary-dark, #142740);
  background: #ffffff;
  border-radius: var(--radius-lg, 1rem);

  font-weight: var(--weight-bold, 700);
}

.footer-logo-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-description {
  margin: 0;
  color: color-mix(in srgb, #ffffff 76%, transparent);
  line-height: var(--line-relaxed, 1.75);
}

/* =========================================================
   4. Footer Columns
========================================================= */

.footer-column-title {
  margin: 0 0 var(--space-4, 1rem);

  color: #ffffff;
  font-size: var(--text-sm, 0.875rem);
  font-weight: var(--weight-bold, 700);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-list {
  display: grid;
  gap: var(--space-3, 0.75rem);

  margin: 0;
  padding: 0;

  list-style: none;
}

.footer-link {
  color: color-mix(in srgb, #ffffff 76%, transparent);
  font-size: var(--text-sm, 0.875rem);
  text-decoration: none;

  transition:
    color var(--transition-base, 220ms ease),
    transform var(--transition-base, 220ms ease);
}

.footer-link:hover {
  color: #ffffff;
  text-decoration: none;
  transform: translateX(3px);
}

/* =========================================================
   5. Footer Contact
========================================================= */

.footer-contact-list {
  display: grid;
  gap: var(--space-4, 1rem);

  margin: 0;
  padding: 0;

  list-style: none;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3, 0.75rem);
}

.footer-contact-icon {
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg, 1rem);
}

.footer-contact-content {
  display: grid;
  gap: 0.125rem;
}

.footer-contact-label {
  color: #ffffff;
  font-size: var(--text-xs, 0.75rem);
  font-weight: var(--weight-bold, 700);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-contact-text,
.footer-contact-text a {
  color: color-mix(in srgb, #ffffff 76%, transparent);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.55;
  text-decoration: none;
}

.footer-contact-text a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* =========================================================
   6. Social Links
========================================================= */

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3, 0.75rem);
  margin-top: var(--space-5, 1.5rem);
}

.footer-social-link {
  width: 42px;
  height: 42px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full, 999px);

  text-decoration: none;

  transition:
    transform var(--transition-base, 220ms ease),
    background-color var(--transition-base, 220ms ease),
    border-color var(--transition-base, 220ms ease);
}

.footer-social-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
  text-decoration: none;
  transform: translateY(-2px);
}

/* =========================================================
   7. Footer CTA
========================================================= */

.footer-cta {
  margin-bottom: var(--space-7, 3rem);
  padding: var(--space-6, 2rem);

  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-5, 1.5rem);
  align-items: center;

  /* Flat semi-transparent background instead of backdrop-filter blur. */
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-2xl, 2rem);
}

.footer-cta-title {
  margin: 0;

  color: #ffffff;
  font-size: clamp(1.5rem, 3vw, var(--text-3xl, 2.5rem));
  line-height: var(--line-tight, 1.15);
}

.footer-cta-text {
  margin-top: var(--space-2, 0.5rem);
  margin-bottom: 0;

  color: color-mix(in srgb, #ffffff 76%, transparent);
  line-height: var(--line-relaxed, 1.75);
}

.footer-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3, 0.75rem);
}

/* =========================================================
   8. Footer Newsletter
========================================================= */

.footer-newsletter {
  display: grid;
  gap: var(--space-3, 0.75rem);
}

.footer-newsletter-text {
  margin: 0;
  color: color-mix(in srgb, #ffffff 76%, transparent);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.6;
}

.footer-newsletter-form {
  display: flex;
  gap: var(--space-2, 0.5rem);
}

.footer-newsletter-input {
  min-width: 0;
  flex: 1 1 auto;

  min-height: 44px;
  padding: 0.75rem 1rem;

  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full, 999px);
}

.footer-newsletter-input::placeholder {
  color: color-mix(in srgb, #ffffff 58%, transparent);
}

.footer-newsletter-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

/* =========================================================
   9. Footer Map
========================================================= */

.footer-map {
  overflow: hidden;
  min-height: 220px;

  border-radius: var(--radius-xl, 1.5rem);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.footer-map iframe {
  width: 100%;
  height: 100%;
  min-height: 220px;
  border: 0;
  display: block;
}

/* =========================================================
   10. Footer Bottom
========================================================= */

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4, 1rem);

  padding-top: var(--space-5, 1.5rem);

  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-copy {
  margin: 0;
  color: color-mix(in srgb, #ffffff 64%, transparent);
  font-size: var(--text-sm, 0.875rem);
}

.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4, 1rem);

  margin: 0;
  padding: 0;

  list-style: none;
}

.footer-bottom-link {
  color: color-mix(in srgb, #ffffff 64%, transparent);
  font-size: var(--text-sm, 0.875rem);
  text-decoration: none;
}

.footer-bottom-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* =========================================================
   11. Light Footer Variant
========================================================= */

.site-footer.footer-light {
  color: var(--color-text, #1f2933);
  background: var(--color-surface, #ffffff);
  border-top: 1px solid var(--color-border, #e4e7ec);
}

.site-footer.footer-light::before {
  background:
    radial-gradient(
      circle at 10% 10%,
      color-mix(in srgb, var(--color-primary, #1f3a5f) 8%, transparent),
      transparent 28%
    ),
    radial-gradient(
      circle at 90% 90%,
      color-mix(in srgb, var(--color-accent, #c9a227) 12%, transparent),
      transparent 30%
    );
}

.footer-light .footer-logo,
.footer-light .footer-column-title,
.footer-light .footer-contact-label,
.footer-light .footer-cta-title {
  color: var(--color-text, #1f2933);
}

.footer-light .footer-description,
.footer-light .footer-link,
.footer-light .footer-contact-text,
.footer-light .footer-contact-text a,
.footer-light .footer-cta-text,
.footer-light .footer-newsletter-text,
.footer-light .footer-copy,
.footer-light .footer-bottom-link {
  color: var(--color-text-muted, #667085);
}

.footer-light .footer-link:hover,
.footer-light .footer-contact-text a:hover,
.footer-light .footer-bottom-link:hover {
  color: var(--color-primary, #1f3a5f);
}

.footer-light .footer-contact-icon,
.footer-light .footer-social-link {
  color: var(--color-primary, #1f3a5f);
  background: var(--color-primary-light, #e8eef6);
  border-color: color-mix(
    in srgb,
    var(--color-primary, #1f3a5f) 12%,
    transparent
  );
}

.footer-light .footer-cta {
  background: var(--color-surface-soft, #f9fafb);
  border-color: var(--color-border, #e4e7ec);
}

.footer-light .footer-bottom {
  border-top-color: var(--color-border, #e4e7ec);
}

.footer-light .footer-map {
  border-color: var(--color-border, #e4e7ec);
}

/* =========================================================
   12. Boutique Footer Variant
========================================================= */

.site-footer.footer-boutique {
  background: linear-gradient(135deg, #26301d, #3f5123);
}

.footer-boutique .footer-social-link:hover,
.footer-boutique .footer-contact-icon {
  background: rgba(199, 154, 91, 0.2);
  border-color: rgba(199, 154, 91, 0.32);
}

/* =========================================================
   13. Cafe / Chocolate Footer Variant
========================================================= */

.site-footer.footer-cafe {
  /* Real Romm teal, deep to mid. */
  background: linear-gradient(135deg, #05323a, #06515d);
}

.footer-cafe .footer-social-link:hover,
.footer-cafe .footer-contact-icon {
  background: rgba(100, 158, 161, 0.22);
  border-color: rgba(100, 158, 161, 0.38);
}

/* Outline CTA needs to read on the dark teal footer. */
.footer-cafe .footer-cta-actions .btn-outline-custom {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
}

.footer-cafe .footer-cta-actions .btn-outline-custom:hover {
  color: var(--color-primary-dark, #05323a);
  background: #ffffff;
  border-color: #ffffff;
}

/* =========================================================
   14. Responsive
========================================================= */

@media (max-width: 1100px) {
  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .site-footer {
    padding-top: var(--space-7, 3rem);
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: var(--space-6, 2rem);
  }

  .footer-cta {
    grid-template-columns: 1fr;
    padding: var(--space-5, 1.5rem);
  }

  .footer-cta-actions {
    width: 100%;
  }

  .footer-cta-actions .btn-custom {
    width: 100%;
  }

  .footer-newsletter-form {
    flex-direction: column;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .footer-container {
    width: min(100% - 1.25rem, var(--container-lg, 1120px));
  }

  .footer-social-link {
    width: 40px;
    height: 40px;
  }
}

/* =========================================================
   15. Reduced Motion
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .footer-link,
  .footer-social-link {
    transition: none !important;
  }

  .footer-link:hover,
  .footer-social-link:hover {
    transform: none !important;
  }
}
