/**
 * Footer Block Styles
 */

/* FIX-FOOTER-STRUCTURE: <footer> is the outer shell (darker or transparent),
   .footer-container is the inner rounded box with padding + background */
.usine-footer {
  color: var(--footer-text-color, #ffffff);
  padding: 2rem var(--section-padding-x, 64px);
  width: 100%;
  box-sizing: border-box;
  background-color: var(--footer-outer-bg, transparent);
}

.footer-container {
  max-width: var(--section-max-width, 1312px);
  margin: 0 auto;
  background-color: var(--footer-bg-color, #0a3760);
  border-radius: 24px;
  padding: 3rem 3rem 2rem;
  box-sizing: border-box;
}

/* Width variants */
.footer-width-filled .footer-container {
  max-width: 100%;
  border-radius: 0;
}

.footer-width-contained .footer-container {
  max-width: var(--section-max-width, 1312px);
}

/* Main horizontal layout: logo left, columns right */
.footer-main {
  display: flex;
  gap: 64px;
  align-items: flex-start;
}

.footer-logo-section {
  flex: 0 0 250px;
}

.footer-columns-wrapper {
  flex: 1;
}

/* Logo — FIX-FOOTER-LOGO-001: logo is now an <a> tag */
.footer-logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.5rem;
  text-decoration: none;
  color: inherit;
}

.footer-logo-img {
  display: block;
  height: 52px;
  width: 180px;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  object-position: left center;
}

.footer-logo-text {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--footer-text-color);
}

/* FIX-FOOTER-CTA-PILL: Footer CTA buttons get pill shape */
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2rem;
}

.footer-actions .btn {
  border-radius: 9999px;
  font-weight: 500;
}

/* Subtitle */
.footer-subtitle {
  color: var(--footer-text-color);
  opacity: 0.8;
  margin-bottom: 1.5rem;
  white-space: pre-line;
}

.footer-meta {
  color: var(--footer-text-color);
  opacity: 0.9;
  white-space: pre-line;
  margin-bottom: 2rem;
}

/* Newsletter */
.footer-newsletter {
  margin-bottom: 2.5rem;
}

.newsletter-form .form-group {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
}

.newsletter-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--footer-text-color);
  font-size: 0.95rem;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Contact Info */
/* FIX-EMPTY-CONTACT-001: Hide empty contact section */
.footer-contact:empty {
  display: none;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-icon .icon-img {
  width: 20px;
  height: 20px;
}

.contact-text {
  color: var(--footer-text-color);
  opacity: 0.8;
  font-size: 0.95rem;
}

/* Footer Columns — FIX-FOOTER-COLUMNS: auto-fit for variable column count */
.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem 3rem;
  margin-bottom: 2rem;
}

.footer-column-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--footer-text-color);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-link-item {
  margin-bottom: 0.75rem;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--footer-text-color);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
  font-size: 0.95rem;
}

.footer-link:hover {
  opacity: 1;
}

.footer-link.btn-disabled {
  opacity: 0.65;
}

.footer-link-chevron {
  display: none;
}

/* Social Links */
.footer-social {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.footer-social-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--footer-text-color);
}

.footer-social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--footer-text-color);
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s;
}

.footer-social-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.footer-social-link .dashicons {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

/* Footer Bottom — FIX-FOOTER-BOTTOM: Better spacing and integration */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

/* FIX-FOOTER-DIVIDER: Subtler separator + more spacing */
.footer-divider {
  width: 100%;
  height: 1px;
  margin: 2.5rem 0 0;
  background: rgba(255, 255, 255, 0.1);
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.72) !important;
}

.footer-copyright * {
  color: inherit !important;
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-credit-text {
  font-size: 14px;
  line-height: 1;
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-legal-link {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-legal-link:hover {
  opacity: 1;
}

/* Webiteasy logo in footer copyright */
.footer-webiteasy-link {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.footer-webiteasy-logo {
  height: 20px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  opacity: 0.72;
  transition: opacity 0.2s;
}

.footer-webiteasy-link:hover .footer-webiteasy-logo {
  opacity: 1;
}

/* Responsive — Tablet */
@media (max-width: 1024px) {
  .usine-footer {
    padding: 1.5rem var(--section-padding-x, 32px);
  }

  .footer-container {
    padding: 2.5rem 2rem 2rem;
  }

  .footer-main {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-logo-section {
    flex: none;
    width: 100%;
  }

  .footer-columns {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem 2rem;
  }
}

/* Responsive — Mobile */
@media (max-width: 768px) {
  .usine-footer {
    padding: 1rem 16px;
  }

  .footer-container {
    padding: 2rem 1.25rem 1.5rem;
    border-radius: 16px;
  }

  .footer-logo-img {
    height: 44px;
    width: auto;
    max-width: 160px;
  }

  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-legal-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
  }

  .footer-contact {
    flex-direction: column;
    gap: 0.75rem;
  }

  .footer-social-links {
    gap: 1rem;
  }

  .footer-actions {
    flex-direction: column;
    width: 100%;
  }

  .footer-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Responsive — Small mobile */
@media (max-width: 480px) {
  .usine-footer {
    padding: 0.75rem 8px;
  }

  .footer-container {
    padding: 1.5rem 1rem 1rem;
    border-radius: 12px;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-legal-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .newsletter-form .form-group {
    flex-direction: column;
  }

  .newsletter-form .form-group .btn {
    width: 100%;
    justify-content: center;
  }
}
