/*
Theme Name:   EGP Media & Press
Theme URI:    https://karacarrero.com/
Template:     kadence
Author:       Kara Carrero / EGP Media and Press
Author URI:   https://karacarrero.com/
Description:  Custom Kadence child theme for EGP Media and Press. Project-based curriculum and parenting resources for homeschoolers and classroom teachers. Includes custom homepage, navigation, footer, and design system.
Version:      1.7.0
License:      GPL-2.0-or-later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  egp-media
Tags:         education, ecommerce, custom-menu, custom-header
*/

/* =========================================================================
   DESIGN TOKENS
   ========================================================================= */
:root {
  --navy: #1a2f4a;
  --navy-deep: #0f1f33;
  --navy-soft: #2a456b;
  --gold: #c9a961;
  --gold-deep: #a88a47;
  --gold-tint: #f5ead0;
  --cream: #faf6ef;
  --white: #ffffff;
  --charcoal: #2a2a2a;
  --gray: #6b6b6b;
  --gray-light: #d4d0c8;
  --gray-faint: #ece8e0;

  --font-display: 'Merriweather', Georgia, serif;
  --font-body: 'Fira Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;
  --space-12: 5rem;
  --space-16: 7rem;
  --space-20: 9rem;

  --max-width: 1240px;
  --content-padding: clamp(1rem, 4vw, 2.5rem);
}

/* =========================================================================
   GLOBAL TYPOGRAPHY OVERRIDES (apply site-wide)
   These apply on every page, not just the homepage
   ========================================================================= */
body {
  font-family: var(--font-body);
  color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
  font-family: var(--font-display);
  color: var(--navy);
}

a { color: var(--navy); }
a:hover { color: var(--gold-deep); }

/* =========================================================================
   FEATURED BANNER (Monthly editable strip at very top of every page)
   Edit content via Appearance > Menus > "Featured Banner" menu location.
   ========================================================================= */
.egp-featured-banner {
	background: var(--navy-deep);
	color: var(--cream);
	border-bottom: 1px solid rgba(201, 169, 97, 0.2);
}
.egp-featured-banner-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: var(--space-2) var(--content-padding);
	text-align: center;
}
.egp-featured-banner-link {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-family: var(--font-body);
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--cream);
	text-decoration: none;
	letter-spacing: 0.02em;
	flex-wrap: wrap;
	justify-content: center;
}
.egp-featured-banner-link:hover {
	color: var(--gold);
}
.egp-featured-banner-star {
	color: var(--gold);
	font-size: 0.75rem;
}
.egp-featured-banner-title {
	font-weight: 500;
}
.egp-featured-banner-arrow {
	transition: transform 0.2s;
	display: inline-block;
}
.egp-featured-banner-link:hover .egp-featured-banner-arrow {
	transform: translateX(3px);
}

/* =========================================================================
   CUSTOM HEADER (egp-header)
   This styles the custom header.php we deliver
   ========================================================================= */
.egp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 239, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-faint);
}

.egp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--content-padding);
  max-width: var(--max-width);
  margin: 0 auto;
  gap: var(--space-6);
}

.egp-logo-lockup {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none;
}
.egp-logo-primary {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.egp-logo-secondary {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-top: 2px;
}

/* Header buttons (desktop) */
.egp-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-5);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 3px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.egp-header-btn-primary {
  background: var(--gold);
  color: var(--white);
}
.egp-header-btn-primary:hover {
  background: var(--gold-deep);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(201, 169, 97, 0.3);
}
.egp-header-btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.egp-header-btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
}

@media (max-width: 720px) {
  .egp-header-btn { display: none; }
}

.egp-header-actions {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.egp-icon-btn {
  background: none;
  border: none;
  color: var(--navy);
  padding: var(--space-2);
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
}
.egp-icon-btn:hover { color: var(--gold-deep); }

.egp-cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--gold);
  color: var(--white);
  font-size: 0.625rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hamburger menu now visible on all viewport sizes (per design preference) */
.egp-mobile-menu-btn { display: flex; }

/* =========================================================================
   MOBILE MENU PANEL
   ========================================================================= */
.egp-mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 31, 51, 0);
  z-index: 199;
  pointer-events: none;
  transition: background 0.3s ease;
}
.egp-mobile-menu-overlay.is-open {
  background: rgba(15, 31, 51, 0.6);
  pointer-events: auto;
}

.egp-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 88vw);
  background: var(--navy);
  color: var(--cream);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2);
}
.egp-mobile-menu.is-open {
  transform: translateX(0);
}

.egp-mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5);
  border-bottom: 1px solid rgba(250, 246, 239, 0.1);
}
.egp-mobile-menu-header .egp-logo-primary {
  color: var(--cream);
  font-size: 1.0625rem;
}
.egp-mobile-menu-header .egp-logo-secondary {
  color: var(--gold);
  font-size: 0.625rem;
}

.egp-mobile-menu-close {
  background: none;
  border: none;
  color: var(--cream);
  padding: var(--space-2);
  display: flex;
  align-items: center;
  cursor: pointer;
}
.egp-mobile-menu-close:hover { color: var(--gold); }

.egp-mobile-menu-search {
  padding: var(--space-5) var(--space-5) 0;
}
.egp-mobile-search-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(250, 246, 239, 0.15);
  border-radius: 4px;
  padding: var(--space-3) var(--space-4);
  transition: border-color 0.2s, background 0.2s;
}
.egp-mobile-search-wrap:focus-within {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.1);
}
.egp-mobile-search-wrap svg {
  color: rgba(250, 246, 239, 0.5);
  flex-shrink: 0;
}
.egp-mobile-search-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  margin-left: var(--space-3);
}
.egp-mobile-search-wrap input::placeholder {
  color: rgba(250, 246, 239, 0.4);
}

.egp-mobile-menu-nav {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.egp-mobile-menu-group h5 {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid rgba(201, 169, 97, 0.2);
}

.egp-mobile-menu-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.egp-mobile-menu-group a {
  display: block;
  padding: var(--space-3) 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid rgba(250, 246, 239, 0.05);
  transition: color 0.2s, padding-left 0.2s;
}
.egp-mobile-menu-group a:hover,
.egp-mobile-menu-group a:focus {
  color: var(--gold);
  padding-left: var(--space-2);
}
.egp-mobile-menu-group ul li:last-child a {
  border-bottom: none;
}

/* =========================================================================
   CUSTOM FOOTER
   ========================================================================= */
.egp-footer {
  background: var(--navy-deep);
  color: rgba(250, 246, 239, 0.75);
  padding: var(--space-12) 0 var(--space-6);
}

.egp-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

.egp-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}
@media (max-width: 1024px) {
  .egp-footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .egp-footer-brand { grid-column: 1 / -1; margin-bottom: var(--space-4); }
}
@media (max-width: 700px) {
  .egp-footer-grid { grid-template-columns: 1fr 1fr; }
  .egp-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .egp-footer-grid { grid-template-columns: 1fr; }
  .egp-footer-brand { grid-column: auto; }
}

.egp-footer-brand .egp-logo-primary { color: var(--cream); }
.egp-footer-brand .egp-logo-secondary { color: var(--gold); }
.egp-footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-top: var(--space-4);
  max-width: 280px;
  color: rgba(250, 246, 239, 0.75);
}

.egp-footer-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.egp-footer-social a {
  width: 36px; height: 36px;
  border: 1px solid rgba(250, 246, 239, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(250, 246, 239, 0.75);
  transition: all 0.2s;
  text-decoration: none;
}
.egp-footer-social a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

.egp-footer-col h5 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 var(--space-4);
}
.egp-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.egp-footer-col a {
  font-size: 0.875rem;
  color: rgba(250, 246, 239, 0.75);
  text-decoration: none;
}
.egp-footer-col a:hover { color: var(--gold); }

.egp-footer-bottom {
  border-top: 1px solid rgba(250, 246, 239, 0.1);
  padding-top: var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 0.8125rem;
  color: rgba(250, 246, 239, 0.5);
}
.egp-footer-bottom-links {
  display: flex;
  gap: var(--space-5);
}
.egp-footer-bottom-links a {
  color: inherit;
  text-decoration: none;
}
.egp-footer-bottom-links a:hover { color: var(--gold); }
