/* =====================================================================
   site.css - SHARED by every page: page reset, black header with the
   side menu, optional cart button, footer. Each page also loads its own
   css file after this one (e.g. tarot-reading.css).
   ===================================================================== */
:root {
  --bg-dark: #111111;
  --text-light: #f5f3f0;
  --accent-red: #800000;
  --accent-gold: #d4af37;
  --font-main: "Georgia", "Times New Roman", serif;
  --burger-color: #d4af37;       /* hamburger colour - change here if you want another one */
}

/* ---------- Reset & base ---------- */
:where(.tr-page) * { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body.tr-page { font-family: var(--font-main); line-height: 1.6; }
body.menu-locked { overflow: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
:where(.tr-page) a { color: inherit; text-decoration: none; transition: all .3s ease; font-family: 'Fraunces', Georgia, serif; }
:where(.tr-page) img { max-width: 100%; height: auto; display: block; }

/* ---------- Black header ---------- */
.site-header { background-color: var(--bg-dark); position: sticky; top: 0; z-index: 1000; border-bottom: 2px solid var(--accent-red); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 14px 20px 14px 72px; display: flex; justify-content: space-between; align-items: center; }   /* left room for the hamburger */
.brand-logo { color: var(--text-light); font-weight: 700; font-family: var(--font-main); line-height: 1.25; white-space: nowrap; }
@media (max-width: 800px) {
  .nav-container { justify-content: center; text-align: center; padding: 12px 60px; }
}

/* ---------- Hamburger button ---------- */
.hamburger { position: absolute; top: 50%; left: 16px; width: 32px; height: 24px; margin-top: -12px; padding: 0; background: none; border: 0; cursor: pointer; z-index: 1003; }
.hamburger span { position: absolute; left: 0; width: 100%; height: 3px; border-radius: 2px; background: var(--burger-color); transition: transform .25s ease, opacity .2s ease, top .25s ease, bottom .25s ease; }
.hamb-top    { top: 0; }
.hamb-middle { top: 50%; margin-top: -1.5px; }
.hamb-bottom { bottom: 0; }
.hamburger.is-open .hamb-top    { top: 50%; margin-top: -1.5px; transform: rotate(45deg); }
.hamburger.is-open .hamb-middle { opacity: 0; }
.hamburger.is-open .hamb-bottom { bottom: 50%; margin-bottom: -1.5px; transform: rotate(-45deg); }

/* ---------- Side menu ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; z-index: 1001; }
#wrapper.toggled .overlay { opacity: 1; visibility: visible; }
#sidebar-wrapper { position: absolute; top: 0; left: 0; width: min(300px, 85vw); height: 100%; overflow-y: auto; padding: 72px 0 24px; background: var(--bg-dark); border-right: 2px solid var(--accent-red); transform: translateX(-100%); transition: transform .3s ease; }
#wrapper.toggled #sidebar-wrapper { transform: translateX(0); }
.sidebar-nav { list-style: none; }
.sidebar-nav li { list-style: none; }
.sidebar-nav a { display: block; padding: 6px 26px; color: var(--text-light); font-family: 'Fraunces', Georgia, serif; font-size: 1.05rem; font-weight: 400; letter-spacing: .025em; line-height: 1.35; border-bottom: 1px solid #262626; }
.sidebar-nav a:hover { color: var(--accent-gold); background: #1a1a1a; }
.menu2-list > a.menu-toggle::after { content: "+"; float: right; color: var(--accent-gold); font-weight: 700; }
.menu2-list.open > a.menu-toggle::after { content: "\2013"; }
.menu2-drop { list-style: none; max-height: 0; overflow: hidden; background: #181818; transition: max-height .3s ease; }
.menu2-list.open .menu2-drop { max-height: 600px; }
.menu2-drop a { padding-left: 44px; font-size: .95rem; letter-spacing: .02em; color: #d8c9b6; }
@media (max-width: 400px) {
  #sidebar-wrapper { width: min(300px, 82vw); padding-top: 64px; }
  .sidebar-nav a { font-size: clamp(.8rem, 4.2vw, 1.05rem); padding: clamp(9px, 3vw, 13px) clamp(16px, 5vw, 26px); }
  .menu2-drop a { font-size: clamp(.74rem, 3.7vw, .95rem); padding-left: clamp(30px, 9vw, 44px); }
}

/* ---------- Footer ---------- */
.site-footer { background-color: var(--bg-dark); color: #f5f3f0; padding: 20px 0 20px; border-top: 2px solid var(--accent-red); }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.site-footer .footer-brand h3 { font-family: 'Fraunces', Georgia, serif; font-size: 1.2rem; font-weight: 600; color: #f5f3f0; margin: 0 0 4px; }
.site-footer a { color: #f5f3f0; }
.site-footer .footer-brand p { color: #d8c9b6; font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 1rem; margin: 0; }
.social-links { display: flex; gap: 15px; }
.social-links img { width: 24px; height: 24px; }
.social-links img[alt="TikTok"], .social-links img[alt="Twitter X"] { filter: drop-shadow(.5px 0 0 #d9b46a) drop-shadow(-.5px 0 0 #d9b46a) drop-shadow(0 .5px 0 #d9b46a) drop-shadow(0 -.5px 0 #d9b46a); }
.footer-bottom { text-align: center; border-top: 1px solid #333; padding-top: 20px; }
.site-footer .footer-bottom p { color: #b5b5b5; font-size: .85rem; margin: 0; }
@media (max-width: 860px) {
  .footer-content { flex-direction: column; text-align: center; justify-content: center; }
  .social-links { justify-content: center; }
  .footer-bottom .tr-sep { display: none; }
  .footer-bottom .tr-dmca { display: block; }
}
@media (max-width: 480px) {
  .site-footer .footer-bottom p { font-size: .78rem; }
}

/* ---------- Header text: name, by-line and tagline ---------- */
/* --hdr-r = free space kept on the right of the header text (the cart button needs more than a plain header) */
.site-header { --hdr-r: 16px; }
.site-header.has-cart { --hdr-r: 76px; }

/* header: name, by-line and tagline close together on one line; height comes from the home page's own logo style */
.tr-brandline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.tr-brandline .tr-by { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 1.15rem; color: #d9b46a; white-space: nowrap; }
.tr-brandline .tr-tag { font-family: var(--font-main); font-size: .72rem; letter-spacing: .06em; color: #a99bb5; }

/* header: centered, never more than 2 lines (name + by-line, then tagline) */
.nav-container .tr-brandline { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.tr-brand1 { display: flex; align-items: baseline; justify-content: center; gap: clamp(6px, 1.4vw, 14px); white-space: nowrap; }
.tr-brandline .brand-logo { margin: 0; padding: 0; line-height: 1.1; font-size: clamp(.9rem, 3.6vw, 1.35rem); }
.tr-brandline .tr-by { font-size: clamp(.8rem, 3.1vw, 1.15rem); line-height: 1.1; }
.tr-brandline .tr-tag { font-size: clamp(.5rem, 1.9vw, .72rem); line-height: 1.1; white-space: nowrap; }

.nav-container .tr-brandline {
  flex: 1 1 auto; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: baseline;
  gap: 2px clamp(8px, 1.6vw, 14px); text-align: center;
}
@media (min-width: 800px) {
  .nav-container .tr-brandline { flex: 0 1 auto; flex-wrap: nowrap; justify-content: flex-start; text-align: left; }
}
/* small screens: text centred in the free space right of the 3 bars (and left of the cart, if there is one).
   Sizes are calculated from that free space, so the text never goes under the bars or the cart. */
@media (max-width: 799px) {
  .tr-brandline .brand-logo, .tr-brandline .tr-by { font-size: min(1.35rem, calc((100vw - 104px - var(--hdr-r)) / 17)); }
  .tr-brandline .tr-tag { font-size: min(1.15rem, calc((100vw - 104px - var(--hdr-r)) / 22)); letter-spacing: .02em; }
  .nav-container { padding: 12px var(--hdr-r) 12px 64px; }
}

/* ---------- Cart button (only on pages that set $showCart = true) ---------- */
#cart-icon {
  position: absolute; top: 50%; right: 20px; transform: translateY(-50%); z-index: 1003;
  display: inline-block; padding: 7px 14px; border-radius: 20px;
  background: #1a1a1a; color: #d9b46a; border: 1px solid rgba(217, 180, 106, .6);
  font-family: var(--font-main); font-size: .85rem; line-height: 1.2; white-space: nowrap; text-decoration: none;
}
#cart-icon:hover { background: rgba(217, 180, 106, .15); color: #f3deaa; }
@media (max-width: 799px) { #cart-icon { right: 10px; } }
@media (max-width: 500px) { #cart-icon { right: 8px; padding: 5px 9px; font-size: .72rem; } }

/* ---------- Footer: gold brand name, tagline and gold line ---------- */
/* the gold line is a span.tr-rule, so its basic shape is defined here too */
.tr-rule { display: block; width: 120px; height: 1px; margin: 18px 0; background: linear-gradient(90deg, #d9b46a, transparent); }

.tr-page .site-footer .footer-brand h3 {
  font-family: 'Cinzel', Georgia, serif; font-weight: 500; font-size: 1.2rem;
  letter-spacing: .12em; text-transform: uppercase; color: #d9b46a;
}
.tr-page .site-footer .footer-brand p {
  font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 400;
  font-size: 1.15rem; color: #d9b46a;
}

/* gold line under the footer brand name (footer is left-aligned): solid gold at the left edge, fading out to the right */
.tr-page .site-footer .footer-brand .tr-rule {
  width: 200px; max-width: 100%; margin: -2px 0 3px;
  background: linear-gradient(90deg, #d9b46a, transparent);
}
/* when the footer becomes centered (the small script in the page adds .tr-centered): centered line, fading at both ends */
.tr-page .site-footer .footer-brand.tr-centered .tr-rule {
  margin: -2px auto 2px;
  background: linear-gradient(90deg, transparent, #d9b46a, transparent);
}
