/*
Theme Name: BWES Theme
Author: Sidhbari Design
Version: 1.0
*/
/* =========================
ROOT VARIABLES
========================= */
:root {
  --max-width: 1100px;
  --space-section: 80px;
  --space-inner: 20px;
  --text-color: #222;
  --accent-color: #56182d;
  --social-icon-size: 20px;
  --reading-width: 840px;
}

/* =========================
    BASE
    ========================= */
body {
  margin: 0;
  font-family: Georgia, serif;
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

section {
  padding: var(--space-section) 0;
}

section h2 {
  margin-bottom: 30px;
  font-size: 1.8rem;
}

/* =========================
   TYPOGRAPHY
========================= */
body {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-color);
}

/* Headings */
h1,
h2,
h3,
h4 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  line-height: 1.3;
}

h1 {
  font-size: 2.2rem;
}

h2 {
  margin-bottom: 25px;
  font-size: 1.7rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

/* Navigation + UI */
.main-nav a,
.hero-button,
.footer-grid,
.team-role {
  font-family: "Source Sans 3", Arial, sans-serif;
}

/* Paragraph refinement */
p {
  margin-bottom: 1em;
}

/* Improve readability */
.about p {
  font-size: 1.05rem;
}

/* =========================
    HEADER
    ========================= */
.site-header {
  border-bottom: 1px solid #ddd;
  padding: 15px 0;
  background: #fff;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  display: block;
  width: 300px;
  height: auto;
}

.main-nav ul {
  display: flex;
  gap: 25px;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.main-nav a {
  text-decoration: none;
  color: #333;
  font-size: 0.95rem;
}

.main-nav a:hover {
  color: var(--accent-color);
}

.main-nav ul li {
  position: relative;
}

.main-nav li.menu-item-has-children > a::after {
  content: "\25BE";
  font-size: 0.7rem;
}

/* Hide submenu by default */
.main-nav ul li .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  padding: 10px 0;
  list-style: none;
  min-width: 180px;
  border: 1px solid #ddd;
}

/* Show on hover */
.main-nav ul li:hover > .sub-menu {
  display: block;
}

/* Submenu items */
.sub-menu li {
  padding: 0;
}

.sub-menu a {
  display: block;
  padding: 8px 15px;
  font-size: 0.9rem;
  color: #333;
  white-space: nowrap;
}

.sub-menu a:hover {
  background: #f5f5f5;
}

.site-header {
  position: relative;
  z-index: 10;
}

/* ==========================================================
   HERO
========================================================== */
/*
    Base hero shared by all pages.
*/
.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  background-size: cover;
  background-position: center;
  color: #fff;
}

/* ==========================================================
   HOMEPAGE HERO
========================================================== */
.hero.home-hero {
  display: flex;
  align-items: center;
}

.hero.home-hero .hero-inner {
  width: 90%;
}

/* Typography */
.hero.home-hero .hero-content h1 {
  font-size: 2.5rem;
  line-height: 1.3;
  margin: 0 0 15px 0;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero.home-hero .hero-content p {
  font-size: 1.1rem;
  margin: 0 0 20px 0;
  color: #fff;
}

/* Button */
.hero-button {
  display: inline-block;
  padding: 10px 18px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: 1px solid #fff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: 0.2s ease;
}

.hero-button:hover {
  background: #fff;
  color: #000;
}

.archive-button {
  margin-top: 50px;
  text-align: center;
}

/* ==========================================================
   INTERNAL PAGE HERO
========================================================== */
.hero.page-hero {
  align-items: flex-end;
}

.hero.page-hero .hero-inner {
  width: 90%;
  margin: 0 auto;
  padding-bottom: 20px;
}

.hero.page-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.8rem, 5vw, 4rem);
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* =========================
    ABOUT
    ========================= */
.about-layout {
  display: flex;
  align-items: center;
  gap: 60px;
}

.about-text {
  flex: 0 1 60%;
}

.about-logo {
  flex: 0 1 40%;
  text-align: center;
}

.about-logo img {
  max-width: 260px;
  width: 100%;
  height: auto;
}

/* =========================
   AIMS (REFINED GRID)
========================= */
.aim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0; /* remove spacing */
}

/* Card */
.aim-card {
  position: relative;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  color: #fff;
}

/* Gradient overlay */
.aim-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 20%,
    rgba(0, 0, 0, 0) 35%
  );
}

/* Content */
.aim-content {
  position: relative;
  padding: 18px;
}

.aim-content h3 {
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.aim-content p {
  font-size: 0.9rem;
  margin: 0;
}

/* =========================
    BOARD
    ========================= */

.board {
  background-color: var(--accent-color);
  color: #fff;
}

.board-list {
  columns: 2;
  column-gap: 40px;
  list-style: none;
  padding: 0;
  line-height: 1.4;
}

.board-list li {
  margin-bottom: 20px;
}

.board-role {
  display: inline-block;
  font-size: 0.85rem;
  font-family: "Source Sans 3", Arial, sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =========================
    TEAM
    ========================= */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.team-member {
  text-align: center;
}

.team-member img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.team-member h3 {
  margin: 10px 0 2px;
  font-size: 1.1rem;
}

.team-role {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.team-role p {
  margin: 0;
}

.team-bio {
  font-size: 0.9rem;
  text-align: justify;
}

/* ==========================================================
   NUNNERIES
========================================================== */
.nunneries-section {
  padding: 0 0 80px;
}

.nunneries-section h2 {
  text-align: center;
  margin-bottom: 60px;
}

.nunnery-row {
  display: flex;
  justify-content: center;
  gap: 17.5px;
  margin-bottom: 17.5px;
}

.nunnery-card {
  position: relative;
  flex: 0 0 calc((100% - 35px) / 3);
  max-width: 355px;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.nunnery-card:hover {
  transform: scale(1.02);
}

.nunnery-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 20%,
    rgba(0, 0, 0, 0) 35%
  );
}

.nunnery-content {
  position: relative;
  width: 100%;
  padding: 18px;
}

.nunnery-content h3 {
  margin: 0;
  color: #fff;
}

@media (max-width: 900px) {
  .nunnery-row {
    flex-direction: column;
    align-items: center;
  }

  .nunnery-card {
    width: 100%;
    max-width: 500px;
  }
}

/* =========================
   FOOTER (REFINED)
========================= */
.site-footer {
  background: #f5f5f5;
  padding: 50px 0 30px;
  font-size: 0.9rem;
}

/* Logo */
.footer-logo {
  margin-bottom: 20px;
}

.footer-logo img {
  display: block;
  max-width: 300px;
  height: auto;
}

/* Grid */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.site-footer h4 {
  margin-bottom: 10px;
}

/* Bottom line */
.footer-bottom {
  text-align: center;
  border-top: 1px solid #ddd;
  padding-top: 15px;
  font-size: 0.85rem;
}

/* =========================
   IMAGE BAND SECTION
========================= */
.image-band {
  position: relative;
  margin: 0;
}

/* Full-width background */
.image-band-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

/* Optional soft overlay */
.image-band-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}

/* Content container */
.image-band .container {
  position: relative;
}

/* Text panel */
.image-band-content {
  max-width: 500px;
  padding: 30px;
  margin: 80px 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
}

/* Typography */
.image-band-content h2 {
  margin-top: 0;
  margin-bottom: 15px;
}

.image-band-content p {
  margin: 0;
}

.image-band.right .image-band-content {
  margin-left: auto;
}

/* ==========================================================
   POSTS
========================================================== */
.post-content {
  padding: 80px 0;
}

.post-meta {
  margin-bottom: 35px;
  color: #777;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-content img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---------------------------------
   WordPress Galleries
---------------------------------- */
.gallery {
  display: grid;
  gap: 15px;
  margin: 40px 0;
}

.gallery.gallery-columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.gallery.gallery-columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.gallery.gallery-columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

.gallery-item {
  margin: 0;
}

.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------------------------------
   Post Navigation
---------------------------------- */
.post-navigation {
  padding: 40px 0 80px;
  border-top: 1px solid #ddd;
}

.post-navigation .container {
  display: flex;
  justify-content: space-between;
}

.post-navigation a {
  text-decoration: none;
  color: inherit;
}

.post-navigation a:hover {
  text-decoration: underline;
}

/* ==========================================================
   STORIES
========================================================== */
.story {
  padding: 60px 0;
}

.story-header {
  margin-bottom: 40px;
}

.story-meta {
  color: #777;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.story-content h2,
.story-content h3,
.story-content h4 {
  margin-top: 50px;
}

.story-content p {
  margin-bottom: 1.5em;
}

.story-content img {
  display: block;
  max-width: 100%;
  height: auto;
}

.wp-block-gallery {
  padding: 40px 0 0 0;
}

/* ==========================================================
   READING WIDTH
========================================================== */
.post-content p {
  max-width: var(--reading-width);
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================
   WORDPRESS GALLERIES
========================================================== */
.story-content .gallery {
  display: grid;
  gap: 15px;
  margin: 50px 0;
}

.story-content .gallery-columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.story-content .gallery-columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.story-content .gallery-columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

.story-content .gallery-item {
  margin: 0;
}

.story-content .gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* ==========================================================
   STORY NAVIGATION
========================================================== */
.story-navigation {
  margin-top: 70px;
  padding-top: 35px;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
}

.story-navigation a {
  text-decoration: none;
  color: inherit;
}

.story-navigation a:hover {
  text-decoration: underline;
}

/* ==========================================================
   SOCIAL MENU ICONS
========================================================== */
.social-icon {
  width: var(--social-icon-size);
  height: var(--social-icon-size);
  min-width: var(--social-icon-size);
  min-height: var(--social-icon-size);
  display: block;
  flex-shrink: 0;
}

.main-nav .social-icon {
  position: relative;
  top: 3px;
  transition: opacity 0.2s ease;
}

.main-nav a:hover .social-icon {
  opacity: 0.7;
}

/* ==========================================================
   FOOTER SOCIAL LINKS
========================================================== */
.footer-social a {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
}

.footer-social a:last-child {
  margin-bottom: 0;
}

.footer-social img {
  width: var(--social-icon-size);
  height: var(--social-icon-size);
  min-width: var(--social-icon-size);
  min-height: var(--social-icon-size);
  display: block;
  flex-shrink: 0;
}

.footer-social a:hover {
  text-decoration: underline;
}

/* =========================
   MOBILE MENU
========================= */
/* Hidden on desktop */
.mobile-menu-toggle {
  display: none;
}

/* Overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  z-index: 9999;
  padding: 40px;
}

/* Active state */
.mobile-menu-overlay.active {
  display: block;
}

/* Close button */
.mobile-menu-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  margin-bottom: 40px;
}

/* Nav */
.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav li {
  margin-bottom: 20px;
}

.mobile-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 1.4rem;
}

.mobile-nav .menu-item-1359 > .sub-menu {
    display: none;
}

/* ==========================================================
   ARCHIVES
========================================================== */
.archive-banner {
  padding: 40px 0;
  background: #56182d;
  color: #fff;
}

.archive-banner-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 80px;
  align-items: center;
}

.archive-banner p {
  max-width: 840px;
  margin: 0;
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.35;
}

.archive-banner-logo {
  width: 130px;
  justify-self: center;
}

.featured-story {
  padding: 80px 0 0;
}

.featured-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 50px;
  align-items: center;
}

.featured-card img {
  display: block;
  width: 100%;
  height: auto;
}

.featured-content h2 {
  margin-top: 0;
}

.story-grid {
  padding-bottom: 80px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
}

.story-card img {
  width: 100%;
  display: block;
  aspect-ratio: 9/6;
  object-fit: cover;
  height: auto;
}

.story-card-content {
  padding-top: 20px;
}

.story-card h3 {
  margin-top: 10px;
}

.homepage-spotlight a,
.featured-card a,
.story-card a {
  color: inherit;
  text-decoration: none;
}

.homepage-spotlight:hover h2,
.featured-card:hover h2,
.story-card:hover h3 {
  color: var(--accent-color);
}

.pagination,
.nav-links {
  margin-top: 60px;
  text-align: center;
}

.page-numbers {
  padding: 8px 12px;
  text-decoration: none;
}

.current {
  font-weight: bold;
}

/* ==========================================================
   SPOTLIGHT ARCHIVE
========================================================== */
.homepage-spotlight,
.spotlight-header {
  background-color: #fdf5ef;
}

.spotlight-grid {
  padding-bottom: 80px;
}

.spotlight-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  align-items: start;
}

.spotlight-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: start;
}

.spotlight-link {
  display: block;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.spotlight-link:visited {
  color: inherit;
}

.spotlight-link:hover {
  color: inherit;
  text-decoration: none;
}

.spotlight-link img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.spotlight-card:hover img {
  transform: scale(1.02);
}

.spotlight-content {
  padding-top: 25px;
}

.spotlight-content h2 {
  margin: 0 0 15px;
  transition: color 0.2s ease;
}

.spotlight-card:hover h2 {
  color: var(--accent-color);
}

.spotlight-content h2 a {
  color: inherit;
  text-decoration: none;
}

.spotlight-content p {
  margin-bottom: 0;
}

.archive-pagination {
  margin-top: 70px;
  text-align: center;
}

/* ==========================================================
   MOBILE
========================================================== */
@media (max-width: 900px) {
  .archive-banner {
    padding: 35px 0;
  }

  .archive-banner-inner {
    grid-template-columns: 1fr;
    gap: 25px;
    text-align: center;
  }

  .archive-banner-logo {
    width: 100px;
  }

  .spotlight-cards {
    grid-template-columns: 1fr;
    gap: 50px;
  }
}

/* ==========================================================
   SINGLE SPOTLIGHT
========================================================== */
.spotlight-intro {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 60px;
  align-items: center;
  max-width: var(--reading-width);
  margin: 0 auto;
}

.spotlight-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.spotlight-title h4 {
  margin: 0 0 10px;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}

.spotlight-title h1 {
  margin: 0 0 20px;
}

.spotlight-title .story-meta {
  margin: 0;
}

/* =========================
    RESPONSIVE
    ========================= */
@media (max-width: 800px) {
  /* Hide desktop nav */
  .main-nav {
    display: none;
  }

  /* Show mobile button */
  .mobile-menu-toggle {
    display: block;
    background: none;
    border: 1px solid #333;
    padding: 8px 14px;
    font-size: 0.9rem;
    cursor: pointer;
  }

  .logo img {
    width: 220px;
  }

  .footer-logo {
    text-align: center;
  }

  .footer-logo img {
    width: 220px;
    margin: 0 auto;
  }

  .about-layout {
    flex-direction: column;
    text-align: left;
  }

  .about-logo {
    margin-top: 20px;
  }

  .about-logo img {
    max-width: 180px;
  }

  .aim-grid {
    grid-template-columns: 1fr;
    width: 100vw;
    margin-left: calc(50% - 50vw);
  }

  .aim-content {
    padding: 30px;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .team-member {
    padding-bottom: 10px;
  }

  .team-member img {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social a {
    justify-content: center;
  }

  .board-list {
    columns: 1;
  }

  .page-hero {
    min-height: 350px;
  }

  .page-hero .container {
    padding-bottom: 40px;
  }

  .page-hero h1 {
    font-size: 2rem;
  }

  .gallery.gallery-columns-3,
  .gallery.gallery-columns-4 {
    grid-template-columns: 1fr;
  }

  .gallery.gallery-columns-2 {
    grid-template-columns: 1fr;
  }

  .post-navigation .container {
    flex-direction: column;
    gap: 20px;
  }

  .story {
    padding: 50px 0;
  }

  .story-content {
    max-width: 100%;
  }

  .story-content .gallery-columns-2,
  .story-content .gallery-columns-3,
  .story-content .gallery-columns-4 {
    grid-template-columns: 1fr;
  }

  .story-navigation {
    flex-direction: column;
    gap: 20px;
  }

  /* Footer logo centered on mobile */
  .footer-logo {
    text-align: center;
  }
}

@media (max-width: 900px) {
  .featured-card {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .spotlight-cards {
    grid-template-columns: 1fr;
  }

  .spotlight-intro {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .spotlight-photo {
    max-width: 320px;
    margin: 0 auto;
  }

  .spotlight-title {
    text-align: center;
  }
}
