/*
Theme Name: Friendly Dog Breeder
Theme URI: https://www.hundforsakring.se/resources/friendly-dog-breeder
Author: Hundförsäkring
Author URI: https://www.hundforsakring.se
Description: This theme is designed for dog breeders to showcase their dogs, litters, and share news and updates with their audience. 
Version: 1.0.5
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: friendly-dog-breeder
Tags: one-column, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, threaded-comments, translation-ready, block-patterns, block-styles, wide-blocks, blog
*/

:root {
  --grass: #52762c;
  --grass-deep: #456925;
  --grass-band: #5a7631;
  /* Lighter green, for text on dark backgrounds only */
  --grass-bright: #7cb342;
  --ink: #444440;
  --ink-soft: #6c6c66;
  --paper-warm: #f3f3f0;
  --char: #33332f;
  --line: #e6e6e1;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, sans-serif;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

.font-script {
  font-family: Caveat, cursive;
}

/* Titles (post/page/category) share .font-script; keep long, unbroken
   titles from overflowing their container and causing horizontal scroll. */
h1,
h2,
h3 {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

/* Fallback utilities for custom Tailwind tokens. */
.bg-grass {
  background-color: var(--grass);
}

.bg-grass-band {
  background-color: var(--grass-band);
}

.bg-char {
  background-color: var(--char);
}

.bg-paper-warm {
  background-color: var(--paper-warm);
}

.text-grass {
  color: var(--grass);
}

.text-grass-deep {
  color: var(--grass-deep);
}

.text-ink {
  color: var(--ink);
}

.text-ink-soft {
  color: var(--ink-soft);
}

.border-grass {
  border-color: var(--grass);
}

.border-line {
  border-color: var(--line);
}

.max-w-wrap {
  max-width: 1080px;
}

.btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 14px 30px;
  border-radius: 9999px;
  border: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-solid {
  background: var(--grass);
  border-color: var(--grass);
  color: #fff;
}

.btn-solid:hover {
  background: var(--grass-deep);
  border-color: var(--grass-deep);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-ghost-green {
  background: transparent;
  color: var(--grass-deep);
  border-color: var(--grass);
}

.btn-ghost-green:hover {
  background: var(--grass);
  color: #fff;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--grass-deep);
  font-weight: 700;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.text-line {
  color: var(--line);
}

/* Shown in post cards when a post has no featured image */
.post-card-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  background: var(--paper-warm);
  font-size: 56px;
  line-height: 1;
}

.post-card-fallback--large {
  font-size: 96px;
}

.post-card-fallback span {
  opacity: 0.3;
}

.home .entry-content,
.page .entry-content {
  margin: 0;
}

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

.site-menu li {
  margin: 0;
  padding: 0;
}

.site-menu li a {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-menu li a:hover,
.site-menu li.current-menu-item > a,
.site-menu li.current_page_item > a {
  color: var(--grass-bright);
}

.menu-item-has-children {
  position: relative;
}

/* Sub-menus: desktop hover/focus dropdown */
@media (min-width: 768px) {
  .site-menu .menu-item-has-children > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .site-menu .menu-item-has-children > a::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
    flex: none;
  }

  .site-menu .menu-item-has-children:hover > a::after,
  .site-menu .menu-item-has-children:focus-within > a::after {
    transform: rotate(225deg) translateY(1px);
  }

  /* invisible bridge so the pointer doesn't lose hover crossing the gap */
  .site-menu .menu-item-has-children::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 14px;
  }

  .site-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 50;
    min-width: 210px;
    margin: 14px 0 0;
    padding: 8px;
    list-style: none;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }

  .site-menu .sub-menu .sub-menu {
    top: -8px;
    left: 100%;
    margin: 0 0 0 6px;
  }

  .site-menu .menu-item-has-children:hover > .sub-menu,
  .site-menu .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    /* Become visible at once so keyboard focus can move straight in */
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  /* Closed with Escape: stays hidden until focus or the pointer leaves */
  .site-menu .menu-item-has-children.is-dismissed > .sub-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
  }

  .site-menu .menu-item-has-children.is-dismissed > a::after {
    transform: rotate(45deg) translateY(-2px);
  }

  .site-menu .sub-menu li {
    margin: 0;
  }

  .site-menu .sub-menu li a {
    display: block;
    padding: 10px 12px;
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0;
    white-space: nowrap;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
  }

  .site-menu .sub-menu li a:hover,
  .site-menu .sub-menu li.current-menu-item > a,
  .site-menu .sub-menu li.current_page_item > a {
    background: var(--paper-warm);
    color: var(--grass-deep);
  }

  .site-menu .sub-menu .menu-item-has-children > a::after {
    margin-left: auto;
    transform: rotate(-45deg) translateY(-1px);
  }
}

/* Mobile submenu toggle button, injected by navigation.js */
.sub-menu-toggle {
  display: none;
}

.site-branding .custom-logo {
  max-height: 46px;
  width: auto;
  margin-right: 1rem;
}

.site-branding-text {
  text-decoration: none;
}

footer .widget,
footer .widget p,
footer .widget li {
  color: #fff;
  font-size: 15px;
  line-height: 1.7;
}

footer .widget a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

footer .widget a:hover {
  color: #fff;
  text-decoration-thickness: 2px;
}

footer .widget ul,
footer .widget ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1.25rem;
  clip: auto;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--char);
  border-radius: 4px;
  z-index: 100000;
  text-decoration: none;
}

/* Keyboard focus */
:focus-visible {
  outline: 2px solid var(--grass-deep);
  outline-offset: 3px;
}

.btn:focus-visible,
.comment-form .submit:focus-visible {
  outline-width: 3px;
}

.site-header :focus-visible,
footer :focus-visible,
.bg-char :focus-visible,
#hero :focus-visible,
#about :focus-visible {
  outline-color: #fff;
}

.site-menu li a:focus-visible {
  color: var(--grass-bright);
}

/* Desktop dropdowns have a white background */
@media (min-width: 768px) {
  .site-menu .sub-menu a:focus-visible {
    outline-color: var(--grass-deep);
    outline-offset: -2px;
  }

  .site-menu .sub-menu li a:focus-visible {
    background: var(--paper-warm);
    color: var(--grass-deep);
  }
}

/* Mobile menu items are full-width rows */
@media (max-width: 767px) {
  .site-nav .site-menu a:focus-visible,
  .site-nav .sub-menu-toggle:focus-visible {
    outline-offset: -3px;
  }
}

/* Mobile menu toggle button */
.site-menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #fff;
  line-height: 0;
}

.site-menu-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 767px) {
  .site-menu-toggle {
    display: flex;
  }

  .site-menu-toggle[aria-expanded="true"] .site-menu-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-menu-toggle[aria-expanded="true"] .site-menu-toggle-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .site-menu-toggle[aria-expanded="true"] .site-menu-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    display: none;
  }

  .site-nav.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--char);
    padding: 0.25rem 0 1.25rem;
    z-index: 40;
  }

  .site-nav.is-open .site-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav.is-open .site-menu li a {
    display: block;
    padding: 0.875rem 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9375rem;
  }

  .site-nav.is-open .site-menu li:last-child a {
    border-bottom: 0;
  }

  .site-nav.is-open .site-menu .menu-item-has-children > a {
    padding-right: 3.25rem;
  }

  .site-nav.is-open .site-menu .sub-menu {
    max-height: 0;
    overflow: hidden;
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.16);
    visibility: hidden;
    transition: max-height 0.25s ease, visibility 0s linear 0.25s;
  }

  .site-nav.is-open .menu-item-has-children.sub-menu-open > .sub-menu {
    max-height: 999px;
    visibility: visible;
    transition: max-height 0.25s ease, visibility 0s;
  }

  .site-nav.is-open .site-menu .sub-menu li a {
    padding-left: 2.75rem;
    font-size: 0.875rem;
    font-weight: 500;
  }

  .site-nav.is-open .menu-item-has-children > .sub-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 48px;
    padding: 0;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
  }

  .site-nav.is-open .menu-item-has-children > .sub-menu-toggle:hover,
  .site-nav.is-open .menu-item-has-children.sub-menu-open > .sub-menu-toggle {
    background: rgba(255, 255, 255, 0.16);
  }

  .sub-menu-toggle-arrow {
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
  }

  .menu-item-has-children.sub-menu-open > .sub-menu-toggle .sub-menu-toggle-arrow {
    transform: rotate(-135deg);
  }
}

.content {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.content > * + * {
  margin-top: 1.25rem;
}

.content h2 {
  font-family: Caveat, cursive;
  font-size: 40px;
  line-height: 1;
  color: var(--ink);
  margin-top: 3rem;
  margin-bottom: 0.25rem;
}

.content h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2.25rem;
  margin-bottom: 0;
}

.content h1,
.content h4,
.content h5,
.content h6 {
  font-weight: 700;
  color: var(--ink);
  margin-top: 2rem;
  margin-bottom: 0;
}

.content h1 {
  font-size: 34px;
  line-height: 1.2;
}

.content h4 {
  font-size: 19px;
}

.content h5 {
  font-size: 17px;
}

.content h6 {
  font-size: 15px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.content p {
  color: var(--ink-soft);
}

.content p:first-of-type {
  font-size: 20px;
  color: var(--ink);
}

.content p:first-of-type::first-letter {
  font-family: Caveat, cursive;
  color: var(--grass);
  font-size: 64px;
  line-height: 0.7;
  float: left;
  margin-right: 0.75rem;
  margin-top: 0.5rem;
}

.content a:not(.wp-element-button) {
  color: var(--grass-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content a:not(.wp-element-button):hover {
  color: var(--grass);
}

/* Front page sections: links keep the colour of their section */
.front-page-content a:not(.wp-element-button) {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content ul {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.content ul > li {
  position: relative;
  padding-left: 2rem;
  color: var(--ink-soft);
}

.content ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 11px;
  height: 11px;
  border-radius: 9999px;
  background: var(--grass);
}

.content ol {
  list-style: decimal;
  padding-left: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.content ol ol {
  list-style: lower-alpha;
}

.content ol > li {
  padding-left: 0.5rem;
  color: var(--ink-soft);
}

.content ol > li + li {
  margin-top: 0.75rem;
}

.content ol > li::marker {
  color: var(--grass);
  font-weight: 700;
}

.content li > ul,
.content li > ol {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.content blockquote {
  font-family: Caveat, cursive;
  font-size: 30px;
  line-height: 1.25;
  color: var(--grass);
  border-left: 3px solid var(--grass);
  padding-left: 1.5rem;
  margin-top: 2.25rem;
  margin-bottom: 2.25rem;
}

.content img {
  width: 100%;
  border-radius: 0.5rem;
  margin-top: 2.25rem;
  margin-bottom: 2.25rem;
  height: auto;
}

.content figcaption {
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: -1.375rem;
  margin-bottom: 2.25rem;
}

.page-feature-image {
  display: block;
  width: 100%;
  height: 440px;
  margin-top: 1rem;
  border-radius: 0.75rem;
  object-fit: cover;
}

@media (max-width: 767px) {
  .page-feature-image {
    height: 280px;
  }
}

.comments-area-wrapper {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
}

.comments-area {
  color: var(--ink-soft);
}

.comments-title,
.comment-reply-title {
  font-family: Caveat, cursive;
  font-size: 42px;
  line-height: 1;
  color: var(--ink);
  margin: 0 0 1rem;
}

.comment-list,
.comment-list .children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-list > li {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}

.comment-list .children {
  margin-top: 1rem;
  margin-left: 1.25rem;
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}

.comment-author .fn,
.comment-metadata a,
.comment-reply-link {
  color: var(--ink);
  text-decoration: none;
}

.comment-metadata {
  font-size: 13px;
  margin: 0.25rem 0 0.75rem;
}

.comment-content p {
  color: var(--ink-soft);
}

.comment-content a {
  color: var(--grass-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.comment-content a:hover {
  color: var(--grass);
}

.comment-content ul,
.comment-content ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.comment-content ul {
  list-style: disc;
}

.comment-content ol {
  list-style: decimal;
}

.comment-form {
  display: grid;
  gap: 0.75rem;
}

.comment-form p {
  margin: 0;
}

.comment-notes,
.logged-in-as,
.comment-form-cookies-consent {
  font-size: 14px;
  color: var(--ink-soft);
}

.comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comment-form-cookies-consent input[type="checkbox"] {
  margin: 0;
}

.comment-form label {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.75rem 0.875rem;
  color: var(--ink);
  background: #fff;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
  outline: 2px solid var(--grass-deep);
  outline-offset: 1px;
  border-color: var(--grass);
}

.comment-form .submit {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 14px 30px;
  border-radius: 9999px;
  border: 2px solid var(--grass);
  background: var(--grass);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.comment-form .submit:hover {
  background: var(--grass-deep);
  border-color: var(--grass-deep);
}

.comment-reply-title {
  margin-top: 2rem;
}

.comment-navigation {
  margin: 1.25rem 0;
}

.comment-navigation .page-numbers {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.comment-navigation .page-numbers li {
  margin: 0;
  padding: 0;
}

.comment-navigation .page-numbers a,
.comment-navigation .page-numbers span {
  display: inline-block;
  min-width: 2.25rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 9999px;
  padding: 0.4rem 0.7rem;
  text-decoration: none;
  color: var(--ink-soft);
  background: #fff;
}

.comment-navigation .page-numbers a:hover {
  border-color: var(--grass);
  color: var(--grass-deep);
}

.comment-navigation .page-numbers .current {
  border-color: var(--grass);
  background: var(--grass);
  color: #fff;
}

/* Search form */
.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 560px;
}

.search-form .search-field {
  flex: 1 1 220px;
  min-width: 0;
  padding: 12px 20px;
  border: 1px solid var(--ink-soft);
  border-radius: 9999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.search-form .search-field:focus {
  outline: 2px solid var(--grass-deep);
  outline-offset: 1px;
  border-color: var(--grass);
}

/* WordPress core content classes */
.wp-caption {
  max-width: 100%;
  margin: 2.25rem 0;
  text-align: center;
}

.wp-caption img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.wp-caption-text {
  margin-top: 0.625rem;
  margin-bottom: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.gallery-caption {
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 0.5rem;
}

.alignleft {
  float: left;
  margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
  float: right;
  margin: 0.5rem 0 1rem 1.5rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.sticky {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 10px 24px rgba(51, 51, 47, 0.06);
}

/* Sticky posts on the journal page keep their card inside the .sticky box */
.post-card.sticky {
  padding: 1rem;
}

.post-card--featured.sticky {
  padding: 1.5rem;
}

.bypostauthor > .comment-body {
  border-left: 3px solid var(--grass);
  padding-left: 0.875rem;
}

footer h2,
footer h3,
footer h4,
footer h5,
footer .wp-block-heading {
	color: #fff;
	font-weight: 700;
	font-size: 1.25rem;
    line-height: 1.75rem;
	margin-bottom: 18px;
}