@font-face {
  font-family: "Kaushan Script";
  src: url("/assets/kaushan-script-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Handwritten accents inspired by the agency's approved campaign image. */
.hero h1,
.home-featured .section-head h2,
.trust .split-copy h2,
.reviews-inner h2,
.portals-inner h2,
.cta-copy h2,
.catalog-page .catalog-intro h1,
.fact strong,
.since-signature {
  font-family: "Kaushan Script", "Segoe Script", cursive;
  font-weight: 400;
  font-style: normal;
  font-synthesis: none;
  letter-spacing: 0;
  line-height: 1.22;
  text-wrap: balance;
  padding-inline: .06em;
}

.hero h1 {
  font-size: clamp(3.25rem, 5.8vw, 5.2rem);
  max-width: 650px;
  margin-block: 14px 22px;
  text-shadow: none;
}

.hero {
  min-height: 720px;
  overflow: hidden;
  color: #123e57;
  background: linear-gradient(125deg, #fff 8%, #f3f9fc 54%, #d9eaf1);
}
.hero::before, .hero::after { display: none; }
.hero > .wrap { position: relative; z-index: 1; }
.hero-content { width: 58%; max-width: 660px; padding: 60px 0 105px; }
.hero p { max-width: 530px; color: #3e5e6e; line-height: 1.8; }
.since-signature { color: #bb552a; font-size: 1.6em; white-space: nowrap; }
.hero .btn-light { color: #123e57; background: rgba(255,255,255,.8); border-color: #c6dbe5; }
.hero .btn-light:hover { background: white; border-color: #6597b1; }
.hero-photo {
  position: absolute;
  inset: 0 max(0px, calc((100vw - 1360px) / 2)) 0 auto;
  width: clamp(420px, 43vw, 520px);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 20%);
}
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.cta-panel .contact-button { margin-top: 12px; align-self: flex-start; color: #123e57; background: white; cursor: pointer; }
.cta-panel .contact-note { font-size: .95rem; margin: 14px 0 0; max-width: 300px; }
.contact-cta .cta-card { display: block; background: linear-gradient(115deg, #edf7fb, #fff 50%, #edf7fb); border-color: #d8eaf1; box-shadow: 0 16px 44px #215b7b0d; }
.contact-cta .cta-copy { max-width: 900px; margin-inline: auto; text-align: center; }
.contact-cta .cta-copy h2 { font-size: clamp(2rem, 3.3vw, 2.85rem); line-height: 1.26; color: #225e7d; margin: 12px auto 18px; text-wrap: balance; }
.contact-cta .cta-copy p { max-width: 640px; margin-inline: auto; }
.contact-cta .cta-actions { justify-content: center; }
.footer-grid .footer-contact-button { min-height: 44px; margin-top: 8px; padding: 10px 18px; font-size: .875rem; color: #174a6a; background: #fff; border-color: #ffffff80; cursor: pointer; }
.footer-grid .footer-contact-button:hover { background: #e7f3f8; }
.footer-grid .footer-contact-note { max-width: 270px; font-size: .875rem; line-height: 1.55; }

.home-featured .section-head h2,
.trust .split-copy h2,
.reviews-inner h2,
.portals-inner h2,
.cta-copy h2 {
  font-size: clamp(2.5rem, 4.1vw, 3.65rem);
}

.catalog-page .catalog-intro h1 { font-size: clamp(2.75rem, 4.3vw, 3.75rem); }
.fact strong { font-size: 2.4rem; color: #ffc09b; }

.portal-logos {
  max-width: 1120px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.portal-logo { min-width: 0; }
.portal-logo img { height: 58px; width: 190px; object-fit: contain; }
.portal-logo img.immobiliare { height: 58px; width: 225px; }
.portal-logo img.idealista { height: 58px; object-fit: contain; }
.portal-logo img.casa { height: 52px; width: 174px; }

footer { background: linear-gradient(115deg, #245a73, #347589); }
.footer-grid .footer-brand { display: block; color: #fff; text-decoration: none; margin-bottom: 12px; }
.footer-brand img {
  width: min(100%, 360px);
  height: auto;
  margin: -4px 0 12px;
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 87%, transparent), linear-gradient(0deg, transparent, #000 13%, #000 87%, transparent);
  mask-composite: intersect;
}
.footer-brand span { display: block; font: 400 clamp(1.75rem, 2.5vw, 2.2rem)/1.35 "Kaushan Script", "Segoe Script", cursive; letter-spacing: 0; }
.footer-social-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-social-links a { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 44px; padding: 4px 0; text-decoration: none; font-size: .875rem; }
.footer-social-links img { width: 38px; height: 38px; object-fit: contain; padding: 4px; background: #fff; border-radius: 50%; }
.footer-social-links a:hover span { text-decoration: underline; text-underline-offset: 4px; }


.topbar-inner { min-height: 54px; }
.topbar-links { align-items: center; gap: 20px; }
.topbar-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.topbar-social img {
  width: 36px;
  height: 36px;
  padding: 5px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(13, 50, 72, .14);
}
.topbar-social:hover img { background: #edf7fb; }
.topbar-social:hover span { text-decoration: underline; text-underline-offset: 3px; }
.topbar .language-picker { flex: 0 0 78px; }
.language-picker > img { width: 21px; height: 15px; object-fit: cover; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(13, 50, 72, .12); }

.scroll-brand, .desktop-social-tools { display: none; }

/* Keep a compact Home link beside the navigation once the large logo scrolls away. */
@media (min-width: 901px) {
  html { scroll-padding-top: 90px; }
  header {
    --masthead-width: min(900px, calc(100vw - 40px));
    --masthead-height: calc(var(--masthead-width) * 215 / 900);
    top: calc(-1 * (var(--masthead-height) + 20px));
  }
  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--masthead-height) auto;
    gap: 8px 14px;
    padding-block: 12px;
  }
  .brand {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    margin-inline: auto;
    width: var(--masthead-width);
    max-width: 100%;
    height: var(--masthead-height);
  }
  .brand img { object-fit: contain; }
  .nav-links {
    grid-column: 1;
    grid-row: 2;
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 24px;
    min-height: 50px;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .nav-links a { padding: 8px 0; font-size: 1rem; }
  .nav-links .nav-cta { padding: 11px 18px; }
  .header-tools { display: none; }
  .property-contact { top: 90px; }
  header.has-scroll-brand .nav { grid-template-columns: clamp(180px, 18vw, 220px) minmax(0, 1fr); }
  header.has-scroll-brand .scroll-brand {
    display: flex;
    grid-column: 1;
    grid-row: 2;
    align-items: center;
    align-self: center;
    min-height: 50px;
    width: 100%;
    border-radius: 8px;
  }
  .scroll-brand img { width: 100%; height: auto; object-fit: contain; }
  .scroll-brand:focus-visible { outline: 3px solid #eaa574; outline-offset: 3px; }
  header.has-scroll-brand .nav-links { grid-column: 2; gap: 8px 18px; justify-content: flex-end; }
  .home-featured .topbar { display: none; }
  .home-featured header {
    --masthead-width: min(740px, calc(100vw - 410px));
    --masthead-height: calc(var(--masthead-width) * 215 / 900);
    top: calc(-1 * (var(--masthead-height) + 10px));
    background: linear-gradient(115deg, #fff 20%, #f3fafd 60%, #e0eff5 100%);
    border-bottom: 1px solid #c8dfe9;
    box-shadow: 0 5px 22px #215b7b0a;
  }
  .home-featured header::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #95c5d8, #438bad 45%, #eaac81 82%, #dc7650);
    pointer-events: none;
  }
  .home-featured .nav {
    width: min(calc(100% - 48px), 1280px);
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 20px;
    padding-block: 10px 8px;
  }
  .home-featured .brand { grid-column: 1; justify-self: start; margin-inline: 0; mix-blend-mode: multiply; }
  .home-featured .nav-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 8px clamp(20px, 3vw, 42px);
    min-height: 58px;
    border-top: 1px solid #80afc533;
    padding-top: 8px;
  }
  .home-featured .nav-links a:not(.nav-cta) { position: relative; padding-block: 10px; }
  .home-featured .nav-links a:not(.nav-cta)::after {
    content: "";
    position: absolute;
    inset: auto 0 4px;
    height: 2px;
    border-radius: 2px;
    background: #d5774f;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .18s ease;
  }
  .home-featured .nav-links a:hover::after,
  .home-featured .nav-links a:focus-visible::after { transform: scaleX(1); }
  .home-featured .nav-links .nav-cta {
    margin-left: auto;
    padding: 11px 22px;
    background: linear-gradient(110deg, #c8653f, #df9163);
    box-shadow: 0 4px 14px #c8653f1f;
  }
  .home-featured .nav-links .nav-cta:hover { background: #bc5b36; }
  .home-featured .desktop-social-tools {
    display: grid;
    grid-template-columns: auto auto 78px;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    justify-content: end;
    gap: 18px;
    width: max-content;
    font-size: .875rem;
    color: #174a6a;
  }
  .desktop-social-tools a { text-decoration: none; }
  .desktop-social-tools .topbar-social { gap: 7px; font-size: .875rem; }
  .desktop-social-tools .topbar-social img { width: 30px; height: 30px; padding: 2px; background: transparent; box-shadow: none; border-radius: 0; }
  .desktop-social-tools .language-picker { background: #ffffffb3; border-color: #b9d4e1; }
  .home-featured header.has-scroll-brand .nav { grid-template-columns: clamp(180px, 18vw, 220px) minmax(0, 1fr); }
  .home-featured header.has-scroll-brand .nav-links { grid-column: 2; border-top-color: transparent; }
  .home-featured header.has-scroll-brand .scroll-brand { mix-blend-mode: multiply; }
  .home-featured header.has-scroll-brand .nav-links .nav-cta { margin-left: 0; }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .home-featured .desktop-social-tools { gap: 12px; }
  .home-featured .nav { column-gap: 16px; }
  .home-featured header.has-scroll-brand .nav-links { gap: 6px 14px; }
  .home-featured header.has-scroll-brand .nav-links .nav-cta { padding-inline: 14px; }
}

@media (max-width: 1000px) {
  .topbar-inner > span { display: none; }
  .topbar-links { width: 100%; justify-content: center; }
}

@media (max-width: 620px) {
  .topbar { display: block; }
  .topbar-inner { min-height: 50px; }
  .topbar-links { gap: 10px; flex-wrap: wrap; padding-block: 3px; }
  .topbar-social { gap: 6px; font-size: .78rem; }
  .topbar-social img { width: 30px; height: 30px; padding: 4px; }
  .topbar .language-picker { width: 70px; height: 40px; flex-basis: 70px; }
}

@media (max-width: 900px) {
  .portal-logos { max-width: 680px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-featured .topbar { display: block; color: #174a6a; background: linear-gradient(100deg, #f5fafc, #deeff6); }
  .home-featured .topbar-inner { min-height: 48px; }
  .home-featured .topbar-inner > span, .home-featured .topbar-links > span { display: none; }
  .home-featured .topbar-links { flex-wrap: nowrap; justify-content: center; align-items: center; gap: clamp(6px, 2vw, 18px); padding-block: 2px; }
  .home-featured .topbar-social { font-size: .875rem; gap: 5px; }
  .home-featured .topbar-social img { width: 26px; height: 26px; padding: 0; background: transparent; box-shadow: none; }
  .home-featured .topbar-social:hover { color: #b95c38; }
  .home-featured .topbar .language-picker { flex-basis: 68px; width: 68px; height: 40px; background: #ffffffb3; }
}

@media (prefers-reduced-motion: reduce) {
  .home-featured .nav-links a::after { transition: none; }
}

@media (max-width: 800px) {
  .hero { min-height: 0; display: block; background: #f5fafc; }
  .hero-content { width: 100%; max-width: 600px; padding: 38px 0 22px; margin-inline: auto; text-align: center; }
  .hero h1 { max-width: 600px; margin-top: 0; font-size: clamp(2.9rem, 8vw, 4.2rem); }
  .hero p { margin-inline: auto; }
  .hero-actions { justify-content: center; margin-top: 22px; }
  .hero-photo { position: relative; inset: auto; width: min(100%, 520px); margin: 0 auto; mask-image: linear-gradient(transparent, black 17%); }
  .hero-photo img { height: auto; margin-top: -38%; }
  .home-featured .search-shell { margin-top: 18px; }
}

@media (max-width: 620px) {
  .hero h1 { font-size: clamp(2.65rem, 10.6vw, 3.8rem); line-height: 1.25; }
  .hero-content { padding: 32px 0 18px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { width: auto; min-height: 46px; font-size: .88rem; padding: 11px 15px; }
  .home-featured .section-head h2,
  .trust .split-copy h2,
  .reviews-inner h2,
  .portals-inner h2,
  .cta-copy h2 { font-size: 2.55rem; line-height: 1.25; }
  .portal-logos { gap: 12px; }
  .portal-logo { padding: 12px; min-height: 86px; border-radius: 22px; }
  .portal-logo img,
  .portal-logo img.immobiliare,
  .portal-logo img.idealista,
  .portal-logo img.casa { width: 100%; height: 46px; }
}

@media (max-width: 360px) {
  .portal-logos { grid-template-columns: minmax(0, 1fr); }
  .portal-logo img { max-width: 210px; }
}

.search-card { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
@media (max-width: 1100px) {
  .search-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-button { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .search-card { grid-template-columns: minmax(0, 1fr); }
  .search-button { grid-column: auto; }
}
