/* ==================== متغیرها ==================== */
:root {
  --royal-dark: #052b3b;
  --royal-main: #0b6e72;
  --royal-light: #3fb4b0;
  --text: #eaf6f5;
  --muted: rgba(255,255,255,0.75);
  --radius: 14px;
  --transition: 0.3s ease;
  --shadow: 0 8px 30px rgba(2,8,10,0.55);
}

/* ==================== پایه ==================== */
* { box-sizing: border-box; margin:0; padding:0; }
body {
  font-family: 'Vazir', sans-serif;
  background: linear-gradient(120deg,#052225,#052b3b);
  color: var(--text);
  line-height:1.6;
}
.container { max-width:1200px; margin:auto; padding:40px 20px; }
.section { margin:60px 0; }

/* ==================== انیمیشن‌ها ==================== */
.animate { opacity:0; transform: translateY(20px); transition: all 0.7s ease-out;}
.animate.show { opacity:1; transform: translateY(0);}
.fade-in { transform: translateY(0);}
.slide-in { transform: translateX(-30px);}
.slide-up { transform: translateY(30px);}
.delay-1 { transition-delay:0.2s;}
.delay-2 { transition-delay:0.4s;}

/* ==================== هدر ==================== */
.header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:15px 20px;
  background: rgba(5,43,59,0.9);
  border-radius: var(--radius);
  position: sticky;
  top:0;
  z-index:1000;
}
.logo { font-weight:bold; font-size:22px; }
.nav-list { display:flex; list-style:none; gap:20px; }
.nav-list li a { color: var(--text); text-decoration:none; font-weight:500; transition:var(--transition);}
.nav-list li a:hover { color: var(--royal-light); transform:translateY(-2px); }

/* ==================== همبرگر ==================== */
.hamburger {
  display:none;
  flex-direction:column;
  gap:5px;
  cursor:pointer;
}
.hamburger span {
  width:25px; height:3px; background: var(--text); border-radius:2px; transition: all 0.4s ease;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px);}
.hamburger.active span:nth-child(2) { opacity:0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px,-6px);}

/* ==================== هیرو ==================== */
.hero { display:grid; grid-template-columns:1fr; gap:40px; align-items:center; }
.hero-left { text-align:center; }
.avatar-wrap { width:180px; height:180px; border-radius:50%; overflow:hidden; border:4px solid var(--royal-light); margin:auto;}
.avatar-wrap img { width:100%; height:100%; object-fit:cover; }
.cta-row { display:flex; gap:12px; justify-content:center; margin-top:15px;}
.btn { padding:10px 20px; border-radius:8px; text-decoration:none; color:var(--text); transition: var(--transition); cursor:pointer; }
.btn.primary { background: var(--royal-main);}
.btn.ghost { border:1px solid var(--royal-light);}
.btn:hover { transform:translateY(-3px); }

/* ==================== کارت پروژه ==================== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 280px; /* ارتفاع کارت */
  background: linear-gradient(135deg, rgba(11,110,114,0.15), rgba(63,180,176,0.15));
}
.project-media { flex:1; overflow:hidden; }
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.project-media img:hover { transform: scale(1.05); }
.project-body { padding: 15px; flex-shrink:0; }

/* ==================== فرم تماس ==================== */
.contact-form input, .contact-form textarea { width:100%; margin:6px 0 12px; padding:10px; border-radius:8px; border:none; }
.contact-form button { margin-top:8px; }

/* ==================== کارت شیشه‌ای ==================== */
.glass {
  background: linear-gradient(135deg, rgba(11,110,114,0.25), rgba(63,180,176,0.25));
  border-radius: var(--radius);
  padding:20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.glass:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,0.5); }

/* ==================== فوتر ==================== */
.footer {
  margin:40px 0;
  font-size:14px;
  color: var(--muted);
  text-align: center;
}
.footer .socials {
  list-style: none;
  display:flex;
  justify-content:center;
  gap:15px;
  margin-top:8px;
}
.footer .socials li a {
  color: var(--royal-light);
  text-decoration:none;
  transition: var(--transition);
}
.footer .socials li a:hover {
  color: var(--royal-main);
  transform: translateY(-2px);
}

/* ==================== ریسپانسیو ==================== */
@media (max-width: 768px){
  .nav-list {
    display:none;
    flex-direction:column;
    gap:15px;
    background: var(--royal-dark);
    position:absolute;
    right:20px;
    top:60px;
    padding:15px;
    border-radius: var(--radius);
    z-index:999;
  }
  .nav-list.active { display:flex; }
  .hamburger { display:flex; }
  .hero { grid-template-columns:1fr; }
  .projects-grid { grid-template-columns:1fr; }
}
@media (min-width: 768px){
  .hero { grid-template-columns:1fr 1fr; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px){
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}
/* ==================== نظرات کاربران ==================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  margin-top: 25px;
}

.testimonial-card {
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(135deg, rgba(11,110,114,0.15), rgba(63,180,176,0.15));
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.avatar-wrap-small {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--royal-light);
  flex-shrink: 0;
}

.avatar-wrap-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info h4 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
}

.user-info .role {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}

.comment {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  margin-top: 5px;
}

/* ریسپانسیو نظرات */
@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* ===== افکت چرخش رنگ دور تمام عکس‌های دایره‌ای ===== */
.avatar-wrap, .avatar-wrap-small {
  position: relative;
  border: none;
}
.avatar-wrap::before, .avatar-wrap-small::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(
    from 0deg,
    #00f5ff,
    #3fb4b0,
    #0b6e72,
    #00f5ff
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spinBorder 3s linear infinite;
}
@keyframes spinBorder {
  to { transform: rotate(360deg); }
}

/* ===== انیمیشن باز و بسته شدن منوی موبایل ===== */
@media (max-width: 768px) {
  .nav-list {
    display: none;
    flex-direction: column;
    gap: 15px;
    background: rgba(5, 43, 59, 0.97);
    position: absolute;
    top: 65px;
    right: 20px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    width: 70%;
    max-width: 280px;
    animation: fadeOut 0.3s ease forwards;
  }
  .nav-list.active {
    display: flex;
    animation: fadeIn 0.35s ease forwards;
  }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
  }
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
  }
}

/* ===== اسکرول نرم ===== */
html {
  scroll-behavior: smooth;
}

/* ===== انیمیشن ظاهر شدن با اسکرول ===== */
.animate {
  opacity: 0;
  transform: translateY(25px);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.animate.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== افکت hover برای کارت‌ها ===== */
.project-card.glass:hover,
.testimonial-card.glass:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  transition: all 0.4s ease;
}

/* ===== دکمه با افکت pulse ===== */
@keyframes pulseAnim {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(63,180,176,0); }
  50% { transform: scale(1.05); box-shadow: 0 0 15px rgba(63,180,176,0.5); }
}
.btn:hover {
  animation: pulseAnim 0.6s ease-in-out;
}
/* ==================== منوی همبرگری ==================== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  width: 30px;
  height: 25px;
  z-index: 2000;
}
.hamburger span {
  width: 100%;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px,5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px,-6px);
}

/* ==================== منو در موبایل ==================== */
@media (max-width: 768px) {
  .nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 65px;
    right: 20px;
    background: rgba(5,43,59,0.97);
    border-radius: 12px;
    padding: 20px;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1500;
  }

  .nav-list.active {
    display: flex;
    animation: fadeInMenu 0.3s ease forwards;
  }

  @keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .hamburger {
    display: flex;
  }
}
@media (max-width: 768px) {
  .nav-list {
    display: none;
    flex-direction: column;
    gap: 15px;
    background: rgba(5,43,59,0.97);
    position: absolute;
    top: 65px;
    right: 20px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    width: 70%;
    max-width: 280px;
    z-index: 1500;
    animation: fadeOut 0.3s ease forwards;
  }

  .nav-list.active {
    display: flex;
    animation: fadeIn 0.35s ease forwards;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
  }

  .hamburger {
    display: flex;
  }
}
