/* =========================================================
   HEADER & NAVIGATION ADJUSTMENTS
   ========================================================= */

/* 1. Prevent the navigation from having a solid white block background */
.main-navigation,
#site-navigation,
.main-navigation ul,
#site-navigation ul,
.main-navigation li,
#site-navigation li,
.inside-navigation {
  background: transparent !important;
}

/* 2. Style the white-background logo into an elegant framed emblem */
.site-logo,
.custom-logo-link,
.site-branding img {
  background: #ffffff !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  border: 1.5px solid #f0c040 !important; /* Gold frame matching theme */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px rgba(240, 192, 64, 0.2) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 52px !important; /* Keep within the 72px header height */
  width: auto !important;
  margin-top: 4px !important;
  margin-bottom: 4px !important;
  box-sizing: border-box !important;
  transition: transform 0.3s ease !important;
}

.site-logo:hover,
.custom-logo-link:hover {
  transform: scale(1.03) !important;
}

/* Ensure the image inside scales perfectly */
.site-logo img,
.custom-logo,
.site-branding img {
  max-height: 38px !important;
  height: 38px !important;
  width: auto !important;
  object-fit: contain !important;
  display: block !important;
}

/* 3. Fix Site Title Color (make it vibrant gold instead of dark grey) */
.site-title,
.site-title a {
  color: #f0c040 !important;
  text-shadow: 0 0 12px rgba(240, 192, 64, 0.4) !important;
}


/* =========================================================
   FOOTER STYLE FIXES
   ========================================================= */

/* Force the white copyright bar to blend into the theme */
.site-footer,
#colophon,
.site-info,
.footer-copy {
  background: #070911 !important;
  color: #9b95b0 !important;
  border-top: 1px solid rgba(255, 215, 90, 0.18) !important;
}

.site-info a,
.footer-copy a {
  color: #f0c040 !important;
}

.site-info a:hover {
  color: #fde68a !important;
}


/* =========================================================
   BASE STYLES
   ========================================================= */

body {
  background: #050816 url('images/stars-bg.png') repeat;
  background-size: cover;
  color: #f5f3ff;
  font-family: "Cormorant Garamond", serif;
  cursor: url('images/wand-cursor.png') 0 0, auto;
}


/* =========================================================
   STICKY FOOTER FIX (Pushes footer to the bottom of the page)
   ========================================================= */

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Force the GeneratePress wrapper to span at least the full viewport height */
#page {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
}

/* Force the main content area to grow and fill any remaining vertical space */
#content {
  flex-grow: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Prevent the footer from shrinking and align it to the bottom */
.site-footer,
#colophon {
  margin-top: auto !important;
  flex-shrink: 0 !important;
}

/* HOMEPAGE */
.home .tmas-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 500px;
  padding: 6rem 1.5rem;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(180deg, rgba(5, 8, 22, 0.35), rgba(5, 8, 22, 0.94)),
    url('images/mist-texture.png') center / cover no-repeat;
  border-bottom: 1px solid rgba(240, 192, 64, 0.3);
}

.home .tmas-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url('images/stars-bg.png') center / 640px auto repeat;
  content: '';
  opacity: 0.42;
}

.home .tmas-hero-inner {
  width: min(100%, 760px);
}

.home .tmas-hero h1,
.home .tmas-section h2,
.home .story-card h3 {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
}

.home .tmas-hero h1 {
  max-width: 15ch;
  margin: 0 auto 1.25rem;
  color: #f7df92;
  font-size: 3.25rem;
  line-height: 1.15;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.8);
}

.home .tmas-hero p {
  max-width: 42rem;
  margin: 0 auto 2rem;
  color: #f5f3ff;
  font-size: 1.3rem;
  line-height: 1.55;
}

.home .tmas-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  border: 1px solid #f0c040;
  border-radius: 4px;
  background: #f0c040;
  color: #111321;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.home .tmas-button:hover {
  transform: translateY(-2px);
  border-color: #ffe58a;
  background: #ffe58a;
  color: #111321;
}

.home .tmas-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.home .tmas-section {
  width: min(100% - 3rem, 1120px);
  margin: 0 auto;
  padding: 4.5rem 0;
  color: #f5f3ff;
}

.home .section-title {
  margin: 0 0 0.5rem;
  color: #f0c040;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.home .tmas-section h2 {
  margin: 0 0 1.75rem;
  color: #f7df92;
  font-size: 2rem;
  line-height: 1.25;
}

.home .tmas-story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.home .story-card {
  display: flex;
  min-width: 0;
  min-height: 270px;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem;
  border: 1px solid rgba(240, 192, 64, 0.25);
  border-top: 3px solid #4f9a91;
  border-radius: 6px;
  background: rgba(11, 13, 26, 0.88);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  transition: transform 180ms ease, border-color 180ms ease;
}

.home .story-card:hover {
  transform: translateY(-3px);
  border-color: rgba(240, 192, 64, 0.65);
}

.home .story-card h3 {
  margin: 0 0 0.8rem;
  color: #f7df92;
  font-size: 1.35rem;
  line-height: 1.3;
}

.home .story-card p {
  flex-grow: 1;
  margin: 0 0 1.5rem;
  color: #d8d9e2;
  font-size: 1.05rem;
  line-height: 1.55;
}

.home .tmas-button-secondary {
  min-height: 42px;
  background: transparent;
  color: #f7df92;
}

.home .tmas-button-secondary:hover {
  background: rgba(240, 192, 64, 0.12);
  color: #fff0bd;
}

.home .tmas-section:last-child:not(.tmas-book-spotlight) {
  margin-bottom: 2rem;
  padding: 3rem 2rem;
  border-top: 1px solid rgba(79, 154, 145, 0.45);
  background: rgba(16, 24, 43, 0.72);
  text-align: center;
}

.home .tmas-section:last-child:not(.tmas-book-spotlight) p:not(.section-title) {
  max-width: 680px;
  margin: 0 auto 1.5rem;
  color: #d8d9e2;
  font-size: 1.1rem;
  line-height: 1.6;
}

.home .tmas-book-spotlight {
  margin-bottom: 2rem;
  padding: 3rem 2rem;
  border-top: 1px solid rgba(79, 154, 145, 0.45);
  background: rgba(16, 24, 43, 0.72);
}

.home .tmas-book-teaser {
  display: grid;
  width: min(100%, 920px);
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  align-items: center;
  gap: 2.5rem;
  margin: 0 auto;
}

.home .tmas-book-teaser-cover,
.tmas-book-cover {
  aspect-ratio: 0.72;
  overflow: hidden;
  border: 1px solid rgba(240, 192, 64, 0.45);
  border-radius: 4px;
  background: #10182b;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.home .tmas-book-teaser-cover img,
.tmas-book-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

.home .tmas-book-teaser-copy h2 {
  margin-bottom: 0.75rem;
}

.home .tmas-book-teaser-copy > p:not(.section-title) {
  max-width: 680px;
  margin: 0 0 1.25rem;
  color: #d8d9e2;
  font-size: 1.1rem;
  line-height: 1.65;
}

.home .tmas-book-byline {
  color: #f7df92 !important;
  font-size: 1rem !important;
}

.home .tmas-book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.home .tmas-book-actions .tmas-button-secondary {
  min-height: 48px;
}

.tmas-book-page {
  width: min(100%, 960px);
  margin: 0 auto;
  color: #f5f3ff;
}

.tmas-book-page .tmas-book-hero {
  display: grid;
  grid-template-columns: minmax(170px, 250px) minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  padding: 0.5rem 0 3rem;
}

.tmas-book-page .tmas-book-cover {
  width: 100%;
}

.tmas-book-page .tmas-book-kicker {
  margin-bottom: 0.75rem;
  color: #4f9a91;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.tmas-book-page .tmas-book-byline {
  color: #f7df92;
  font-size: 1rem;
}

.tmas-book-page p {
  color: #d8d9e2;
  font-size: 1.05rem;
  line-height: 1.7;
}

.tmas-book-page .tmas-book-details {
  color: #d8d9e2;
  font-size: 0.95rem;
}

.tmas-book-page .tmas-book-section {
  padding: 2rem 0;
  border-top: 1px solid rgba(79, 154, 145, 0.4);
}

.tmas-book-page .tmas-book-section h2 {
  margin: 0 0 1rem;
  color: #f7df92;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.5rem;
  line-height: 1.3;
}

.tmas-book-page .tmas-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  border: 1px solid #f0c040;
  border-radius: 4px;
  background: #f0c040;
  color: #111321;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.tmas-book-page .tmas-button:hover {
  border-color: #ffe58a;
  background: #ffe58a;
  color: #111321;
}

.tmas-book-page .tmas-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .home .tmas-story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-branding-container {
    flex: 1 1 auto;
    min-width: 0;
  }

  .site-branding {
    min-width: 0;
  }

  .site-branding .main-title {
    max-width: 15rem;
    font-size: 1rem;
    line-height: 1.25;
  }

  .home .tmas-hero {
    min-height: 420px;
    padding: 4.5rem 1.25rem;
  }

  .home .tmas-hero h1 {
    font-size: 2.25rem;
  }

  .home .tmas-hero p {
    font-size: 1.1rem;
  }

  .home .tmas-section {
    width: min(100% - 2rem, 1120px);
    padding: 3.25rem 0;
  }

  .home .tmas-section h2 {
    font-size: 1.7rem;
  }

  .home .tmas-story-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home .story-card {
    min-height: 0;
  }

  .home .tmas-section:last-child:not(.tmas-book-spotlight) {
    padding: 2.25rem 1.25rem;
  }

  .home .tmas-book-spotlight {
    padding: 2.25rem 1.25rem;
  }

  .home .tmas-book-teaser {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .home .tmas-book-teaser-cover {
    width: min(100%, 210px);
    justify-self: center;
  }

  .tmas-book-page .tmas-book-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .tmas-book-page .tmas-book-cover {
    width: min(100%, 230px);
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home .tmas-button,
  .home .story-card {
    transition: none;
  }

  .home .tmas-button:hover,
  .home .story-card:hover {
    transform: none;
  }
}

/* LONG-FORM READING */
.inside-article {
  border: 1px solid rgba(240, 192, 64, 0.22);
  border-radius: 6px;
  background: rgba(11, 13, 26, 0.96) !important;
}

.entry-content {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.65;
}

.entry-content p,
.entry-content li {
  color: inherit;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: #ffe8a3;
  font-weight: 600;
}

.entry-content strong,
.entry-content b {
  color: #ffffff;
  font-weight: 700;
}

.page-id-22 .entry-content .tmas-contact-page {
  max-width: 720px;
  margin: 0 auto;
}

.page-id-22 .entry-content .tmas-contact-intro {
  color: #ffffff;
  font-size: 1.3rem;
}

.page-id-22 .entry-content .tmas-contact-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border: 1px solid #f0c040;
  border-radius: 4px;
  background: #f0c040;
  color: #111321;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.page-id-22 .entry-content .tmas-contact-button:hover {
  border-color: #ffe58a;
  background: #ffe58a;
  color: #111321;
}

.page-id-22 .entry-content .tmas-contact-button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.page-id-22 .entry-content .tmas-contact-address a {
  color: #ffe8a3;
  font-weight: 700;
}