/* ========================================================================
   Base & Typography
   ======================================================================== */

body {
  margin: 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ========================================================================
   Header
   ======================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fafafa;
  border-bottom: 1px solid #e1e1e1;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

/* Flex ordering: toggle, logo, nav, socials */
.mobile-menu-toggle { order: 1; align-self: center; }
.site-logo         { order: 2; }
.header-nav        { order: 3; }
.header-social     { order: 4; align-self: center; }

/* Logo sizing */
.site-logo img {
  display: block;
  width: 190px;
  height: auto;
}

/* Nav menu styling */
.header-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.header-nav .menu li a {
  font-size: 1rem;
  font-weight: 500;
  padding: 0.25rem 0;
  transition: opacity 0.2s;
}

.header-nav .menu li a:hover {
  opacity: 0.3;
}

/* Social icons */
.header-social {
  display: flex !important;
  gap: 0.75rem;
}

.header-social img {
  width: 24px;
  height: 24px;
}

/* Hamburger toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  position: relative;
  align-self: center;
}

.mobile-menu-toggle .hamburger {
  display: block;
  width: 24px;
  height: 3px;
  background: #333;
  position: relative;
  margin: 0 auto;
}
.mobile-menu-toggle .hamburger::before,
.mobile-menu-toggle .hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 3px;
  background: #333;
  left: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.mobile-menu-toggle .hamburger::before { top: -6px; }
.mobile-menu-toggle .hamburger::after  { top: 6px; }

/* ========================================================================
   Footer
   ======================================================================== */

.site-footer {
  background: #fafafa;
  border-top: 1px solid #e1e1e1;
  padding: 2rem 1rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo img {
  display: inline-block;
  width: 190px;
  height: auto;
  margin-bottom: 1rem;
}

.footer-nav .menu {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: inline-flex;
  gap: 1.5rem;
}

.footer-nav .menu li a {
  font-size: 0.95rem;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.footer-social img {
  width: 24px;
  height: 24px;
}

/* ========================================================================
   Site Content Wrapper
   ======================================================================== */

.site-content {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  line-height: 1.6;
}

/* ========================================================================
   404 Page
   ======================================================================== */

.page-404 {
  text-align: center;
  padding: 4rem 1rem;
}

.page-404 h1 { font-size: 2rem; margin-bottom: 1rem; }
.page-404 p  { font-size: 1rem; color: #666; }

/* ========================================================================
   Devotion Grid & Cards
   ======================================================================== */

.devotion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.devotion-card {
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.devotion-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content { padding: 1rem; flex-grow: 1; }
.card-content h2 { font-size: 1.25rem; margin: 0 0 0.5rem; }
.card-content time { font-size: 0.875rem; color: #666; margin-bottom: 0.75rem; display: block; }
.card-content p { font-size: 1rem; line-height: 1.4; }

.card-footer { display: flex; justify-content: space-between; align-items: center; padding: 0 1rem 1rem; }
.read-more, .share-btn { color: #0073e6; font-weight: 500; background: none; border: none; cursor: pointer; }

/* ========================================================================
   Devotion Single Page
   ======================================================================== */

.devotion-single-image-crop {
  width: 500px;
  max-width: 100%;
  height: 300px;
  overflow: hidden;
  margin: 0 auto 1.5rem;
}
.devotion-single-image-crop img { width: 100%; height: 100%; object-fit: cover; }

.devotion-single-header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.devotion-single-date { display: inline-block; background: rgba(255,255,255,0.8); color: #0073e6; padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.875rem; margin-bottom: 1rem; }

.devotion-single-content { line-height: 1.8; margin-bottom: 2rem; }

.similar-devotions { margin-top: 3rem; padding: 0 1.5rem; }
.similar-devotions h2  { font-size: 1.5rem; margin-bottom: 1rem; }
.similar-devotions .devotion-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }

/* ========================================================================
   Mobile Menu Toggle
   ======================================================================== */

@media (max-width: 768px) {
  /* Show toggle, hide nav */
  .mobile-menu-toggle { display: block; }
  .header-nav { display: none; }
  .header-nav.open { display: block; }

  /* Vertical menu items */
  .header-nav .menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* Adjust logo size for mobile */
  .site-logo img { width: 95px; }
  .site-logo img { height: 36.5px; }

  /* Hamburger → X */
  .mobile-menu-toggle.open .hamburger { background: transparent; }
  .mobile-menu-toggle.open .hamburger::before { transform: translateY(6px) rotate(45deg); }
  .mobile-menu-toggle.open .hamburger::after  { transform: translateY(-6px) rotate(-45deg); }
}


/* ========================================================================
   Pages: About & Contact
   ======================================================================== */

.page-about h1,
.page-contact h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.page-content {
  line-height: 1.8;
  margin-bottom: 2rem;
}



.contact-details {
  margin-top: 2rem;
}
.contact-details h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.contact-details ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-details li {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.contact-details a {
  color: #0073e6;
}



.devotion-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.devotion-filters label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.devotion-filters input,
.devotion-filters select {
  padding: 0.25rem;
  font-size: 1rem;
}
.devotion-pagination {
  text-align: center;
  margin-top: 2rem;
}
.devotion-pagination ul {
  list-style: none;
  padding: 0;
  display: inline-flex;
  gap: 0.5rem;
}
.devotion-pagination li a,
.devotion-pagination li span {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
}
.devotion-pagination .current {
  background: #0073e6;
  color: #fff;
  border-color: #0073e6;
}
@media (max-width: 600px) {
  .devotion-filters {
    flex-direction: column;
  }
}


/* Single Devotion Share */
.devotion-single-share {
  margin: 2rem 0;
  text-align: center;
}
.devotion-single-share .share-btn {
  background: none;
  border: 2px solid #0073e6;
  color: #0073e6;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
}

/* Card Share Button */
.devotion-card .share-btn {
  background: none;
  border: none;
  color: #0073e6;
  cursor: pointer;
  font-size: 0.9rem;
}
.devotion-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}


/* MOBILE MENU OVERLAY CUSTOMIZATION */
@media (max-width: 768px) {
  /* Hide social icons on mobile */
  .header-social {
    display: none !important;
  }

  /* Align logo next to the toggle */
  .header-inner {
    justify-content: flex-start !important;
    position: relative;
  }

  .mobile-menu-toggle {
    display: block !important;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
  }

  .site-logo {
    margin-left: 5rem; /* moves logo closer to toggle */
  }
  .site-logo img {
    width: 95px;
    height: auto;
  }

  /* Hide inline nav by default */
  .header-nav {
    display: none;
  }

  /* Overlay menu uses same bg as header */
  .header-nav.open {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--edev-overlay-bg, #026b9c);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.596);
    padding: 2rem 1rem;
    z-index: 1001;
    overflow-y: auto;
  }

  /* Vertical menu items */
  .header-nav.open .menu {
    margin-top: 2rem; /* moves Menu closer to the top */
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}
