/* ==========================================================================
   Masjid Theme — Modern Boxed Layout
   Responsive · Professional · Mobile-first
   ========================================================================== */

/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --green-700: #155d30;
  --green-600: #1d7a40;
  --green-500: #24964e;
  --green-400: #34b865;
  --green-100: #e8f7ee;
  --green-50:  #f2fbf5;

  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;

  --gold:     #c89b3c;
  --gold-bg:  #fdf8ee;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 4px 16px rgba(0,0,0,.09), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.07);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --box-width: 1200px;
  --box-pad:   clamp(16px, 4vw, 32px);

  --header-h:  64px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --trans:     .22s ease;
}

/* ── Reset / Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--gray-800);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-600); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--green-700); }

img { max-width: 100%; display: block; }

h1,h2,h3,h4,h5,h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--gray-900);
  margin: 0 0 .75rem;
}

p { margin: 0 0 1rem; }

/* ── Boxed container ────────────────────────────────────────────────────── */
.tq-container {
  width: 100%;
  max-width: var(--box-width);
  margin-inline: auto;
  padding-inline: var(--box-pad);
}

/* ── Section spacing ────────────────────────────────────────────────────── */
.tq-section {
  padding-block: clamp(40px, 6vw, 80px);
}

.tq-section-sm {
  padding-block: clamp(24px, 4vw, 48px);
}

.tq-section-title {
  text-align: center;
  margin-bottom: clamp(24px, 4vw, 48px);
}

.tq-section-title .eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green-600);
  background: var(--green-100);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 12px;
}

.tq-section-title h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: .5rem;
}

.tq-section-title p {
  color: var(--gray-600);
  max-width: 560px;
  margin-inline: auto;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
#tq-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow var(--trans);
}

#tq-header.scrolled {
  box-shadow: var(--shadow);
}

.tq-header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo */
.tq-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.tq-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}

.tq-logo-initials {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--green-600);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tq-logo-text {
  max-width: 200px;
}

.tq-logo-text strong {
  display: block;
  font-size: .88rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tq-logo-text small {
  font-size: .7rem;
  color: var(--gray-500);
  font-weight: 400;
}

/* Desktop nav */
.tq-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.tq-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.tq-nav-list > li {
  position: relative;
}

.tq-nav-list > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: .83rem;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  transition: color var(--trans), background var(--trans);
  white-space: nowrap;
}

.tq-nav-list > li > a:hover,
.tq-nav-list > li.active > a {
  color: var(--green-600);
  background: var(--green-50);
}

.tq-nav-list > li > a svg {
  transition: transform var(--trans);
  opacity: .6;
}

.tq-nav-list > li:hover > a svg {
  transform: rotate(180deg);
  opacity: 1;
}

/* Dropdown */
.tq-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 190px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 6px 6px; /* top padding bridges the gap so hover doesn't break */
  z-index: 200;
}

.tq-nav-list > li:hover .tq-dropdown,
.tq-nav-list > li.tq-open .tq-dropdown {
  display: block;
  animation: fadeDown .16s ease;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tq-dropdown a {
  display: block;
  padding: 8px 14px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  transition: color var(--trans), background var(--trans);
}

.tq-dropdown a:hover {
  color: var(--green-600);
  background: var(--green-50);
}

/* Mobile hamburger */
.tq-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-left: auto;
  transition: border-color var(--trans);
}

.tq-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 99px;
  transition: all var(--trans);
}

.tq-hamburger:hover { border-color: var(--green-500); }
.tq-hamburger:hover span { background: var(--green-600); }

/* Mobile menu */
#tq-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0,0,0,.45);
}

#tq-mobile-menu.open { display: block; }

.tq-mobile-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: #fff;
  overflow-y: auto;
  padding: 0;
  box-shadow: var(--shadow-lg);
  animation: slideLeft .22s ease;
}

@keyframes slideLeft {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.tq-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}

.tq-mobile-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--gray-500);
  line-height: 1;
  padding: 4px;
}

.tq-mobile-nav { padding: 12px 0; }

.tq-mobile-nav a {
  display: block;
  padding: 11px 20px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-100);
  transition: color var(--trans), background var(--trans);
}

.tq-mobile-nav a:hover {
  color: var(--green-600);
  background: var(--green-50);
}

.tq-mobile-nav .tq-sub-link {
  padding-left: 36px;
  font-size: .84rem;
  color: var(--gray-600);
  background: var(--gray-50);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.tq-hero {
  position: relative;
  min-height: clamp(320px, 55vw, 540px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--green-700);
}

.tq-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.tq-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10,30,18,.88) 0%,
    rgba(10,30,18,.55) 40%,
    rgba(10,30,18,.22) 80%,
    transparent 100%
  );
}

.tq-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 48px var(--box-pad) clamp(32px,5vw,60px);
  max-width: var(--box-width);
  margin-inline: auto;
}

.tq-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 16px;
}

.tq-hero-title {
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
  margin-bottom: 12px;
  max-width: 700px;
}

.tq-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.tq-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: rgba(255,255,255,.82);
}

.tq-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.tq-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .85rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--trans);
  text-decoration: none;
  white-space: nowrap;
}

.tq-btn-primary {
  background: var(--green-500);
  color: #fff;
  border-color: var(--green-500);
}

.tq-btn-primary:hover {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(29,122,64,.35);
}

.tq-btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.55);
}

.tq-btn-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: #fff;
  color: #fff;
}

.tq-btn-sm {
  font-size: .78rem;
  padding: 7px 16px;
}

/* ── Prayer time strip ───────────────────────────────────────────────────── */
.tq-prayer-strip {
  background: var(--green-700);
  color: #fff;
  padding: 14px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tq-prayer-strip::-webkit-scrollbar { display: none; }

.tq-prayer-list {
  display: flex;
  gap: 2px;
  min-width: max-content;
}

.tq-prayer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  transition: background var(--trans);
  cursor: default;
}

.tq-prayer-item.active {
  background: rgba(255,255,255,.18);
}

.tq-prayer-name {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .75;
  margin-bottom: 2px;
}

.tq-prayer-time {
  font-size: 1rem;
  font-weight: 700;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.tq-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--trans), transform var(--trans);
}

.tq-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.tq-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.tq-card-body {
  padding: 18px 20px;
}

.tq-card-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 8px;
}

.tq-card h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tq-card p {
  font-size: .82rem;
  color: var(--gray-600);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tq-card-meta {
  font-size: .74rem;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Grid layouts ────────────────────────────────────────────────────────── */
.tq-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tq-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tq-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .tq-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .tq-grid-3 { grid-template-columns: 1fr; }
  .tq-grid-2 { grid-template-columns: 1fr; }
  .tq-grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (max-width: 480px) {
  .tq-grid-4 { grid-template-columns: 1fr; }
}

/* ── Stat / info boxes ───────────────────────────────────────────────────── */
.tq-stat-box {
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.tq-stat-box .num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--green-600);
  line-height: 1;
  margin-bottom: 4px;
}

.tq-stat-box .lbl {
  font-size: .78rem;
  color: var(--gray-600);
  font-weight: 500;
}

/* ── Feature list ────────────────────────────────────────────────────────── */
.tq-feature-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  transition: background var(--trans);
}

.tq-feature-item:hover {
  background: var(--green-50);
}

.tq-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--green-100);
  color: var(--green-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.tq-feature-item h4 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.tq-feature-item p {
  font-size: .82rem;
  color: var(--gray-600);
  margin: 0;
}

/* ── Quran/Hadith quote box ──────────────────────────────────────────────── */
.tq-quote {
  background: var(--gold-bg);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
}

.tq-quote-text {
  font-size: .95rem;
  font-style: italic;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.tq-quote-source {
  font-size: .78rem;
  font-weight: 600;
  color: var(--gold);
}

/* ── Page header (inner pages) ───────────────────────────────────────────── */
.tq-page-header {
  background: linear-gradient(135deg, var(--green-700) 0%, var(--green-500) 100%);
  padding: clamp(32px, 5vw, 60px) 0;
  color: #fff;
}

.tq-page-header h1 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: #fff;
  margin-bottom: 8px;
}

.tq-page-header p {
  color: rgba(255,255,255,.8);
  margin: 0;
}

/* Breadcrumb */
.tq-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: .78rem;
  color: rgba(255,255,255,.7);
  margin-bottom: 12px;
}

.tq-breadcrumb a { color: rgba(255,255,255,.7); }
.tq-breadcrumb a:hover { color: #fff; }
.tq-breadcrumb span { opacity: .5; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
#tq-footer {
  background: var(--gray-900);
  color: var(--gray-400);
}

.tq-footer-top {
  padding: clamp(40px, 6vw, 72px) 0 clamp(32px, 5vw, 56px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.tq-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
}

.tq-footer-brand .tq-logo-text strong,
.tq-footer-brand .tq-logo-text small {
  color: #fff;
}

.tq-footer-desc {
  font-size: .82rem;
  line-height: 1.7;
  margin: 16px 0 20px;
  color: var(--gray-500);
}

.tq-footer-social {
  display: flex;
  gap: 8px;
}

.tq-footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  transition: background var(--trans), color var(--trans);
}

.tq-footer-social a:hover {
  background: var(--green-600);
  color: #fff;
}

.tq-footer-col h5 {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}

.tq-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tq-footer-links a {
  font-size: .82rem;
  color: var(--gray-500);
  transition: color var(--trans);
}

.tq-footer-links a:hover { color: var(--green-400); }

.tq-footer-address {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tq-footer-address-item {
  display: flex;
  gap: 10px;
  font-size: .82rem;
  color: var(--gray-500);
}

.tq-footer-address-item i {
  color: var(--green-500);
  flex-shrink: 0;
  margin-top: 2px;
}

.tq-footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .75rem;
  color: var(--gray-600);
}

.tq-footer-bottom a {
  color: var(--gray-500);
}

.tq-footer-bottom a:hover { color: var(--green-400); }

.tq-powered {
  display: flex;
  align-items: center;
  gap: 5px;
}

.tq-powered img {
  height: 16px;
}

/* ── Mobile header ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .tq-nav { display: none; }
  .tq-hamburger { display: flex; }
}

/* ── Footer responsive ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .tq-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .tq-footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 540px) {
  .tq-footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Utilities ───────────────────────────────────────────────────────────── */
.tq-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0;
  border: none;
}

.tq-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--green-100);
  color: var(--green-700);
}

.tq-badge-gold {
  background: var(--gold-bg);
  color: var(--gold);
}

.text-green { color: var(--green-600); }
.bg-green-light { background: var(--green-50); }

/* ── Main content offset (sticky header) ────────────────────────────────── */
body { padding-top: 0; }

/* ── Inner page content padding ─────────────────────────────────────────── */
.tq-page-content {
  padding-block: clamp(32px, 5vw, 64px);
}

/* ── Pagination override ─────────────────────────────────────────────────── */
.tq-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 32px;
}

.tq-pagination a,
.tq-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 600;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  transition: all var(--trans);
}

.tq-pagination a:hover,
.tq-pagination span.active {
  background: var(--green-600);
  border-color: var(--green-600);
  color: #fff;
}

/* ── Print / accessibility ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
