@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;300;400;600;700;900&display=swap');

:root {
  --primary: #4f46e5;
  --primary-rgb: 79, 70, 229;
  --secondary: #06b6d4;
  --dark: #0f172a;
  --light: #f8fafc;
  --gradient-main: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --shadow-color: rgba(79, 70, 229, 0.25);
}

body {
  font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  background-color: var(--light);
  color: var(--dark);
  overflow-x: hidden;
}

/* =========================================================
   UTILITIES
   ========================================================= */

.text-gradient {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bg-soft-primary {
  background-color: rgba(var(--primary-rgb), 0.1);
}

.btn-white {
  background: white;
  color: var(--dark);
  border: 1px solid #e2e8f0;
}

.hover-up {
  transition: transform 0.3s;
}

.hover-up:hover {
  transform: translateY(-3px);
}


/* =========================================================
   HEADER / HERO SECTION
   ========================================================= */

.header-section {
  min-height: 85vh;
  display: flex;
  align-items: center;
  background: white;
  padding-top: 80px;
}

/* پس‌زمینه‌های هندسی محو */

.bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  opacity: 0.4;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: #e0e7ff;
  top: -10%;
  left: -10%;
  animation: float 10s infinite alternate;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: #cffafe;
  bottom: -10%;
  right: -5%;
  animation: float 8s infinite alternate-reverse;
}


/* =========================================================
   HERO VISUAL
   ========================================================= */

.hero-visual {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.glowing-circle {
  position: absolute;
  width: 400px;
  height: 400px;
  background: var(--gradient-main);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(5px);
  opacity: 0.15;
  z-index: 0;
  animation: pulse-glow 3s infinite alternate;
}

/* تصویر / لوگوی شهرداری */

.hero-img {
  position: relative;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
  transition: transform 0.4s ease;
}

.hero-img:hover {
  transform: scale(1.02);
}


/* =========================================================
   FLOATING BADGE
   ========================================================= */

.floating-badge {
  position: absolute;
  bottom: 80px;
  right: -20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 15px 25px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.5);
  animation: float-badge 4s ease-in-out infinite;
}


/* =========================================================
   MUNICIPALITY CONTENT
   ========================================================= */

.content-section {
  position: relative;
  padding: 80px 0;
}

.section-title {
  font-weight: 700;
  color: var(--dark);
}

.section-subtitle {
  color: #64748b;
  font-weight: 400;
}


/* =========================================================
   ARTICLE CARDS
   ========================================================= */

.hover-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.hover-card:hover {
  transform: translateY(-5px);
}

.card-img-wrap {
  height: 200px;
  overflow: hidden;
  background: #f1f5f9;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

.hover-card:hover .card-img-wrap img {
  transform: scale(1.1);
}



.article-title {
  color: var(--dark);
  transition: color 0.3s ease;
}

.hover-card:hover .article-title {
  color: var(--primary);
}



.article-category {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 50px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
}


/* تاریخ */

.article-date {
  color: #64748b;
  font-size: 0.85rem;
}



.article-summary {
  color: #64748b;
  line-height: 1.9;
}


/* =========================================================
   ARTICLE DETAIL
   ========================================================= */

.article-detail {
  background: white;
  border-radius: 20px;
  overflow: hidden;
}

.article-detail-image {
  width: 100%;
  max-height: 550px;
  object-fit: cover;
}

.article-content {
  color: #334155;
  line-height: 2.2;
  font-size: 1.05rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-meta {
  color: #64748b;
  font-size: 0.9rem;
}


/* =========================================================
   CATEGORY FILTER / NAVIGATION
   ========================================================= */

.category-link {
  text-decoration: none;
  transition: all 0.3s ease;
}

.category-link:hover {
  transform: translateY(-2px);
}

.category-link.active {
  background: var(--gradient-main);
  color: white !important;
}


/* =========================================================
   SEARCH
   ========================================================= */

.search-box {
  position: relative;
}

.search-box input {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 18px;
  background: white;
  transition: all 0.3s ease;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
  outline: none;
}


/* =========================================================
   GALLERY
   ========================================================= */

.gallery-wrapper {
  width: 100%;
  max-width: 1100px;
  height: 70vh;
  min-height: 500px;
  background: #111;
  position: relative;
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition:
    opacity 0.8s ease-in-out,
    transform 0.8s ease;
  transform: scale(1.05);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.gallery-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}



.caption-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85),
    transparent
  );
  color: white;
  padding: 60px 30px 30px;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: 0.5s 0.3s;
}

.gallery-slide.active .caption-overlay {
  opacity: 1;
  transform: translateY(0);
}


.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
}

.gallery-btn:hover {
  background: white;
  color: black;
}

.gallery-btn.next {
  left: 20px;
}

.gallery-btn.prev {
  right: 20px;
}



.gallery-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
}

.dot.active {
  width: 30px;
  background: var(--primary);
  border-radius: 10px;
}


/* =========================================================
   FEEDBACK
   ========================================================= */

.feedback-section {
  position: relative;
}

.feedback-card {
  background: white;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.feedback-card input,
.feedback-card textarea,
.feedback-card select {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.feedback-card input:focus,
.feedback-card textarea:focus,
.feedback-card select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
  outline: none;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn-primary {
  background: var(--gradient-main);
  border: none;
  color: white;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--shadow-color);
}


/* =========================================================
   SOCIAL BUTTONS
   ========================================================= */

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: 0.3s;
}

.social-btn:hover {
  background: var(--primary);
  transform: translateY(-3px);
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  background: var(--dark);
  color: white;
}

.site-footer a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: white;
}


/* =========================================================
   ALERT / MESSAGES
   ========================================================= */

.alert {
  border-radius: 12px;
  border: none;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  100% {
    transform: translateY(-20px);
  }
}

@keyframes float-badge {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes pulse-glow {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.15;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.25;
  }
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991px) {

  .header-section {
    text-align: center;
    padding-top: 2rem;
    min-height: auto;
  }

  .hero-visual {
    margin: 0 auto 3rem;
    height: 400px;
  }

  .floating-badge {
    right: 50%;
    transform: translateX(50%);
    bottom: -20px;
    animation: none;
  }

  .content-section {
    padding: 60px 0;
  }

  .gallery-wrapper {
    height: 60vh;
    min-height: 400px;
  }
}


@media (max-width: 576px) {

  .header-section {
    padding-top: 1rem;
  }

  .hero-visual {
    height: 320px;
  }

  .glowing-circle {
    width: 280px;
    height: 280px;
  }

  .floating-badge {
    padding: 10px 15px;
    gap: 10px;
    border-radius: 15px;
  }

  .gallery-wrapper {
    height: 50vh;
    min-height: 300px;
  }

  .gallery-btn {
    width: 40px;
    height: 40px;
  }

  .gallery-btn.next {
    left: 10px;
  }

  .gallery-btn.prev {
    right: 10px;
  }

  .caption-overlay {
    padding: 40px 15px 20px;
  }

  .card-img-wrap {
    height: 180px;
  }
}