/*
Theme Name: CPAC
Theme URI: https://clevelandpalesteine.org
Author: Rehan Waheed
Description: A custom WordPress theme for CPAC based off Darcy's design. Updated header height to match footer height.
Version: 1.2.0
Text Domain: cpac
*/

:root {
  color-scheme: light;
  --cpac-bar-height: clamp(3rem, 4.2vh, 4rem);
  --cpac-nav-footer-font: 'Inter', sans-serif;
}

body {
  font-family: 'Inter', sans-serif;
  padding-bottom: calc(var(--cpac-bar-height) + env(safe-area-inset-bottom, 0px));
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 100;
  background: #111827;
  color: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: 0.5rem;
  font-weight: 700;
  line-height: 1;
  transition: top 120ms ease;
}

.skip-link:focus {
  top: 0.75rem;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #fde68a;
  outline-offset: 2px;
}

.site-header,
.site-footer {
  transition: height 180ms ease, min-height 180ms ease, padding 180ms ease;
}

.site-header {
  height: calc(4rem + env(safe-area-inset-bottom, 0px));
  min-height: calc(4rem + env(safe-area-inset-bottom, 0px));
}

.site-footer {
  height: var(--cpac-bar-height);
  min-height: var(--cpac-bar-height);
  font-family: var(--cpac-nav-footer-font);
}

.site-main {
  padding-top: calc(var(--cpac-bar-height) + 0.5rem) !important;
  padding-bottom: calc(var(--cpac-bar-height) + 0.5rem) !important;
}

.custom-logo-link,
.custom-logo {
  display: block;
  width: 100%;
  height: 100%;
}

.custom-logo {
  object-fit: contain;
}

.impact-text {
  font-family: 'Impact', 'Arial Black', sans-serif;
  color: #facc15;
  -webkit-text-stroke: 3px #000000;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 1);
  letter-spacing: -0.02em;
}

@media (max-width: 640px) {
  .impact-text {
    -webkit-text-stroke: 1.5px #000000;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 1);
  }
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #10b981;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

.site-footer {
  padding-bottom: env(safe-area-inset-bottom, 0px);
  min-height: calc(4rem + env(safe-area-inset-bottom, 0px));
}

.site-main > section {
  width: 100%;
  max-width: 1500px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .cpac-header-cta {
    max-width: 8.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body {
    overflow: hidden;
  }

  main {
    height: calc(100svh - 8rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-main section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .site-main section#hero {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 1rem;
  }

  .site-main h2 {
    font-size: 1.75rem;
    line-height: 1.15;
  }

  .site-main .rounded-2xl {
    border-radius: 1rem;
  }

  .site-main .rounded-xl {
    border-radius: 0.9rem;
  }

  .site-footer {
    bottom: env(safe-area-inset-bottom, 0px);
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }
}

@media (max-width: 767px) {
  .site-footer {
    justify-content: flex-end;
  }

  .site-footer .cpac-footer-text {
    display: none;
  }

  .site-footer .menu {
    display: none;
  }

  .site-footer .cpac-footer-links {
    margin-left: auto;
  }

  .site-footer .cpac-footer-social {
    border-left: 0;
    margin-left: 0;
    padding-left: 0;
  }
}

header.site-header .menu,
footer.site-footer .menu {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

header.site-header .menu-item,
footer.site-footer .menu-item {
  display: flex;
  align-items: center;
  margin: 0;
}

header.site-header .menu-item a,
footer.site-footer .menu-item a,
#mobile-menu .menu-item a,
.site-header .brand-text,
.site-footer .footer-text,
.site-header .cpac-header-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.25rem;
  white-space: nowrap;
  line-height: 1.1;
  font-size: clamp(0.7rem, 1.05vh, 0.85rem);
  letter-spacing: 0.16em;
  font-family: var(--cpac-nav-footer-font);
  font-weight: 800;
  text-transform: uppercase;
}

header.site-header .header-brand {
  max-width: none;
}

@media (max-width: 639px) {
  header.site-header.cpac-header-compact .brand-text {
    display: none;
  }

  header.site-header.cpac-header-compact .header-brand {
    gap: 0;
  }
}

header.site-header .menu > .menu-item {
  display: flex;
  align-items: center;
}

.cpac-header-overflow {
  display: none;
}

.cpac-header-overflow-btn {
  min-width: 2rem;
  height: 2rem;
}

.cpac-header-overflow-menu {
  min-width: 12rem;
  max-width: min(18rem, 80vw);
  padding: 0.35rem;
  border-radius: 0.75rem;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  z-index: 50;
}

.cpac-header-overflow-menu .menu {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cpac-header-overflow-menu .menu-item {
  display: flex;
}

.cpac-header-overflow-menu .menu-item a {
  display: block;
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 0.5rem;
  color: #fff;
  background: transparent;
}

.cpac-header-overflow-menu .menu-item a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fde68a;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

