/* =========================
   MDINTY — Home (index) Styles
   Final version (no bricolage)
   ========================= */

:root{
  --bg: #f2f6ff;
  --surface: rgba(255,255,255,0.82);
  --card: rgba(255,255,255,0.92);

  --text: #0f172a;
  --muted: #64748b;

  --shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 14px 30px rgba(15,23,42,0.08);

  --radius: 26px;

  --blue-soft: #eaf2ff;
  --blue-line: #d7e6ff;

  --sand-soft: #fff0d9;
  --sand-line: #ffe2b6;

  --btn: #eaf2ff;
  --btn-text:#2563eb;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:'Inter', sans-serif;
  color:var(--text);
  background:
    radial-gradient(1100px 520px at 18% 10%, #dbeafe 0%, transparent 60%),
    radial-gradient(900px 520px at 88% 18%, #fff7ed 0%, transparent 55%),
    var(--bg);
}

/* Main frame */
.container{
  width:min(420px, 92vw);
  margin:18px auto;
  padding:14px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.55);
  max-width:100%;
  overflow:hidden;
}

/* =========================
   Header (logo left, title centered)
   ========================= */
.header{
  position: relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 10px 14px;
}

.app-title{
  margin:0;
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;

  /* Center title like screenshot */
  position:absolute;
  left:50%;
  transform: translateX(-50%);
  text-align:center;
  width: 60%;
  pointer-events:none;
}

.app-logo-wrap{
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: rgba(255,255,255,0.85);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
  border: 1px solid rgba(15,23,42,0.06);
}

.app-logo{
  width: 34px;
  height: 34px;
  object-fit: contain;
}

/* =========================
   Links + base cards
   ========================= */
.card-link{
  display:block;
  width:100%;
  max-width:100%;
  text-decoration:none;
  color:inherit;
}

.card{
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15,23,42,0.06);
  max-width:100%;
  overflow:hidden;
}

/* Main layout */
.home{
  display:grid;
  gap: 14px;
  padding: 0 6px 22px;
  max-width:100%;
  overflow:hidden;
}

/* =========================
   Top grid (Prayer + Weather)
   ========================= */
.top-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width:100%;
}

/* Keep weather on LEFT like mock (even RTL) */
.weather-card{ order: 1; }
.prayer-card{ order: 2; }

.weather-card,
.prayer-card{
  width:100%;
  min-width:0;
}

/* Card head */
.card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 10px;
}

.head-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.head-ico{ font-size: 20px; }

.card-h2{
  margin:0;
  font-size: 15px;
  font-weight: 900;
}

.pill{
  font-size: 12px;
  font-weight: 900;
  color: var(--btn-text);
  background: var(--btn);
  border: 1px solid rgba(37,99,235,0.12);
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

/* =========================
   Flat style inside Weather + Prayer
   ========================= */
.weather-card{
  background: var(--blue-soft);
  border: 1px solid rgba(37,99,235,0.10);
}

.prayer-card{
  background: var(--sand-soft);
  border: 1px solid rgba(245,158,11,0.16);
}

/* disable any .inner inside those 2 cards */
.weather-card .inner,
.prayer-card .inner{
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Weather flat layout (matches your HTML: w-flat / w-left / w-stats) */
.w-flat{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  width:100%;
}

.w-left{ min-width:0; }

.w-icon{
  font-size: 28px;
  line-height: 1;
  margin-bottom: 6px;
}

.w-temp{
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 2px;
}

.w-desc{
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.w-stats{
  display:flex;
  flex-direction:column;
  gap:8px;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  min-width:0;
  max-width:100%;
  text-align:left; /* keep icons/text aligned */
}

.stat{
  display:flex;
  align-items:center;
  gap:8px;
  padding:0;
  white-space: nowrap;
  min-width:0;
}

.s-ico{ font-size: 14px; }

/* Prayer head tweaks (mosque icon + title) */
.prayer-head{ margin-bottom: 10px; }

.prayer-title{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  gap:10px;
  min-width:0;
}

.mosque-ico{
  font-size: 22px;
  line-height: 1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}

/* Prayer body */
.p-remaining{
  margin-top:8px;
  font-size:13px;
  font-weight:900;
  color:#0f172a;
}

.p-next{
  margin:0;
  font-size: 13px;
  font-weight: 900;
  color: #334155;
}

/* =========================
   Pharmacy banner (same as screenshot)
   ========================= */
.pharmacy-banner{
  padding: 18px 16px;
}

.pharmacy-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  width:100%;
  text-decoration:none;
  color:inherit;
}

.ph-ico-wrap{
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #eaf2ff;
  border: 1px solid rgba(37,99,235,0.10);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 10px 18px rgba(15,23,42,0.06);
  flex: 0 0 auto;
}

.ph-emoji{
  font-size: 28px;
  line-height: 1;
}

.ph-title{
  margin:0;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

/* You used this class in HTML */
.ph-title-center{
  flex: 1;
  text-align: center;
}

/* =========================
   News card
   ========================= */
.news-card{
  padding: 16px;
}

.news-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.news-title{
  margin:0;
  font-size: 16px;
  font-weight: 900;
}

/* List */
.news-list{
  list-style:none;
  padding:0;
  margin:0;
  max-height: 240px;
  overflow:auto;
}

.news-list li{
  padding: 12px 0;
  border-bottom: 1px solid rgba(15,23,42,0.07);
  font-size: 13px;
  line-height: 1.8;
  font-weight: 800;
  color: #0f172a;
}

.news-list li:last-child{ border-bottom: none; }

/* If titles are links (blue & underlined like screenshot) */
.news-list a{
  color: #2563eb;
  text-decoration: underline;
  font-weight: 900;
}
.news-list a:hover{
  filter: brightness(0.92);
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 360px){
  .app-title{ font-size: 40px; }
  .ph-title{ font-size: 26px; }
  .top-grid{ grid-template-columns: 1fr; }
  .weather-card, .prayer-card{ order: unset; }
}
