
:root{
  --red:#a71920;
  --dark:#101216;
  --muted:#6b7280;
  --cream:#fffaf0;
  --green:#0b4d3c;
  --card:#ffffff;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  color:var(--dark);
  background:#f7f3ec;
  line-height:1.6;
  text-align:center;
  overflow-x:hidden;
}

a{color:inherit}

.container{
  width:min(1120px,92%);
  margin:auto;
}

.site-header{
  position:sticky;
  top:0;
  z-index:10;
  background:#fffdf8;
  border-bottom:1px solid #eadfd0;
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 0;
  gap:20px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  font-weight:800;
  color:var(--red);
}

.brand img{
  width:54px;
  height:54px;
  object-fit:contain;
}

.menu{
  display:flex;
  gap:20px;
  flex-wrap:wrap;
  justify-content:center;
}

.menu a{
  text-decoration:none;
  font-weight:700;
  color:#222;
}

.menu a:hover{color:var(--red)}

.hero{
  background:linear-gradient(135deg,#1b1b1f,#7f1016);
  color:white;
  padding:70px 0 50px;
}

.hero-grid{
  display:grid;
  grid-template-columns:1fr 1.2fr;
  gap:36px;
  align-items:center;
  justify-items:center;
  text-align:center;
}

.logo-card{
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.18);
  border-radius:28px;
  padding:24px;
  text-align:center;
}

.logo-card img{
  max-width:320px;
  width:100%;
}

.hero h1{
  font-size:clamp(36px,6vw,72px);
  line-height:1.02;
  margin:0 0 12px;
}

.hero p{
  font-size:20px;
  max-width:720px;
  margin-left:auto;
  margin-right:auto;
}

.actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:center;
  margin-top:24px;
}

.btn{
  display:inline-block;
  text-decoration:none;
  border-radius:999px;
  padding:12px 20px;
  font-weight:800;
  border:2px solid transparent;
}

.btn.primary{background:#fff;color:var(--red)}
.btn.secondary{border-color:#fff;color:#fff}

.section{padding:56px 0}

.section h2{
  font-size:34px;
  margin:0 0 12px;
  color:var(--red);
  text-align:center;
}

/* Prayer table first, events below */
.grid{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:28px !important;
  max-width:900px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

.card{
  background:var(--card);
  border-radius:18px;
  padding:24px;
  box-shadow:0 10px 28px rgba(0,0,0,.07);
  border:1px solid #eee1d2;
  width:100%;
  max-width:900px;
  margin-left:auto;
  margin-right:auto;
  text-align:center;
}

.welcome-card{
  max-width:900px;
  margin-left:auto;
  margin-right:auto;
  text-align:center;
}

.welcome-card p{
  max-width:760px;
  margin-left:auto;
  margin-right:auto;
}

.widget-title{
  text-align:center;
  margin:0 0 4px;
  color:var(--green);
}

.small{
  text-align:center;
  color:var(--muted);
  font-size:14px;
}

#datePicker,
.select-row select{
  padding:8px 10px;
  border-radius:8px;
  border:1px solid #ccc;
  font-size:14px;
  color:#111;
  background:#fff;
  text-align:center;
}

.select-row{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin:14px 0;
}

#eventMonthSelect,
#eventYearSelect{
  min-width:120px;
}

table{
  width:100%;
  border-collapse:collapse;
  table-layout:auto;
  margin-left:auto;
  margin-right:auto;
}

td,th{
  padding:9px;
  border-bottom:1px solid #eee;
  text-align:center;
  vertical-align:middle;
}

.prayer-table td,
.prayer-table th,
#eventsTableBody td,
#islamic-events-widget th{
  text-align:center;
}

.prayer-table td:last-child{
  font-weight:800;
  color:var(--green);
}

.highlight{
  font-weight:800;
  color:var(--green);
}

/* Compact original event summary styling */
.notice{
  background:#fff6cf;
  border:1px solid #e3c96b;
  border-radius:12px;
  padding:12px;
  margin:12px 0;
  text-align:center;
  line-height:1.45;
}

.next{
  background:#eef6ff;
  border:1px solid #cfe0ff;
}

/* Keep blue box compact, like the green header */
#todayEventBox,
#nextEventBox{
  display:block !important;
  min-height:auto !important;
  height:auto !important;
  padding:12px !important;
  margin:12px 0 !important;
  text-align:center !important;
  line-height:1.45 !important;
}

#nextEventBox strong,
#todayEventBox strong{
  display:block;
  margin-bottom:4px;
  font-size:16px;
  font-weight:800;
}

#eventsMonthTitle{
  background:#0b4d3c;
  color:#fff;
  padding:8px 10px;
  border-radius:6px;
  font-weight:bold;
  margin-bottom:10px;
  text-align:center;
  line-height:1.35;
}

.badge{
  display:inline-block;
  border-radius:999px;
  padding:3px 9px;
  font-weight:800;
  font-size:12px;
  margin-left:6px;
}

.badge.wiladat{background:#eef7f3;color:#0b4d3c}
.badge.shahadat{background:#fff1f1;color:#a61e1e}
.badge.important{background:#eef6ff;color:#0b6bcb}

.socials,
.welcome-socials{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:15px;
  flex-wrap:wrap;
}

.socials a{
  background:#fff;
  border:1px solid #e8d8c8;
  padding:10px 14px;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
}

.footer{
  background:#16171b;
  color:white;
  padding:32px 0;
  margin-top:40px;
  text-align:center;
}

.footer a{color:white}

.page-hero{
  background:#7f1016;
  color:white;
  padding:46px 0;
  text-align:center;
}

@media(max-width:800px){
  .container{width:94%}
  .nav{
    flex-direction:column;
    gap:10px;
  }
  .menu{
    gap:10px;
    font-size:14px;
  }
  .hero{
    padding:34px 0 30px;
  }
  .hero-grid,
  .grid{
    grid-template-columns:1fr !important;
    gap:20px !important;
  }
  .logo-card{
    max-width:360px;
    width:100%;
    margin-left:auto;
    margin-right:auto;
  }
  .hero h1{
    font-size:38px;
    line-height:1.08;
    text-align:center;
  }
  .hero p{
    font-size:16px;
    text-align:center;
    margin-left:auto;
    margin-right:auto;
  }
  .actions{
    flex-direction:column;
    align-items:center;
    gap:12px;
  }
  .btn{
    width:min(280px,100%);
    text-align:center;
  }
  .card{
    padding:18px;
    border-radius:14px;
  }
  table{
    font-size:13px;
  }
  th,td{
    padding:8px 5px;
    white-space:normal;
    word-break:normal;
  }
}

@media(max-width:430px){
  .hero h1{font-size:34px}
  table{font-size:12px}
  th,td{padding:7px 4px}
}


/* Manual Events Page */
.manual-events-section{
  padding-top:40px;
}

.manual-events-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
  margin-bottom:26px;
}

.manual-events-toolbar h2{
  margin-bottom:4px;
}

.manual-event-filter{
  padding:10px 14px;
  border-radius:999px;
  border:1px solid #ddd;
  background:#fff;
  font-weight:700;
  color:#111;
}

.manual-events-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:22px;
}

.manual-event-card{
  background:#fff;
  border:1px solid #eee1d2;
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 10px 28px rgba(0,0,0,.08);
  text-align:left;
}

.manual-event-image{
  display:block;
  position:relative;
  height:220px;
  overflow:hidden;
  background:#7f1016;
  text-decoration:none;
}

.manual-event-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .25s ease;
}

.manual-event-card:hover .manual-event-image img{
  transform:scale(1.04);
}

.manual-event-date{
  position:absolute;
  left:16px;
  top:16px;
  background:#fff;
  color:#7f1016;
  border-radius:14px;
  padding:10px 12px;
  min-width:64px;
  text-align:center;
  box-shadow:0 8px 18px rgba(0,0,0,.2);
}

.manual-event-date strong{
  display:block;
  font-size:26px;
  line-height:1;
}

.manual-event-date span{
  display:block;
  font-size:13px;
  font-weight:800;
  text-transform:uppercase;
  margin-top:3px;
}

.manual-event-body{
  padding:20px;
}

.manual-event-meta{
  color:var(--muted);
  font-size:14px;
  font-weight:700;
  margin-bottom:8px;
}

.manual-event-body h3{
  margin:0 0 10px;
  color:var(--red);
  font-size:24px;
  line-height:1.2;
}

.manual-event-body h3 a{
  text-decoration:none;
}

.manual-event-body p{
  margin:0 0 14px;
  color:#333;
}

.manual-event-bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.manual-event-badge{
  display:inline-block;
  background:#eef6ff;
  color:#0b6bcb;
  border-radius:999px;
  padding:5px 10px;
  font-size:12px;
  font-weight:800;
}

.manual-event-link{
  color:#0b4d3c;
  font-weight:800;
  text-decoration:none;
}

.manual-event-link:hover{
  text-decoration:underline;
}

.manual-event-empty{
  background:#fff;
  border:1px solid #eee1d2;
  border-radius:18px;
  padding:24px;
  text-align:center;
  grid-column:1/-1;
}

.manual-event-detail-card{
  padding:0;
  overflow:hidden;
  max-width:850px;
  text-align:center;
}

.manual-detail-hero{
  height:auto;
  background:#fff;
  overflow:visible;
}

.manual-detail-hero img{
  width:100%;
  height:auto;
  object-fit:contain;
  display:block;
}

.manual-detail-content{
  padding:28px;
}

.manual-detail-content h2{
  color:var(--red);
  font-size:36px;
  margin:6px 0 10px;
}

.manual-detail-location{
  color:#333;
}

.event-btn{
  background:#0b4d3c;
  color:#fff;
}

@media(max-width:700px){
  .manual-events-toolbar{
    justify-content:center;
    text-align:center;
  }
  .manual-event-card{
    text-align:center;
  }
  .manual-event-bottom{
    justify-content:center;
  }
  .manual-detail-hero{
    height:auto;
  }
  .manual-detail-content h2{
    font-size:28px;
  }
}


/* Range date display fixes for manual event cards */
.manual-event-meta{
  line-height:1.45;
}

.manual-event-image img{
  background:#7f1016;
}

.manual-event-date{
  z-index:2;
}

.manual-event-card{
  overflow:hidden;
}


/* Event listing: show category banner instead of poster image */
.manual-event-card.no-list-image .manual-event-type-banner{
  display:block;
  position:relative;
  min-height:150px;
  text-decoration:none;
  overflow:hidden;
  border-radius:0;
}

.manual-event-type-banner{
  background:#0b4d3c;
}

.manual-event-type-banner.type-majlis,
.manual-event-type-banner.type-aza,
.manual-event-type-banner.type-majlis-e-aza{
  background:linear-gradient(135deg,#050505,#151515);
}

.manual-event-type-banner.type-milad,
.manual-event-type-banner.type-wiladat,
.manual-event-type-banner.type-community,
.manual-event-type-banner.type-important{
  background:linear-gradient(135deg,#0b4d3c,#126b55);
}

.manual-event-type-banner.type-shahadat{
  background:linear-gradient(135deg,#050505,#7f1016);
}

.manual-event-type-label{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  color:#fff;
  font-size:34px;
  font-weight:900;
  letter-spacing:.3px;
  text-align:center;
}

.manual-event-type-label::after{
  content:"";
  position:absolute;
  width:110px;
  height:3px;
  background:rgba(255,255,255,.65);
  bottom:36px;
  border-radius:999px;
}

.manual-event-card.no-list-image .manual-event-date{
  z-index:3;
}

.manual-event-card.no-list-image .manual-event-image{
  display:none;
}

@media(max-width:700px){
  .manual-event-type-label{
    font-size:28px;
  }
  .manual-event-card.no-list-image .manual-event-type-banner{
    min-height:135px;
  }
}


/* Prayer Day / Month / Year Views */
.prayer-views-card{
  max-width:1000px;
}

.prayer-tabs{
  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  margin:22px 0;
}

.prayer-tab{
  border:1px solid #d8cab9;
  background:#fff;
  color:#111;
  padding:10px 16px;
  border-radius:999px;
  font-weight:800;
  cursor:pointer;
}

.prayer-tab.active{
  background:#0b4d3c;
  color:#fff;
  border-color:#0b4d3c;
}

.prayer-view{
  display:none;
}

.prayer-view.active{
  display:block;
}

.prayer-day-card{
  background:#fffaf0;
  border:1px solid #eee1d2;
  border-radius:18px;
  padding:20px;
}

.prayer-day-card h3{
  margin:0 0 4px;
  color:#0b4d3c;
  font-size:28px;
}

.prayer-day-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(120px, 1fr));
  gap:12px;
  margin-top:18px;
}

.prayer-time-box{
  background:#fff;
  border:1px solid #eee1d2;
  border-radius:14px;
  padding:14px 10px;
}

.prayer-time-box span{
  display:block;
  color:#6b7280;
  font-size:14px;
  margin-bottom:4px;
}

.prayer-time-box strong{
  color:#0b4d3c;
  font-size:24px;
}

.prayer-month-title{
  background:#0b4d3c;
  color:#fff;
  padding:10px;
  border-radius:8px;
  margin:14px 0;
}

.table-scroll{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.prayer-view-table{
  min-width:760px;
}

.prayer-view-table th{
  background:#fffaf0;
  color:#111;
  font-weight:800;
}

.prayer-view-table td,
.prayer-view-table th{
  text-align:center;
  white-space:nowrap;
}

@media(max-width:700px){
  .prayer-day-grid{
    grid-template-columns:repeat(2, 1fr);
  }
  .prayer-tab{
    padding:9px 12px;
    font-size:14px;
  }
}

/* Support / Donation Page */
.language-switcher{display:flex;justify-content:center;gap:8px;margin-top:18px}
.language-switcher button{border:1px solid rgba(255,255,255,.55);background:rgba(255,255,255,.12);color:#fff;border-radius:999px;padding:8px 14px;font-weight:800;cursor:pointer}
.language-switcher button.active{background:#fff;color:#7f1016}
.support-section .card{text-align:center}
.support-intro{max-width:850px;margin:0 auto 24px}
.support-amount{display:inline-block;background:#7f1016;color:#fff;border-radius:999px;padding:10px 22px;font-size:28px;font-weight:900;margin:10px 0 0}
.support-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:22px;margin:24px auto;max-width:900px}
.support-card{background:#fff;border:1px solid #eee1d2;border-radius:20px;padding:26px 20px;box-shadow:0 10px 28px rgba(0,0,0,.08);text-align:center}
.support-card-icon{width:70px;height:70px;border-radius:18px;display:flex;align-items:center;justify-content:center;background:#0b4d3c;color:#fff;font-size:34px;margin:0 auto 14px}
.support-card h3{color:#a71920;font-size:26px;margin:0 0 8px}
.payment-number{font-size:30px;font-weight:900;color:#0b4d3c;margin:16px 0;letter-spacing:.5px}
.copy-btn{background:#7f1016;color:#fff;border:0;border-radius:999px;padding:11px 18px;font-weight:800;cursor:pointer}
.support-note{max-width:850px;margin:24px auto}.support-note h3{color:#a71920}
.poster-card{max-width:720px;margin:24px auto}.poster-card img{width:100%;height:auto;display:block;border-radius:14px;border:1px solid #eee1d2}
@media(max-width:700px){.payment-number{font-size:24px}.support-amount{font-size:24px}}


/* Full-site English/Norsk language switcher */
.site-language{
  display:flex;
  gap:6px;
  align-items:center;
  justify-content:center;
  margin-left:12px;
}

.site-language button{
  border:1px solid #d8cab9;
  background:#fff;
  color:#7f1016;
  border-radius:999px;
  padding:5px 9px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}

.site-language button.active{
  background:#7f1016;
  color:#fff;
  border-color:#7f1016;
}

@media(max-width:800px){
  .site-language{
    width:100%;
    margin-left:0;
    margin-top:6px;
  }
}


/* Single global language switcher */
.language-switcher{display:none !important;}
.site-language{
  display:flex;
  gap:6px;
  align-items:center;
  justify-content:center;
  margin-left:14px;
}
.site-language button{
  border:1px solid #d8cab9;
  background:#fff;
  color:#7f1016;
  border-radius:999px;
  padding:6px 11px;
  font-size:13px;
  font-weight:900;
  cursor:pointer;
}
.site-language button.active{
  background:#7f1016;
  color:#fff;
  border-color:#7f1016;
}

/* Tauheed-inspired Support Payment Design */
.support-amount-wrap{
  display:inline-flex;
  flex-direction:column;
  gap:4px;
  align-items:center;
  margin-top:12px;
}
.support-amount-wrap span{color:#6b7280;font-weight:700;}
.support-amount-wrap strong{
  background:#7f1016;
  color:#fff;
  border-radius:999px;
  padding:9px 22px;
  font-size:26px;
}
.payment-step{
  max-width:980px;
  margin:34px auto;
  text-align:left;
}
.payment-step-title{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:18px;
}
.payment-step-title h2{
  margin:0;
  font-size:34px;
  color:#111827;
}
.step-number{
  width:54px;
  height:54px;
  border-radius:12px;
  color:#fff;
  font-weight:900;
  font-size:23px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.step-number.orange{background:linear-gradient(135deg,#ff7a1a,#f23b3b);}
.step-number.blue{background:linear-gradient(135deg,#2f80ed,#6c63ff);}
.step-icon{
  font-size:30px;
  color:#0b6bcb;
}
.vipps-box{
  background:#fff8f0;
  border:1px solid #ffc78f;
  border-radius:16px;
  padding:28px;
}
.vipps-box p{
  font-size:20px;
  margin:0 0 18px;
}
.vipps-number{
  background:linear-gradient(135deg,#ff7a1a,#f23b3b);
  color:#fff;
  border:0;
  border-radius:10px;
  padding:15px 28px;
  font-size:21px;
  font-weight:900;
  box-shadow:0 8px 18px rgba(242,59,59,.24);
  cursor:pointer;
}
.payment-note{
  margin-top:18px !important;
  color:#7a4a16;
  font-size:15px !important;
}
.payment-divider{
  height:1px;
  background:#ddd;
  max-width:980px;
  margin:42px auto;
}
.bank-box{
  background:#eef6ff;
  border:1px solid #b9d8ff;
  border-radius:16px;
  padding:28px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
}
.bank-field span{
  display:block;
  color:#4b5563;
  font-size:17px;
  margin-bottom:6px;
}
.bank-field strong{
  display:block;
  font-size:24px;
  color:#111827;
}
.bank-field:nth-child(3){
  grid-column:1 / -1;
}
.small-copy{
  margin-top:10px;
  background:#0b4d3c;
  color:#fff;
  border:0;
  border-radius:999px;
  padding:8px 13px;
  font-weight:800;
  cursor:pointer;
}
.bank-preferred{
  text-align:center;
  color:#0b4d3c;
  font-weight:800;
  margin-top:16px;
}
.support-cards{display:none !important;}

@media(max-width:800px){
  .site-language{
    width:100%;
    margin-left:0;
    margin-top:8px;
  }
  .payment-step{text-align:center;}
  .payment-step-title{
    justify-content:center;
    flex-wrap:wrap;
  }
  .payment-step-title h2{
    font-size:28px;
  }
  .bank-box{
    grid-template-columns:1fr;
    text-align:center;
  }
}
