html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
/* ----------------------------------- */


.display-option {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.display-option.active {
    display: flex !important;
    animation: fadeIn 0.5s ease-in-out;
} 

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.digital-clock, .weather-widget {
    padding: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
}

#current-time {
    font-size: 2.5em;
    font-weight: bold;
    margin-top: 10px;
}

.weather-info {
    margin-top: 10px;
}

.temperature {
    font-size: 2.5em;
    font-weight: bold;
}

.condition {
    font-size: 1.2em;
    margin-top: 5px;
}

/* ---------------------Row One column for Date------------------------ */
.date-name-wrapper {
  min-height: 100px;
  color: #0e054a;
}

/* Left Section */
.left-info {
  flex: 1;
  text-align: left;
}

.gregorian-date{
  font-size: clamp(1.4rem, 2.6vw, 4.2rem);
  color: #000;
  line-height: 1.2;
  font-weight: 600;
}

.hijri-date {
  font-family: 'me_quran';
  color: #000;
  font-size: clamp(1.2rem, 2.5vw, 3.5rem);
  font-weight: 600;
  margin-top: 4px;
}
.hijri-keyword {
  font-family: 'me_quran';
  color: #000;
  font-size: clamp(0.8rem, 1.5vw, 2.0rem);
  font-weight: 400;
}

.hijri-date span {
  margin: 0 3px;
}

.hijri-weekday {
  font-weight: 600;
}

.hijri-year {
  font-weight: 700;
}


/* Right Section */
.right-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
}

.logo-img {
    height: clamp(100px, 10vw, 115px);
    width:  clamp(100px, 10vw, 115px);
  object-fit: contain;
  /* filter: brightness(0) invert(0); */
}


/* --------------------------------------------- */

/* Row Option Styles */
.row-option {
    display: none;
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.row-option.active {
    display: block;
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.full-row-content {
    width: 100%;
    height: 100%;
    padding: 5px 2px;
}

/* --------------------------------------------- */
.arabic-text {
    font-family: 'me_quran','qpc-nastaleeq';
    font-size: clamp(1.8rem, 2.5vw, 4.2rem);
    line-height: 2.2;
    color: #000000;
    text-align: right;
    direction: rtl;
    margin-right: 2px;
    padding-right: 5px;
    background: rgba(44, 94, 52, 0.05);
    border-radius: 10px;
    border-right: 2px solid #2c5e34;
}

.arabic-bismillah {
    font-family: 'me_quran','qpc-nastaleeq';
    font-size: clamp(0.5rem, 1.5vw, 2.2rem);
    line-height: 1.2;
    color: #000000;
    direction: rtl;
    text-align: center;
    margin-bottom: 0.4em;
}

/* NEW: verse text + end symbol stay together */
.quran-verse-line {
    direction: rtl;
    text-align: right;
    display: block;
    unicode-bidi: plaintext;
}

#quranVerseText {
    display: inline;
}

.verse-end-symbol {
    font-family: 'KFGQPC Uthman Taha Naskh', 'Traditional Arabic', serif;
    font-size: clamp(2.5rem, 2.5vw, 4.2rem);
    color: #000000;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.18em;   /* RTL spacing before symbol */
    white-space: nowrap;    /* keep symbol + number together */
    line-height: 1;
}

.verse-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.5em;
    color: #000000;
    font-family: Arial, sans-serif;
    line-height: 1;
}

.sura-name-text {
    font-family: 'surah-name', serif;
    font-size: clamp(1.0rem, 2.5vw, 1.2rem);
    color: #000000;
    display: block;
    text-align: center;
    margin-top: 0.5rem;
}

.sura-english-text {
    font-size: clamp(2.2rem, 2.5vw, 3.2rem);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #000000;
    text-align: center;
    direction: ltr;
    display: block;
    margin-top: 0.35rem;
}

.hadith-text {
    font-family: 'me_quran','qpc-nastaleeq';
    font-size: clamp(1.8rem, 2.5vw, 4.2rem);
    text-align: center;
    direction: rtl;
    line-height: 1.8;
    padding: 20px 40px;
}

.hadith-label {
    text-align: center;
    direction: ltr;
    font-size: clamp(1.2rem, 1.8vw, 2rem);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 600;
    opacity: .7;
    margin-bottom: 18px;
}

.hadith-translation {
    direction: ltr;
    font-size: clamp(2.2rem, 2.5vw, 3.2rem);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    text-align: center;
    margin-top: 22px;
    opacity: .85;
}

.hadith-reference {
    margin-top: 16px;
    font-size: clamp(.9rem, 1.2vw, 1.4rem);
    opacity: .65;
}
/* --------------------------------------------- */
.container-fluid {
  padding: 0;
  margin: 0;
}

.margin-top-20 {
  margin-top: 20px;
}

/* ==========================================================
   DESKTOP — Row structure
   ========================================================== */
.row-1 { height: 15vh; }
.row-2 { height: 76vh; }
.row-3 { height: 9vh; }

.row {
  margin: 0 !important;
  width: 100%;
  display: flex;
}

/* Ensure columns have proper height */
.row > .col {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* For row-2 only, override column widths */
.row-2 .row > .col-md-6:first-child {
  flex: 0 0 40%;
  max-width: 40%;
}

.row-2 .row > .col-md-6:last-child {
  flex: 0 0 60%;
  max-width: 60%;
}

/* Ensure mobile view still stacks at 100% */
@media (max-width: 767.98px) {
  .row-2 .row > .col-md-6:first-child,
  .row-2 .row > .col-md-6:last-child {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ==========================================================
   MOBILE RESPONSIVE ADJUSTMENTS
   ========================================================== */

@media (max-width: 767px) {
  /* HEIGHT FIX — Rows must auto-expand */
  .row-1,
  .row-2,
  .row-3 {
    height: auto !important;
    min-height: auto !important;
  }

  /* Row becomes vertical stack */
  .row {
    margin: 0 !important;
    flex-direction: column !important;
    height: auto !important;
  }

  /* Columns become full-width */
  .row > .col,
  .col-12,
  .col-md-6 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    height: auto !important;
  }
}

/* ==========================================================
   TABLE CONTAINER - WORKING SOLUTION
   ========================================================== */

/* Wrapper */
.table-container-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Table container - IMPORTANT: Override inline styles with !important */
.table-container {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  transition: opacity 0.6s ease !important;
  z-index: 1;
  display: block !important;
}

/* Active table - Override inline styles */
.table-container.active {
  opacity: 1 !important;
  z-index: 2;
}

/* Ensure tables fill their containers */
.english-table,
.arabic-table {
  width: 100%;
  height: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 0 !important;
  line-height: 1.2;
}

/* ==========================================================
   COLUMN WIDTHS — MATCH BOTH TABLES
   ========================================================== */

.english-table th:nth-child(1),
.english-table td:nth-child(1),
.arabic-table th:nth-child(3),
.arabic-table td:nth-child(3) {
  width: 40%;
}

.english-table th:nth-child(2),
.english-table td:nth-child(2),
.arabic-table th:nth-child(1),
.arabic-table td:nth-child(1) {
  width: 30%;
}

.english-table th:nth-child(3),
.english-table td:nth-child(3),
.arabic-table th:nth-child(2),
.arabic-table td:nth-child(2) {
  width: 30%;
}

.prayer-name-wrap { display: inline-block; }


.next-countdown{
  display: inline-block;
  font-size: clamp(1.0rem, 2.8vw, 2.0rem) !important;
  font-weight: 700;
}

.next-countdown-friday{
   font-size: clamp(0.7rem, 1.8vw, 1.6rem) !important;
   font-weight: 600;
}
/* IMPORTANT: if parent is flex, allow the banner to grow */ 
.footer-ticker{
  width: 100%;
  overflow: hidden;
  padding: 10px 0;
}

/* viewport */
.ticker-track{
  overflow: hidden;
}

/* moving strip */
.ticker-inner{
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
  animation: ticker-ltr 40s linear infinite; /* adjust speed */
}

/* each message */
.ticker-msg{
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;

  font-size: 1.6rem;
  font-weight: 700;
  color: #0f0f0f;

  padding-inline: 80px; /* gap between repeats */
}

.ticker-icon{
  height: 80px;
  width: auto;
  margin: 0 10px;
  vertical-align: middle;
}

.ticker-icon-alert{
        height: 160px;
        margin: 10px auto auto auto;
      }
/* force a consistent scroll direction (right -> left) */
@keyframes ticker-ltr{
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* optional: smoother on some TVs/browsers */
@media (prefers-reduced-motion: reduce){
  .ticker-inner{ animation: none; }
}

.footer-item{
  text-align:center;
  padding:20px;
}

.hadith-title{
  font-size:1.5rem;
  font-weight:700;
  margin-bottom:10px;
}

.hadith-text,
.reminder-text,
.dua-text{
  font-size:1.3rem;
  font-weight:600;
}

.dua-translation{
  font-size:1rem;
  margin-top:8px;
  opacity:0.85;
}



/* ==========================================================
   UNIFIED FONT SYSTEM (EN + AR)
   ========================================================== */


.english-table th, .english-table td,
.arabic-table th, .arabic-table td {
  padding: clamp(0.1rem, 1vw, 0.25rem) !important;
  vertical-align: middle;
}

/* Prayer name */
.english-table td:nth-child(1),
.arabic-table td:nth-child(3) {
  font-size: clamp(1.2rem, 2.2vw, 2.8rem) !important;
  font-weight: 600;
  color: #000;
}

tr .friday-cell.prayer-name,
tr .friday-cell {
    font-size: clamp(2.5rem, 1.8vw, 3.0rem) !important;
    white-space: nowrap;
    font-weight: 600;
}
/* Time columns */
.english-table td:nth-child(2),
.english-table td:nth-child(3),
.arabic-table td:nth-child(1),
.arabic-table td:nth-child(2) {
  font-size: clamp(2.0rem, 2.8vw, 3.2rem) !important;
  font-weight: 700;
  color: #000;
  text-align: center !important;
}

/* Arabic specific font */
.arabic-table th:nth-child(1),
.arabic-table th:nth-child(2),
.arabic-table th:nth-child(3),
.arabic-table td:nth-child(3) {
  font-family: 'me_quran', serif;
}

/* Arabic specific font */
.arabic-table th:nth-child(3) {
  text-align: right !important;
}
.arabic-table th:nth-child(1),
.arabic-table th:nth-child(2) {
  text-align: center !important; 
}


/* English alignment */
.english-table td:nth-child(1) { text-align: left !important; }
.english-table td:nth-child(2),
.english-table td:nth-child(3) { text-align: center !important; }

/* Arabic alignment */
.arabic-table td:nth-child(1),
.arabic-table td:nth-child(2) { text-align: center !important; }
.arabic-table td:nth-child(3) { text-align: right !important; }

/* Table Headers */
.english-table thead th,
.arabic-table thead th {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 700;
  color: #000;
  padding: clamp(0.2rem, 1vw, 0.3rem) !important;
}
   /* ==========================================================
   HEADER TOP & BOTTOM LINES
   ========================================================== */

.english-table thead,
.arabic-table thead {
  border-top: 2px solid rgba(0,0,0,0.25);
  border-bottom: 0.5px solid rgba(0,0,0,0.25);
}

/* Row bottom lines */
.english-table tbody td,
.arabic-table tbody td {
  position: relative;
}

.english-table tbody td::after,
.arabic-table tbody td::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 1.5px;
  background: rgba(0,0,0,0.1);
  pointer-events: none;
}

/* Remove line on last row */
.english-table tbody tr:last-child td::after,
.arabic-table tbody tr:last-child td::after {
  display: none;
}

/* ==========================================================
   ACTIVE ROW – CURVED + 3D
   ========================================================== */

.prayer-active { border-left: none !important; }

.prayer-active td {
  background: linear-gradient(135deg, rgba(255,245,215,0.95), rgba(255,220,150,0.85)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65),
              inset 0 -2px 4px rgba(0,0,0,0.06);
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.14));
  padding-top: 3px !important;
  padding-bottom: 3px !important;
  text-shadow: 0 0 4px rgba(255,180,80,0.25);
}

.prayer-active td:first-child {
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
  box-shadow: inset 4px 0 0 rgba(121,255,188,0.9),
              inset 0 1px 0 rgba(255,255,255,0.65),
              inset 0 -2px 4px rgba(0,0,0,0.06);
}

.prayer-active td:last-child {
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

.prayer-active td::after { display: none !important; }



/* ==========================================================
   Tomorrow Tag and reduce row font
   ========================================================== */
.prayer-name-wrap-ar { direction: rtl; }
.tomorrow-tag-ar { font-weight: 600; }


/* Slightly shrink text only for rows that show Tomorrow tag */
.tomorrow-row .prayer-title{
  font-size: clamp(1.0rem, 2.0vw, 2.0rem) !important;
  margin-bottom : 10px !important;
}

/* Shrink the time columns a touch as well (keeps row height stable) */
.tomorrow-row td:nth-child(2),
.tomorrow-row td:nth-child(3),
.arabic-table .tomorrow-row td:nth-child(1),
.arabic-table .tomorrow-row td:nth-child(2){
  font-size: clamp(1.5rem, 2.4vw, 2.5rem) !important;
}

.tomorrow-row{
  line-height: 0.5 !important;
  background-color: #fefefe;
}

/* Make the tag smaller/compact */
.tomorrow-row .tomorrow-tag{
  font-size: 0.7rem !important;
  padding: 5px 20px !important;
  line-height: 0.5;
  background-color: #ddf7e8;

  display: inline-block;
  border-radius: 999px;
  font-weight: 400;
}

/* ==========================================================
   MOBILE TABLE ADJUSTMENTS
   ========================================================== */
@media (max-width: 767.98px) {
  .table-container-wrapper {
    min-height: 300px;
    height: auto;
  }
  
  .table-container {
    position: relative !important;
    height: auto;
    min-height: 300px;
  }
  
  .english-table,
  .arabic-table {
    height: auto;
    min-height: 300px;
  }

  .english-table td:nth-child(1),
  .arabic-table td:nth-child(3) {
    font-size: clamp(1.1rem, 1.8vw, 1.6rem) !important;
  }

  .english-table td:nth-child(2),
  .english-table td:nth-child(3),
  .arabic-table td:nth-child(1),
  .arabic-table td:nth-child(2) {
    font-size: clamp(1.4rem, 2.0vw, 1.8rem) !important;
  }
}

/* ==========================================================
   CLOCK STYLES
   ========================================================== */

.clock {
    height: 18vh;
    font-size: clamp(20vh, 20vw, 26vh);
    line-height: 18.4vh;
    display: flex;
    position: relative;
    overflow: hidden;
    font-weight: 900;
}

.clock::before, .clock::after {
    content: '';
    width: 7ch;
    height: 2.5vh;
    background: linear-gradient(to top, transparent, rgb(255, 255, 255));
    position: absolute;
    z-index: 2;
}

.clock::after {
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgb(255, 255, 255));
}

.clock > div {
    display: flex;
}

.tick {
    line-height: 15vh;
}

.tick-hidden {
    opacity: 0;
}

.hours, .minutes, .seconds {
    position: relative;
}

.hours .first, .hours .second,
.minutes .first, .minutes .second,
.seconds .first, .seconds .second {
    position: relative;
    width: 1ch;
    height: 18vh;
    overflow: hidden;
}

.number {
    position: absolute;
    width: 100%;
    text-align: center;
    height: 18vh;
}

.number.old {
    z-index: 1;
}

.number.new {
    z-index: 3;
    transform: translateY(18vh);
}

.animating .number.old {
    animation: moveOld linear 0.5s forwards;
}

.animating .number.new {
    animation: moveNew linear 0.5s forwards;
}

@keyframes moveOld {
    from {
        transform: translateY(0vh);
    }
    to {
        transform: translateY(-18vh);
    }
}

@keyframes moveNew {
    from {
        transform: translateY(18vh);
    }
    to {
        transform: translateY(0vh);
    }
}

/* Date display */
.date-display {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  opacity: 0.9;
}

/* Progress overlay */
.table-container { position: relative; }

.table-progress-overlay .bar {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 8px;
  width: 0%;
  background: linear-gradient(90deg,#ffd27a,#ff8200);
  border-radius: 6px;
  transition: width 0.6s linear;
}

.table-progress-overlay {
    position: absolute;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 5;
    display: flex;
    align-items: flex-end;
    padding: 0;
}

.table-progress-overlay .progress {
    height: 20%;
    width: 100%;
    background: transparent !important;
    pointer-events: none;
}

.table-progress-overlay .progress-bar {
    opacity: 0.35;
}

/* When content is loaded dynamically, ensure it's visible */
.right-column-container .display-option {
    display: flex !important;
    opacity: 1 !important;
}

/* Dhuhr progress bar special styling */
.bg-warning.progress-bar {
  background-color: #ffc107 !important;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  ) !important;
  background-size: 1rem 1rem !important;
}

/* Make sure overlay doesn't interfere with clicks */
.table-progress-overlay {
  pointer-events: none;
  z-index: 1;
}

/* adhkar-after-salah */

.adhkar-list{
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

.adhkar-item{
  padding: 18px 22px;
  border-radius: 18px;
  background: rgba(0,0,0,0.04);
}

.adhkar-ar{
  font-size: clamp(1.8rem, 3.2vw, 3.6rem);
  font-weight: 700;
  direction: rtl;
  text-align: right;
}

.adhkar-en{
  margin-top: 8px;
  font-size: clamp(1.1rem, 1.6vw, 1.8rem);
  opacity: 0.8;
}

.adhkar-repeat{
  display: inline-block;
  margin-right: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.08);
  font-size: 0.8em;
}

.adhkar-ref{
  margin-top: 8px;
  font-size: 0.9em;
  opacity: 0.7;
}
