/* =========================================================
ATVOF – Global Design System CSS
Komplett override för Elementor + TD
Rainier West 500 via font family "Rainier"
========================================================= */

:root{
  --font-display: "Rainier", serif;
  --font-body: "Nunito", sans-serif;

  --color-text: #2B2B2B;
  --color-muted: #6F6F6F;
  --color-primary: #C65A1E;
  --color-primary-hover: #A94E1E;
  --color-secondary: #5BB6D6;
  --color-bg: #FFFAF1;
  --color-surface: #FFFFFF;

  --h1: 56px;
  --h2: 42px;
  --h3: 30px;
  --h4: 22px;
  --h5: 18px;
  --h6: 16px;

  --body: 18px;
  --small: 15px;

  --lh-display: 1.08;
  --lh-heading: 1.15;
  --lh-body: 1.6;

  /* 8-grid spacing */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-7: 56px;
  --space-8: 64px;
  --space-9: 72px;
  --space-10: 80px;
  --space-11: 96px;
  --space-12: 120px;

  --container-max: 1200px;
  --container-pad-x: 24px;

  --section-hero-y: 80px;
  --section-standard-y: 64px;
  --section-compact-y: 48px;
  --section-footer-top: 48px;
  --section-footer-bottom: 40px;

  --gap-xs: 8px;
  --gap-sm: 16px;
  --gap-md: 24px;
  --gap-lg: 32px;
  --gap-xl: 48px;

  --card-pad: 24px;
  --radius-button: 5px;
  --radius-card: 16px;
}

html{
  -webkit-text-size-adjust: 100%;
}

body{
  font-family: var(--font-body);
  font-size: var(--body);
  line-height: var(--lh-body);
  color: var(--color-text);
}

body,
.elementor-widget-text-editor,
.elementor-widget-text-editor p,
.elementor-widget-theme-post-content,
.elementor-widget-theme-post-content p{
  font-family: var(--font-body);
  font-size: var(--body);
  line-height: var(--lh-body);
  color: var(--color-text);
}

p{
  margin-top: 0;
  margin-bottom: var(--space-2);
}

small{
  font-size: var(--small);
  line-height: 1.5;
}

a{
  color: var(--color-primary);
}
a:hover,
a:focus{
  color: var(--color-primary-hover);
}

/* ---------- H1 dekorativ Rainier ---------- */
h1,
.elementor h1,
.elementor-widget-heading h1.elementor-heading-title,
body.td-page h1,
body.td-page .td-topbar__title,
body.td-page .td-app-view-header__title,
body.td-page .td-entry-inline-title,
body.td-page .td-entry-view__title{
  font-family: var(--font-display) !important;
  font-weight: 500 !important;
  font-style: normal !important;
  font-size: var(--h1) !important;
  line-height: var(--lh-display) !important;
  text-transform: uppercase !important;
  letter-spacing: 0 !important;
  font-variant-ligatures: common-ligatures discretionary-ligatures contextual !important;
  font-feature-settings:
    'liga' 1,
    'clig' 1,
    'calt' 1,
    'dlig' 1,
    'salt' 1,
    'swsh' 1,
    'ss01' 1,
    'ss02' 1 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin-top: var(--space-4);
  margin-bottom: 0;
}

/* ---------- Dekorativ Rainier-klass ---------- */
.atvof-rainier-decorative,
.atvof-rainier-decorative .elementor-heading-title{
  font-family: var(--font-display) !important;
  font-weight: 500 !important;
  font-style: normal !important;
  letter-spacing: 0 !important;
  line-height: var(--lh-display) !important;
  font-variant-ligatures: common-ligatures discretionary-ligatures contextual !important;
  font-feature-settings:
    'liga' 1,
    'clig' 1,
    'calt' 1,
    'dlig' 1,
    'salt' 1,
    'swsh' 1,
    'ss01' 1,
    'ss02' 1 !important;
}

/* ---------- Övriga rubriker ---------- */
h2,
.elementor h2,
.elementor-widget-heading h2.elementor-heading-title{
  font-family: var(--font-display) !important;
  font-weight: 500 !important;
  font-style: normal !important;
  font-size: var(--h2) !important;
  line-height: var(--lh-display) !important;
  letter-spacing: -0.01em;
  margin-top: var(--space-4);
  margin-bottom: 0;
}

h3,
.elementor h3,
.elementor-widget-heading h3.elementor-heading-title{
  font-family: var(--font-display) !important;
  font-size: var(--h3) !important;
  line-height: var(--lh-heading) !important;
  font-weight: 500 !important;
  font-style: normal !important;
  margin-top: var(--space-4);
  margin-bottom: 0;
}

h4,
.elementor h4,
.elementor-widget-heading h4.elementor-heading-title{
  font-family: var(--font-display) !important;
  font-size: var(--h4) !important;
  line-height: 1.25 !important;
  font-weight: 500 !important;
  font-style: normal !important;
  margin-top: var(--space-4);
  margin-bottom: 0;
}

h5,
.elementor h5,
.elementor-widget-heading h5.elementor-heading-title{
  font-family: var(--font-display) !important;
  font-size: var(--h5) !important;
  line-height: 1.35 !important;
  font-weight: 500 !important;
  font-style: normal !important;
  margin-top: var(--space-3);
  margin-bottom: 0;
}

h6,
.elementor h6,
.elementor-widget-heading h6.elementor-heading-title{
  font-family: var(--font-display) !important;
  font-size: var(--h6) !important;
  line-height: 1.25 !important;
  font-weight: 500 !important;
  font-style: normal !important;
  margin-top: var(--space-3);
  margin-bottom: 0;
}

/* Första rubriken i ett block ska inte få extra luft ovanför */
.elementor-widget:first-child h1,
.elementor-widget:first-child h2,
.elementor-widget:first-child h3,
.elementor-widget:first-child h4,
.elementor-widget:first-child h5,
.elementor-widget:first-child h6{
  margin-top: 0 !important;
}

/* ---------- Eyebrow ---------- */
.td-eyebrow,
.eyebrow{
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-top: 0;
  margin-bottom: var(--space-2);
}

/* ---------- Elementor widget-margins ---------- */
.elementor-widget-heading,
.elementor-widget-text-editor,
.elementor-widget-icon-list,
.elementor-widget-image,
.elementor-widget-html{
  margin-bottom: 0;
}

/* ---------- Knappar ---------- */
button,
input[type="button"],
input[type="submit"],
.elementor-button,
a.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button{
  border-radius: var(--radius-button) !important;
}

/* ---------- Cards ---------- */
.td-card,
.td-dash-card{
  border-radius: var(--radius-card);
  padding: var(--card-pad);
  box-sizing: border-box;
}

/* ---------- Container-regler ---------- */
.elementor-section.elementor-section-boxed > .elementor-container{
  max-width: var(--container-max);
  padding-left: var(--container-pad-x);
  padding-right: var(--container-pad-x);
  box-sizing: border-box;
}

.elementor .e-con.e-parent,
.elementor .e-con.e-child{
  box-sizing: border-box;
}

.atvof-container{
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad-x);
  padding-right: var(--container-pad-x);
  box-sizing: border-box;
}

/* ---------- Sektionstyper ---------- */
.atvof-section-hero{
  padding-top: var(--section-hero-y) !important;
  padding-bottom: var(--section-hero-y) !important;
}

.atvof-section-standard{
  padding-top: var(--section-standard-y) !important;
  padding-bottom: var(--section-standard-y) !important;
}

.atvof-section-compact{
  padding-top: var(--section-compact-y) !important;
  padding-bottom: var(--section-compact-y) !important;
}

.atvof-section-footer{
  padding-top: var(--section-footer-top) !important;
  padding-bottom: var(--section-footer-bottom) !important;
}

/* ---------- Gap-hjälpklasser ---------- */
.atvof-gap-xs{ gap: var(--gap-xs) !important; }
.atvof-gap-sm{ gap: var(--gap-sm) !important; }
.atvof-gap-md{ gap: var(--gap-md) !important; }
.atvof-gap-lg{ gap: var(--gap-lg) !important; }
.atvof-gap-xl{ gap: var(--gap-xl) !important; }

/* ---------- Innehållsrytmer ---------- */
.atvof-stack-xs > * + *{ margin-top: var(--gap-xs); }
.atvof-stack-sm > * + *{ margin-top: var(--gap-sm); }
.atvof-stack-md > * + *{ margin-top: var(--gap-md); }
.atvof-stack-lg > * + *{ margin-top: var(--gap-lg); }

.atvof-card{
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: var(--card-pad);
}

.atvof-card > *:last-child{
  margin-bottom: 0;
}

@media (max-width: 1024px){
  :root{
    --container-pad-x: 20px;
    --section-hero-y: 72px;
    --section-standard-y: 56px;
    --section-compact-y: 40px;
  }
}

@media (max-width: 767px){
  :root{
    --h1: 36px;
    --h2: 30px;
    --h3: 24px;
    --h4: 20px;
    --h5: 17px;
    --h6: 15px;

    --body: 16px;
    --small: 14px;

    --container-pad-x: 16px;

    --section-hero-y: 64px;
    --section-standard-y: 48px;
    --section-compact-y: 32px;
    --section-footer-top: 40px;
    --section-footer-bottom: 32px;

    --card-pad: 20px;
  }

  .elementor-location-footer h2,
  .elementor-location-footer .elementor-widget-heading h2.elementor-heading-title{
    font-size: 34px !important;
    line-height: 1.1 !important;
  }

  .elementor-location-footer h3,
  .elementor-location-footer h4,
  .elementor-location-footer h5,
  .elementor-location-footer h6,
  .elementor-location-footer .elementor-widget-heading h3.elementor-heading-title,
  .elementor-location-footer .elementor-widget-heading h4.elementor-heading-title,
  .elementor-location-footer .elementor-widget-heading h5.elementor-heading-title,
  .elementor-location-footer .elementor-widget-heading h6.elementor-heading-title{
    font-size: 20px !important;
  }

  .td-eyebrow,
  .eyebrow{
    font-size: 12px !important;
  }
}
