/* =========================================================
   i2165062 — MAIN CSS (Final Responsive OLED Edition)
   Author: Ali Asadi REDBIN
   ========================================================= */

/* ---------- تنظیمات پایه ---------- */
:root {
  --ink:#2b2f35;
  --muted:#777;
  --line:#d8dade;
  --bg0:#f7f8f9;
  --bg1:#eef0f2;
  --radius:18px;

  /* Drawer (minimal) */
  --drawer-bg: rgba(255,255,255,0.78);
  --drawer-border: rgba(0,0,0,0.08);
  --drawer-shadow: 0 24px 70px rgba(0,0,0,0.18);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", "Segoe UI", sans-serif;
  background: radial-gradient(1000px 500px at 50% 0%, var(--bg1), var(--bg0));
  color: var(--ink);
  overflow-x: hidden;
}

/* =========================================================
   ساختار اصلی سایت
   ========================================================= */
.wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  justify-content: flex-start;
  padding: 30px 16px;
}

/* =========================================================
   لوگو و عنوان
   ========================================================= */
.logo-wrap {
  text-align: center;
  margin-bottom: 28px;
}

/* (مطابق نسخه HTML شما) */
.logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #3a3f44;
  display: grid;
  place-items: center;
  margin: 0 auto 16px auto;
  box-shadow: inset 0 2px 4px rgba(255,255,255,.08),
              0 6px 16px rgba(0,0,0,.25);
  position: relative;
}
.logo img {
  width: 80%;
  height: auto;
  filter: drop-shadow(0 1px 1px rgba(255,255,255,0.3));
}

.title {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: .08em;
  font-weight: 700;
}

.tagline {
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--muted);
  margin-top: 4px;
}

/* =========================================================
   کارت کشورها (Iran, Egypt, Saudi, Turkey)
   ========================================================= */

/* در دسکتاپ همه کارت‌ها در یک ردیف قابل مشاهده‌اند */
.rail {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2vw;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 1200px;
  margin: 10px auto 40px;
  overflow: hidden;
  padding: 0 1vw;
}

.card {
  flex: 0 0 calc(25% - 2vw);
  height: clamp(260px, 28vw, 320px);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: #000;
  transform-style: preserve-3d;
  transition: transform .3s ease, box-shadow .3s ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  perspective: 1000px;
}

/* خمیدگی طبیعی‌تر (OLED curve) */
.card[data-tilt="left"] { transform: perspective(1000px) rotateY(5deg) rotateZ(-1deg); }
.card[data-tilt="right"]{ transform: perspective(1000px) rotateY(-5deg) rotateZ(1deg); }
.card[data-tilt="center"]{ transform: perspective(1000px); }

.card:hover {
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
}

.shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.card:hover .shot {
  transform: scale(1.05);
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35%;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
}
.overlay span {
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .05em;
}

/* ---------- بازتاب نور دینامیک ---------- */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 30%),
    rgba(255,255,255,0.6) 0%,
    rgba(255,255,255,0.2) 15%,
    rgba(255,255,255,0.0) 60%
  );
  opacity: 0.35;
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: blur(15px);
  transition: opacity 0.4s ease;
}
.card:hover::before {
  opacity: 0.55;
  animation: shimmer 2.5s ease-in-out infinite;
}

/* ---------- بازتاب پایین (Soft Mirror) ---------- */
.card::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.05), rgba(0,0,0,0.15));
  filter: blur(8px);
  transform: scaleY(-1);
  opacity: 0.2;
  pointer-events: none;
}

@keyframes shimmer {
  0% { opacity: 0.4; }
  50% { opacity: 0.55; }
  100% { opacity: 0.4; }
}

/* =========================================================
   منوی پایین صفحه
   ========================================================= */
nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 11.5px;
  letter-spacing: .15em;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255,255,255,.7);
  transition: background .2s ease;
}
nav a:hover {
  background: white;
}

/* =========================================================
   Socials (پایین صفحه)
   ========================================================= */
.socials{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:14px;
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid var(--line);
  width: min(900px, 100%);
}

.social{
  display:flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  color: var(--ink);
  font-size: 11.5px;
  letter-spacing:.12em;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255,255,255,.72);
  transition: transform .18s ease, background .18s ease;
}

.social:hover{
  background:#fff;
  transform: translateY(-1px);
}

.social svg{
  width:16px;
  height:16px;
  fill: currentColor;
  opacity:.9;
}

/* =========================================================
   Drawer Menu (Left)
   ========================================================= */

.drawer-btn{
  position: fixed;
  left: 14px;
  top: 16px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--drawer-border);
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.12);
  cursor: pointer;
  z-index: 1001;
  display: grid;
  place-items: center;
  transition: transform .18s ease, background .18s ease;
}
.drawer-btn:hover{
  background: rgba(255,255,255,0.9);
  transform: translateY(-1px);
}

.drawer-btn__icon{
  width: 18px;
  height: 12px;
  position: relative;
  display:block;
}
.drawer-btn__icon::before,
.drawer-btn__icon::after,
.drawer-btn__icon{
  background: transparent;
}
.drawer-btn__icon::before,
.drawer-btn__icon::after{
  content:"";
  position:absolute;
  left:0;
  width: 18px;
  height: 2px;
  background: rgba(43,47,53,0.85);
  border-radius: 2px;
}
.drawer-btn__icon::before{ top: 1px; }
.drawer-btn__icon::after{ bottom: 1px; }
.drawer-btn__icon{
  border-top: 2px solid rgba(43,47,53,0.85);
  border-radius: 2px;
}

/* Backdrop */
.drawer-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1000;
}

/* Drawer Panel */
.drawer{
  position: fixed;
  top: 12px;
  left: 12px;
  bottom: 12px;
  width: min(340px, calc(100vw - 24px));
  border-radius: 18px;
  background: var(--drawer-bg);
  border: 1px solid var(--drawer-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--drawer-shadow);
  z-index: 1002;

  transform: translateX(-110%);
  transition: transform .22s ease;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.drawer.is-open{
  transform: translateX(0);
}

.drawer__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.drawer__brand{
  display:flex;
  align-items:center;
  gap:10px;
}

.drawer__dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background: rgba(43,47,53,0.7);
  box-shadow: 0 0 0 6px rgba(43,47,53,0.06);
}

.drawer__title{
  font-weight:700;
  letter-spacing:.08em;
  font-size: 12px;
}
.drawer__sub{
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--muted);
  margin-top:2px;
}

.drawer__close{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.65);
  cursor:pointer;
  transition: background .18s ease, transform .18s ease;
}
.drawer__close:hover{
  background:#fff;
  transform: translateY(-1px);
}

.drawer__nav{
  padding: 12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.drawer__item{
  text-decoration:none;
  color: var(--ink);
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.62);
  border-radius: 16px;
  padding: 12px 12px;
  transition: transform .18s ease, background .18s ease;
}
.drawer__item:hover{
  background:#fff;
  transform: translateY(-1px);
}

.drawer__kicker{
  display:block;
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--muted);
  text-transform: uppercase;
}
.drawer__label{
  display:block;
  margin-top:6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
}

.drawer__foot{
  margin-top:auto;
  padding: 12px 14px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.drawer__hint{
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--muted);
}

/* =========================================================
   نسخه واکنش‌گرا برای موبایل و تبلت
   ========================================================= */
@media (max-width: 900px) {
  .rail {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    flex-wrap: nowrap;
    justify-content: flex-start;
    max-width: none;
    padding-left: 10px;
  }
  .card {
    flex: 0 0 70%;
    height: 280px;
  }
  .rail::-webkit-scrollbar { display: none; }
}

@media (max-width: 600px) {
  .overlay span { font-size: 15px; }
  .drawer-btn{ top: 12px; left: 12px; }
  .socials{ gap:10px; }
  .social{ padding: 7px 10px; }
}

/* ---------- نقاط زیر اسلایدر ---------- */
.slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  transition: background 0.3s, transform 0.3s;
}
.dot.active {
  background: var(--accent, #00bfa6);
  transform: scale(1.2);
}
