/**
 * Footer - Portugal section
 * Matches Netlify shell.css footer design
 */

/* ========== FOOTER CONTAINER ========== */
.residentas-footer {
  position: relative;
  padding: clamp(28px, 4vw, 48px) clamp(22px, 4vw, 56px) 24px !important;
  background: linear-gradient(145deg, #211b16, #171310 58%) !important;
  color: rgba(255, 244, 230, 0.78) !important;
  border-top: 1px solid rgba(255, 244, 230, 0.14) !important;
}

.residentas-footer .wp-block-columns {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 0.9fr) minmax(200px, 1.15fr) minmax(150px, 0.9fr);
  gap: clamp(48px, 5vw, 104px) !important;
  align-items: start !important;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 48px !important;
}

.residentas-footer .wp-block-column {
  margin: 0 !important;
  min-width: 0;
}

/* ========== FOOTER BRAND ========== */
.residentas-footer-brand {
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(13px, 1.05vw, 15px) !important;
  font-weight: 600 !important;
  color: #fff4e6 !important;
  letter-spacing: 0.02em !important;
}

/* Brand description text */
.residentas-footer .wp-block-columns .wp-block-column:first-child > .wp-block-group + p,
.residentas-footer .wp-block-columns .wp-block-column:first-child > p:last-child {
  max-width: 360px;
  margin: 18px 0 24px !important;
  color: rgba(255, 244, 230, 0.68) !important;
  font-size: 15px !important;
  line-height: 1.8 !important;
  text-wrap: pretty;
  text-align: left;
}

.residentas-footer-brand-row {
  justify-content: flex-start !important;
  gap: 8px !important;
}

.residentas-footer-brand-row .wp-block-image img {
  width: 46px !important;
  height: 46px !important;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* ========== FOOTER COLUMN HEADINGS ========== */
/* min-height matches the brand row logo (46px) so the eyebrow text
   vertically centers on the same baseline as the brand title */
.residentas-footer-col-title {
  color: rgba(255, 244, 230, 0.96) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  margin: 0 0 18px !important;
  min-height: 46px;
  display: flex;
  align-items: center;
}

/* ========== FOOTER LINKS ========== */
.residentas-footer-links {
  list-style: none !important;
  padding-left: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin: 0 !important;
}
.residentas-footer-links li {
  list-style: none !important;
}
.residentas-footer-links a {
  color: rgba(255, 244, 230, 0.74) !important;
  text-decoration: none !important;
  font-size: 14px !important;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
}
.residentas-footer-links a:hover {
  color: #fff4e6 !important;
  transform: translateX(2px);
}

/* ========== FOOTER BOTTOM BAR ========== */
.residentas-footer-bottom {
  max-width: 1200px;
  margin: 28px auto 0 !important;
  padding-top: 20px !important;
  border-top: 1px solid rgba(255, 244, 230, 0.14) !important;
  color: rgba(255, 244, 230, 0.48) !important;
  font-size: 12px !important;
  align-items: center !important;
}
.residentas-footer-legal {
  color: rgba(255, 244, 230, 0.48) !important;
  font-size: 12px !important;
}

.residentas-footer-tagline {
  color: rgba(255, 244, 230, 0.68) !important;
  font-style: italic;
  text-align: right;
  flex: 0 0 48%;
  margin-left: auto !important;
}

/* ========== FOOTER ORANGE DOT ========== */
.residentas-footer-dot {
  width: 8px !important;
  height: 8px !important;
  background: #b95732 !important;
  border-radius: 50% !important;
}

/* ========== BOOKING SECTION (above footer) ========== */
.residentas-book-section {
  position: relative;
  padding: clamp(56px, 7vw, 96px) clamp(22px, 4vw, 56px) !important;
  background: #ffffff !important;
  border-top: 1px solid rgba(35, 26, 21, 0.06) !important;
  scroll-margin-top: 100px;
}
.residentas-book-section .residentas-eyebrow {
  color: #b95732 !important;
  justify-content: center;
}
.residentas-book-section h2 {
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(28px, 3.4vw, 44px) !important;
  font-weight: 400 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.015em !important;
  color: #231a15 !important;
}
.residentas-book-section .rs-search-form {
  max-width: 900px;
  margin-top: 0;
  padding: 22px 22px 22px 26px;
  border-radius: 18px;
  background: #ffffff !important;
  box-shadow: 0 18px 44px rgba(35, 26, 21, 0.11), 0 3px 10px rgba(35, 26, 21, 0.06);
  border: 1px solid rgba(35, 26, 21, 0.06);
}
.residentas-book-section .rs-search-btn {
  border-radius: 12px;
  min-width: 106px;
}

/* ========== FOOTER RESPONSIVE ========== */
@media (max-width: 980px) {
  .residentas-footer .wp-block-columns {
    grid-template-columns: 1fr 1fr !important;
    gap: clamp(24px, 4vw, 40px) !important;
  }
}

@media (max-width: 640px) {
  .residentas-footer {
    padding: clamp(32px, 5vw, 48px) 18px 24px !important;
  }
  .residentas-book-section {
    padding: clamp(36px, 6vw, 56px) 18px !important;
  }

  /* FOOTER - center brand, keep 3 link columns side-by-side, reorder bottom row.
     Applied globally so every page using parts/footer-portugal renders identically
     (was previously only loaded by portugal.css → Portugal landing pages only). */
  .residentas-footer-brand-row,
  .residentas-footer-brand-copy {
    text-align: center !important;
    justify-content: center !important;
  }
  .residentas-footer .wp-block-columns .wp-block-column:first-child > .wp-block-group + p,
  .residentas-footer .wp-block-columns .wp-block-column:first-child > p:last-child {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  /* Brand row spans full width on top, then 3 link columns CENTERED as a group */
  .residentas-footer .wp-block-columns {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(80px, max-content)) !important;
    grid-template-areas:
      "brand brand brand"
      "explore company support" !important;
    justify-content: center !important;
    gap: 28px 22px !important;
    margin-bottom: 32px !important;
  }
  .residentas-footer .wp-block-columns .wp-block-column:nth-child(n+2) {
    flex-basis: auto !important;
    width: max-content !important;
  }
  .residentas-footer .wp-block-columns .wp-block-column:nth-child(1) {
    grid-area: brand;
  }
  .residentas-footer .wp-block-columns .wp-block-column:nth-child(2) {
    grid-area: explore;
  }
  .residentas-footer .wp-block-columns .wp-block-column:nth-child(3) {
    grid-area: company;
  }
  .residentas-footer .wp-block-columns .wp-block-column:nth-child(4) {
    grid-area: support;
  }
  .residentas-footer-col-title {
    font-size: 10px !important;
    margin-bottom: 12px !important;
    min-height: 0 !important;
    display: block !important;
  }
  .residentas-footer-links a {
    font-size: 12px !important;
  }
  /* Bottom row: tagline first, then copyright, both centered, stacked */
  .residentas-footer-bottom {
    flex-direction: column-reverse !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
  }
  .residentas-footer-tagline,
  .residentas-footer-legal {
    text-align: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 0 0 auto !important;
  }
}
