/*******************************************************
  Flat Fee YYJ – Block Theme CSS
  - Typekit is enqueued in functions.php (no @import here)
  - Uses WP preset variables where possible (with fallbacks)
  - Apply classes via block “Advanced → Additional CSS class(es)”
*******************************************************/

/* Design tokens (WP preset vars with safe fallbacks) */
:root{
  --ff-paper: var(--wp--preset--color--paper, #f7f2eb);
  --ff-accent: var(--wp--preset--color--accent, #ff9600);
  --ff-accent-hover: var(--wp--preset--color--accent-hover, #ffab33);
  --ff-teal: var(--wp--preset--color--teal, #0098B5);
  --ff-footer: var(--wp--preset--color--footer, #212529);
  --ff-white: var(--wp--preset--color--white, #ffffff);

  --ff-font-heading: var(--wp--preset--font-family--din-2014, "din-2014", sans-serif);
  --ff-font-body: var(--wp--preset--font-family--arial, Arial, sans-serif);
}

/* Base */
body{
  background-color: var(--ff-paper);
  font-family: var(--ff-font-body);
}

h2{
	font-size: 2.5rem;
}

h1, h2, h3{
  font-family: var(--ff-font-heading);
  font-style: normal;
  font-weight: 400; /* matches your original (it was overridden to 400) */
}

p, span, form, a, h4, h5, input, label{
  font-family: var(--ff-font-body);
}

/* Form label default */
label{
  font-weight: 800;
}

/*******************************************************
  Header (optional starter styling)
*******************************************************/
/* Fixed overlay header */
.site-header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent !important;
}

/* Kill any nested background */
.site-header,
.site-header .wp-block-group,
.site-header .wp-block-navigation{
  background: transparent !important;
}

/* Header padding */
.site-header .wp-block-group{
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Push homepage splash content down so it isn't covered by fixed header */
.wp-block-cover.splash .wp-block-cover__inner-container{
  padding-top: 90px; /* adjust to your header height */
}

/* Optional: prevent other pages' content from sliding under fixed header */
body:not(.home) .wp-site-blocks{
  padding-top: 90px; /* match header height */
}

/* Remove any default top margin the first block might get */
.wp-site-blocks > *:first-child{
  margin-top: 0 !important;
}

}
.site-header a{
  text-decoration: none;
  color: inherit;
}

/* 2) Remove the margin on the first content block (your splash) */
:where(.wp-site-blocks) > header.wp-block-template-part + *{
  margin-block-start: 0 !important;
}

:where(.wp-site-blocks) > header.wp-block-template-part,
:where(.wp-site-blocks) > footer.wp-block-template-part{
  margin-block-start: 0 !important;
}


/*******************************************************
  Buttons
  - Works for WP Button block (recommended)
  - Also works for plain <a class="button-main"> in HTML blocks
*******************************************************/
.wp-block-button.button-main .wp-block-button__link,
a.button-main,
button.button-main,
input.button-main{
  padding: .5em 1.25em !important;
  border-radius: 16px;
  font-family: var(--ff-font-heading);
  font-size: 1.1em;
  font-weight: 600;
  background-color: var(--ff-accent);
  color: var(--ff-white);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  font-size: 1.25rem;
  border: none;
  display: inline-block;
}

.wp-block-button.button-main .wp-block-button__link:hover,
a.button-main:hover,
button.button-main:hover,
input.button-main:hover{
  background-color: var(--ff-accent-hover);
  color: var(--ff-white);
}

/*******************************************************
  Splash (Cover block + inner groups)
  Apply classes:
  - Cover block: "splash"
  - Inner Group: "splash-title"
  - Optional Group: "splash-description"
  - Group around calculator: "splash-calculator"
*******************************************************/
.wp-block-cover.splash{
  padding: 0;
}

/* Ensure we can vertically center inside the cover */
.wp-block-cover.splash .wp-block-cover__inner-container{
  height: 100%;
}

.splash-title{
  min-height: 100vh;
  color: var(--ff-white);
  text-align: center;
  width: 100%;
}

/* Title */
.splash-title h1{
  margin: 0 auto;
  width: 75%;
  font-size: 4em;
  color: var(--ff-white);
}

/* Description (use paragraph in blocks; supports h2 too) */
.splash-description p,
.splash-description h2{
  width: 75%;
  font-family: var(--ff-font-body);
  font-size: 1em;
  color: var(--ff-white);
  margin: 0.75rem auto 0 auto;
  font-weight: 400;
}

/* Calculator wrapper */
.splash-calculator{
  padding: 1em;
  -webkit-backdrop-filter: blur(50px);
  backdrop-filter: blur(50px);
  display: inline-block;
  border-radius: 16px;
  color: var(--ff-white);
  width: 50%;
  margin-top: 1rem;
  font-size: 1.2rem;
  text-align: left;
}

/* Calculator layout */

.calc-row{
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1em 0;
}

.calc-row label{
  font-weight: 400;
  flex: 1 1 50%;
}

.calc-row input{
  background-color: transparent;
  border: var(--ff-white) 1px solid;
  border-radius: 5px;
  color: var(--ff-white);
  flex: 1 1 50%;
  font-size: 1.25em;
  padding: 0.25rem 0.5rem;
  min-width: 0;
}

.calc-row input:focus{
  outline: none;
}

.calc-results{
  border-top: 4px var(--ff-white) solid;
  display: flex;
  gap: 1rem;
  padding: 1em 0;
}

.calc-result{
  flex: 1 1 33%;
}

.calc-result p{
  margin-bottom: 2px;
}

.calc-fineprint{
  font-size: .85em;
  padding-top: 0;
  padding-bottom: 1em;
}

.calc-fineprint p{
  margin: 0;
	font-size: .75rem;
}

@media (max-width: 768px) {
  .splash-title h1{
    width: 90%;
    font-size: 2.5em;
  }

  .splash-description{
    display: none;
  }

  .splash-calculator{
    width: 90%;
    text-align: center;
  }

  .calc-row{
    flex-direction: column;
    align-items: stretch;
  }

  .calc-row label{
    text-align: center;
  }

  .calc-row input{
    text-align: center;
  }

  .calc-results{
    flex-direction: column;
    text-align: center;
  }
}

/*******************************************************
  Generic section helpers
*******************************************************/
.homepage-block{
  padding: 2rem 0;
}

.centered{
  text-align: center;
}

.homepage-textblock{
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.homepage-full-img{
  width: 90%;
  max-width: 650px;
  margin: 0.75rem auto;
}

.homepage-full-img img{
  width: 100%;
  height: auto;
  display: block;
}

/*******************************************************
  Steps list
  - Apply "list-container" to a Columns block
  - Apply "list-item" to a Group inside each column
*******************************************************/
.list-container .list-item{
  padding: 10px;
  border-radius: 16px;
  max-width: 200px;
  min-height: 200px;
  font-size: 1.25rem;
  margin: 0 auto;
}

.list-container .list-item h3{
  font-size: 4em;
  margin: 0;
}

.list-container .list-item p{
  margin: 10px 0 0 0;
}

.list-container > .wp-block-column:nth-child(1) .list-item { background-color: #c7c7ff; }
.list-container > .wp-block-column:nth-child(2) .list-item { background-color: #ffc7f2; }
.list-container > .wp-block-column:nth-child(3) .list-item { background-color: #c5eab2; }
.list-container > .wp-block-column:nth-child(4) .list-item { background-color: #ffffff; }

/*******************************************************
  Savings Table
  Preferred: WP Table block inside a Group with class "homepage-table"
*******************************************************/
.homepage-table .wp-block-table{
  margin: 0;
	font-size: 1.25rem;
}

.homepage-table table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.homepage-table th,
.homepage-table td{
  background-color: var(--ff-white);
  padding: 0.75rem;
  vertical-align: middle;
}

.homepage-table th{
  text-align: left;
}

.homepage-table th:nth-child(2),
.homepage-table td:nth-child(2){
  text-align: center;
}

.homepage-table th:nth-child(3),
.homepage-table td:nth-child(3){
  text-align: center;
  background-color: var(--ff-accent);
  color: var(--ff-white);
}

.homepage-table .table-fineprint{
  font-size: 0.95em;
  margin-top: 0.75rem;
}

/*******************************************************
  Inverse callout
  Apply class "inverse-callout" to a Group block
*******************************************************/
.inverse-callout{
  border-radius: 16px;
  background-color: #c7c7ff;
  padding: 1rem 1rem 0 1rem;
}

.inverse-callout img{
  width: 100%;
  max-width: 200px;
  height: auto;
}

.inverse-callout h2{
  margin-top: .5rem;
}

.inverse-callout p{
  margin-bottom: 1rem;
}

/* Inverse callout button variant */
.inverse-callout .wp-block-button.button-main .wp-block-button__link,
.inverse-callout a.button-main{
  background-color: #000;
}

/*******************************************************
  Newsletter submit (if you use a custom form)
*******************************************************/
#newsletter-submit{
  cursor: pointer;
  background-color: #ffaa39;
  color: var(--ff-white);
  border: none;
  border-radius: 5px;
  padding: 0.5em 1em;
}

/*******************************************************
  Footer
*******************************************************/
footer,
.site-footer{
  background-color: var(--ff-footer);
  color: var(--ff-white);
  padding: 2rem 0;
}

footer h4{
	margin-bottom: 1rem;
}

.site-footer a{
  color: var(--ff-white);
  text-decoration: none;
}

.footer-links{
  border-bottom: 1px solid var(--ff-white);
  padding-bottom: 1em;
  margin-bottom: 1em;
}

.footer-links ul{
  list-style: none;
  padding: 0;
  font-size: .95em;
  margin: 0;
}

.footer-links li{
  margin-bottom: 5px;
}

.footer-copyright{
  text-align: center;
  padding-top: 1em;
  margin: 0;
}

/*******************************************************
  Blog Template Styling (kept from your original)
  Note: to use the blog-title background image, place sterntie.webp in assets/images/
*******************************************************/
.blog-container{
  padding-top: 100px;
}

.blog-text{
  padding: 1em 0;
}

.blog-title{
  text-align: center;
  background-image: url("../images/sterntie.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 35vh;
}

.blog-title h1{
  width: 100%;
}

.blog-title h1 span{
  background-color: var(--ff-teal);
  padding: 0 1em;
  border-radius: 8px;
  font-size: 1.3em;
  font-weight: 600;
  color: var(--ff-white);
  display: inline-block;
  margin-top: 17.5vh;
  transform: translateY(-50%);
}

.blog-author{
  padding: 1em 0em;
}

.blog-author p{
  width: inherit;
  display: inline-block;
  margin: 0;
  font-size: 1.2em;
  font-weight: 700;
}

.blog-author p span{
  line-height: 40px;
}

.category-label{
  text-align: center;
  padding: .5em 0;
}

.category-label h4{
  font-weight: 600;
}

.category-button-container, .link-button-container{
  padding: 1em 0;
}

.category-button, .link-button{
  display: inline-block;
  width: 90%;
  padding: 1em 0;
  background-color: #ff9f1c;
  border-radius: 8px;
  color: var(--ff-white);
  font-size: 1.1em;
  font-weight: 700;
  text-align: center;
  position: relative;
  top: 0;
  transition: top ease 0.2s;
  text-decoration: none;
}

.category-button:hover, .link-button:hover{
  top: -7px;
}

.blog-panel-img{
  position: relative;
}

.blog-panel-img span{
  position: absolute;
  bottom: 0;
  right: 0;
  color: var(--ff-white);
  padding: 0.15em 0.75em;
  z-index: 10;
  border-radius: 8px 0 0 0;
}

.blog-panel-text h3{
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.blog-panel-text p{
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

.article-tag{ background-color: var(--ff-teal); }
.guide-tag{ background-color: #ED6A5A; }
.profile-tag{ background-color: #985F99; }
.development-tag{ background-color: #003E1F; }

@media (max-width: 768px) {
  .category-button{
    width: 95%;
    font-size: .9em;
    font-weight: 500;
  }
}
