/*
Theme Name: Sorsari Theme
Theme URI:
Author: HSJ Web Services
Author URI:
Description: A blank theme
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 5.7
Version:
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sorsari-theme
Tags:
*/

/* ========== Social links ========== */
.wp-block-social-links .wp-social-link a {
  color: #ffffff;
  background-color: transparent;
}
.wp-block-social-links .wp-social-link a:hover {
  color: #dddddd;
}

/* =========================================================
   HEADER (works with or without .sorsari-header class)
   ========================================================= */

/* Make template part stretch full width */
.wp-block-template-part {
  width: 100%;
}

/* Outer header wrapper should span full width (often alignfull) */
.wp-block-template-part > .wp-block-group.alignfull {
  width: 100%;
}

/* Inner header row: center within wide container and use flex */
.wp-block-template-part
  > .wp-block-group.alignfull
  > .wp-block-group.alignfull {
  max-width: var(--wp--style--global--wide-size, 1300px);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* push logo left / menu right */
  gap: var(--wp--style--block-gap, 24px);
}

/* Support the old .sorsari-header markup (kept for safety) */
.sorsari-header {
  width: 100%;
}
.sorsari-header > .wp-block-group.alignfull {
  max-width: var(--wp--style--global--wide-size, 1300px);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wp--style--block-gap, 24px);
}

/* Logo sizing inside header */
.wp-block-template-part .wp-block-site-logo {
  flex: 0 0 auto;
}
.wp-block-template-part .wp-block-site-logo img {
  height: auto;
  width: auto;
  max-height: 64px;
}

/* Ensure nav sits on the right even if core adds its own justification */
.wp-block-template-part nav.wp-block-navigation {
  margin-left: auto;
}

/* Remove spacer used as faux flex grow in some patterns */
.wp-block-template-part .wp-block-spacer {
  display: none !important;
}

/* Make sure mobile overlay menu stacks above content */
.wp-site-blocks > header {
  position: relative;
  z-index: 1000;
}
.wp-block-navigation__responsive-container {
  z-index: 1001;
}

/* =========================================================
   ARCHIVE: /releases
   ========================================================= */

/* Constrain and center the main content area */
.archive.post-type-archive-release main,
.archive.post-type-archive-release main.sorsari-container,
.archive.post-type-archive-release
  main.sorsari-container
  .wp-block-group.is-layout-constrained {
  max-width: var(--wp--style--global--content-size, 1100px);
  margin-left: auto;
  margin-right: auto;
  padding: 24px;
  display: block;
}

/* Grid of cards */
.archive.post-type-archive-release .sorsari-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

/* Card */
.archive.post-type-archive-release .sorsari-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--wp--preset--color--custom-off-black);
  padding: 16px;
  /*   transition: transform 0.12s ease; */
}

.archive.post-type-archive-release .sorsari-card:hover {
  background-color: rgba(255, 255, 255, 0.018);
  color: black;
}



/* .archive.post-type-archive-release .sorsari-card:hover { transform: translateY(-2px); } */

/* 1:1 cover */
.archive.post-type-archive-release .sorsari-cover {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  overflow: hidden;
  background: transparent;
}
.archive.post-type-archive-release .sorsari-cover-img,
.archive.post-type-archive-release .sorsari-cover-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Card typography */
.archive.post-type-archive-release .sorsari-card-body {
  color: var(--wp--preset--color--white);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
}
.archive.post-type-archive-release .sorsari-album-title {
  font-family: var(--wp--preset--font-family--major-mono-display);
  text-transform: lowercase;
}
.archive.post-type-archive-release .sorsari-release-name {
  opacity: 0.9;
}
.archive.post-type-archive-release .sorsari-meta {
  opacity: 0.8;
}

/* =========================================================
   SINGLE: release
   ========================================================= */

.single-release .sorsari-container {
  max-width: var(--wp--style--global--content-size, 1056px);
  margin: 0 auto;
  padding: 24px;
}

/* H1 spacing tweak to keep back button close */
.single-release .entry-header .wp-block-heading {
  margin-bottom: 8px;
}

/* Two-column layout (mobile first) */
.single-release .sorsari-two-col {
  display: grid;
  gap: var(--wp--style--block-gap, 24px);
  grid-template-columns: 1fr;
  grid-template-areas:
    "cover"
    "details"
    "tracks";
}
.single-release .sr-cover {
  grid-area: cover;
}
.single-release .sr-details {
  grid-area: details;
}
.single-release .sr-tracks {
  grid-area: tracks;
}

@media (min-width: 900px) {
  /* Two-column layout */
  .single-release .sorsari-two-col {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "cover   details"
      "tracks  details";
  }
}

/* Panels transparent */
.single-release .sorsari-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

/* Square cover */
.single-release .sorsari-cover {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  overflow: hidden;
  background: transparent;
  margin-bottom: 16px;
}
.single-release .sorsari-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Headings and body text */
.single-release .sorsari-panel h2 {
  font-family: var(--wp--preset--font-family--major-mono-display);
  text-transform: lowercase;
  margin: 16px 0 8px 0;
  font-size: 18px;
  line-height: 1.2;
}
.single-release .sorsari-meta-list,
.single-release .entry-summary {
  font-size: 16px;
  line-height: 1.6;
}
.single-release .sorsari-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.single-release .sorsari-meta-list li {
  margin-bottom: 6px;
}
.single-release .sorsari-links a {
  display: inline-block;
  margin: 4px 8px 0 0;
  text-decoration: none;
}

/* Tracklist details */
.single-release .track-credits {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.85;
  margin-top: 2px;
}

/* Spacing tweaks */
.single-release .sr-cover .sorsari-cover {
  margin-bottom: 0;
}
.single-release .sr-tracks h2 {
  margin-top: 0;
}

@media (min-width: 900px) {
  .single-release .sr-cover {
    max-width: 580px;
  }
}

/* =========================================================
   BACK / CLOSE BUTTON STYLES
   ========================================================= */

/* Wrapper above the title (kept for layout control if needed) */
.sr-close-under-title-wrap {
  display: block;
}

/* Base button */
.sr-close-under-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--wp--preset--font-family--major-mono-display);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #000;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 4px; /* minimal radius as requested */
  padding: 6px 10px;
  line-height: 1;
  transform: translateZ(0); /* avoid blinks on hover */
}

/* Arrow (consistent width, always visible) */
.sr-close-under-title::before {
  content: "←";
  display: inline-block;
  width: 1em; /* reserve space so text reveal does not shift arrow */
  text-align: center;
}

/* Label hidden by default on hover-enabled devices */
.sr-close-under-title .label {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 160ms ease;
}

/* Reveal label on hover/focus (pointer devices) */
@media (hover: hover) and (pointer: fine) {
  .sr-close-under-title:hover .label,
  .sr-close-under-title:focus-visible .label {
    max-width: 12ch; /* enough for “TO RELEASES” */
  }
}

/* On touch devices, show full label always */
@media (hover: none) {
  .sr-close-under-title .label {
    max-width: none;
  }
}

/* Slight press feedback */
.sr-close-under-title:active {
  transform: translateY(1px);
}

/* Variant under tracks reuses the same class; optional top margin helper */
.sr-close-under-tracks {
  margin-top: 8px;
}

/* =========================================================
   RESPONSIVE TWEAKS
   ========================================================= */

@media (max-width: 640px) {
  .archive.post-type-archive-release main,
  .archive.post-type-archive-release main.sorsari-container,
  .single-release .sorsari-container {
    padding: 16px;
  }

  .archive.post-type-archive-release .sorsari-grid {
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .wp-block-template-part .wp-block-site-logo img {
    max-height: 48px;
  }
}

/* Cloudcatch modal title font alignment with theme */
.wp-block-cloudcatch-light-modal-block {
  font-family: var(--wp--preset--font-family--major-mono-display);
  text-transform: lowercase;
}

/* ==== FORCE Major Mono Display on the BACK buttons ==== */
.sr-close-under-title,
.sr-close-under-title .label {
  font-family: "Major Mono Display", monospace !important;
}

/* ==== Stack BACK button and title on separate lines (never side-by-side) ==== */
.single-release .entry-header {
  display: block !important; /* neutralize any flex from a pattern */
}

.single-release .entry-header .sr-close-under-title-wrap,
.single-release .entry-header .wp-block-heading {
  display: block !important; /* each one takes its own row */
  width: 100% !important;
}

/* In case some global CSS keeps header as flex, force column layout just in single-release */
.single-release .entry-header.is-layout-flex,
.single-release .entry-header.wp-block-group.is-layout-flex {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important; /* both aligned left */
}

/* Keep the button snug to the title (you can tweak this gap) */
.single-release .entry-header .sr-close-under-title-wrap {
  margin-bottom: 8px;
}

/* (optional) ensure the H1 doesn't add extra bottom gap */
.single-release .entry-header .wp-block-heading {
  margin-bottom: 8px;
}

/* Back buttons: force Major Mono Display everywhere */
.single-release .entry-header a.sr-close-under-title,
.single-release .sr-tracks a.sr-close-under-title,
.sr-close-under-title,
.sr-close-under-title .label {
  font-family: "Major Mono Display",
    var(--wp--preset--font-family--major-mono-display, "Major Mono Display"),
    monospace !important;
  font-weight: 400 !important;
  font-variation-settings: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hide the two “TO RELEASES” buttons everywhere */
.sr-close-under-title-wrap,
.sr-close-under-title,
.sr-close-under-tracks {
  display: none !important;
}

/* Base (keep your desktop behavior) */
.image-modal {
  position: relative;
  display: inline-flex;
  width: fit-content;
  max-width: 90vw;
  max-height: 90vh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}
.image-modal figure {
  margin: 0;
  padding: 0;
}

/* Image scales, preserves aspect */
.image-modal figure img {
  display: block;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

/* Mobile / narrow: expand the box to the viewport and let the img fill it */
@media (max-width: 700px) {
  .image-modal {
    /* stop shrink-wrapping; use the viewport instead */
    display: flex; /* not inline-flex */
    width: 96vw; /* grow the modal */
    height: auto;
    max-width: 96vw;
    max-height: 96svh; /* safe viewport height on mobile */
  }
  .image-modal figure img {
    width: 100%; /* fill modal width */
    height: auto; /* keep aspect */
    max-width: 96vw;
    max-height: 96svh;
    object-fit: contain;
  }
}

/* remove the uneccesary spacing at the top of the first details h2 in single release template */
.h2-details {
  margin-top: 0 !important;
}

/*fixing the missing padding on the header for the release archive and release-single template pages */
.header-fix {
/*   padding-left: 14px; */
/*   padding-right: 14px; */
  max-width: 1100px;
  margin: 0 auto;
}

.wp-block-cover {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.wp-block-button__link {
  transition: 0.2s ease;
}

.wp-block-button__link:hover {
  background-color: #baabc285;
  color: #fff;
  transform: translateY(-2px);
}

.category-gallery .size-full:hover {
	cursor: pointer;
}
