/*
Theme Name: Starter Block Theme v2
Theme URI: https://jakson.co/
Author: Jakson
Author URI: https://jakson.co/
Description: 
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 7.4
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: starter-block-theme-v2
Tags: Block Editor Patterns, Site Editor

/*  Smoot Scroll */
html {
  scroll-behavior: smooth;
}

/*  Reduced motion prefs  */
@media screen and (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/*  Navigation Block Breakpoint. Credit: https://wpdocs.io/ */
body .wp-block-navigation__responsive-container-open:not(.always-shown) {
  display: block !important;
}

body .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
  display: none !important;
}

/* Change the width to the breakpoit of the Nav */
@media (min-width: 799px) {
  body .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: none !important;
  }

  body .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: block !important;
  }
}

/* end nav break point */

/* Nicley wrapped headlines */
h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

/* I've no idea why when you add a backgroud colour to a column, WP by default adds padding to it... so weird - this get's rid of that */
:where(.wp-block-columns.has-background) {
  padding: initial;
}

/* Pull Quote */
.wp-block-pullquote blockquote {
  display: grid;
  gap: 20px;
}

.wp-block-pullquote cite {
  font-size: 80%;
  font-weight: 600;
}

/* Search Block */
.wp-block-search__input {
  border: 1px solid;
}

.wp-block-search__button {
  box-shadow: none;
  border: 1px solid var(--wp--preset--color--custom-off-black);
  border-radius: 0;
  color: white;
  padding: 0.4rem 1rem 0.5rem 1rem;
  font-weight: 500;
}

/* Comments */
.comment-form-cookies-consent {
  font-size: 14px;
  line-height: 2;
}

/* Keep our titles link the off black color*/
.wp-block-post-title :where(a) {
  color: var(--wp--preset--color--custom-off-black);
}

/* Button hover state  - core button block still does not have this and I can't figure out how to do it in theme.json! */
.wp-block-button__link,
a {
  transition: 0.3s;
}

.wp-block-button.is-style-fill .wp-block-button__link:hover,
#commentform .form-submit.wp-block-button input:hover {
  background: var(--wp--preset--color--custom-white);
  color: var(--wp--preset--color--custom-off-black);
}

.wp-block-button .wp-block-button__link:hover {
  background: var(--wp--preset--color--custom-custom-white);
  color: var(--wp--preset--color--off-black);
  border-color: var(--wp--preset--color--custom-off-black);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--wp--preset--color--custom-off-black);
  color: var(--wp--preset--color--custom-white);
  border-color: var(--wp--preset--color--custom-off-black);
}

a:hover:not(.wp-block-site-title a, .wp-block-button__link.wp-element-button) {
  text-decoration: underline !important;
}

/*Transparent Header */

header.wp-block-template-part * {
  color: white;
}

header.wp-block-template-part {
    min-height: 88px;
    Margin-bottom: -88px;
    z-index: 999;
    position: relative;
}

/* Site Title */
.wp-block-site-title {
    font-family: 'Impact';
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 98%;
}

/* Full-width breakout for shortcode block */
.full-width-shortcode {
  width: 100vw !important;
  max-width: 100vw !important;
  position: relative;
  left: 50% !important;
  transform: translateX(-50%) !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Prevent horizontal overflow */
html, body {
  overflow-x: hidden;
}

h2.wp-block-heading {
  position: relative;
  padding-left: 0px; /* Space for line + gap */
  display: flex;
  align-items: center;
}

h2.wp-block-heading::before {
  content: "";
  display: block;
  width: 50px; /* Line length */
  height: 1px; /* Line thickness */
  background: #ffffff; /* Line color */
  margin-right: 10px; /* Gap between line and text */
  position: static;
}

.wp-block-social-links a {
  transform: scale(3);
   margin: 0 15px;
}

/* Mobile centering (typically < 768px) */
@media (max-width: 767px) {
  .wp-block-social-links {
    justify-content: center;
    flex-wrap: wrap;
  }

/* Mobile height */
@media (max-width: 781px) {
   .wp-block-cover {
    min-height: 200px !important;
  }
}

@media (max-width: 781px) {
  .home .wp-block-cover {
    min-height: 700px !important;
  }
}

/* Navigation Block Responsive Container */

@media (max-width: 767px) {
  .wp-block-navigation__responsive-container.is-menu-open 
  .wp-block-navigation-item__content {
    font-size: 40px !important; /* Adjust size as needed */
    font-family: Poppins, sans-serif !important; /* Ensure consistent font */
    font-weight: 600 !important; /* Ensure consistent weight */
    letter-spacing: 0.3px;
    line-height: 1 !important; /* Improve readability */
  }
  
  /* Optional: Increase click area */
  .wp-block-navigation__responsive-container.is-menu-open 
  .wp-block-navigation-item {
    padding: 12px 0 !important;
  }
}