/*
Theme Name: Hahn Agency Theme
Theme URI: https://wordpress.org/themes/hahnagencytheme/
Author: the WordPress team
Author URI: https://wordpress.org
Description: A Theme created by the Hahn Agency Development Team.
Version: 1.1.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hahnagencytheme
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
html {
  scroll-behavior: smooth;
}

a {
  text-decoration-thickness: 1px !important;
  text-underline-offset: 0.1em;
}

ul.wp-block-list {
  padding-left: 16px; /* TODO: use custom properties instead */
}

.wp-element-button.is-active {
  background-color: var(--wp--preset--color--accent-1) !important;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
  outline-width: 2px;
  outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation
  .wp-block-navigation-submenu
  .wp-block-navigation-item:not(:last-child) {
  margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation
  .wp-block-navigation-item
  .wp-block-navigation-item__content {
  outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation
  .wp-block-navigation-item
  ul.wp-block-navigation__submenu-container
  .wp-block-navigation-item__content {
  outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
caption,
figcaption,
p {
  text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
  display: block;
}

.hahn-position-relative, .editor-styles-wrapper .hahn-position-relative {
  position: relative;
}

/*
 * Add Padding to top and bottom of selected group blocks
 */
section.wp-block-group {
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
}

section.wp-block-group.is-layout-constrained {
  padding-top: 1.25rem;
}

body .gform_wrapper .gform_footer input.button,
body .gform_wrapper .gform_footer input[type="submit"] {
  font-weight: 700 !important;
  font-size: 1rem !important;
  line-height: inherit !important;
  padding-top: 0.85rem !important;
  padding-right: 1.8rem !important;
  padding-bottom: 0.85rem !important;
  padding-left: 1.8rem !important;
  text-decoration: none !important;
}

.gfield_label.gform-field-label {
  text-transform: uppercase;
}

.gfield_required.gfield_required_text {
  color: var(--wp--preset--color--accent-2);
}

.gform_validation_errors {
  background-color: var(--wp--preset--color--primary)!important;
}

.gform_validation_errors h2, .gform_validation_errors ol li, .gform_validation_errors ol li a {
  color: var(--wp--preset--color--white)!important;
}

.gfield_description.validation_message.gfield_validation_message {
  color: var(--wp--preset--color--white)!important;
  background-color: var(--wp--preset--color--primary)!important;
  padding: var(--wp--preset--spacing--30);
  display: inline-block;
}

.gform_required_legend {
  color: var(--wp--preset--color--white)!important;
}

.gform-theme--framework .gform_required_legend .gfield_required, .gfield_required {
  color: var(--wp--preset--color--accent-2)!important;
}

.primary-nav-site-logo a img {
  width: 200px;
}

.footer-logo a img {
  width: 300px;
}

ul.hahn-feature-list, .editor-styles-wrapper ul.hahn-feature-list {
  list-style: none;
}

.hahn-feature-list li, .editor-styles-wrapper .hahn-feature-list li {
  text-align: center;
}

@media screen and (min-width: 1132px) {
  .hahn-offset-20 {
    transform: translateY(20px);
  }
  
  .hahn-offset-60 {
    transform: translateY(60px);
  }
}

.hahn-column-overlap-wrapper {
  position: relative;
}

.hahn-columns-bg-box-border {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 63%;
  z-index: 0;
  pointer-events: none;
}

.hahn-columns-overlap {
  position: relative;
  z-index: 1;
}

@media screen and (min-width: 781px) {
  /* Default: Image right, text left */
  .hahn-columns-overlap .wp-block-column:first-child {
    margin-right: -40px;
    z-index: 3;
    position: relative;
    max-width: 523px;
    transform: translate(23px, -70px);
  }

  .hahn-columns-overlap .wp-block-column:last-child {
    margin-left: -40px;
    z-index: 2;
    position: relative;
    transform: rotate(1deg);
  }

  /* Modifier: Image on the left */
  .hahn-image-left .hahn-columns-overlap .wp-block-column:first-child {
    margin-right: -40px;
    z-index: 2;
    position: relative;
    transform: rotate(-1deg);
    max-width: none;
  }

  .hahn-image-left .hahn-columns-overlap .wp-block-column:last-child {
    margin-left: -40px;
    z-index: 3;
    position: relative;
    max-width: 523px;
    transform: translate(-23px, -70px);
  }
}

@media screen and (max-width: 780px) {
  .hahn-image-left .hahn-columns-overlap .wp-block-column:first-child {
    order: 2;
  }

  .hahn-image-left .hahn-columns-overlap .wp-block-column:last-child {
    order: 1;
  }
}

/* Floating Icons for home page */
.hahn-floating-svg, .editor-styles-wrapper .hahn-floating-svg {
  position: absolute;
  z-index: 9999;
  pointer-events: none;
}

@media screen and (max-width: 1250px) {
  .hahn-floating-svg, .editor-styles-wrapper .hahn-floating-svg {
    display: none;
  }
}

@media screen and (max-width: 780px) {
  .hahn-floating-svg, .editor-styles-wrapper .hahn-floating-svg {
    display: none;
  }
}

/* positioning for specific icons */
.hahn-floating-svg.hahn-family {
  top: 0;
  left: 0;
}

.hahn-floating-svg.hahn-family.form-section {
  top: 100px;
  right: 0;
  left: auto;
}

.hahn-family img, .editor-styles-wrapper .hahn-family img {
  width: 112px;
  height: auto;
}

.hahn-floating-svg.hahn-grackle {
  right: -40px;
  top: 0;
}

.hahn-grackle img, .editor-styles-wrapper .hahn-grackle img {
  height: 145px;
}

.hahn-floating-svg.hahn-party {
  left: 75px;
  bottom: -75px;
}

.hahn-party img, .editor-styles-wrapper .hahn-party img {
  height: 130px;
}

.hahn-floating-svg.hahn-chair {
  right: 30%;
  bottom: -75px;
}

.hahn-chair img, .editor-styles-wrapper .hahn-chair img {
  height: 123px;
}

.hahn-floating-svg.hahn-star {
  top: 65px;
  left: 80px;
}

.hahn-floating-svg.hahn-star.wakeup {
  top: 112px;
  left: 80px;
}

.hahn-floating-svg.hahn-star.around-the-corner {
  top: -17px;
  left: 80px;
}

.hahn-floating-svg.hahn-star.form-section {
  top: 0;
  left: 40px;
}

.hahn-star img, .editor-styles-wrapper .hahn-star img {
  height: 200px;
}

.hahn-floating-svg.hahn-building {
  bottom: 65px;
  left: 78px;
}

.hahn-building img, .editor-styles-wrapper .hahn-building img {
  height: 162px;
}

.hahn-floating-svg.hahn-sun {
  bottom: 228px;
  right: 65px;
}

.hahn-sun img, .editor-styles-wrapper .hahn-sun img {
  height: 131px;
}

.hahn-floating-svg.hahn-moon {
  top: 0;
  right: 61px;
}

.hahn-moon img, .editor-styles-wrapper .hahn-moon img {
  height: 250px;
}

.hahn-floating-svg.hahn-capital {
  bottom: 600px;
  right: 88px;
}

.hahn-floating-svg.hahn-capital.form-section {
  bottom: 100px;
  left: 50px;
}

.hahn-capital img, .editor-styles-wrapper .hahn-capital img {
  height: 161px;
}

.hahn-floating-svg.hahn-star-bottom {
  bottom: 125px;
  right: 0;
}

.hahn-star-bottom img, .editor-styles-wrapper .hahn-star-bottom img {
  height: 250px;
}

.hahn-floating-svg.hahn-guitar {
  top: 0;
  right: 50px;
}

.hahn-guitar img, .editor-styles-wrapper .hahn-guitar img {
  height: 132px;
}

@media screen and (max-width: 780px) {
  .hahn-collage-1, .hahn-collage-2 {
    padding-bottom: var(--wp--preset--spacing--20)!important;
  }
}

.hahn-collage-1 .image-1,
.editor-styles-wrapper .hahn-collage-1 .image-1 {
  transform: rotate(-4deg) scale(1.3) translateY(-30px);
}

.hahn-collage-1 .image-2,
.editor-styles-wrapper .hahn-collage-1 .image-2 {
  transform: rotate(4deg) scale(1.3) translate(15px, 30px);
  z-index: 3;
}

.hahn-collage-1 .image-3,
.editor-styles-wrapper .hahn-collage-1 .image-3 {
  transform: scale(1.1);
  z-index: 2;
}

.hahn-collage-1 .image-4,
.editor-styles-wrapper .hahn-collage-1 .image-4 {
  transform: rotate(4deg) scale(1.3) translate(15px, -15px);
}

/* Collage 1 mobile */
@media screen and (max-width: 764px) {
  .hahn-collage-1 .image-1 {
    transform: rotate(-4deg) scale(1.2) translate(10px, -20px);
    padding: 4px !important;
  }
  .hahn-collage-1 .image-2 {
    transform: rotate(4deg) scale(1.2) translate(22px, -10px);
    padding: 4px !important;
  }
  .hahn-collage-1 .image-3 {
    padding: 4px !important;
  }
  .hahn-collage-1 .image-4 {
    transform: rotate(4deg) scale(1.2) translate(-12px, -15px);
    padding: 4px !important;
  }
}

.hahn-collage-2 .image-1,
.editor-styles-wrapper .hahn-collage-2 .image-1 {
  transform: rotate(-4deg) scale(1.3) translateY(-30px);
}

.hahn-collage-2 .image-2,
.editor-styles-wrapper .hahn-collage-2 .image-2 {
  transform: rotate(4deg) scale(1.3) translate(-15px, 30px);
  z-index: 3;
}

.hahn-collage-2 .image-3,
.editor-styles-wrapper .hahn-collage-2 .image-3 {
  transform: scale(1.1);
  z-index: 2;
}

.hahn-collage-2 .image-4,
.editor-styles-wrapper .hahn-collage-2 .image-4 {
  transform: rotate(-4deg) scale(1.3) translate(-15px, -15px);
  z-index: 4;
}

/* Collage 2 mobile */
@media screen and (max-width: 764px) {
  .hahn-collage-2 .image-1 {
    transform: rotate(-4deg) scale(1.2) translate(10px, -20px);
    padding: 4px !important;
  }
  .hahn-collage-2 .image-2 {
    transform: rotate(4deg) scale(1.2) translate(22px, -10px);
    padding: 4px !important;
  }
  .hahn-collage-2 .image-3 {
    padding: 4px !important;
  }
  .hahn-collage-2 .image-4 {
    transform: rotate(4deg) scale(1.2) translate(-12px, -15px);
    padding: 4px !important;
  }
}

@media screen and (max-width: 1452px) {
  .hahn-grid-wrap-evenly {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media screen and (max-width: 600px) {
  .hahn-grid-wrap-evenly {
    grid-template-columns: 1fr !important;
  }
}

.hahn-paper-tear-bottom {
  position: relative;
  z-index: 5;
  transform: translateY(-1px);
}

.hahn-paper-tear-top {
  position: relative;
  z-index: 5;
  transform: translateY(1px);
}

/* fix paper tear padding on mobile */
@media screen and (max-width: 780px) {
  .hahn-paper-tear-bottom{
    min-height:50px!important;
  }
}

.hahn-map-mobile {
  display: none;
}

.hahn-mobile-map-image {
  transform: scale(1.5) translate(-68px);
}

.editor-styles-wrapper .hahn-map-mobile {
  display: block;
}

@media screen and (max-width: 780px) {
  .hahn-map-mobile {
    display: block;
  }

  .hahn-map-desktop {
    display: none;
  }

  #the-goodnight-story {
    padding-bottom: 0!important;
  }
}

.hahn-parallax-bg .wp-block-cover__image-background {
  height: 150%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
  background-position: bottom!important;
}

/* Default: 4 columns */
.hahn-about-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* On medium screens: force 2 columns */
@media screen and (max-width: 1024px) {
  .hahn-about-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hahn-about-grid > *:nth-child(even) {
    transform: translateY(20px);
  }
}

/* On small screens: stack to 1 column */
@media screen and (max-width: 600px) {
  .hahn-about-grid {
    grid-template-columns: 1fr;
  }

  .hahn-about-grid > *:nth-child(even) {
    transform: translateY(0);
  }
}

.hahn-back-to-top {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  position: fixed;
  bottom: 50px;
  right: 50px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  z-index: 9999;
  cursor: pointer;
  background-color: var(--wp--preset--color--primary);
  background-image: url('../hahnagencytheme/assets/images/up-arrow-white.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
  transition: opacity 0.3s ease-in-out;
}

.hahn-back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.hahn-back-to-top:hover {
  opacity: 0.8;
}

.hahn-back-to-top a:focus:not(:focus-visible) {
  outline: none;
}

.hahn-back-to-top a {
  background-color: transparent !important;
}

.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open {
  background-color: var(--wp--preset--color--accent-1) !important;
}

.wp-block-navigation__container.has-text-color.has-accent-2-color.is-responsive.items-justified-right.wp-block-navigation {
  width: 100%;
  align-items: center;
}
