/*
Theme Name: Karlssons Stensättning
Theme URI: https://karlssonssten.se
Description: Custom child theme for Karlssons Stensättning AB
Author: Joel Karlsson
Template: astra
Version: 1.1
*/

/* ============================================================
   RESET & ROOT
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --g1: #2d5a38;
  --g2: #3a7d44;
  --g3: #4e9a5c;
  --g4: #6db87a;
  --beige: #f5f0e8;
  --beige2: #e8dcc8;
  --beige3: #c4a882;
  --white: #ffffff;
  --bg: #fafaf7;
  --text: #1c1e1a;
  --text2: #4a4e46;
  --text3: #8a8f84;
  --r: 10px;
  --f: 'Inter', system-ui, sans-serif;
}

html, body {
  font-family: var(--f) !important;
  background: var(--bg) !important;
  color: var(--text) !important;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  overflow-x: hidden;
}

a { text-decoration: none; }

/* Hide Astra's own header/footer/breadcrumbs */
#wpadminbar { display: none !important; }
.site-header, #masthead, .ast-site-header-html,
.site-footer, #colophon, .ast-footer-html,
.ast-above-header-section, .ast-below-header-section,
.ast-breadcrumbs-wrapper, .ast-comment-list-wrap .ast-comment-meta,
.comments-area { display: none !important; }

/* ============================================================
   HEADER
   ============================================================ */
.ks-header {
  position: sticky; top: 0; z-index: 9999;
  background: var(--g1);
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: 68px; width: 100%;
}

.ks-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }

.ks-logo-icon {
  width: 36px; height: 36px;
  background: var(--beige2); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: var(--g1);
}

.ks-logo-name { color: #fff; font-size: 14px; font-weight: 600; }
.ks-logo-sub  { color: rgba(255,255,255,0.5); font-size: 11px; }

.ks-nav { display: flex; align-items: center; gap: 2px; }

.ks-nav a {
  color: rgba(255,255,255,0.78);
  font-size: 13px; font-weight: 500;
  padding: 8px 13px; border-radius: 7px; transition: all .2s;
}

.ks-nav a:hover, .ks-nav a.active { color: #fff; background: rgba(255,255,255,0.1); }

.ks-nav .btn-offert {
  margin-left: 8px; background: var(--g3); color: #fff !important;
  padding: 9px 18px; border-radius: 8px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(78,154,92,0.35);
}

.ks-nav .btn-offert:hover { background: var(--g4) !important; transform: translateY(-1px); }

/* ============================================================
   HERO (frontpage only)
   ============================================================ */
.ks-hero {
  background: linear-gradient(150deg, var(--g1) 0%, var(--g2) 50%, var(--g3) 100%);
  padding: 90px 48px 110px;
  text-align: center; position: relative; overflow: hidden;
}

.ks-hero-bg {
  position: absolute; inset: 0;
  background: url('https://karlssonssten.se/wp-content/uploads/2022/11/OFPE6341-650x525.jpg') center/cover;
  opacity: 0.1;
}

.ks-hero-wave {
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 60px; background: var(--bg);
  clip-path: ellipse(60% 100% at 50% 100%);
}

.ks-hero-inner { position: relative; max-width: 680px; margin: 0 auto; }

.ks-badge {
  display: inline-block;
  border: 1px solid rgba(245,240,232,0.35); background: rgba(245,240,232,0.12);
  color: var(--beige); font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 20px; margin-bottom: 22px;
}

.ks-hero h1 {
  font-size: 50px; font-weight: 800; color: #fff;
  line-height: 1.1; letter-spacing: -.03em; margin-bottom: 18px;
}

.ks-hero p {
  font-size: 17px; color: rgba(255,255,255,0.72);
  line-height: 1.7; margin-bottom: 34px;
}

.ks-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   PAGE BANNER (inner pages)
   ============================================================ */
.ks-page-banner {
  background: linear-gradient(135deg, var(--g1) 0%, var(--g2) 100%);
  padding: 52px 0 56px; position: relative; overflow: hidden;
}

.ks-page-banner::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 40px; background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.ks-breadcrumb { font-size: 12px; color: rgba(255,255,255,0.55); margin-bottom: 10px; }
.ks-breadcrumb a { color: rgba(255,255,255,0.55); transition: color .2s; }
.ks-breadcrumb a:hover { color: rgba(255,255,255,0.9); }

.ks-page-title {
  font-size: 40px; font-weight: 800; color: #fff;
  letter-spacing: -0.03em; line-height: 1.15;
}

/* ============================================================
   PAGE BODY (inner pages)
   ============================================================ */
.ks-page-body { padding: 64px 0 90px; background: var(--bg); }

.ks-page-body h1,
.ks-page-body h2,
.ks-page-body h3,
.ks-page-body h4 {
  font-family: var(--f) !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  letter-spacing: -0.02em; line-height: 1.25;
}

.ks-page-body h2 { font-size: 26px !important; margin: 32px 0 14px !important; }
.ks-page-body h3 { font-size: 20px !important; margin: 24px 0 10px !important; }
.ks-page-body h4 { font-size: 16px !important; margin: 18px 0 8px !important; }

.ks-page-body p {
  font-size: 15px !important; color: var(--text2) !important;
  line-height: 1.8 !important; margin-bottom: 18px !important;
  font-family: var(--f) !important;
}

.ks-page-body ul, .ks-page-body ol {
  margin: 0 0 18px 22px; color: var(--text2);
  font-size: 15px; line-height: 1.8;
}

.ks-page-body img { border-radius: var(--r); max-width: 100%; height: auto; display: block; }

.ks-page-body a {
  color: var(--g2); font-weight: 500;
  transition: color .2s;
}

.ks-page-body a:hover { color: var(--g1); }

/* WPBakery cleanup */
.ks-page-body .vc_row,
.ks-page-body .wpb_row,
.ks-page-body .vc_column_container { width: 100% !important; }

/* ============================================================
   CONTACT FORM 7
   ============================================================ */
.wpcf7-form p { margin-bottom: 14px !important; }

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="number"],
.wpcf7-form textarea,
.wpcf7-form select {
  font-family: var(--f) !important;
  width: 100%; border: 1px solid var(--beige2) !important;
  border-radius: 8px !important; padding: 12px 16px !important;
  font-size: 14px !important; background: #fff !important;
  color: var(--text) !important; outline: none !important;
  box-shadow: none !important; transition: border .2s, box-shadow .2s !important;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form textarea:focus {
  border-color: var(--g3) !important;
  box-shadow: 0 0 0 3px rgba(78,154,92,0.12) !important;
}

.wpcf7-form textarea { min-height: 130px; resize: vertical; }

.wpcf7-form input[type="submit"] {
  font-family: var(--f) !important;
  background: var(--g2) !important; color: #fff !important;
  font-weight: 700 !important; font-size: 14px !important;
  cursor: pointer; border: none !important;
  padding: 13px 30px !important; border-radius: 9px !important;
  box-shadow: 0 2px 10px rgba(58,125,68,.25) !important;
  transition: all .2s !important; width: auto !important;
}

.wpcf7-form input[type="submit"]:hover {
  background: var(--g3) !important; transform: translateY(-1px) !important;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-beige {
  background: var(--beige); color: var(--g1) !important;
  padding: 14px 30px; border-radius: 9px;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transition: all .2s; display: inline-block;
}

.btn-beige:hover { background: #fff; transform: translateY(-2px); }

.btn-outline {
  background: rgba(255,255,255,0.12); color: #fff !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  padding: 14px 30px; border-radius: 9px;
  font-size: 14px; font-weight: 500;
  transition: all .2s; display: inline-block;
}

.btn-outline:hover { background: rgba(255,255,255,0.2); }

.btn-green {
  background: var(--g3); color: #fff !important;
  padding: 13px 28px; border-radius: 9px;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 2px 10px rgba(78,154,92,.3);
  transition: all .2s; display: inline-block;
}

.btn-green:hover { background: var(--g4); transform: translateY(-2px); }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.ks-wrap { max-width: 1140px; margin: 0 auto; padding: 0 48px; }
.ks-section { padding: 72px 0; }
.ks-section-beige { background: var(--beige); padding: 72px 0; }
.ks-section-white { background: #fff; padding: 72px 0; }

.ks-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--g3); margin-bottom: 10px; }
.ks-title { font-size: 30px; font-weight: 800; color: var(--text); letter-spacing: -.03em; line-height: 1.2; margin-bottom: 12px; }
.ks-desc  { font-size: 15px; color: var(--text3); line-height: 1.7; max-width: 500px; margin-bottom: 40px; }

/* ============================================================
   STATS
   ============================================================ */
.ks-stats {
  display: flex; justify-content: center;
  gap: 60px; flex-wrap: wrap;
  background: #fff; border-bottom: 1px solid var(--beige2);
  padding: 28px 48px;
}

.ks-stat-n { font-size: 26px; font-weight: 800; color: var(--g2); }
.ks-stat-l { font-size: 11px; color: var(--text3); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }

/* ============================================================
   SERVICES CARDS
   ============================================================ */
.ks-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

.ks-card {
  background: #fff; border: 1px solid var(--beige2);
  border-radius: var(--r); padding: 24px; transition: all .25s;
}

.ks-card:hover { border-color: var(--g3); box-shadow: 0 6px 24px rgba(58,125,68,.1); transform: translateY(-3px); }

.ks-icon { width: 42px; height: 42px; background: var(--beige); border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 19px; margin-bottom: 13px; }

.ks-card h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.ks-card p  { font-size: 13px; color: var(--text3); line-height: 1.6; }

/* ============================================================
   GALLERY
   ============================================================ */
.ks-gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }

.ks-gitem { border-radius: var(--r); overflow: hidden; aspect-ratio: 4/3; position: relative; }
.ks-gitem img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; display: block; }
.ks-gitem:hover img { transform: scale(1.06); }

.ks-gcap {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(45,90,56,.75));
  padding: 18px 13px 11px;
  color: #fff; font-size: 13px; font-weight: 600;
  opacity: 0; transition: opacity .3s;
}

.ks-gitem:hover .ks-gcap { opacity: 1; }
.ks-center { text-align: center; margin-top: 28px; }

/* ============================================================
   REVIEWS
   ============================================================ */
.ks-grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }

.ks-review {
  background: #fff; border: 1px solid var(--beige2);
  border-radius: var(--r); padding: 24px;
}

.ks-stars { color: var(--g3); font-size: 14px; letter-spacing: 2px; margin-bottom: 11px; }
.ks-rtext { font-size: 13px; color: var(--text2); line-height: 1.7; margin-bottom: 14px; font-style: italic; }
.ks-rname { font-size: 13px; font-weight: 700; color: var(--text); }

/* ============================================================
   CTA SECTION
   ============================================================ */
.ks-cta {
  background: linear-gradient(135deg, var(--g1), var(--g2), var(--g3));
  padding: 72px 48px; text-align: center;
}

.ks-cta h2 { font-size: 34px; font-weight: 800; color: #fff; letter-spacing: -.03em; margin-bottom: 12px; }
.ks-cta p  { font-size: 16px; color: rgba(255,255,255,.75); margin-bottom: 30px; }

/* ============================================================
   FOOTER
   ============================================================ */
.ks-footer { background: var(--g1); padding: 52px 0 26px; }

.ks-footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px; padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 20px;
}

.ks-fbrand { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.ks-ftag   { font-size: 13px; color: rgba(255,255,255,.5); line-height: 1.7; }

.ks-footer h4 { font-size: 11px; font-weight: 700; color: var(--beige2); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 13px; }
.ks-footer ul { list-style: none; }
.ks-footer ul li { margin-bottom: 8px; }
.ks-footer ul li a { color: rgba(255,255,255,.5); font-size: 13px; transition: color .2s; }
.ks-footer ul li a:hover { color: #fff; }

.ks-footer-bot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: rgba(255,255,255,.3);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .ks-header  { padding: 0 20px; }
  .ks-hero    { padding: 64px 24px 90px; }
  .ks-hero h1 { font-size: 32px; }
  .ks-nav     { display: none; }
  .ks-grid-3, .ks-gallery { grid-template-columns: 1fr 1fr; }
  .ks-grid-2  { grid-template-columns: 1fr; }
  .ks-stats   { gap: 28px; padding: 24px 20px; }
  .ks-footer-grid { grid-template-columns: 1fr 1fr; }
  .ks-wrap    { padding: 0 24px; }
  .ks-page-title { font-size: 28px; }
}

@media (max-width: 600px) {
  .ks-hero h1 { font-size: 26px; }
  .ks-grid-3, .ks-gallery { grid-template-columns: 1fr; }
  .ks-footer-grid { grid-template-columns: 1fr; }
  .ks-title { font-size: 24px; }
  .ks-page-title { font-size: 24px; }
  .ks-cta { padding: 52px 24px; }
  .ks-cta h2 { font-size: 26px; }
}
