/* Kildegård Anlæg - genskabt fra WordPress (Hestia-tema). */

/* ---------- Skrifttyper (selv-hostet, ingen forbindelse til Google) ---------- */
@font-face { font-family: 'Roboto'; font-weight: 300; font-style: normal; font-display: swap; src: url('../fonts/roboto-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/roboto-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/roboto-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/roboto-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto Slab'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/roboto-slab-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto Slab'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/roboto-slab-latin-700-normal.woff2') format('woff2'); }

:root {
  --bg-page: #c0b2a2;
  --ink: #3c4858;
  --text: #999;
  --text-article: #777;
  --tan: #c0b2a2;
  --accent: #474e34;
  --accent-dark: #363c27;
  --footer: #323437;
  --accent-pink: #e91e63;
  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text);
  font: 400 14px/1.7 'Roboto', Helvetica, Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; color: var(--ink); }
ul { margin: 0; padding: 0; }

.icon { height: 1em; width: auto; vertical-align: -0.125em; fill: currentColor; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 15px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 69px; }
.brand { display: flex; align-items: center; padding: 8px 0; }
.brand img { height: 52px; width: auto; }
.brand-text {
  display: inline-flex; flex-direction: column; line-height: 1.05;
  font: 300 25px/1.05 'Roboto', sans-serif; letter-spacing: .06em; color: #4d5a2e;
}
.brand-text small { font-size: 15px; letter-spacing: .08em; color: #8a7968; margin-top: 2px; }
.brand-text-big { font-size: clamp(48px, 7vw, 100px); color: rgba(255,255,255,.2); }
.brand-text-big small { font-size: .55em; }

.main-nav ul { list-style: none; display: flex; gap: 6px; }
.main-nav a {
  display: block; padding: 10px 14px;
  font: 400 12px/1 'Roboto', sans-serif; text-transform: uppercase; color: #555;
}
.main-nav a:hover, .main-nav a.active { color: var(--accent); text-decoration: none; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: #555; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero og sidehoveder ---------- */
.hero, .page-header {
  position: relative;
  display: block; text-align: center; color: #fff;
  background-color: #4a4a48;
  background-image: linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.5)), var(--bg);
  background-size: cover; background-position: center;
}
.hero { min-height: max(560px, calc(100vh - 169px)); padding: 245px 0 130px; }
.hero h1 { color: #fff; font: 700 clamp(40px, 6vw, 66px)/1.15 'Roboto', sans-serif; }
.hero-sub { display: block; margin: 28px 0 40px; font: 700 20px/1.4 'Roboto Slab', serif; color: #fff; }

.page-header { padding: 118px 0 182px; }
.page-header-gradient { background-image: linear-gradient(45deg, rgb(192,178,162) 0, rgb(255,206,141) 100%); }
.page-header h1 { color: #fff; font: 700 42px/60px 'Roboto', sans-serif; max-width: 940px; margin: 0 auto; }

.btn {
  display: inline-block; padding: 14px 36px;
  background: var(--accent); color: #fff;
  font: 500 12px/1 'Roboto', sans-serif; text-transform: uppercase; letter-spacing: .02em;
  border-radius: 3px; box-shadow: 0 2px 4px rgba(0,0,0,.25);
  transition: background .2s, box-shadow .2s;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; box-shadow: 0 14px 26px -12px rgba(71,78,52,.42), 0 4px 23px 0 rgba(0,0,0,.12), 0 8px 10px -5px rgba(71,78,52,.2); }

/* ---------- Hvidt kort ---------- */
.card {
  position: relative; background: #fff;
  margin: 0 30px; border-radius: 6px; overflow: hidden;
  box-shadow: 0 16px 38px -12px rgba(0,0,0,.56), 0 4px 25px 0 rgba(0,0,0,.12), 0 8px 10px -5px rgba(0,0,0,.2);
}
.card-overlap { margin-top: -60px; }

/* ---------- Forside: ydelser ---------- */
.services { padding: 70px 0 80px; }
.section-title { text-align: center; font: 700 36px/1.2 'Roboto Slab', serif; color: var(--ink); }
.section-lead { max-width: 740px; margin: 18px auto 0; text-align: center; font-size: 16px; line-height: 1.7; }

.service-grid { display: flex; flex-wrap: wrap; justify-content: center; margin: 80px -15px 0; row-gap: 70px; }
.service { flex: 0 0 33.333%; max-width: 33.333%; padding: 0 15px; text-align: center; }
.service .icon { display: block; height: 56px; margin: 0 auto 22px; color: var(--tan); }
.service h3 { font: 700 18px/1.4 'Roboto Slab', serif; margin-bottom: 12px; }
.service-link { display: block; color: inherit; }
.service-link:hover { text-decoration: none; }
.service-link:hover h3 { color: var(--accent); }
.service .icon-excavator { height: 66px; margin-bottom: 12px; }
.service p { margin: 0; font-size: 14px; line-height: 26px; color: var(--text); }

/* ---------- Forside: Om Kildegård Anlæg ---------- */
.about {
  position: relative; color: #fff; padding: 110px 0;
  background-color: #2c4320;
  background-image: linear-gradient(rgba(0,0,0,.62), rgba(0,0,0,.62)), var(--bg);
  background-size: cover; background-position: center;
}
.about-inner { display: grid; grid-template-columns: 5fr 6fr; gap: 40px; align-items: center; }
.about-text { padding-left: 20px; }
.about h2 { color: #fff; font: 700 36px/1.2 'Roboto Slab', serif; margin-bottom: 38px; }
.about p { margin: 0 0 24px; font: 400 18px/1.65 'Roboto', sans-serif; color: #fff; }
.about-logo { display: flex; justify-content: center; }
.about-logo img { width: 100%; max-width: 470px; height: auto; }

/* ---------- Forside: galleri ---------- */
.home-gallery { padding: 95px 0; }
.thumbs { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 50px; }
.thumbs li { width: 300px; max-width: 100%; }
.thumbs a { display: block; }
.thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Forside: Om os / kontaktbånd ---------- */
.contact-band {
  position: relative; color: #fff; padding: 110px 0 100px;
  background-color: #3a3a3a;
  background-image: linear-gradient(rgba(0,0,0,.62), rgba(0,0,0,.62)), var(--bg);
  background-size: cover; background-position: center;
}
.contact-band h2 { color: #fff; font: 700 36px/1.2 'Roboto Slab', serif; margin-bottom: 36px; }
.contact-band .lead { max-width: 500px; margin: 0 0 50px; font: 300 18px/1.65 'Roboto', sans-serif; color: #d8d8d8; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.contact-reviews { min-width: 0; }
.contact-reviews .smileywrapper { max-width: 100%; }

/* Karrusel: alle kort ligger oven på hinanden, så højden er det højeste korts. Ét vises ad gangen. */
.rc-track { display: grid; }
.rc-slide { grid-area: 1 / 1; margin: 0 !important; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; }
.rc-slide.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }
.rc-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.rc-btn { background: none; border: 0; color: #fff; font: 400 32px/1 'Roboto', sans-serif; padding: 0 10px; cursor: pointer; }
.rc-dots { display: flex; gap: 9px; }
.rc-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; }
.rc-dot[aria-current="true"] { background: #fff; }
.info-block { display: flex; gap: 14px; margin-bottom: 28px; }
.info-block > .icon { flex: 0 0 auto; height: 30px; width: 30px; margin-top: 2px; color: #fff; }
.info-block h3 { color: #fff; font: 700 18px/1.3 'Roboto Slab', serif; margin-bottom: 8px; }
.info-block p { margin: 0; font-size: 13px; line-height: 1.7; color: #fff; }
.info-block a { color: #fff; }

/* ---------- Undersider: indhold ---------- */
.content { padding: 80px 0 90px; }
.content-narrow { max-width: 782px; margin: 0 auto; padding-left: 15px; padding-right: 15px; }
.content p { margin: 0 0 18px; font: 300 17px/1.75 'Roboto', sans-serif; color: var(--text-article); }
.content strong { font-weight: 500; color: var(--ink); }
.content a { color: var(--ink); }
.content h2 { font: 500 36px/1.66 'Roboto', sans-serif; margin: 20px 0 10px; }
.content ul { margin: 0 0 30px; padding-left: 38px; }
.content li { font: 300 17px/1.75 'Roboto', sans-serif; color: var(--text-article); margin-bottom: 4px; }

.work-wide { margin: 25px 0; }
.work-wide img { width: 100%; }
.content .work-grid {
  list-style: none; display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 25px; margin: 25px 0; padding-left: 0;
}
.content .work-grid li { grid-column: span 2; display: flex; margin: 0; }
/* En enlig sidste række fylder hele bredden, to fylder halvdelen hver (som WordPress' galleri) */
.content .work-grid li:last-child:nth-child(3n+1) { grid-column: span 6; }
.content .work-grid li:nth-last-child(2):nth-child(3n+1),
.content .work-grid li:last-child:nth-child(3n+2) { grid-column: span 3; }
.work-grid a { display: flex; flex: 1; min-width: 0; }
.work-grid img { width: 100%; height: 100%; object-fit: cover; }
.content .work-grid + .work-wide, .content .work-wide + .work-grid { margin-top: 0; }

/* ---------- Kontaktside ---------- */
.map-wrap { max-width: 1600px; margin: 0 auto; height: 300px; background: #cfe9f2; }
.map { display: block; width: 100%; height: 100%; border: 0; }
.contact-page { background: #fff; padding: 40px 0 120px; }
.contact-inner { padding-left: 24px; }
.contact-page h1 { font: 700 38px/1.2 'Roboto Slab', serif; margin-bottom: 38px; }
.contact-block { margin-bottom: 40px; }
.contact-block h2 { display: flex; align-items: center; gap: 8px; font: 700 18px/1.3 'Roboto Slab', serif; margin-bottom: 20px; }
.contact-block h2 .icon { height: 25px; color: var(--accent-pink); }
.contact-block p { margin: 0; font-size: 14px; line-height: 23px; color: var(--text); }
.contact-block strong { color: var(--text); font-weight: 700; }
.contact-block a { color: var(--text); }
.page-contact .card, .page-contact main { background: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: #fff; padding: 38px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 30px; }
.site-footer a { color: #fff; font: 700 12px/1 'Roboto', sans-serif; text-transform: uppercase; }
.copyright { margin: 0; font-size: 13px; color: #fff; }
.link-btn { background: none; border: 0; padding: 0; color: #fff; font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Til toppen, lightbox og cookiebanner ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 50px; height: 50px; border: 0; border-radius: 50%;
  background: rgba(190,190,190,.9); color: #fff; font-size: 18px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.to-top:hover { background: #a8a8a8; }
.to-top[hidden], .lightbox[hidden], .cookie-bar[hidden] { display: none; }
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.88); padding: 30px;
}
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 12px; right: 18px; background: none; border: 0;
  color: #fff; font-size: 44px; line-height: 1; cursor: pointer;
}

.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background: #fff; color: #333; box-shadow: 0 -2px 12px rgba(0,0,0,.2);
}
.cookie-bar-inner { max-width: var(--container); margin: 0 auto; padding: 16px 15px; display: flex; align-items: center; gap: 24px; justify-content: space-between; }
.cookie-bar p { margin: 0; font: 400 14px/1.5 'Roboto', sans-serif; color: #333; }
.cookie-btns { display: flex; gap: 8px; flex: 0 0 auto; }
.cookie-btn { border: 0; border-radius: 3px; padding: 10px 18px; font: 500 13px/1 'Roboto', sans-serif; cursor: pointer; }
.cookie-btn-no { background: #dedfe0; color: #333; }
.cookie-btn-yes { background: #61a229; color: #fff; }
.cookie-btn:hover { filter: brightness(.94); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lightbox :focus-visible, .site-footer :focus-visible, .contact-band :focus-visible, .about :focus-visible, .hero :focus-visible { outline-color: #fff; }

/* ---------- Responsivt ---------- */
@media (max-width: 991px) {
  .service { flex-basis: 50%; max-width: 50%; }
  .about-inner { grid-template-columns: 1fr; }
  .about-logo { display: none; }
  .about-text { padding-left: 0; }
  .hero { min-height: 560px; padding-top: 180px; }
}

@media (max-width: 767px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; box-shadow: 0 6px 8px rgba(0,0,0,.12);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 0 14px; }
  .main-nav a { padding: 14px 20px; }
  .site-header .container { position: relative; }

  .card { margin-left: 12px; margin-right: 12px; }
  .hero { min-height: 480px; padding: 120px 0 100px; }
  .page-header { padding: 70px 0 110px; }
  .page-header h1 { font-size: 30px; line-height: 1.35; }
  .services { padding: 50px 0; }
  .service { flex-basis: 100%; max-width: 100%; }
  .service-grid { margin-top: 50px; row-gap: 50px; }
  .about, .contact-band { padding: 70px 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .home-gallery { padding: 60px 0; }
  .thumbs { gap: 20px; }
  .content { padding: 50px 0 60px; }
  .content h2 { font-size: 28px; }
  .content .work-grid { gap: 12px; grid-template-columns: repeat(2, 1fr); }
  .content .work-grid li, .content .work-grid li:last-child:nth-child(3n+2), .content .work-grid li:nth-last-child(2):nth-child(3n+1) { grid-column: span 1; }
  .content .work-grid li:last-child:nth-child(3n+1) { grid-column: span 1; }
  .content .work-grid li:last-child:nth-child(odd) { grid-column: span 2; }
  .contact-inner { padding-left: 15px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .cookie-bar-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .cookie-btns { justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
