/*
Theme Name: CityFast v38
Theme URI: https://cityfast.org
Author: CityFast
Description: Professionellt fastighetstema för CityFast Stockholm.
Version: 3.8.0
License: GNU General Public License v2 or later
Text Domain: cityfast
*/

/* ── FONTS ─────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ── VARIABLES ──────────────────────────────────── */
:root {
  --primary:     #0d1f3c;
  --primary-90:  rgba(13,31,60,0.90);
  --primary-97:  rgba(13,31,60,0.97);
  --accent:      #2d4a7a;
  --accent-lt:   #4a6fa5;
  --gold:        #c9a84c;
  --gold-hover:  #ddca3c;
  --white:       #ffffff;
  --off-white:   #f5f4f0;
  --text:        #0d1f3c;
  --text-muted:  #5a6275;
  --border:      #c1cdd8;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;

  --max-w: 1260px;
}

/* ── RESET ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--text);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: all .15s ease; }
ul { list-style: none; }

/* ── TYPOGRAPHY ─────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.heading {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  line-height: 1.1;
  color: var(--primary);
  position: relative;
  bottom: -.1em;
}

.heading--xl { font-size: clamp(2rem, 5vw, 4.5rem); }
.heading--lg { font-size: clamp(1.8rem, 3.5vw, 3rem); }
.heading--md { font-size: clamp(1.4rem, 2.5vw, 2rem); }

p { margin-bottom: 1rem; }

/* ── LAYOUT ─────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container--narrow { max-width: 700px; }
.container--full   { max-width: 100%; padding: 0 1.5rem; }

/* ── HEADER TOP BAR ──────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 150;
  background: var(--primary);
}

.header__top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: .45rem 1.5rem;
  background: var(--primary);
  border-bottom: none;
}

.stock-price {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.stock-price span { color: var(--white); margin-left: .3rem; }

/* ── HEADER MAIN ────────────────────────────────── */
.header__main {
  background: rgb(13,31,60);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background-color: var(--primary);
  height: 5rem;
}

.-scrolled .header__main {
  background-color: var(--primary);
}

.header__main .container--full {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* ── LOGO ───────────────────────────────────────── */
.header__logo a {
  display: flex;
  align-items: center;
  gap: 0;
}

.logo-name {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--white);
  letter-spacing: .18em;
  text-transform: uppercase;
  line-height: 1;
}

.logo-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  border-left: 1px solid rgba(255,255,255,0.25);
  padding-left: 14px;
  margin-left: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
}

/* ── PRIMARY NAV ────────────────────────────────── */
.header__nav { align-self: flex-end; }

.nav-primary { width: 100%; }
.nav-primary ul { display: flex; gap: 0; }

.nav-primary > ul > li { margin-left: 2rem; }

.nav-primary > ul > li > a {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--white);
  padding-bottom: .75rem;
  display: block;
  position: relative;
}

.nav-primary > ul > li > a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width .25s ease;
}

.nav-primary > ul > li > a:hover::after { width: 100%; }
.nav-primary > ul > li > a:hover { color: var(--gold); opacity: 1; }

/* CTA nav button */
.nav-primary li.nav-button > a {
  background: var(--gold);
  color: var(--primary) !important;
  border-radius: 100px;
  padding: .5rem 1.25rem;
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 500;
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  align-self: center;
}
.nav-primary li.nav-button > a:hover {
  background: var(--gold-hover);
  opacity: 1;
}
.nav-primary li.nav-button > a::after { display: none; }

/* ── HAMBURGER ──────────────────────────────────── */
.header__off-canvas-toggle {
  display: none;
  position: absolute;
  left: 1.25rem;
  height: 100%;
  align-items: center;
}

.off-canvas-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.off-canvas-toggle__burger,
.off-canvas-toggle__burger::before,
.off-canvas-toggle__burger::after {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all .25s ease;
}

.off-canvas-toggle__burger { position: relative; }
.off-canvas-toggle__burger::before,
.off-canvas-toggle__burger::after {
  content: '';
  position: absolute;
  left: 0;
}
.off-canvas-toggle__burger::before { top: -8px; }
.off-canvas-toggle__burger::after  { top:  8px; }

/* ── OFF-CANVAS MOBILE MENU ─────────────────────── */
.off-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  max-width: 25rem;
  background: var(--gold);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform .3s ease;
  pointer-events: none;
}
.off-canvas-visible .off-canvas {
  transform: translateX(0);
  pointer-events: auto;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.off-canvas__body {
  height: 100%;
  overflow-y: auto;
}

.off-canvas__inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 4rem 2rem;
  position: relative;
}

.off-canvas__close {
  position: absolute;
  top: 1rem; right: 1rem;
}

.close-button {
  background: none;
  border: none;
  width: 2rem; height: 2rem;
  cursor: pointer;
  position: relative;
}
.close-button::before,
.close-button::after {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 100%; height: 2px;
  background: var(--primary);
  border-radius: 2px;
}
.close-button::before { transform: rotate(-45deg); }
.close-button::after  { transform: rotate(45deg); }

.nav-off-canvas ul { margin: 0; padding: 0; }
.nav-off-canvas > ul > li { border-bottom: 1px solid rgba(13,31,60,0.15); }
.nav-off-canvas > ul > li > a {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 2rem;
  color: var(--primary);
  padding: .5rem 0;
  display: block;
  text-decoration: none;
}
.nav-off-canvas > ul > li > a:hover { opacity: .7; }

/* ── HERO ───────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero--large {
  height: 50vw;
  max-height: 600px;
  min-height: 500px;
}

.hero--large .hero__content {
  align-items: center;
  text-align: left;
  padding: 0;
}

.hero__image,
.hero__slideshow,
.hero__slideshow .rslides {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image img,
.hero__slideshow img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Stenhus-style overlay - stronger gradient at bottom for text */
.hero--overlay .hero__image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.25) 40%, rgba(0,0,0,0.6) 100%);
  z-index: 1;
}

.hero__content {
  color: var(--white);
  display: flex;
  height: 100%;
  width: 100%;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 20;
}

.hero__content h1,
.hero__content .heading {
  color: #ffffff;
  margin-top: 0;
  max-width: 46.875rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero__content p {
  color: rgba(255,255,255,0.92);
  font-size: 1.05rem;
  max-width: 38rem;
  line-height: 1.65;
  margin-bottom: 0;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

/* ── MAIN CONTENT ───────────────────────────────── */
.main {
  background: var(--white);
  display: block;
  padding-top: 0;
}

/* ── SECTIONS ───────────────────────────────────── */
.section,
section[class^="section-"] {
  margin: 3.75rem 0;
}

.section--padded,
section.section--padded {
  padding: 3.75rem 0;
}

.section--bgc-primary,
section.section--bgc-primary {
  background-color: var(--primary);
  color: var(--white);
}

.section--bgc-primary h1,
.section--bgc-primary h2,
.section--bgc-primary h3,
.section--bgc-primary p { color: var(--white); }

.section--bgc-gray,
section.section--bgc-gray { background: var(--off-white); }

/* ── BUTTONS ────────────────────────────────────── */
.button {
  display: inline-block;
  border: 1px solid var(--primary);
  border-radius: 100px;
  color: var(--primary);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .625rem 1.875rem;
  text-decoration: none;
  transition: all .15s ease;
  cursor: pointer;
  background: transparent;
}

.button:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--primary);
  box-shadow: 0 0 1.25rem rgba(201,168,76,0.35);
  opacity: 1;
}

.button--primary {
  background: var(--primary);
  color: var(--white);
}

.button--secondary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--primary);
}

.button--white {
  background: var(--white);
  border-color: var(--white);
  color: var(--primary);
}

/* ── INFO NUMBERS ───────────────────────────────── */
.info-numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.info-number {
  text-align: center;
  padding: 1.5rem 1rem;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.info-number:last-child { border-right: none; }

.info-number__intro {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  display: block;
  margin-bottom: .5em;
}

.info-number__large {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 400;
  color: var(--gold);
  line-height: .9;
  display: block;
  border-bottom: 4px solid var(--accent-lt);
  padding-bottom: .25rem;
  margin-bottom: .5rem;
}

/* ── ARTICLE / NEWS CARDS ───────────────────────── */
.article-card {
  background: var(--white);
  display: flex;
  position: relative;
  box-shadow: 0 .3125rem .625rem rgba(0,0,0,.1);
  border-radius: .3125rem;
  overflow: hidden;
  transition: box-shadow .15s ease;
}

.article-card:hover { box-shadow: 0 .4375rem .9375rem rgba(0,0,0,.2); }

.article-card__tag {
  background: var(--accent);
  width: 5.3125rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-card__details {
  padding: .9375rem 3.625rem .8125rem 1.5625rem;
  align-self: center;
  color: var(--primary);
}

.article-card__details p {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}

/* ── SPLIT SECTION ──────────────────────────────── */
.section-split {
  display: flex;
}

.section-split__media {
  width: 40%;
  overflow: hidden;
  position: relative;
}

.section-split__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}

.section-split__content {
  width: 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem;
}

.section-split__content .container {
  max-width: 700px;
  padding: 0;
  margin: 0;
}

/* ── CONTACT FORM ───────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.form-group label {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid var(--primary);
  border-radius: .625rem;
  padding: .75rem 1rem;
  font-family: var(--font-sans);
  font-size: .95rem;
  color: var(--primary);
  outline: none;
  transition: box-shadow .2s;
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  box-shadow: 0 0 0 3px rgba(13,31,60,0.1);
}

.form-group textarea { min-height: 130px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── FOOTER ─────────────────────────────────────── */
.footer {
  background: var(--accent);
  color: var(--white);
  padding: 3.75rem 0;
  text-align: left;
}

.footer .container--wide {
  max-width: 1340px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer__logo {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 700;
  font-size: 1.55rem;
  color: var(--white);
}

.footer__info {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
}

.footer__contact p { margin-bottom: .75rem; font-size: .88rem; color: rgba(255,255,255,0.75); }
.footer__contact p:last-child { margin: 0; }
.footer__contact a { color: rgba(255,255,255,0.75); text-decoration: none; }
.footer__contact a:hover { color: var(--primary); opacity: 1; }

.footer__nav ul { display: flex; flex-direction: column; gap: .75rem; }
.footer__nav li a {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
}
.footer__nav li a:hover { color: var(--primary); opacity: 1; }

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 767px) {
  .header__nav { display: none; }
  .header__off-canvas-toggle { display: flex; }
  .header__main .container--full { justify-content: center; }

  .hero--large {
    height: 100vw;
    min-height: 24rem;
  }

  .main { padding-top: 0; }

  .hero--large .hero__content { padding-top: 94px; }

  .section-split { flex-direction: column; }
  .section-split__media { width: 100%; height: 250px; }
  .section-split__content { width: 100%; padding: 2.5rem 1.25rem; }

  .info-numbers { grid-template-columns: 1fr 1fr; }

  .footer .container--wide { flex-direction: column; gap: 2rem; }
  .footer__info { flex-direction: column; gap: 1.5rem; }

  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
  .info-numbers { grid-template-columns: 1fr 1fr; }
}

/* ── GAP FIX: make space under fixed header navy not white ── */
body { background: var(--primary); }
.main > *:not(.section-hero) { background: var(--white); }
.section-default { background: var(--white); }

/* ── KILL WHITE GAP ─────────────────────────────── */
html, body { background: #0d1f3c !important; }
.main { background: transparent; }
.section-default, .section--narrow { background: #ffffff; }

/* ── FINAL GAP FIX ───────────────────────────────── */
header { border: none !important; border-bottom: none !important; }
.main, .main > * { margin-top: 0 !important; }
.section-hero, .section-hero > * { margin: 0 !important; }
.hero { margin-top: 0 !important; }

/* ══════════════════════════════════════════════════════
   CITYFAST CUSTOM HEADER — Desktop
   ══════════════════════════════════════════════════════ */
.cf-nav{display:flex;align-items:center;list-style:none;margin:0;padding:0}
.cf-nav>li{position:relative;margin-left:2rem}
.cf-nav>li>a{font-family:'Playfair Display',serif;font-style:italic;font-size:1.1rem;color:#fff;text-decoration:none;white-space:nowrap;display:inline-block;padding:.5rem 0}
.cf-nav>li>a:hover{color:#c9a84c}
.cf-dropdown-wrap{position:fixed;top:6.5rem;left:0;right:0;background:#c9a84c;padding:2rem 5vw;display:flex;align-items:center;gap:0;opacity:0;visibility:hidden;transform:translateY(-5px);transition:all .25s ease;z-index:200}
.cf-nav>li:hover .cf-dropdown-wrap{opacity:1;visibility:visible;transform:translateY(0)}
.cf-dropdown-wrap .dd-title{font-family:'Playfair Display',serif;font-style:italic;font-weight:400;font-size:2.2rem;color:#0d1f3c;margin:0;padding-right:3rem;white-space:nowrap}
.cf-dropdown-wrap .dd-sep{width:1px;height:3rem;background:rgba(0,0,0,0.2);margin:0 2.5rem;flex-shrink:0}
.cf-dropdown-wrap .dd-col{display:flex;flex-direction:column;gap:.3rem}
.cf-dropdown-wrap .dd-col a{font-family:'DM Sans',sans-serif;font-weight:700;font-size:.78rem;letter-spacing:.1em;text-transform:uppercase;color:#0d1f3c;text-decoration:none;white-space:nowrap;line-height:1.8}
.cf-dropdown-wrap .dd-col a:hover{color:#fff}
.cf-btn-felan{background:#c9a84c!important;color:#0d1f3c!important;padding:.65rem 1.8rem!important;border-radius:100px!important;font-family:'Playfair Display',serif!important;font-style:italic!important;font-size:1.05rem!important;font-weight:400!important;text-decoration:none!important;display:inline-block!important;line-height:1.4!important;border:none!important;white-space:nowrap!important}
.cf-btn-felan:hover{background:#d4b55a!important}
.cf-hamburger{display:none;background:none;border:none;cursor:pointer;padding:8px;flex-direction:column;justify-content:center;gap:5px;z-index:10}
.cf-hamburger span{display:block;width:26px;height:2px;background:#fff;border-radius:2px}
.cf-mobile-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#0d1f3c;z-index:9999;display:flex;flex-direction:column;opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s ease;overflow-y:auto}
.cf-mobile-overlay.is-open{opacity:1;visibility:visible}
.cf-mobile-close{position:absolute;top:1.5rem;right:1.5rem;background:none;border:none;cursor:pointer;padding:8px}
.cf-mobile-close span{display:block;width:28px;height:2px;background:#fff;border-radius:2px}
.cf-mobile-close span:first-child{transform:rotate(45deg) translateY(1px)}
.cf-mobile-close span:last-child{transform:rotate(-45deg) translateY(-1px)}
.cf-mobile-nav{list-style:none;margin:0;padding:5rem 2rem 2rem;text-align:left}
.cf-mobile-nav>li{border-bottom:1px solid #c9a84c;padding:1.2rem 0}
.cf-mobile-nav>li:last-child{border-bottom:none;padding-top:1.8rem}
.cf-mobile-nav>li>a{font-family:'Playfair Display',serif;font-style:italic;font-weight:400;font-size:1.5rem;color:#fff;text-decoration:none;display:flex;align-items:center;justify-content:space-between}
.cf-mobile-nav>li>a:hover{color:#c9a84c}
.cf-mobile-nav .cf-mob-arrow{width:28px;height:28px;border:1px solid rgba(255,255,255,0.3);border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-left:12px;transition:transform .2s ease}
.cf-mobile-nav .cf-mob-arrow svg{width:12px;height:12px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cf-mobile-nav .cf-mob-sub{display:none;padding:.8rem 0 .2rem 20px}
.cf-mobile-nav .cf-mob-sub a{font-family:'DM Sans',sans-serif;font-style:normal;font-weight:500;font-size:.75rem;letter-spacing:.1em;text-transform:uppercase;color:#fff;text-decoration:none;display:block;padding:.45rem 0;line-height:1.6}
.cf-mobile-nav .cf-mob-sub a:hover{color:#c9a84c}
.cf-mobile-nav li.cf-mobile-felan{text-align:center}
.cf-mobile-nav li.cf-mobile-felan a{background:#c9a84c;color:#0d1f3c;padding:.7rem 2.5rem;border-radius:100px;font-size:1.1rem;display:inline-block;justify-content:center}
.cf-logo-mobile-sub{display:none}

/* ══════════════════════════════════════════════════════
   MOBILE RESPONSIVE — max-width: 768px
   ══════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* General mobile padding */
  .main > div,
  .main > section {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Tables become single-column */
  table { width: 100% !important; }
  table tr { display: flex !important; flex-direction: column !important; }
  table td { width: 100% !important; display: block !important; padding-bottom: 1rem !important; }

  /* Images responsive */
  img { max-width: 100% !important; height: auto !important; }
  iframe { max-width: 100% !important; }

  /* Grid layouts become single column on mobile */
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  [style*="display:grid"] {
    grid-template-columns: 1fr !important;
  }

  /* Reduce heading sizes */
  h1 { font-size: 2.2rem !important; }
  h2 { font-size: 1.6rem !important; }

  /* Property cards: force images to auto height */
  [style*="object-fit:cover"] {
    height: auto !important;
    min-height: 180px !important;
    max-height: 250px !important;
  }

  /* ── MOBILE HEADER ── */
  .cf-nav { display: none !important; }
  .cf-stockholm { display: none !important; }
  .cf-hamburger { display: flex !important; position: absolute !important; left: 1.5rem !important; }
  .cf-header-right { display: none !important; }
  .cf-dropdown-wrap { display: none !important; }
  .cf-logo-sub { display: none !important; }
  .cf-logo-link {
    flex-direction: column !important;
    align-items: center !important;
    margin: 0 auto !important;
  }
  .cf-logo-mobile-sub { display: block !important; }
}
