/* ==========================================================================
   FOOTER.CSS
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border-glass);
  padding: 90px 0 30px;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  width: 600px; height: 400px;
  background: var(--gradient-glow);
  opacity: 0.25;
  transform: translateX(-50%);
  pointer-events: none;
}


.footer-top {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.65fr 1fr;
  column-gap: 35px;
  align-items: start;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--border-glass);
}
.footer-brand p { margin: 20px 0 26px; font-size: 0.92rem; max-width: 300px; }

.footer-socials { display: flex; gap: 14px; }
.footer-socials a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  display: flex; align-items: center; justify-content: center;
  transition: all .3s var(--ease);
  font-size: 0.9rem;
}
.footer-socials a:hover { background: var(--gradient-main); border-color: transparent; transform: translateY(-3px); }

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  margin-bottom: 22px;
  letter-spacing: 0.02em;
}
.footer-col ul { display: flex; flex-direction: column; gap: 13px; }
.footer-col a { color: var(--muted); font-size: 0.92rem; transition: color .3s; }
.footer-col a:hover { color: var(--accent); }

.footer-newsletter p { font-size: 0.92rem; margin-bottom: 18px; }
.newsletter-form { display: flex; gap: 0; border: 1px solid var(--border-glass); border-radius: 100px; padding: 5px; }
.newsletter-form input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 10px 18px;
  font-size: 0.9rem;
  font-family: var(--font-body);
}
.newsletter-form input:focus { outline: none; }
.newsletter-form button {
  background: var(--gradient-main);
  color: var(--text);
  border-radius: 100px;
  padding: 10px 22px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
}
.newsletter-note { font-size: 0.8rem; margin-top: 10px; color: var(--muted); }

.footer-bottom {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 14px;
}

.footer-logo {
  display: block;
  width: 180px;
  height: 40px;
  overflow: hidden;
  margin: 0 0 12px !important;
  padding: 0 !important;
}

.footer-logo img {
  display: block;
  margin-left: -20px;
  width: 180px;
  height: 180px;
  max-width: none;
  object-fit: contain;
  transform: translateY(-66px);
}

.site-footer .footer-brand p {
  margin: 0 0 26px !important;
  font-size: 0.92rem;
  max-width: 300px;
}


/* FOOTER RESPONSIVE FIX */
@media screen and (max-width: 992px) {
    .footer-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 36px 28px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-brand p {
        max-width: 420px;
    }
}

@media screen and (max-width: 640px) {
    .site-footer {
        padding: 56px 0 24px;
    }

    .footer-top {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        padding-bottom: 36px;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-logo {
        max-width: 100%;
    }

    .footer-newsletter {
        min-width: 0;
    }

    .newsletter-form {
        width: 100%;
        box-sizing: border-box;
    }

    .newsletter-form input {
        width: 100%;
        min-width: 0;
        padding: 10px 12px;
    }

    .newsletter-form button {
        flex-shrink: 0;
        padding: 10px 16px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-top: 22px;
    }

    .footer-socials {
        flex-wrap: wrap;
    }
}

/* CENTER FOOTER CONTENT ON MOBILE */
@media screen and (max-width: 640px) {
    .footer-top {
        text-align: center;
        justify-items: center;
    }

    .footer-brand,
    .footer-col,
    .footer-newsletter {
        width: 100%;
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto 12px !important;
    }

    .footer-brand p {
        margin: 0 auto 24px !important;
    }

    .footer-socials {
        justify-content: center;
    }

    .footer-col ul {
        align-items: center;
    }
  }



/* MOBILE FOOTER — NO NEWSLETTER */
@media screen and (max-width: 640px) {
    .footer-top {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 36px;
        text-align: center;
    }

    .footer-brand,
    .footer-top .footer-col {
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto 16px !important;
    }

    .footer-brand p {
        max-width: 360px;
        margin: 0 auto 24px !important;
        line-height: 1.7;
    }

    .footer-socials {
        justify-content: center;
    }

    .footer-col h4 {
        margin-bottom: 18px;
    }

    .footer-col ul {
        align-items: center;
        gap: 14px;
    }

    /* Hide newsletter if it exists */
    .footer-newsletter {
        display: none !important;
    }

    .footer-bottom {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
}



/* MOBILE FOOTER ALIGNMENT — CORRECT SELECTORS */
@media screen and (max-width: 640px) {
    .site-footer {
        width: 100%;
        box-sizing: border-box;
        overflow-x: clip;
    }

    .site-footer .footer-top {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .site-footer .footer-brand,
    .site-footer .footer-col {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        box-sizing: border-box;
    }

    .site-footer .footer-logo {
        margin: 0 auto 16px !important;
    }

    .site-footer .footer-brand p {
        width: calc(100% - 32px);
        max-width: 360px;
        margin: 0 auto 24px !important;
        text-align: center;
        overflow-wrap: break-word;
    }

    .site-footer .footer-socials {
        justify-content: center;
    }

    .site-footer .footer-col h4 {
        text-align: center;
    }

    .site-footer .footer-col ul {
        align-items: center;
        padding-left: 0;
        list-style: none;
    }

    .site-footer .footer-bottom {
        align-items: center;
        text-align: center;
    }
}
