/* ============================================================
   XREI.CSS — fully self-contained
   No dependency on are.css
   ============================================================ */

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --xrei-gold: #c9a96e;
  --xrei-gold-light: #e2c99a;
  --xrei-dark: #1a1a1a;
  --are-dark-blue: #1a3748;
  --xrei-mid: #555555;
  --xrei-light: #f7f5f1;
  --xrei-white: #ffffff;
  --xrei-border: #e0dad0;

  --xrei-font-head: "Cormorant Garamond", "Georgia", serif;
  --xrei-font-body: "Jost", "Helvetica Neue", sans-serif;

  --xrei-radius: 6px;
  --xrei-radius-lg: 12px;
  --xrei-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  --xrei-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.13);

  --xrei-max: 1200px;
}

/* ============================================================
   BASE LAYOUT
   ============================================================ */

.site-title {
  margin-top: 10px;
}

#are-branding .custom-logo {
  max-height: 40px;
}

@media (min-width: 922px) {
  #are-header-inner {
    height: 60px;
  }
}
.are-container {
  max-width: var(--xrei-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 60px);
}

.are-section {
  padding: clamp(60px, 8vw, 120px) 0;
}

.are-section__header {
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 72px);
}

.are-section__h2 {
  font-family: var(--xrei-font-head);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 500;
  color: var(--xrei-dark);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 30px auto;
}

.are-section__intro {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--xrei-mid);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.are-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--xrei-radius);
  font-family: var(--xrei-font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: all 0.22s ease;
  cursor: pointer;
}

.are-btn--primary {
  background: var(--xrei-gold);
  color: var(--xrei-white);
  border: 2px solid var(--xrei-gold);
}
.are-btn--primary:hover {
  background: #b8925a;
  border-color: #b8925a;
  color: var(--xrei-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201, 169, 110, 0.35);
}

.are-btn--outline {
  background: transparent;
  color: var(--xrei-white);
  border: 2px solid rgba(255, 255, 255, 0.7);
}
.are-btn--outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--xrei-white);
  color: var(--xrei-white);
}

/* ============================================================
   HERO
   ============================================================ */
.xrei-hero {
  position: relative;
  margin-top: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body.admin-bar #primary {
  margin-top: 92px;
}

.dev-homes-hero-about {
  margin-top: 60px;
}

.xrei-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.xrei-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  display: block;
}

.xrei-hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--are-dark-blue);
}

.xrei-hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--xrei-white);
  padding: clamp(40px, 8vw, 20px) clamp(20px, 4vw, 60px);
  max-width: 1001px;
  animation: xrei-heroin 1s ease both;
}

@keyframes xrei-heroin {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.xrei-hero__badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}

.xrei-hero__badge {
  font-family: var(--xrei-font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 20px;
  color: var(--xrei-white);
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.08);
}

.xrei-hero__badge--gold {
  border-color: var(--xrei-gold-light);
  color: var(--xrei-gold-light);
}

.xrei-hero__tagline {
  font-family: var(--xrei-font-head);
  font-size: clamp(36px, 5.5vw, 68px);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
  color: var(--xrei-white);
}

.xrei-hero__subline {
  font-size: clamp(15px, 1.8vw, 19px);
  line-height: 1.65;
  min-height: calc(1.65em * 4);
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 40px;
  font-weight: 300;
}

.xrei-hero__ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.xrei-typewriter {
  /* inline — no extra styles needed */
}

.xrei-cursor {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: var(--xrei-gold);
  margin-left: 2px;
  vertical-align: baseline;
  animation: xrei-blink 1s step-end infinite;
}

@keyframes xrei-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ============================================================
   WHO WE ARE
   ============================================================ */
.xrei-who {
  background: var(--xrei-light);
}

.xrei-who__intro {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--xrei-mid);
  max-width: 720px;
  margin: 0 auto 16px;
  line-height: 1.75;
  text-align: center;
}

.xrei-who__intro strong {
  color: var(--xrei-dark);
  font-weight: 600;
}

.xrei-who__intro a {
  color: var(--xrei-gold);
  text-decoration: none;
}

.xrei-who__intro a:hover {
  text-decoration: underline;
}

.xrei-who__founded {
  text-align: center;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--xrei-mid);
  max-width: 640px;
  margin: -16px auto 56px;
  line-height: 1.7;
  font-style: italic;
}

.xrei-who__pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.xrei-who__pillar {
  background: var(--xrei-white);
  border-radius: var(--xrei-radius-lg);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--xrei-shadow);
  border: 1px solid var(--xrei-border);
  transition:
    box-shadow 0.22s,
    transform 0.22s;
}

.xrei-who__pillar:hover {
  box-shadow: var(--xrei-shadow-lg);
  transform: translateY(-3px);
}

.xrei-who__pillar-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(201, 169, 110, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--xrei-gold);
  margin-bottom: 20px;
}

.xrei-who__pillar-title {
  font-family: var(--xrei-font-head);
  font-size: 22px;
  font-weight: 500;
  color: var(--xrei-dark);
  margin: 0 0 12px;
}

.xrei-who__pillar-text {
  font-size: 15px;
  color: var(--xrei-mid);
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   PORTUGAL — REGIONS
   ============================================================ */
.xrei-portugal {
  background: var(--xrei-white);
}

.xrei-regions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.xrei-region-card {
  border-radius: var(--xrei-radius-lg);
  padding: clamp(28px, 3.5vw, 40px);
  border: 1px solid var(--xrei-border);
  background: var(--xrei-white);
  box-shadow: var(--xrei-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition:
    box-shadow 0.22s,
    transform 0.22s;
}

.xrei-region-card:hover {
  box-shadow: var(--xrei-shadow-lg);
  transform: translateY(-3px);
}

.xrei-region-card__region {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--xrei-gold);
}

.xrei-region-card__name {
  font-family: var(--xrei-font-head);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  color: var(--xrei-dark);
  margin: 0;
  line-height: 1.2;
}

.xrei-region-card__desc {
  font-size: 14px;
  color: var(--xrei-mid);
  line-height: 1.65;
  margin: 0;
}

.xrei-network {
  text-align: center;
  padding: 32px;
  background: var(--xrei-light);
  border-radius: var(--xrei-radius-lg);
  border: 1px solid var(--xrei-border);
}

.xrei-network__text {
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--xrei-mid);
  line-height: 1.7;
  margin: 0;
}

.xrei-network__text strong {
  color: var(--xrei-dark);
}

.xrei-network__text a {
  color: var(--xrei-gold);
  text-decoration: none;
}

.xrei-network__text a:hover {
  text-decoration: underline;
}

/* ============================================================
   OFFICES
   ============================================================ */
.xrei-offices {
  border-top: 2px solid #fff;
  background: var(--are-dark-blue);
}

.xrei-offices .are-section__h2 {
  color: var(--xrei-white);
}

.xrei-offices .are-section__intro {
  color: rgba(255, 255, 255, 0.65);
}

.xrei-offices__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2px;
  border-radius: var(--xrei-radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.xrei-office {
  padding: clamp(28px, 3vw, 40px) clamp(20px, 2.5vw, 32px);
  background: rgba(255, 255, 255, 0.04);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 0.22s;
}

.xrei-office:last-child {
  border-right: none;
}

.xrei-office:hover {
  background: rgba(201, 169, 110, 0.08);
}

.xrei-office__region {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--xrei-gold);
  margin-bottom: 10px;
}

.xrei-office__name {
  font-family: var(--xrei-font-head);
  font-size: 22px;
  font-weight: 500;
  color: var(--xrei-white);
  margin: 0 0 10px;
}

.xrei-office__address {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   CONTACT
   ============================================================ */
.xrei-contact {
  background: var(--xrei-light);
}

.xrei-contact__grid {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.xrei-contact__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(28px, 3.5vw, 44px) 48px;
  background: var(--xrei-white);
  border-radius: var(--xrei-radius-lg);
  border: 1px solid var(--xrei-border);
  box-shadow: var(--xrei-shadow);
  text-decoration: none;
  gap: 10px;
  transition:
    box-shadow 0.22s,
    transform 0.22s;
}

.xrei-contact__card:hover {
  box-shadow: var(--xrei-shadow-lg);
  transform: translateY(-3px);
}

.xrei-contact__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(201, 169, 110, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--xrei-gold);
}

.xrei-contact__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--xrei-mid);
}

.xrei-contact__value {
  font-family: var(--xrei-font-head);
  font-size: 18px;
  color: var(--xrei-dark);
  font-weight: 500;
}

.xrei-contact__license {
  text-align: center;
  font-size: 14px;
  color: var(--xrei-mid);
  letter-spacing: 0.04em;
  margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .xrei-hero {
    min-height: 43svh;
  }

  .xrei-offices__grid {
    grid-template-columns: 1fr 1fr;
  }

  .xrei-office {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .xrei-regions__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .xrei-hero__ctas {
    flex-direction: column;
    align-items: center;
  }

  .xrei-offices__grid {
    grid-template-columns: 1fr;
  }
}

.are-homepage-href {
  color: #fff;
}

/* ============================================================
   FOOTER LANGUAGE SWITCHER
   ============================================================ */

.footer-disclaimer {
  background: var(--are-dark-blue);
  padding: 20px;
  text-align: right;
  border-top: 1px solid #fff;
}

.footer-disclaimer-lang {
  margin: 0 auto 0px;
}

@media (max-width: 480px) {
  .footer-disclaimer {
    text-align: center;
  }

  .footer-disclaimer-lang {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 4px;
  }

  .lang-flag {
    font-size: 1.1em;
  }
}

/* ============================================================
   FISCAL VALUES REGISTRY — /data-for-article/
   Styles [fiscal_table] and the [fiscal_value] error marker.
   ============================================================ */

.fiscal-table {
  border: 1px #eee solid !important;
  max-width: 800px;
  border-collapse: collapse;
  margin: 20px auto 40px auto !important;
  font-size: 0.95rem;
}

.fiscal-table th,
.fiscal-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #dee2e6;
  text-align: left;
}

.fiscal-table th {
  background: #f8f9fa;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
}

/* Money and rates right-aligned so the digits line up. */
.fiscal-table th:nth-child(2),
.fiscal-table th:nth-child(3),
.fiscal-table td:nth-child(2),
.fiscal-table td:nth-child(3) {
  text-align: right;
  white-space: nowrap;
}

.fiscal-table tr:last-child td {
  border-bottom: none;
}

/* A missing key must be impossible to miss while writing. */
.fiscal-missing {
  background: #f8d7da;
  color: #721c24;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.9em;
}

/* ------------------------------------------------------------
   FOUR-COLUMN COMPARISON VARIANT
   Fixed layout so the columns hold the same proportions at
   every width. The type selector raises specificity above the
   three-column rules, which would otherwise win by source order.
   ------------------------------------------------------------ */
table.fiscal-table-wrap {
  width: 100%;
  table-layout: fixed;
}

table.fiscal-table-wrap th,
table.fiscal-table-wrap td {
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
  vertical-align: top;
}

table.fiscal-table-wrap th:nth-child(1),
table.fiscal-table-wrap td:nth-child(1) {
  width: 20%;
}

table.fiscal-table-wrap th:nth-child(2),
table.fiscal-table-wrap td:nth-child(2),
table.fiscal-table-wrap th:nth-child(3),
table.fiscal-table-wrap td:nth-child(3) {
  width: 22%;
  white-space: normal;
  text-align: left;
}

table.fiscal-table-wrap th:nth-child(4),
table.fiscal-table-wrap td:nth-child(4) {
  width: 36%;
}

/* ------------------------------------------------------------
   MOBILE
   A band cell holds "€660,982 – €1,150,853", which cannot wrap
   without breaking the number. The table scrolls sideways instead.
   ------------------------------------------------------------ */
@media (max-width: 600px) {
  .fiscal-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.85rem;
  }

  .fiscal-table thead,
  .fiscal-table tbody,
  .fiscal-table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  .fiscal-table th,
  .fiscal-table td {
    padding: 0.5rem 0.6rem;
    white-space: nowrap;
  }

  /* The band column needs the room; the other two are short. */
  .fiscal-table th:first-child,
  .fiscal-table td:first-child {
    width: 52%;
  }

  .fiscal-table th:nth-child(2),
  .fiscal-table td:nth-child(2) {
    width: 20%;
  }

  .fiscal-table th:nth-child(3),
  .fiscal-table td:nth-child(3) {
    width: 28%;
  }

  table.fiscal-table-wrap th,
  table.fiscal-table-wrap td {
    padding: 0.45rem 0.3rem;
  }
}
