:root {
  --primary: #1e3a8a;      /* Marian blue */
  --primary-soft: #eef3ff;
  --accent: #16a34a;
  --text-main: #111827;
  --text-soft: #4b5563;
  --border-soft: #e5e7eb;
  --bg-page: #ffffff;
  --shadow-soft: 0 14px 40px rgba(15, 23, 42, 0.08);
  --hero-media-h: clamp(520px, 70vh, 720px);
  --radius-card: 16px;
  --transition-fast: 0.25s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #f3f4ff 0, #ffffff 40%);
  color: var(--text-main);
}

#page-content {
  flex: 1 0 auto;
}


/* HEADER */

.site-header {
  background: #A3D9F9;
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 40;
  overflow: visible;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0.75rem 6vw;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-weight: 700;
  color: #000033;
  font-size: 1.05rem;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: #000033;
  /* color: var(--text-soft); */
}

/* NAV */

.main-nav {
  display: flex;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: #000033;
  font-size: 0.95rem;
  position: relative;
  display: inline-block;

  /* reserve space so underline doesn't push layout */
  padding-bottom: 6px;
  padding-right: 12px; /* space for arrow on dropdown items */
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

/* Underline: always exists, just hidden (no layout shift) */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;

  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1e3a8a, #4f46e5);

  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Sub-menu */
.nav-item {
  position: relative;
}

/* ✅ Move dropdown arrow to ::before so it doesn't conflict with underline */
/* .nav-item-has-children > .nav-link::before {
  content: "▾";
  position: absolute;
  right: 0;
  top: 0.15rem;
  font-size: 0.65rem;
  color: currentColor;
  opacity: 0.85;
} */
.nav-item-has-children{
  position: relative;
}

/* submenu placement (reduce gap) */
.submenu{
  top: calc(100% + 6px);   /* reduce gap from 10px */
}

.nav-item-has-children::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;            /* bridge height */
}

.nav-item-has-children:hover > .submenu,
.nav-item-has-children:focus-within > .submenu{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* .submenu {
  position: absolute;
  top: 130%;
  left: 0;
  background: #000033;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 0.5rem 0.75rem;
  display: none;
  min-width: 180px;
}

.submenu li {
  margin: 0.15rem 0;
}

.submenu a {
  font-size: 0.9rem;
  color: var(--text-soft);
  text-decoration: none;
} */

.nav-item-has-children:hover .submenu {
  display: block;
}

/* Lang + hamburger */

.header-controls {
  margin-left: auto;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.75rem;
}

.lang-select {
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  background: #f9fafb;
}

.nav-toggle {
  /* display: none;
  border: none;
  background: transparent;
  padding: 0.3rem;
  cursor: pointer; */
    width: 42px;
  height: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
}

.nav-toggle span {
  /* display: block;
  width: 20px;
  height: 2px;
  background: #111827;
  margin: 4px 0;
  transition: var(--transition-fast); */
    width: 24px;
  height: 2.5px;
  background: #1e3a8a; /* Marian blue */
  border-radius: 2px;
  transition: background .2s ease;
}
.nav-toggle:hover span{
  background: #0f2a66;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--border-soft);
  /* background: #ffffff; */
}

.mobile-nav.open {
  display: block;
}

.mobile-nav .nav-menu {
  flex-direction: column;
  padding: 0.75rem 6vw 1rem;
}

/* HERO */

/* .hero {
  min-height: 90vh;
  display: flex;
  align-items: center;  
  flex-direction: column;   
  padding: 1.5rem 6vw;
  /* padding: 2.5rem 6vw 1.5rem; 
  background: transparent;
} */
 .hero {
  /* ✅ Avoid big blank space on laptops: don’t lock hero to 90vh */
  min-height: clamp(520px, 72vh, 760px);
  display: flex;
  flex-direction: column;
  align-items: stretch; /* ✅ prevents “floating down” look */
  padding: 1.5rem 6vw;
  background: transparent;
}

/* .hero-main {
  display: flex;
  gap: 2.5rem;
  align-items: stretch;
} */
.hero-main {
  /* flex: 1;
  display: flex; */
  gap: 2.5rem;
  /* align-items: stretch; */
  /* min-height: 360px;           or 380 / 400 if you prefer a bit taller */
  width: 100%;
  align-items: center;
  display: grid;
  grid-template-columns: 0.9fr 1.6fr;

}

.hero-text {
  flex: 1.25;
  padding: 1.5rem 0;
}

.hero-category {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-weight: 700;
}

.hero-title {
  margin: 0.75rem 0 0.75rem;
  font-size: 2.6rem;
  line-height: 1.2;
  color: var(--primary); /* Marian / Divine blue */
}

.hero-desc strong {
  margin: 0;
  font-weight: 700;
  color: var(--text-soft);
  font-size: 1rem;
  max-width: 30rem;
}

.hero-btn {
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #1e3a8a, #4f46e5);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

/* hero media */

.hero-media {
  /* flex: 1.4;
  display: flex;
  gap: 1rem; */
  display: grid;
  grid-template-columns: 1fr clamp(180px, 22vw, 280px);
  /* grid-template-columns: 1fr 260px; wider side column */
  gap: 1.25rem;
  align-items: stretch;
}

.hero-media.no-sides {
  grid-template-columns: 1fr;   /* ✅ main takes full width */
}
.hero-media.no-sides .hero-media-main {
  height: clamp(520px, 75vh, 820px);
}
/* .hero-media-main {
  flex: 2;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
} */
/* Main hero image container: fixed 16:9 box */

.hero-media-main {
  /* height: var(--hero-media-h); */
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);

    /* ✅ key change test*/
  aspect-ratio: 16 / 10;                 /* choose 16/9, 16/10, 4/3 */
  max-height: var(--hero-media-h);       /* safety cap */
  width: 100%;
  /* flex: 2;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9;        /* 🔹 this is the key line 
  max-height: 480px;           optional safety limit */
}

/* .hero-media-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
} */
/* Image must fill the box, not define its own height */
.hero-media-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;           /* keeps it cropped nicely */
  /* border: 1px solid rgba(17,24,39,0.06); */
  object-position: center;
  display: block;
}

.hero-media-sides {
  /* flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  justify-content: space-between; */
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: var(--hero-media-h);
}

.hero-media-sides img {
  /* width: 100%;
  aspect-ratio:  16 / 10;        /* square images 
  border-radius: 18px;
  object-fit: cover;
  box-shadow: var(--shadow-soft); */
  height: calc((var(--hero-media-h) - 1.25rem) / 2); 
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}

/* .hero-media-sides img {
  flex: 1;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
} */

/* HERO STRIP */

.hero-strip {
  width: 100%;
  /* margin-top: auto; */
  margin-top: 1.5rem;
  /* margin-top: 2rem; */
  border-top: 1px solid var(--border-soft);
  padding-top: 1.2rem;
}

.hero-strip-inner {
  display: flex;
  gap: 1.5rem;
}

.hero-strip-item {
  flex: 1;
  cursor: pointer;
}

.hero-strip-progress {
  height: 3px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.hero-strip-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1e3a8a, #4f46e5);
}

.hero-strip-meta {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #9ca3af;
  font-weight: 600;
}

.hero-strip-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  margin-top: 0.2rem;
}

.hero-strip-item.active .hero-strip-meta {
  color: var(--primary);
}

@media (max-width: 960px) {
  .hero-main {
    grid-template-columns: 1fr;
  }

  .hero-media {
    grid-template-columns: 1fr;
  }

  .hero-media-sides {
    display: none;
  }

  .hero-media-main {
    height: 48vh;
  }
}

/* CARDS SECTION */

.cards-section {
  padding: 1.5rem 6vw 3rem;
}

.cards-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.info-card {
  background: #ffffff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--primary); /* Marian / Divine blue */
}

.info-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;   /* default focal point */
  display: block;
}

.info-card-body {
  padding: 1.2rem 1.3rem 1.4rem;
}

.info-card-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

.info-card-title {
  font-size: 1.2rem;
  margin: 0.4rem 0 0.3rem;
}

.info-card-text {
  font-size: 0.9rem;
  color: var(--text-soft);
}

.info-card-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}



/* FOOTER */

.site-footer{
  padding: 10px 16px;        /* ⬅ reduce vertical height */
  background:  #A3D9F9;       /* keep your blue */
}

.site-footer .footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.site-footer p{
  margin: 4px 0;             /* ⬅ remove large gaps */
  font-size: 0.85rem;        /* ⬅ smaller text */
  line-height: 1.3;          /* ⬅ tighter lines */
  color: #000000
}
/* .site-footer {
  border-top: 1px solid var(--border-soft);
  background: #002776;
  text-align: center;
  color: #ffffff;
  padding: 0.75rem 6vw;
}


.footer-inner {
  text-align: center;
  font-size: 0.85rem;
  color: #ffffff;
  /* color: var(--text-soft); 
} */

/* RESPONSIVE */

@media (max-width: 960px) {
  .hero-main {
    flex-direction: column;
  }

  .hero-media {
    width: 100%;
  }

  .hero-strip-inner {
    overflow-x: auto;
  }

  .hero-strip-item {
    flex: 0 0 70%;
    min-width: 70%;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-media-sides {
    display: none; /* simplify on phone */
  }
}

/* Mother Mary */
.mm-slider {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mm-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 0;
  width: 100%;
}

.mm-track::-webkit-scrollbar { height: 8px; }
.mm-track::-webkit-scrollbar-thumb { border-radius: 8px; }

.mm-card {
  min-width: 320px;
  max-width: 360px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  scroll-snap-align: start;
  flex: 0 0 auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

.mm-imgwrap img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.mm-body { padding: 14px 16px; }

.mm-meta {
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 6px;
}

.mm-h { margin: 0 0 8px 0; font-size: 18px; }

.mm-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  max-height: 3.8em;
  overflow: hidden;
}

.mm-nav {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 20px;
}

/* Adding css for rosary */
/* ===== Rosary page (safe, append-only) ===== */

.mm-grid{
  display:grid;
  gap:18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width:1200px){ .mm-grid{ grid-template-columns: repeat(3, 1fr);} }
@media (max-width:900px){  .mm-grid{ grid-template-columns: repeat(2, 1fr);} }
@media (max-width:560px){  .mm-grid{ grid-template-columns: 1fr;} }

.mm-set{
  border: 1px solid rgba(17,24,39,.10);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.85);
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}

.mm-set-head{
  width:100%;
  display:flex;
  gap:12px;
  align-items:center;
  padding:12px;
  background:transparent;
  border:0;
  cursor:pointer;
  text-align:left;
}

.mm-set-cover{
  width:72px;
  height:72px;
  border-radius: 14px;
  overflow:hidden;
  flex: 0 0 auto;
  background: rgba(30,58,138,.06);
  border: 1px solid rgba(17,24,39,.08);
}
.mm-set-cover img{ width:100%; height:100%; object-fit:cover; display:block; }

.mm-set-meta{ flex: 1 1 auto; }
.mm-set-title{ font-weight: 900; font-size: 1.05rem; }
.mm-set-hint{ font-weight: 700; color: rgba(30,58,138,.95); font-size:.85rem; margin-top:2px; }
.mm-set-intro{ color: rgba(17,24,39,.70); font-size:.9rem; margin-top:6px; }

.mm-set-toggle{ font-size: 1.1rem; opacity: .8; }

.mm-set-body{ display:none; padding: 0 12px 14px; }
.mm-set.open .mm-set-body{ display:block; }

.mm-mystery-grid{
  display:grid;
  gap:14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width:900px){ .mm-mystery-grid{ grid-template-columns: 1fr; } }

.mm-mystery{
  border: 1px solid rgba(17,24,39,.10);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.85);
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}

.mm-mystery-img{
  position:relative;
  aspect-ratio: 16/9;
  background: rgba(30,58,138,.06);
}
.mm-mystery-img img{ width:100%; height:100%; object-fit:cover; display:block; }

.mm-mystery-num{
  position:absolute;
  left:10px; top:10px;
  width:32px; height:32px;
  border-radius:10px;
  display:grid; place-items:center;
  font-weight:900;
  background: rgba(30,58,138,.85);
  color:#fff;
}

.mm-mystery-body{ padding: 10px 12px 12px; }
.mm-mystery-name{ font-weight: 900; margin-bottom: 4px; }
.mm-mystery-desc{ color: rgba(17,24,39,.75); font-size:.92rem; margin-bottom:8px; }

.mm-refs{ display:flex; flex-wrap:wrap; gap:8px; }
.mm-ref{
  font-size:.78rem;
  padding:5px 8px;
  border-radius:999px;
  background: rgba(79,70,229,.08);
  color: #1e3a8a;
  font-weight: 800;
}

/* Rosary page: always expanded (no toggle) */
.mm-set-body { display: block !important; }
.mm-set-toggle { display: none !important; }
.mm-set-head { cursor: default !important; }

/* Rosary: mysteries 1–5 should stack vertically (single column) */
.mm-mystery-grid {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 14px;
}

.hero-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-btn.secondary{
  /* background: transparent;
  border: 2px solid #3b82f6;
  color: #1e3a8a; */
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #1e3a8a, #4f46e5);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

/* .hero-btn.secondary:hover{
  background: rgba(59,130,246,0.1);
} */

/* =========================================================
   SUBMENU: stable hover (no shaking)
   ========================================================= */

.nav-item{
  position: relative;
}

.submenu{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;

  min-width: 220px;
  list-style: none;
  margin: 0;
  padding: 8px;

  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);

  /* hidden state without layout shift */
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 2000;
}

.nav-item-has-children:hover > .submenu,
.nav-item-has-children:focus-within > .submenu{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.submenu a{
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #0f172a;
}

.submenu a:hover{
  background: rgba(30,58,138,0.08);
}

/* footer does not grow */
.site-footer {
  flex-shrink: 0;
}

/* MASS TIMINGS TABLE */

.mass-table-wrap {
  margin-top: 1.2rem;
}

.mass-table-title {
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
}

.mass-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.mass-table thead {
  background: rgba(30,58,138,0.08);
}

.mass-table th,
.mass-table td {
  padding: 0.7rem 0.8rem;
  text-align: left;
  font-size: 0.95rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-soft);
}

.mass-table th {
  font-weight: 800;
  color: var(--primary);
}

.mass-table tbody tr:last-child td {
  border-bottom: none;
}

/* Highlight special Mass */
.mass-highlight {
  background: rgba(79,70,229,0.06);
}

.mass-highlight td {
  font-weight: 700;
}

/* Mobile friendly */
@media (max-width: 720px) {
  .mass-table thead {
    display: none;
  }

  .mass-table tr {
    display: block;
    border-bottom: 1px solid var(--border-soft);
  }

  .mass-table td {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 0.6rem 0.8rem;
    font-size: 0.92rem;
  }

  .mass-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--primary);
  }
}

/* Mass Times card list - nicer than bullets */
.info-card-list{
  list-style: none;
  padding-left: 0;
  margin-top: 0.65rem;
}

.info-card-list li{
  position: relative;
  padding-left: 1.1rem;
  margin: 0.45rem 0;
  line-height: 1.5;
  color: var(--text-main);
  font-weight: 600;
}

.info-card-list li::before{
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
  font-weight: 900;
}

/* Always show the 3-bar "home" button on ALL screen sizes */
.nav-toggle{
  display: flex !important;
}
.header-controls{
  display: flex !important;
}

.site-brand{
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-brand:hover{
  opacity: 0.95;
}

.site-header{
  position: sticky;
  top: 0;
  z-index: 9999;
}

/* Sticky can fail if a parent has overflow hidden/auto */
html, body{
  overflow-x: hidden;
}

/* Remove link styling from header brand */
.brand-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  justify-content: center;
}

/* Ensure nothing inside looks like a link */
.brand-link * {
  text-decoration: none !important;
  color: inherit;
}