/*
Theme Name: Circus Block
Author: Ivan Kovač
Description: Circus Custom Theme
Version: 0.1
Text Domain: circus
*/

/* When logged in, WP adds .admin-bar on body and a top offset. Keep layout normal,
   but push fixed header down so it doesn't collide with admin bar. */
body.admin-bar .site-header {
  top: calc(16px + 32px);
}
@media (max-width: 781px) {
  body.admin-bar .site-header {
    top: calc(16px + 46px);
  }
}

/********* 
FONT
*********/
@font-face {
  font-family: "Satoshi";
  src: url("assets/fonts/Satoshi-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/********* 
BODY
*********/
body {
  position: relative;
}
.site-wrapper {
  position: relative;
  max-width: 1920px;
  margin: 0 auto;
}

/********* 
HEADER
*********/
.site-header {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 999;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff8ef;
  padding: 16px;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-branding {
  display: flex;
  align-items: center;
}

.custom-logo-link {
  display: block;
  line-height: 0;
}

.custom-logo-link img {
  display: block;
  height: 69px;
  width: auto;
}

/* Header Primary Menu */
.nav-menu li {
  line-height: 1 !important;
}

.nav-menu a {
  font-size: 16px;
  line-height: 1 !important;
  text-decoration: none;
  color: #000;
}

.nav-menu .menu-btn a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 32px;
  background-color: #faf764;
  border-radius: 2px;
  margin-left: 8px;
}

/* HEADROOM */
.site-header.hr {
  will-change: transform;
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.hr--pinned {
  transform: translateY(0);
}

.site-header.hr--unpinned {
  transform: translateY(-120%);
}

/********* 
FOOTER
*********/
.site-footer {
  background: #fff8ef;
  margin-top: 8px;
  padding: 64px 16px;
}

.footer-top {
  padding-bottom: 16px;
  border-bottom: 1px solid #f7ecde;
}

.footer-top-inner {
  display: flex;
  justify-content: center;
  text-align: center;
}
.footer-branding {
  justify-items: center;
}
.footer-branding .custom-logo {
  max-height: 69px;
  justify-content: center;
}

.footer-text {
  max-width: 508px;
  font-size: 13px;
  margin-top: 8px;
  margin-bottom: 0;
}

.footer-bottom {
  padding-top: 8px;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.footer-menu {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-menu a,
.footer-createdby span {
  display: block;
  text-decoration: none;
  color: #000;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35em;
}

.footer-menu a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/********* 
HOMEPAGE
*********/
.hero-cover h1 {
  opacity: 0;
  will-change: opacity, transform;
}

.hero-cover {
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.fade-in-txt {
  opacity: 0;
}

.fade-in-reveal {
  opacity: 1;
}

.js .fade-in-reveal {
  opacity: 0;
}

.col-center {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

/* JOKES */
.jokes {
  max-width: 1032px !important;
  margin-block-start: 0 !important;
}

.jokes_controls,
.jokes_filters {
  display: flex;
  justify-content: center;
}
.jokes-filterbar {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.jokes-filterbar__label {
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.jokes-filterbar__field {
  display: inline-block;
  position: relative;
}

.jokes-filterbar__select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-size: 13px !important;
  font-weight: 700;
  line-height: 1.4em;
  background-color: #f7ecde;
  text-transform: capitalize;
  border: 0;
  padding: 16px 48px 16px 16px;
  cursor: pointer;
  outline: none;
  width: auto;
  min-width: 0;
  display: inline-block;
  background-image: url("https://ivankovac.from.hr/wp-content/uploads/2026/02/arrow.svg");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
}

.jokes_list {
  margin-top: 64px;
}

.jokes-items {
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

/* Joke - Cards */
.joke {
  box-sizing: border-box;
  background: #f7ecde;
  padding: 43px 48px;
  text-align: center;
  align-content: center;
  min-height: 200px;
}

.joke__typewrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.joke__type {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.25em;
  margin-bottom: 24px !important;
}

.joke__type::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 100%;
  background: #000;
  margin-right: 8px;
  display: inline-block;
}

.joke__question {
  font-size: 16px;
  margin: 0 0 8px;
}

.joke__answer {
  font-size: 16px;
  font-weight: 500;
  font-style: italic;
  margin: 0;
}

/* More button wrapper */
.jokes_more {
  margin-top: 64px;
  display: flex;
  justify-content: center;
}

/* Hide margin if element is empty */
.jokes_more:empty {
  display: none;
  margin-top: 0;
  margin-bottom: 0;
}

.jokes_list:empty {
  display: none;
  margin-top: 0;
}

/* RESPOSIVITY */
/* Desktop */
@media (min-width: 782px) {
  .menu-toggle {
    display: none;
  }

  .site-nav {
    display: block;
    position: static;
    padding: 0;
    background: transparent;
  }
}
/* Mobile */
@media (max-width: 781px) {
  body {
    padding-left: 8px;
    padding-right: 8px;
  }

  /* FONT */
  h1 {
    font-size: 56px;
    line-height: 59px;
  }
  h2 {
    font-size: 32px;
    line-height: 32px;
  }

  /* HEADER */
  header .custom-logo-link img {
    height: 47px;
  }

  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
  }

  .menu-toggle img {
    width: 50px;
    height: 50px;
  }

  .nav-open .site-nav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #f7ecde;
    padding: 20px 16px;
    z-index: 999;
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }

  /* HOMEPAGE */
  .hero-cover > .wp-block-cover__image-background {
    display: none;
  }

  .hero-cover {
    background-image: url("https://ivankovac.from.hr/wp-content/uploads/2026/02/homepage-hero-mobile.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  .explore-row {
    gap: 40px;
  }

  .circus-explore,
  .circus-explore > div {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
  }

  .jokes-section {
    padding-top: 0 !important;
    padding-bottom: 24px !important;
  }

  .jokes-section > h2,
  .jokes-section > p {
    text-align: left;
  }

  .punch-it-section {
    justify-content: start !important;
  }

  .jokes-items {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .joke {
    padding: 32px 48px;
  }

  .jokes_more {
    margin-bottom: 40px;
  }

  /* FOOTER */
  .footer-bottom-inner {
    flex-direction: column;
  }
}
