/*
Theme Name: Easti
Author: Josh Dowling
Author URI: https://github.com/JKDow
Description: A custom lightweight theme for Eastern Indoor.
Tags: custom-theme, lightweight, responsive
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: easti
*/

/* ------------------------------
   Root tokens
------------------------------ */
:root {
  /* Computed in JS; this is a safe fallback */
  --header-offset: 84px;

  --c-fg: oklch(20.8% 0.042 265.755);
  --c-fg-muted: oklch(34% 0.03 265);
  --c-bg: oklch(98.5% 0.002 247.839);
  --c-panel: oklch(96.8% 0.007 247.896);
  --c-brand: oklch(48.8% 0.243 264.376);

  --radius: 8px;
  --shadow-1: 0 2px 4px rgba(0,0,0,.06);
  --shadow-2: 0 14px 28px rgba(0,0,0,.18), 0 2px 4px rgba(0,0,0,.12);
}

/* ------------------------------
   Base
------------------------------ */
body.ei-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-fg);
  background: var(--c-bg);
}

.site {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Elementor pages should be full-bleed; control padding on the main element only */
.site-main {
  flex: 1;
  padding: 0;
}

/* Header is fixed and centered; Vue header mounts inside this container */
.ei-header-container {
  display: flex;
  position: fixed;
  right: 0;
  left: 0;
  top: 1rem;              /* bumped further for admin bar below */
  z-index: 50;
  justify-content: center;
  transition-property: transform, opacity, top;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

:root { --wp-admin--admin-bar--height: 32px; }
@media (max-width: 782px) {
  :root { --wp-admin--admin-bar--height: 46px; }
}

/* When WP admin bar is present, push header down */
body.admin-bar .ei-header-container {
  top: calc(var(--wp-admin--admin-bar--height, 32px) + 4px);
  transition: top 200ms cubic-bezier(.4,0,.2,1);
}

/* When our script collapses the bar, pull header back up */
html.easti-ab-collapsed body.admin-bar .ei-header-container {
  top: 1rem;
}

/* Pages that should NOT be pushed down (front page hero) */
.main--no-offset { padding-top: 0; }

/* Pages that SHOULD be pushed below the fixed header */
.main--with-offset { padding-top: var(--header-offset); }

/* ------------------------------
   Generic layout helpers
------------------------------ */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* ------------------------------
   Fallback header/footer (when Vue header isn’t present)
------------------------------ */
.site-header,
.site-footer {
  background: var(--c-panel);
  padding: 1rem 0;
  box-shadow: var(--shadow-1);
}

.site-title {
  font-weight: 700;
  text-decoration: none;
  color: var(--c-brand);
}

/* ------------------------------
   Content (used on index/home fallbacks)
------------------------------ */
.entry {
  margin-bottom: 2rem;
}

.entry__header { margin: 0 0 .5rem; }

.entry__title {
  margin: 0;
  line-height: 1.25;
}

.entry__title a {
  color: inherit;
  text-decoration: none;
}
.entry__title a:hover { text-decoration: underline; }

.entry__meta {
  font-size: .875rem;
  color: var(--c-fg-muted);
  margin: 0 0 .75rem;
}

.entry-content {
  background: #fff;
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

/* For posts index excerpts */
.entry__excerpt { color: var(--c-fg); }

/* ------------------------------
   Pagination
------------------------------ */
.pagination {
  display: flex;
  gap: .5rem;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
}

/* WordPress core pagination markup varies; keep it simple */
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 .5rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--c-fg);
  background: #fff;
  box-shadow: var(--shadow-1);
}
.pagination .page-numbers.current {
  background: var(--c-panel);
  font-weight: 600;
}
.pagination .page-numbers:hover {
  text-decoration: none;
  box-shadow: var(--shadow-2);
}

/* ------------------------------
   Utilities / small helpers
------------------------------ */
.relative { position: relative; }

/* Hide-only-visually helper (for a11y labels etc.) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ===== Footer (Easti) ===== */
.site-footer {
    background: #0f1115;
    color: #f5f7fa;
    padding: 2.5rem 1rem 2rem;
    font-size: 0.95rem;
}
.site-footer a {
    color: inherit;
    text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* Layout shell */
.site-footer .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

/* Header: tiny logo icon + tagline */
.site-footer .footer-header {
    text-align: center;
    margin-bottom: 1.75rem;
}
.site-footer .footer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* Make the custom logo a small badge */
.site-footer .footer-logo .custom-logo,
.site-footer .footer-logo img {
    max-width: 250px;
    max-height: 250px;
    width: auto;
    height: auto;
    display: block;
    border-radius: 8px;        /* optional: badge feel */
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}
.site-footer .footer-site-name {
    font-weight: 700;
    font-size: 1rem;
}

.site-footer .footer-tagline {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Two-column content */
.site-footer .footer-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* address+contact slightly wider */
    gap: 2rem;
    padding: 1rem 0 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-footer .footer-col h3 {
    font-size: 1.05rem;
    margin: 0 0 0.75rem;
    color: #ffffff;
}
.site-footer .footer-address {
    font-style: normal;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

/* Hours list as tidy two-column rows */
.site-footer .hours-list {
    display: grid;
    grid-template-columns: 1fr; /* each row is its own grid wrapper <div> */
    gap: 0.35rem;
    margin: 0;
    padding: 0;
}
.site-footer .hours-list > div {
    display: grid;
    grid-template-columns: 9.5rem 1fr; /* label | time */
    align-items: baseline;
    gap: 0.75rem;
}
.site-footer .hours-list dt {
    font-weight: 600;
    margin: 0;
}
.site-footer .hours-list dd {
    margin: 0;
    opacity: 0.95;
}

/* Bottom strip */
.site-footer .footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.8;
    padding-top: 1rem;
}

/* Responsive */
@media (max-width: 900px) {
    .site-footer .footer-content {
        grid-template-columns: 1fr;
    }
    .site-footer .hours-list > div {
        grid-template-columns: 8.5rem 1fr;
    }
}
@media (max-width: 520px) {
    .site-footer .hours-list > div {
        grid-template-columns: 7.5rem 1fr;
    }
}
