/* =========================================================
   Adriel Missionary Baptist Church
   Modern-but-church-appropriate theme (no external fonts)
   Keeps your existing class names + layout
   ========================================================= */

/* ======= Design tokens ======= */
:root{
    /* Neutrals */
    --bg: #f5f7fb;
    --paper: #ffffff;
    --ink: #0f172a;      /* slate-900 */
    --muted: #475569;    /* slate-600 */
    --muted2:#64748b;    /* slate-500 */
    --line: rgba(15, 23, 42, .10);
  
    /* Brand colors (blue-forward like your current, modernized) */
    --navy: #0b2a4a;
    --navy2:#123b63;
    --navy3:#0a2038;
  
    /* Accents (warm + subtle) */
    --gold: #c39a3a;
    --gold2:#e0c07a;
    --burg: #7a1f22;
    --green:#1f6f5b;
  
    /* Depth */
    --shadow: 0 22px 60px rgba(2, 6, 23, .16);
    --shadow2: 0 14px 34px rgba(2, 6, 23, .12);
    --shadow3: 0 10px 22px rgba(2, 6, 23, .10);
  
    --radius: 18px;
    --radius2: 26px;
    --max: 1180px;
  
    /* Fonts (no downloads) */
    --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
            Arial, "Noto Sans", "Liberation Sans", sans-serif;
    --serif: ui-serif, Georgia, "Times New Roman", Times, serif;
  
    --ease: cubic-bezier(.2,.8,.2,1);
  }
  
  /* ======= Base ======= */
  *{box-sizing:border-box}
  html,body{height:100%}
  html{scroll-behavior:smooth}
  body{
    margin:0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--bg);
    overflow-x:hidden;
  }
  
  /* “Depth” background layers that scroll nicely */
  body::before{
    content:"";
    position:fixed;
    inset:0;
    z-index:-2;
    background:
      radial-gradient(1100px 620px at 10% 0%, rgba(18, 59, 99, .18), transparent 58%),
      radial-gradient(900px 520px at 90% 10%, rgba(195, 154, 58, .12), transparent 55%),
      radial-gradient(900px 600px at 50% 110%, rgba(15, 23, 42, .08), transparent 60%),
      linear-gradient(180deg, #f8fbff 0%, #f5f7fb 40%, #f3f6fb 100%);
  }
  body::after{
    /* subtle “film grain” for richness (very light) */
    content:"";
    position:fixed;
    inset:-20%;
    z-index:-1;
    pointer-events:none;
    opacity:.035;
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
    transform: translate3d(0,0,0);
  }
  
  a{color:inherit}
  .container{max-width:var(--max); margin:0 auto; padding:0 18px}
  
  /* Better focus */
  :focus-visible{
    outline:none;
    box-shadow: 0 0 0 3px rgba(18,59,99,.18), 0 0 0 1px rgba(18,59,99,.45);
    border-radius: 12px;
  }
  
  /* ======= Top announcement bar ======= */
  .announce{
    background: linear-gradient(180deg, var(--navy), var(--navy2));
    color:#fff;
    border-bottom:1px solid rgba(255,255,255,.10);
  }
  .announce .inner{
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:11px 0; flex-wrap:wrap;
    font-size:13px;
  }
  .announce .left{
    display:flex; gap:10px; flex-wrap:wrap; align-items:center;
  }
  .badge{
    display:inline-flex; align-items:center; gap:8px;
    border:1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.10);
    border-radius: 999px;
    padding:7px 10px;
    font-size:12px;
    white-space:nowrap;
    backdrop-filter: blur(10px);
  }
  .dot{
    width:8px; height:8px; border-radius:999px;
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(195,154,58,.22);
  }
  .announce a{
    color:#fff;
    text-decoration:underline;
    text-underline-offset:3px;
    text-decoration-thickness: 2px;
  }
  
  /* ======= Header ======= */
  header{
    position:sticky;
    top:0;
    z-index:50;
    background: rgba(245, 247, 251, .84);
    backdrop-filter: blur(14px);
    border-bottom:1px solid rgba(15, 23, 42, .10);
  }
  .headerRow{
    display:flex; align-items:center; justify-content:space-between; gap:14px;
    padding:14px 0;
  }
  .brand{
    display:flex; align-items:center; gap:12px;
    min-width: 240px;
  }
  .mark{
    width:46px; height:46px; border-radius: 999px;
    border:1px solid rgba(18, 59, 99, .22);
    background:
      radial-gradient(circle at 30% 25%, rgba(255,255,255,.70), transparent 58%),
      rgba(18, 59, 99, .10);
    display:flex; align-items:center; justify-content:center;
    box-shadow: 0 10px 20px rgba(2,6,23,.10);
  }
  .mark svg{display:block}
  .brand h1{
    margin:0;
    font-family: var(--sans);
    font-size:18px;
    letter-spacing: -0.01em;
    line-height:1.05;
    font-weight: 800;
  }
  .brand .tag{
    display:block;
    margin-top:3px;
    font-size:12px;
    color: var(--muted2);
    letter-spacing: .02em;
  }
  
  nav{
    display:flex; align-items:center; gap:10px; flex-wrap:wrap;
    justify-content:flex-end;
  }
  nav a{
    text-decoration:none;
    font-size:13px;
    padding:10px 12px;
    border-radius: 999px;
    border:1px solid rgba(15, 23, 42, .10);
    background: rgba(255,255,255,.72);
    transition: transform .14s var(--ease), box-shadow .14s var(--ease), background .14s var(--ease), border-color .14s var(--ease);
    backdrop-filter: blur(10px);
  }
  nav a:hover{
    background:#fff;
    box-shadow: 0 14px 26px rgba(2,6,23,.12);
    transform: translateY(-1px);
  }
  nav a.primary{
    border-color: rgba(195, 154, 58, .42);
    background: rgba(195, 154, 58, .14);
    color: var(--navy);
    font-weight: 900;
  }
  
  .menuBtn{
    display:none;
    border:1px solid rgba(15, 23, 42, .12);
    background: rgba(255,255,255,.78);
    border-radius: 14px;
    padding:10px 12px;
    font-size:13px;
    cursor:pointer;
    transition: transform .14s var(--ease), box-shadow .14s var(--ease), background .14s var(--ease);
  }
  .menuBtn:hover{
    background:#fff;
    box-shadow: 0 12px 22px rgba(2,6,23,.10);
    transform: translateY(-1px);
  }
  
  /* ======= Hero ======= */
  .hero{padding:26px 0 14px}
  .heroCard{
    background: rgba(255,255,255,.86);
    border:1px solid rgba(15, 23, 42, .10);
    border-radius: var(--radius2);
    box-shadow: var(--shadow);
    overflow:hidden;
    backdrop-filter: blur(14px);
  }
  .heroGrid{
    display:grid;
    grid-template-columns: 1.25fr .75fr;
    gap:0;
  }
  .heroLeft{
    padding:30px 30px 20px;
    border-right:1px solid rgba(15, 23, 42, .08);
    position:relative;
  }
  .heroLeft:before{
    content:"";
    position:absolute; inset:0;
    background:
      radial-gradient(900px 380px at 0% 0%, rgba(195, 154, 58, .10), transparent 55%),
      radial-gradient(820px 340px at 56% 12%, rgba(18, 59, 99, .10), transparent 55%);
    pointer-events:none;
  }
  .heroLeft > *{position:relative}
  .kicker{
    display:flex; align-items:center; gap:10px;
    font-size:11px;
    letter-spacing:.18em;
    text-transform:uppercase;
    color: var(--muted2);
    margin:0 0 10px;
    font-weight: 800;
  }
  .heroLeft h2{
    margin:0 0 10px;
    font-family: var(--serif);
    font-size:42px;
    line-height:1.10;
    letter-spacing:-.02em;
  }
  .heroLeft p{
    margin:0 0 14px;
    color: var(--muted);
    font-size:14px;
    line-height:1.75;
    max-width: 74ch;
  }
  .ctaRow{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px}
  
  .btn{
    display:inline-flex; align-items:center; gap:8px;
    text-decoration:none;
    font-size:13px;
    padding:11px 13px;
    border-radius: 14px;
    border:1px solid rgba(15, 23, 42, .12);
    background: rgba(255,255,255,.72);
    transition: transform .14s var(--ease), box-shadow .14s var(--ease), background .14s var(--ease), border-color .14s var(--ease);
    cursor:pointer;
    white-space:nowrap;
    backdrop-filter: blur(10px);
  }
  .btn:hover{
    background:#fff;
    box-shadow: 0 14px 26px rgba(2,6,23,.12);
    transform: translateY(-1px);
  }
  .btn.primary{
    border-color: rgba(195, 154, 58, .42);
    background: rgba(195, 154, 58, .14);
    color: var(--navy);
    font-weight: 900;
  }
  .btn.alt{
    border-color: rgba(31, 111, 91, .28);
    background: rgba(31, 111, 91, .10);
    color: var(--green);
    font-weight: 900;
  }
  
  .heroRight{
    padding:0;
    background:
      linear-gradient(180deg, rgba(18, 59, 99, .10), transparent 35%),
      linear-gradient(90deg, rgba(195, 154, 58, .08), transparent 60%),
      rgba(245, 247, 251, .55);
  }
  .panel{
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
  }
  .panelTop{
    height:170px;
    background:
      radial-gradient(260px 180px at 30% 25%, rgba(18, 59, 99, .18), transparent 60%),
      radial-gradient(300px 200px at 80% 10%, rgba(195, 154, 58, .16), transparent 60%),
      linear-gradient(180deg, rgba(255,255,255,.12), transparent 55%),
      #eef3fb;
    display:flex; align-items:center; justify-content:center;
    color: var(--muted);
    font-size:13px;
    padding:14px;
    text-align:center;
  }
  .panelBottom{
    padding:12px;
    display:grid;
    gap:10px;
  }
  .miniRow{
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    border:1px solid rgba(15, 23, 42, .10);
    background: rgba(255,255,255,.74);
    border-radius: 999px;
    padding:9px 10px;
    font-size:12px;
    color:#223044;
    backdrop-filter: blur(10px);
  }
  .miniRow b{font-weight:900; color:#0f172a}
  
  .heroInfo{
    display:grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-top:1px solid rgba(15, 23, 42, .08);
    background: rgba(255,255,255,.50);
  }
  .heroInfo .slot{
    padding:13px 14px;
    border-right:1px solid rgba(15, 23, 42, .08);
    font-size:13px;
    color: var(--muted);
    line-height:1.55;
  }
  .heroInfo .slot:last-child{border-right:none}
  .heroInfo b{color:var(--ink)}
  .hint{margin-top:10px; font-size:12px; color:var(--muted2)}
  
  /* ======= Section layout ======= */
  section{padding:26px 0}
  .sectionHead{
    display:flex; align-items:flex-end; justify-content:space-between; gap:12px;
    flex-wrap:wrap;
    margin-bottom: 12px;
  }
  .sectionTitle{
    margin:0;
    font-family: var(--sans);
    font-size:22px;
    letter-spacing:-.01em;
    font-weight: 900;
  }
  .sectionSub{
    margin:6px 0 0;
    color: var(--muted);
    font-size:14px;
    line-height:1.70;
    max-width: 80ch;
  }
  .pill{
    display:inline-flex; align-items:center; gap:8px;
    border:1px solid rgba(15, 23, 42, .10);
    background: rgba(255,255,255,.68);
    border-radius:999px;
    padding:8px 10px;
    font-size:12px;
    color:#223044;
    white-space:nowrap;
    backdrop-filter: blur(10px);
  }
  
  .grid{
    display:grid;
    grid-template-columns: 1.1fr .9fr;
    gap:16px;
  }
  .card{
    background: rgba(255,255,255,.86);
    border:1px solid rgba(15, 23, 42, .10);
    border-radius: var(--radius2);
    box-shadow: var(--shadow2);
    padding:16px;
    backdrop-filter: blur(12px);
  }
  .card h3{
    margin:0 0 8px;
    font-family: var(--sans);
    font-size:16px;
    letter-spacing:-.01em;
    font-weight: 900;
  }
  
  /* ======= Inputs ======= */
  .controls{
    display:flex; gap:10px; flex-wrap:wrap; align-items:center;
    margin:10px 0 10px;
  }
  input,select{
    padding:10px 11px;
    border:1px solid rgba(15, 23, 42, .12);
    border-radius: 14px;
    background: rgba(255,255,255,.70);
    font-size:13px;
    outline:none;
    min-width: 200px;
    transition: box-shadow .14s var(--ease), border-color .14s var(--ease), background .14s var(--ease);
    backdrop-filter: blur(10px);
  }
  input:focus,select:focus{
    border-color: rgba(18,59,99,.45);
    box-shadow: 0 0 0 3px rgba(18,59,99,.12);
    background:#fff;
  }
  
  /* ======= Events list ======= */
  .list{display:flex; flex-direction:column; gap:10px}
  .item{
    display:flex; gap:12px; align-items:flex-start;
    border:1px solid rgba(15, 23, 42, .10);
    background: rgba(255,255,255,.68);
    border-radius: 18px;
    padding:12px;
    transition: transform .14s var(--ease), box-shadow .14s var(--ease), background .14s var(--ease);
    backdrop-filter: blur(10px);
  }
  .item:hover{
    background:#fff;
    box-shadow: 0 18px 30px rgba(2,6,23,.12);
    transform: translateY(-1px);
  }
  .dateBox{
    width:66px; flex:0 0 auto;
    text-align:center;
    border-right:1px solid rgba(15, 23, 42, .10);
    padding-right:12px;
  }
  .dateBox .m{
    font-size:11px;
    color:var(--muted2);
    letter-spacing:.14em;
    text-transform:uppercase;
    font-weight: 800;
  }
  .dateBox .d{
    font-family: var(--sans);
    font-size:24px;
    font-weight: 900;
    line-height:1;
    margin-top:2px;
  }
  .meta{flex:1}
  .meta .top{
    display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap;
    align-items:flex-start;
  }
  .meta b{font-size:14px}
  .meta .small{
    margin-top:4px;
    color:var(--muted);
    font-size:13px;
    line-height:1.55;
  }
  .tag{
    font-size:12px;
    border:1px solid rgba(15, 23, 42, .10);
    background: rgba(255,255,255,.84);
    border-radius:999px;
    padding:6px 10px;
    color:#223044;
    white-space:nowrap;
  }
  
  /* Optional tag variants if you later classify events */
  .tag.worship{border-color: rgba(18,59,99,.24); background: rgba(18,59,99,.08)}
  .tag.fellowship{border-color: rgba(195,154,58,.28); background: rgba(195,154,58,.10)}
  .tag.youth{border-color: rgba(31,111,91,.24); background: rgba(31,111,91,.10)}
  .tag.outreach{border-color: rgba(122,31,34,.22); background: rgba(122,31,34,.08)}
  
  /* ======= Embed placeholders ======= */
  .placeholder{
    border:1px dashed rgba(15, 23, 42, .18);
    background: rgba(255,255,255,.62);
    border-radius: 18px;
    min-height: 260px;
    display:flex; align-items:center; justify-content:center;
    text-align:center;
    padding:14px;
    color:var(--muted);
    font-size:13px;
    backdrop-filter: blur(10px);
  }
  
  /* ======= Footer ======= */
  footer{
    padding:22px 0 34px;
    color:var(--muted);
    font-size:13px;
  }
  .footerBox{
    border-top:1px solid rgba(15, 23, 42, .10);
    padding-top:14px;
    display:flex;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
  }
  
 
  /* ======= Mobile ======= */
  @media (max-width: 980px){
    .heroGrid{grid-template-columns:1fr}
    .heroLeft{border-right:none; border-bottom:1px solid rgba(15, 23, 42, .08)}
    .heroInfo{grid-template-columns:1fr}
    .heroInfo .slot{border-right:none; border-bottom:1px solid rgba(15, 23, 42, .08)}
    .heroInfo .slot:last-child{border-bottom:none}
    .grid{grid-template-columns:1fr}
  }
  @media (max-width: 860px){
    nav{display:none}
    nav.open{display:flex; width:100%; justify-content:flex-start; padding:8px 0 12px}
    .headerRow{flex-wrap:wrap}
    .menuBtn{display:inline-flex; align-items:center; gap:8px}
  }
  
  /* Reduced motion support */
  @media (prefers-reduced-motion: reduce){
    *{scroll-behavior:auto}
    nav a, .btn, .item{transition:none}
  }
  
  /* ======= Hero media behavior ======= */
.panelTop.hero-image,
#heroMedia{
  position: relative;
  width: 100%;
  height: 315px;
  overflow: hidden;
  padding: 0;
}

#heroFallback,
#heroLiveLink,
#heroCountdown{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#heroFallback,
#heroLiveImage{
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #eef3fb;
}

#heroLiveLink{
  display: none;
}

#heroCountdown{
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(11,42,74,.82), rgba(18,59,99,.72)),
    url("./Images/FBLIVE.png") center/contain no-repeat,
    #4f6689;
  color: #fff;
}

.countdownInner{
  max-width: 420px;
  width: 100%;
  padding: 24px 20px;
  border-radius: 20px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
}

.countdownLabel{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .9;
  margin-bottom: 10px;
}

.countdownTime{
  font-size: clamp(30px, 6vw, 48px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 10px;
}

.countdownSub{
  font-size: 14px;
  line-height: 1.5;
  opacity: .95;
}

.liveFrameWrap{
  position: relative;
  width: 100%;
  height: 100%;
}

.liveFrameWrap iframe{
  width: 100%;
  height: 100%;
  display: block;
}

.liveFullscreenBtn{
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
}
@media (max-width: 860px){
  .announce .inner{
    display:block;
  }

  .announce .left{
    display:flex;
    flex-wrap:nowrap;
    gap:10px;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom:6px;
    scrollbar-width:none;
  }

  .announce .left::-webkit-scrollbar{
    display:none;
  }

  .announce .badge{
    flex:0 0 auto;
    white-space:nowrap;
  }

  .announce .right{
    margin-top:10px;
  }
}
/* Make both sections feel equal */
.announcements .item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
  min-height: 84px; /* KEY LINE */
}

/* Match event card spacing */
.announcements .meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

/* Match event title weight/size */
.announcements .meta b {
  font-size: 16px;
  font-weight: 600;
}

/* Match event subtext */
.announcements .small {
  font-size: 14px;
  color: #6b7280;
}
.announcements .item + .item {
  margin-top: 12px;
}
.hero-image {
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
}

#heroFallback {
  width: 100%;
  height: 100%;
  object-fit: cover; /* THIS is the magic */
  display: block;
}