/* Mobile First - Footer Styles */
.site-footer {
  background-color: transparent;
  /* use parent color */
  padding-top: 0;
  /* no pt */
  display: flex;
  flex-direction: column;
  padding: 0 var(--site-padding) 30px var(--site-padding);
  /* 0 top, side, 30px bottom */
}

.footer-container {
  width: 100%;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  /* Remove default gaps */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  /* Indented Border */
  padding-top: 30px;
}

/* 1. Logo Row */
.footer-logo-row {
  width: 100%;
  display: flex;
  justify-content: flex-start;
}

.footer-logo {
  width: 120px;
  height: auto;
  filter: brightness(0) invert(1);
}

/* 2. Main Grid (Nav + Info) */
.footer-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
  padding-top: 30px;
  padding-bottom: 0;
  /* Let divider handle the bottom spacing now */
}

/* Column 1: Navigation */
.footer-col-nav {
  display: flex;
  flex-direction: column;
}

.footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-menu li a {
  color: #ffffff;
  /* Pure white */
  font-family: "Eudoxus Sans", sans-serif;
  font-size: 14px;
  /* Updated to 14px */
  font-weight: 400;
  text-decoration: none;
  opacity: 1;
  /* Remove opacity */
  transition: opacity 0.3s;
  white-space: nowrap;
}

.footer-menu li a:hover {
  opacity: 0.8;
}

/* Column 2: Info (Copyright & Email) */
.footer-col-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: flex-start;
  align-items: flex-start;
  /* Aligned Start */
  text-align: left;
  /* Aligned Left */
}

.footer-copyright p,
.footer-email p {
  margin: 0;
  color: #ffffff;
  /* Pure white */
  font-family: "Eudoxus Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  opacity: 1;
  /* Remove opacity */
}

.footer-email a {
  color: #ffffff;
  text-decoration: none;
}

/* 3. Divider */
.footer-divider {
  display: block;
  /* Restored */
  width: 100%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 30px 0;
  /* Spacing 30px top and bottom */
}

/* 4. Bottom Row (Legal) */
.footer-bottom-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.footer-legal-item p,
.footer-legal-item a {
  margin: 0;
  font-size: 14px;
  color: #ffffff;
  /* Pure white */
  opacity: 1;
  /* Remove opacity */
  text-decoration: none;
}

/* Desktop (min-width: 768px) Override */
@media (min-width: 768px) {
  .site-footer {
    padding-left: var(--site-padding);
    padding-right: var(--site-padding);
  }

  .footer-container {
    max-width: none;
  }

  /* Grid Layout for Desktop to reorder elements */
  .footer-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* Left Center Right */
    grid-template-areas:
      "logo . nav"
      "divider divider divider"
      "copyright legal email";
    align-items: center;
    gap: 0;
  }

  /* Flatten wrappers to allow grid placement */
  .footer-main-grid,
  .footer-col-info {
    display: contents;
  }

  /* 1. Logo */
  .footer-logo-row {
    grid-area: logo;
    justify-content: flex-start;
    padding: 0;
  }

  /* 2. Nav */
  .footer-col-nav {
    grid-area: nav;
    align-items: flex-end;
  }

  .footer-menu {
    flex-direction: row;
    gap: 30px;
  }

  /* 3. Divider */
  .footer-divider {
    grid-area: divider;
    margin: 30px 0;
    width: 100%;
  }

  /* 4. Copyright */
  .footer-copyright {
    grid-area: copyright;
    justify-self: start;
    font-size: 14px;
  }

  .footer-copyright p {
    font-size: 14px;
  }

  /* 5. Legal (Bottom Row originally) */
  .footer-bottom-row {
    grid-area: legal;
    justify-content: center;
    gap: 24px;
    width: auto;
    justify-self: center;
  }

  /* 6. Email */
  .footer-email {
    grid-area: email;
    justify-self: end;
    font-size: 14px;
  }
}

/* ── Footer Contact Modal ── */
.footer-contact-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.footer-contact-modal.active {
  opacity: 1;
  visibility: visible;
}

.footer-contact-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.footer-contact-modal__content {
  position: relative;
  background: #1D1D1D;
  border: 1px solid rgba(173, 235, 231, 0.15);
  border-radius: 16px;
  padding: 32px 24px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
}

.footer-contact-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

.footer-contact-modal__title {
  font-family: "Unbounded", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.footer-contact-modal__subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin: 0 0 24px;
}

.footer-contact-modal__field {
  margin-bottom: 16px;
}

.footer-contact-modal__field label {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.footer-contact-modal__field label span {
  color: #ADEBE7;
}

.footer-contact-modal__field input,
.footer-contact-modal__field textarea,
.footer-contact-modal__field select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
  font-family: "Eudoxus Sans", sans-serif;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.footer-contact-modal__field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.footer-contact-modal__field input:focus,
.footer-contact-modal__field textarea:focus,
.footer-contact-modal__field select:focus {
  border-color: rgba(173, 235, 231, 0.5);
}

.footer-contact-modal__field textarea {
  resize: vertical;
  min-height: 80px;
}

.footer-contact-modal__submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ADEBE7, #7dd3cf);
  border: none;
  border-radius: 10px;
  color: #1D1D1D;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.2s;
}

.footer-contact-modal__submit:hover {
  opacity: 0.9;
}

.footer-contact-modal__feedback {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
}

.footer-contact-modal__feedback.success {
  background: rgba(173, 235, 231, 0.15);
  color: #ADEBE7;
}

.footer-contact-modal__feedback.error {
  background: rgba(237, 114, 33, 0.15);
  color: #ED7221;
}