/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-bg:       #fafafa;
  --clr-surface:  #ffffff;
  --clr-primary:  #1e3a5f;
  --clr-accent:   #b08d57;
  --clr-text:     #2c2c2c;
  --clr-muted:    #6b7280;
  --clr-border:   #e5e7eb;
  --clr-hero-overlay: rgba(30, 58, 95, 0.82);
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --max-w:        1140px;
  --radius:       12px;
  --shadow-card:  0 2px 16px rgba(0,0,0,.06);
  --shadow-card-hover: 0 8px 30px rgba(0,0,0,.1);
  --transition:   .25s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--clr-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--clr-primary); }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--clr-primary); line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p + p { margin-top: 1rem; }

/* ===== LAYOUT ===== */
.container { width: 90%; max-width: var(--max-w); margin: 0 auto; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--clr-border);
  padding: .7rem 0;
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem;
}
.navbar__brand {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--clr-primary);
  font-weight: 700;
  display: flex; align-items: center; gap: .4rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.navbar__brand svg { width: 24px; height: 24px; }
.navbar__links {
  display: flex; gap: .15rem; list-style: none;
  align-items: center;
}
.navbar__links > li { position: relative; }
.navbar__links > li > a {
  color: var(--clr-muted);
  font-size: .88rem;
  font-weight: 500;
  padding: .4rem .7rem;
  border-radius: 6px;
  transition: all var(--transition);
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: .25rem;
}
.navbar__links > li > a:hover {
  color: var(--clr-primary);
  background: rgba(30, 58, 95, .06);
}
.navbar__links > li > a.active {
  color: var(--clr-primary);
  background: rgba(30, 58, 95, .08);
  font-weight: 600;
}

/* Dropdown arrow */
.navbar__links > li > a .caret {
  font-size: .55rem;
  transition: transform var(--transition);
}

/* Dropdown menu */
.dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 200px; padding-top: .4rem; z-index: 110; }
.dropdown__menu {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(0,0,0,.1);
  padding: .4rem;
  list-style: none;
}
.dropdown__menu li a {
  display: block;
  color: var(--clr-muted);
  font-size: .85rem; font-weight: 500;
  padding: .5rem .85rem;
  border-radius: 8px;
  transition: all var(--transition);
  white-space: nowrap;
}
.dropdown__menu li a:hover {
  color: var(--clr-primary);
  background: rgba(30, 58, 95, .06);
}
.dropdown__menu li a.active {
  color: var(--clr-primary);
  background: rgba(30, 58, 95, .08);
  font-weight: 600;
}

/* Show dropdown on hover (desktop) */
@media (min-width: 961px) {
  .navbar__links > li:hover > .dropdown { display: block; }
  .navbar__links > li:hover > a .caret { transform: rotate(180deg); }
}

/* Kids link accent */
.navbar__links .nav-kids a {
  color: var(--clr-accent);
  font-weight: 600;
}
.navbar__links .nav-kids a:hover { color: #9a7a48; }

/* Hamburger */
.navbar__toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.navbar__toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--clr-primary); margin: 4px 0;
  transition: var(--transition);
}

/* ===== RESPONSIVE NAVBAR ===== */
@media (max-width: 960px) {
  .navbar__toggle { display: block; }
  .navbar__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--clr-surface);
    padding: .75rem 5%; gap: 0;
    border-bottom: 1px solid var(--clr-border);
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
  }
  .navbar__links.open { display: flex; }
  .navbar__links > li > a {
    display: block;
    padding: .55rem .75rem;
    font-size: .9rem;
    border-radius: 8px;
  }
  /* Mobile dropdowns inline */
  .dropdown { display: none; position: static; padding-top: 0; min-width: auto; }
  .dropdown.open { display: block; }
  .dropdown__menu {
    border: none; box-shadow: none; border-radius: 0;
    padding: 0 0 .25rem 1rem;
    background: transparent;
  }
  .dropdown__menu li a { font-size: .88rem; padding: .4rem .75rem; }
  /* Mobile toggle for dropdowns */
  .navbar__links > li > a .caret { display: inline; }
  .lang-switcher {
    border-left: none !important; margin-left: 0 !important;
    padding-left: 0 !important;
    margin-top: .5rem; padding-top: .5rem;
    border-top: 1px solid var(--clr-border);
  }
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher {
  display: flex; align-items: center; gap: .3rem;
  margin-left: .75rem;
  padding-left: .75rem;
  border-left: 1px solid var(--clr-border);
  flex-shrink: 0;
}
.lang-switcher a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 20px;
  font-size: .65rem; font-weight: 700;
  text-transform: uppercase;
  color: var(--clr-muted);
  border: 1px solid var(--clr-border);
  border-radius: 4px;
  transition: all var(--transition);
  letter-spacing: .02em;
}
.lang-switcher a:hover { color: var(--clr-primary); border-color: var(--clr-primary); }
.lang-switcher a.active { background: var(--clr-primary); color: #fff; border-color: var(--clr-primary); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--clr-primary) 0%, #2d5a8e 50%, #3d6a9e 100%);
  color: #fff;
  padding: 5rem 1rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}
.hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--clr-bg), transparent);
}
.hero__content { position: relative; z-index: 1; max-width: 700px; }
.hero h1 { color: #fff; margin-bottom: 1.2rem; letter-spacing: -.01em; }
.hero p { font-size: 1.15rem; opacity: .9; margin-bottom: 2rem; line-height: 1.7; }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--clr-primary) 0%, #2d5a8e 50%, #3d6a9e 100%);
  color: #fff; text-align: center;
  padding: 4.5rem 1rem 3.5rem;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}
.page-hero h1 { color: #fff; position: relative; z-index: 1; }
.page-hero p  { position: relative; z-index: 1; opacity: .85; margin-top: .6rem; font-size: 1.08rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ===== SECTIONS ===== */
.section { padding: 4.5rem 0; }
.section--alt { background: var(--clr-surface); }
.section__header { text-align: center; margin-bottom: 3rem; }
.section__header p { color: var(--clr-muted); max-width: 600px; margin: .6rem auto 0; }

/* ===== CARDS ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  display: flex; flex-direction: column;
}
.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
  border-color: rgba(176, 141, 87, .3);
}
.card__icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--clr-primary), #2d5a8e);
  color: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .75rem;
  font-size: 1.25rem;
}
.card h3 { margin-bottom: .4rem; font-size: 1.15rem; }
.card p  { color: var(--clr-muted); font-size: .9rem; flex: 1; }
.card__link {
  display: inline-block; margin-top: .75rem;
  font-weight: 600; font-size: .85rem;
}

/* ===== CONTENT PAGE ===== */
.content-section { padding: 3.5rem 0; }
.content-section .container { max-width: 820px; }
.content-section h2 { margin: 2.5rem 0 .75rem; }
.content-section h2:first-child { margin-top: 0; }
.content-section h3 { margin: 1.5rem 0 .5rem; color: var(--clr-accent); }
.content-section ul, .content-section ol {
  margin: .75rem 0 .75rem 1.5rem;
  color: var(--clr-text);
}
.content-section li { margin-bottom: .4rem; }
.content-section blockquote {
  border-left: 3px solid var(--clr-accent);
  padding: 1rem 1.5rem;
  margin: 1.75rem 0;
  color: var(--clr-muted);
  font-style: italic;
  background: linear-gradient(135deg, #f9f7f3, #faf8f5);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Feature list (icon + text rows) */
.feature-list { list-style: none; margin: 1.5rem 0; padding: 0; }
.feature-list li {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--clr-border);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list__icon {
  flex-shrink: 0; width: 40px; height: 40px;
  background: linear-gradient(135deg, #eef3fa, #e4ecf5);
  color: var(--clr-primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700;
}
.feature-list__text h4 { font-size: 1rem; margin-bottom: .2rem; }
.feature-list__text p  { font-size: .92rem; color: var(--clr-muted); }

/* Detail cards (Apparitions, Saints, Dogmas, Gifts, Prayers) */
.detail-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.detail-card:hover {
  box-shadow: var(--shadow-card);
  border-color: rgba(176, 141, 87, .25);
}
.detail-card__header { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.detail-card__badge {
  background: linear-gradient(135deg, var(--clr-primary), #2d5a8e);
  color: #fff;
  font-size: .72rem; font-weight: 700;
  padding: .25rem .7rem; border-radius: 20px;
  letter-spacing: .02em;
}
.detail-card h3 { font-size: 1.2rem; }
.detail-card p { color: var(--clr-muted); font-size: .95rem; }
.detail-card p + p { margin-top: .6rem; }

/* ===== APP BANNER ===== */
.app-banner {
  background: linear-gradient(135deg, #f0ebe3 0%, #e8e0d4 100%);
  padding: 3rem 0;
  text-align: center;
}
.app-banner h3 { margin-bottom: .3rem; }
.app-banner p { color: var(--clr-muted); margin: .3rem 0 1.25rem; }
.app-banner .btn { display: inline-block; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 2rem;
  border-radius: 50px;
  font-weight: 600; font-size: .95rem;
  transition: all var(--transition);
  cursor: pointer; border: none;
}
.btn--primary { background: var(--clr-accent); color: #fff; }
.btn--primary:hover { background: #9a7a48; color: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(176,141,87,.3); }
.btn--outline {
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,.45);
}
.btn--outline:hover { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.7); }

/* ===== FOOTER ===== */
.footer {
  background: var(--clr-primary); color: rgba(255,255,255,.65);
  padding: 3rem 0 2rem; text-align: center;
  font-size: .85rem;
}
.footer a { color: var(--clr-accent); transition: color var(--transition); }
.footer a:hover { color: #d4ad6a; }
.footer__links {
  list-style: none;
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.25rem;
  margin-bottom: 1.25rem;
}
.footer__links a {
  padding: .2rem 0;
}
.footer__divider {
  width: 40px; height: 1px;
  background: rgba(255,255,255,.15);
  margin: 0 auto 1rem;
}
.footer p { opacity: .7; }

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* Cross icon used in rosary theme */
.cross-icon::before { content: '✝'; }

/* ===== BLOG ===== */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
.blog-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 2rem 2rem 1.5rem;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.blog-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
  border-color: rgba(176, 141, 87, .3);
}
.blog-card h2 { font-size: 1.35rem; margin-bottom: .5rem; }
.blog-card h2 a { color: var(--clr-primary); }
.blog-card h2 a:hover { color: var(--clr-accent); }
.blog-card > p { color: var(--clr-muted); font-size: .95rem; }
.blog-card__meta {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: .6rem;
  font-size: .82rem; color: var(--clr-muted);
}
.blog-card__category {
  background: linear-gradient(135deg, var(--clr-primary), #2d5a8e);
  color: #fff;
  font-size: .7rem; font-weight: 700;
  padding: .2rem .65rem; border-radius: 20px;
  letter-spacing: .03em; text-transform: uppercase;
}
.blog-post__meta {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 2rem; padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--clr-border);
  font-size: .85rem; color: var(--clr-muted);
}
.blog-post__nav {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--clr-border);
}

/* ===== PRINT ===== */
@media print {
  .navbar, .app-banner, .footer, .lang-switcher { display: none; }
  .hero, .page-hero { background: var(--clr-primary) !important; -webkit-print-color-adjust: exact; }
}
