/*
Theme Name: St. Clare's
Theme URI: https://github.com/yourusername/stclares-theme
Description: A minimal WordPress theme for St. Clare's
Version: 0.3.0
Author: Your Name
Author URI: https://your-website.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stclares
*/

/*
  CSS Reset
  https://www.joshwcomeau.com/css/custom-css-reset/
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}
input,
button,
textarea,
select {
  font: inherit;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}
#root,
#__next,
#app {
  isolation: isolate;
}

@media (prefers-color-scheme: dark) {
  a[href] {
    text-decoration: none;
    color: salmon;
  }
  a[href]:visited {
    color: darksalmon;
  }
}


/*
 * Utility Classes
/*/
.contents {
  display: contents;
}
.grid {
  display: grid;
}
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.space-between {
  justify-content: space-between;
}
.justify-center {
  justify-content: center;
}
.items-center {
  align-items: center;
}
.flex-1 {
  flex: 1;
}
.gap-1 {
  gap: .25rem;
}
.gap-2 {
  gap: .5rem;
}
.gap-4 {
  gap: 1rem;
}
.gap-8 {
  gap: 2rem;
}
.w-2 {
  width: 0.5rem;
}
.h-2 {
  height: 0.5rem;
}
.w-4 {
  width: 1rem;
}
.h-4 {
  height: 1rem;
}
.w-6 {
  width: 1.5rem;
}
.h-6 {
  height: 1.5rem;
}
.mt-2 {
  margin-top: .5rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mt-8 {
  margin-top: 2rem;
}
.my-4 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.my-8 {
  margin-top: 2rem;
  margin-bottom: 2rem;
}
.m-16 {
  margin: 4rem;
}
.m-8 {
  margin: 2rem;
}
.not-link {
  text-decoration: none;
  color: var(--text-color) !important;
}
.text-color {
  color: var(--text-color);
}
.text-center {
  text-align: center;
}
.typography {
  max-width: 50ch;
}
.typography p + p{
  margin-top: .75rem;
}
.list-none {
  list-style: none;
  padding-left: initial;
}
.radius-md {
  border-radius: 1rem;
}
.radius-md-img img {
  border-radius: 1rem;
}

/*
  App Styles
*/
:root {
  --radius-container: 0.6rem;
  --bg-color: #fff;
  --text-color: #1e1f22;
}
body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main {
  flex-grow: 1;
  display: grid;
  gap: 2rem;
}

.dual-column {
  display: grid;
  gap: 2rem;
}

@media (min-width: 721px) {
  .dual-column {
    grid-template-columns: 1fr 1fr;
  }
}

.page-block {
  max-width: 55rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
  width: 100%;
}

@media (min-width: 450px) {
  .page-block {
    padding: 0 3rem;
  }
}

.page-cols {
  display: flex;
  gap: 2.5rem;
}
.page-cols > article {
  max-width: 45ch;
}
.page-cols > aside {
  flex-basis: min-content;
  flex-grow: 1;
}

@media (max-width: 60ch) {
  .page-cols {
    flex-direction: column;
  }
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header .logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0;
  color: inherit;
  text-decoration: none;
  color: var(--text-color) !important;
}
.site-header .logo-container svg {
  height: 2rem;
  margin-bottom: 0.2rem; /* Better optical alignment */
}
.site-header .logo-container .h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.menu {
    list-style: none;
    padding-left: initial;
}

/********************************************************************
 * Site Menu
 *******************************************************************/
/* Menu hamburger / container */
#menu-popup * {
  text-decoration: none;
  color: currentColor;
  list-style-type: none;
}
#menu-popup ul {
  padding: 0;
  margin: 0;
  list-style: none;
}
#menu-popup li > details summary::-webkit-details-marker {
  display: none;
}
#menu-popup li > details[open] svg {
  transform: rotate(180deg);
}
#menu-popup li > details svg {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  width: 1.5rem;
  height: 1.5rem;
}
#menu-popup li > * > * {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  cursor: pointer;
  padding: 0.2rem 0.8rem;
}
#menu-popup figcaption {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0.8rem;
}
.sitenav-bg {
  position: fixed;
  top: 0;
  inset: 0;
  background: #000d;
  z-index: 111;
}
.sitenav--inner {
  z-index: 999;
}
@media (max-width: 720px) {
  #menu-popup {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 99;
    padding: 1.5rem;
    overflow-y: auto;
  }
  #menu-modal-title {
    font-size: 2rem;
  }
  #menu-popup:not(:target) {
    display: none;
  }
  #menu-popup > ul > li:not(:first-child) > * > * {
    border-top: 1px solid currentColor;
  }
  #menu-popup > ul > li > * > * {
    padding: 1rem;
  }
  #menu-popup figure {
    padding: 0;
    padding-left: 1rem;
    display: grid;
  }
}
#menu-popup .sitenav--dropdown {
  padding: 0;
  margin-bottom: 2rem;
}
#menu-popup .sitenav--dropdown .sitenav--inner {
  display: grid;
  gap: 2rem;
}
@media (min-width: 550px) {
  #menu-popup .sitenav--dropdown .sitenav--inner {
    grid-template-columns: auto auto;
  }
}
@media (max-width: 722px) {
  .sitenav--dropdown > .page-block {
    padding: 0;
  }
}
@media (min-width: 721px) {
  .sitenav--hamburger,
  .menu-title-container {
    display: none;
  }
  #menu-popup ul {
    display: flex;
    gap: 1.5rem;
  }
  .sitenav--dropdown {
    position: fixed;
    left: 0;
    right: 0;
    margin-top: 1rem;
    padding: 1rem;
    background: #eee;
  }
  #menu-popup .sitenav--dropdown ul {
    flex-direction: column;
    gap: 0.5rem;
  }
  #menu-popup figure {
    flex: 1;
  }
}

.box {
  height: 80rem;
  width: 1rem;
  background: green;
}

.visually-hidden:not(:focus):not(:active) {
  border: 0;
  clip: rect(0 0 0 0);
  height: auto;
  margin: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #282a33;
    --text-color: white;
  }
  .box {
    background: rgb(51, 53, 64);
  }
  .text-input-fieldset {
    background: #434551;
  }
  .sitenav a {
    color: white !important;
  }
}

.hero-img {
  overflow: hidden;
  width: 100%;
}
.hero-img img {
  border-radius: 1rem;
  width: 100%;
  max-height: calc(100vh - 6.25rem - 4rem);
  min-height: 10rem;
  object-fit: cover;
  object-position: center;
}

.event-list {
  --mask: linear-gradient(to bottom,
    rgba(0,0,0,1) 0, rgba(0,0,0,1) 60%,
    rgba(0,0,0,0) 99%, rgba(0,0,0,0) 0
  ) 100% 50% / 100% 100% repeat-x;
  -webkit-mask: var(--mask);
  mask: var(--mask);
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}
.event {
  display: flex;
  gap: 2rem;
}
.event--content {
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  line-height: 1.2;
  gap: 0.2rem;
}
.event--content h3 {
  font-size: 1.125rem;
}
.event--content div {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.event--day {
  font-size: 1.75rem;
  font-weight: 700;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  line-height: 1;
}
.event--day > span {
  font-size: 1.125rem;
}
.purple {
  margin: 0.125rem;
  width: 1rem;
  height: 1rem;
  border-radius: 99in;
  background: purple;
  display: inline-block;
}
.text-purple {
  color: purple;
}
.text-purple > span {
  color: var(--text-color);
}

.btn {
  text-decoration: none;
  color: var(--bg-color) !important;
  background: var(--text-color);
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
}

.map-img {
  display: grid;
  color: currentColor;
  text-decoration: none;
}
.map-img > * {
  grid-area: 1/1;
}
.map-img img {
  border-radius: 1rem;
  width: 100%;
}

.site-footer {
    background: #fafafa;
    overflow: hidden;
  }
  .site-footer .page-block > * {
    font-size: 0.9rem;
  }
  .site-footer .logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
  }
  .site-footer .logo svg {
    height: 2rem;
    margin-bottom: 0.2rem; /* Better optical alignment */
  }
  
  .site-footer h2 {
    font-size: inherit;
    font-weight: bold;
    margin-top: .5rem;
  }
  .site-footer a {
    color: inherit;
    text-decoration: none;
    font-style: italic;
  }
  .site-footer li {
    margin-top: .5rem;
  }
  
  @media (prefers-color-scheme: dark) {
    .site-footer {
      background: #21232b;
    }
  }


.simple-form {
  display: grid;
  gap: 0.5rem;
}

.simple-form label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.simple-form label > details {
  font-size: 0.85rem;
}
.simple-form button {
  border: none;
}

.simple-form input,
.simple-form textarea {
  border: none;
  background: #ececec;
  border-radius: 0.25rem;
  padding: 0.25rem 0.45rem;
}
.simple-form textarea {
  resize: vertical;
}
@media (prefers-color-scheme: dark) {
  .simple-form input,
  .simple-form textarea {
    background: #4e515e;
    color: white;
  }
}

.popup {
  position: absolute;
  background: var(--bg-color);
  padding: 0.5rem;
  border: 1px solid gray;
}

/* WordPress Content Styles */
.entry-content > *:not(.alignwide):not(.alignfull) {
  max-width: calc(55rem);
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
  width: 100%;
}

@media (min-width: 450px) {
  .entry-content > *:not(.alignwide):not(.alignfull) {
    padding: 0 3rem;
  }
}
.entry-content p + p {
  margin-top: .75rem;
}
.entry-content :not(:is(h1, h2, h3, h4, h5, h6)) + :is(h1, h2, h3, h4, h5, h6) {
  margin-top: 1rem;
}
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  line-height: 1.35;
}

.alignwide {
  margin-left: calc(25% - 25vw);
  margin-right: calc(25% - 25vw);
  max-width: 100vw;
  width: auto;
}

.alignfull {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
  width: 100vw;
}

.sitenav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.sitenav ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 2rem;
}

.sitenav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
}

/* Sub-menu styles */
.sitenav li {
  position: relative;
}

.sitenav ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-color);
  border: 1px solid var(--text-color);
  border-radius: 0.25rem;
  padding: 0.5rem;
  min-width: 200px;
  flex-direction: column;
  gap: 1rem;
  z-index: 100;
  margin-top: 0;
}

/* Create a padding bridge between menu item and submenu */
.sitenav li.menu-item-has-children > a {
  padding-bottom: 1rem;
}

.sitenav ul ul::before {
  content: '';
  position: absolute;
  top: -1rem;
  left: 0;
  right: 0;
  height: 1rem;
  background: transparent;
}

/* Show sub-menu on hover if JS is available */
@media (hover: hover) {
  .sitenav li:hover > ul {
    display: flex;
  }
}

/* Show sub-menu on click for touch devices and when JS is not available */
.sitenav li > details[open] > ul {
  display: flex;
}

/* Arrow indicator for items with sub-menus */
.sitenav li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-left: 0.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='currentColor' aria-hidden='true'%3E%3Cpath fill-rule='evenodd' d='M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z' clip-rule='evenodd'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  vertical-align: middle;
  filter: invert(var(--is-dark-mode));
}

@media (prefers-color-scheme: dark) {
  :root {
    --is-dark-mode: 1;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --is-dark-mode: 0;
  }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .sitenav ul ul {
    background: var(--bg-color);
    border-color: rgba(255, 255, 255, 0.2);
  }
}

/* Mobile menu styles */
@media (max-width: 720px) {
  .sitenav ul {
    flex-direction: column;
    gap: 1rem;
  }

  .sitenav li.menu-item-has-children > a {
    padding-bottom: 0;
  }
  
  .sitenav ul ul::before {
    display: none;
  }
  
  .sitenav ul ul {
    position: static;
    border: none;
    padding-left: 1rem;
    width: 100%;
  }

  .sitenav li.menu-item-has-children > a::after {
    float: right;
    transform: rotate(-90deg);
  }
  
  .sitenav li.menu-item-has-children > a[aria-expanded="true"]::after {
    transform: rotate(0);
  }
}

blockquote.wp-block-quote {
  border-left: 4px solid var(--text-color);
}

/**
* WPForms
*/
.wpforms-container {
  --wpforms-label-color: var(--text-color);
  --wpforms-field-border-radius: 0.5rem;
  --wpforms-field-background-color: #ececec;
  --wpforms-field-size-input-spacing: 0.35rem;
  --wpforms-button-border-radius: 0.5rem;
  --wpforms-button-text-color: var(--bg-color);
  --wpforms-button-background-color: var(--text-color);
  --wpforms-button-size-padding-h: 2rem;
  --wpforms-button-size-height: 4rem;
}
@media (prefers-color-scheme: dark) {
  .wpforms-field-container {
    --wpforms-field-background-color: #4e515e;
    --wpforms-field-text-color: white;
    --wpforms-label-error-color: #f76566;
  }
}
.wpforms-container .wpforms-submit {
  width: 100%;
}
