/* ===============================
   RESET & BASE
================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  margin: 0;
  padding: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #f4f6f8;
  direction: rtl;
  color: #222;
}

/* ===============================
   GRID LAYOUT
================================ */
#accordionContainer {
  display: grid;
  gap: 18px;
  align-items: start;
}

/* Desktop */
@media (min-width: 1200px) {
  #accordionContainer {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tablet landscape */
@media (min-width: 900px) and (max-width: 1199px) {
  #accordionContainer {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet portrait */
@media (min-width: 600px) and (max-width: 899px) {
  #accordionContainer {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 599px) {
  #accordionContainer {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   CARD
================================ */
.project-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

/* ===============================
   HEADER
================================ */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #f1f3f5;
  cursor: pointer;
  user-select: none;
}

.card-header:hover {
  background: #e9ecef;
}

.card-title {
  font-weight: 600;
  font-size: 0.95rem;
}

/* ===============================
   STATUS BADGES
================================ */
.card-status {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  color: #fff;
  white-space: nowrap;
}

.status-انجام‌شده {
  background: #2e7d32;
}

.status-در-حال-انجام {
  background: #f9a825;
}

.status-در-انتظار {
  background: #c62828;
}

/* fallback */
[class^="status-"]:not(.status-انجام‌شده):not(.status-در-حال-انجام):not(.status-در-انتظار) {
  background: #546e7a;
}

/* ===============================
   ACCORDION BODY
================================ */
.accordion-body {
  padding: 14px;
  background: #fafafa;
  overflow: hidden;
  transition: height 0.35s ease, opacity 0.25s ease;
}

/* ===============================
   COVER
================================ */
.card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.card-cover iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ===============================
   TABS
================================ */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.tab-btn {
  flex: 1;
  padding: 8px 6px;
  font-size: 0.8rem;
  border: none;
  border-radius: 10px;
  background: #e0e0e0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.tab-btn:hover {
  background: #d5d5d5;
}

.tab-btn.active {
  background: #1976d2;
  color: #fff;
}

/* ===============================
   TAB CONTENT
================================ */
.tab-content {
  display: none;
  font-size: 0.8rem;
  line-height: 1.9;
}

.tab-content.active {
  display: block;
}

.tab-content p {
  margin: 4px 0;
}

/* ===============================
   SLIDER
================================ */
.project-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
}

.slider-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.slider-item.active {
  opacity: 1;
}

.slider-item iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ===============================
   LINK IFRAME
================================ */
.fullscreen-btn {
  margin-bottom: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  border: none;
  border-radius: 8px;
  background: #1976d2;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.fullscreen-btn:hover {
  background: #1e88e5;
  transform: translateY(-1px);
}

.link-iframe {
  width: 100%;
  height: 280px;
  border: none;
  border-radius: 10px;
  background: #000;
}

/* ===============================
   FOOTER
================================ */
.project-footer {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #eee;
  font-size: 0.75rem;
  color: #777;
}

/* ===============================
   RELOAD BUTTON
================================ */
.reload-btn {
  appearance: none;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1976d2, #0d47a1);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(25, 118, 210, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 14px;
}

.reload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(25, 118, 210, 0.45);
}

.reload-btn:active {
  transform: translateY(0);
}

/* ===============================
   DARK MODE (READY)
================================ */
@media (prefers-color-scheme: dark) {
  body {
    background: #121212;
    color: #e0e0e0;
  }

  .project-card {
    background: #1e1e1e;
    border-color: #333;
  }

  .card-header {
    background: #2a2a2a;
  }

  .accordion-body {
    background: #1a1a1a;
  }

  .tab-btn {
    background: #333;
    color: #ddd;
  }

  .tab-btn.active {
    background: #2196f3;
  }
}
/* ===== Header ===== */
.app-header {
  margin-bottom: 18px;
}

.header-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

/* آیتم مشترک */
.header-item {
  display: flex;
  align-items: center;
}

/* لوگو */
.header-logo span {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

/* سرچ */
.header-search input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #ccc;
  font-size: 13px;
}

.header-search input:focus {
  outline: none;
  border-color: #1976d2;
}

/* اکشن‌ها */
.header-actions {
  gap: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .header-item {
    width: 100%;
  }

  .header-actions {
    justify-content: stretch;
  }
}
.header-search {
  display: flex;
  gap: 8px;
  width: 100%;
}

.header-search button {
  padding: 10px 14px;
  border-radius: 12px;
  border: none;
  background: #1976d2;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

.header-search button:hover {
  background: #1565c0;
}
.slider-fullscreen-btn {
  margin-bottom: 8px;
  padding: 6px 12px;
  font-size: 12px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.slider-fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.85);
}
/* ===== Slider Wrapper ===== */
.project-slider-wrapper {
  position: relative;
}

/* ===== Fullscreen Button (Overlay واقعی) ===== */
.slider-fullscreen-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 9999;

  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;

  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 16px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

/* hover */
.slider-fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}
/* ===== Cover Wrapper ===== */
.cover-wrapper {
  position: relative;
}

/* ===== Cover Fullscreen Button ===== */
.cover-fullscreen-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;

  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;

  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 16px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.cover-fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.05);
}
.fullscreen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;

  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 16px;
  line-height: 1;

  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.05);
}
.card-status-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* مشترک */
.card-publish {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
  color: #fff;
  font-weight: 500;
}

/* منتشر شده */
.publish-yes {
  background: #2e7d32; /* سبز */
}

/* عدم انتشار */
.publish-no {
  background: #c62828; /* قرمز */
}

/* در انتظار */
.publish-pending {
  background: #78909c; /* خنثی / خاکستری مایل به آبی */
}
/* ===============================
   GLOBAL COUNTDOWN – SOFT UI BLUE
================================ */

.countdown-timer {
  margin: 14px 0 18px;
  padding: 14px 18px;

  border-radius: 16px;
  background: linear-gradient(
    145deg,
    #e6f0ff,
    #f8fbff
  );

  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;

  display: flex;
  align-items: center;
  gap: 10px;

  box-shadow:
    8px 8px 20px rgba(15, 23, 42, 0.12),
   -8px -8px 20px rgba(255, 255, 255, 0.9);

  position: relative;
  overflow: hidden;
}

/* متن همیشه بالاتر از افکت */
.countdown-timer * {
  position: relative;
  z-index: 2;
}

/* subtle light sweep (پشت متن) */
.countdown-timer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.6),
    transparent 70%
  );
  transform: translateX(-100%);
  animation: sweep 4s infinite;
  z-index: 1;
}

@keyframes sweep {
  to { transform: translateX(100%); }
}

/* ===============================
   ACTIVE – NORMAL TIME FLOW
================================ */

.countdown-timer.active {
  border-left: 5px solid #2563eb;
}

.countdown-timer.active strong {
  color: #2563eb;
}

/* ===============================
   URGENT – LAST HOURS
================================ */

.countdown-timer.urgent {
  border-left: 5px solid #38bdf8;
  background: linear-gradient(
    145deg,
    #0031ff,
    #0e2e79
  );
  color: #fff;

  animation: heartbeat 1s infinite;
}

.countdown-timer.urgent strong {
  color: #38bdf8;
}

@keyframes heartbeat {
  0%   { transform: scale(1); }
  10%  { transform: scale(1.02); }
  20%  { transform: scale(1); }
  100% { transform: scale(1); }
}

/* ===============================
   EXPIRED – DEADLINE PASSED
================================ */

.countdown-timer.expired {
  background: linear-gradient(
    145deg,
    #fee2e2,
    #fff1f2
  );
  border-left: 5px solid #dc2626;
  color: #7f1d1d;
  font-weight: 700;
}



/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-main: #f8fafc;
    --glass: rgba(255,255,255,0.75);
    --border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #475569;
    --accent: #2563eb;
    --accent-soft: #dbeafe;
}

body {
    font-family: "Inter", "Segoe UI", sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
}

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 99999;
}

/* ===== Nav ===== */
.ux-nav {
    backdrop-filter: blur(14px);
    background: var(--glass);
    border-bottom: 1px solid var(--border);
}

.ux-nav-container {
    max-width: 1280px;
    margin: auto;
    padding: 14px 20px;

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
}

/* ===== Logo ===== */
.ux-logo img {
    height: 42px;
}

/* ===== Menu ===== */
.ux-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.ux-menu a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    transition: 0.3s;
}

.ux-menu a:hover,
.ux-menu a.active {
    color: var(--accent);
}

/* ===== Dropdown ===== */
.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 130%;
    inset-inline-start: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 0;
    min-width: 180px;

    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: 0.35s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.dropdown a {
    display: block;
    padding: 10px 18px;
    font-size: 13px;
    color: var(--text-main);
}

.dropdown a:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ===== CTA ===== */
.nav-cta .btn-primary {
    background: var(--accent);
    color: white;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
    transition: 0.3s;
}

.nav-cta .btn-primary:hover {
    background: #1d4ed8;
}

/* ===== Toggle ===== */
#nav-toggle {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.nav-toggle span {
    width: 26px;
    height: 2px;
    background: var(--text-main);
}

/* ===== Mobile ===== */
@media (max-width: 900px) {

    .ux-nav-container {
        grid-template-columns: auto auto;
    }

    .nav-toggle {
        display: flex;
        justify-self: end;
    }

    .nav-cta {
        display: none;
    }

    .ux-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;

        flex-direction: column;
        align-items: center;
        gap: 0;

        max-height: 0;
        overflow: hidden;
        transition: 0.4s ease;
        border-bottom: 1px solid var(--border);
    }

    .ux-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border);
    }

    .ux-menu a {
        display: block;
        padding: 16px;
        opacity: 0;
        transform: translateY(-10px);
        transition: 0.3s;
    }

    #nav-toggle:checked ~ .ux-menu {
        max-height: 600px;
    }

    #nav-toggle:checked ~ .ux-menu a {
        opacity: 1;
        transform: translateY(0);
    }

    /* Mobile Dropdown */
    .dropdown {
        position: static;
        box-shadow: none;
        border: none;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        display: none;
    }

    .has-dropdown:hover .dropdown {
        display: block;
    }
}
/* ===== CTA Menu Button ===== */
.menu-cta a {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #ffffff !important;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    transition: all 0.3s ease;
}

.menu-cta a:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

/* Mobile adjustment */
@media (max-width: 900px) {
    .menu-cta {
        margin: 14px 0;
    }

    .menu-cta a {
        display: inline-block;
    }
}
