:root {
  --primary-dark: #0b5038;
  --primary: #0d6b4a;
  --primary-light: #127a56;
  --primary-lighter: #1a8f66;
  --accent: #e5c273;
  --accent-hover: #d4b05f;
  --text-white: #ffffff;
  --text-light: #f0f0f0;
  --text-muted: #c8d6d0;
  --card-bg: rgba(13, 107, 74, 0.6);
  --footer-bg: #083d2b;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Vazirmatn', 'Tahoma', 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #0b5038 0%, #083d2b 50%, #062e20 100%);
  color: var(--text-white);
  min-height: 100vh;
  direction: rtl;
  line-height: 1.8;
}

/* Navbar */
.navbar-custom {
  background: linear-gradient(90deg, #0b5038, #0d6b4a) !important;
  padding: 0.8rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-white) !important;
  font-weight: 700;
  font-size: 1.3rem;
}

.navbar-brand img,
.logo-icon {
  width: 48px;
  height: 48px;
}

.nav-link {
  color: var(--text-light) !important;
  font-weight: 500;
  padding: 0.5rem 1.2rem !important;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent) !important;
  background: rgba(229, 194, 115, 0.1);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 20%;
  left: 20%;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.btn-contact {
  background: var(--accent) !important;
  color: #0b5038 !important;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 0.5rem 1.4rem !important;
  transition: var(--transition);
}

.btn-contact:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(229, 194, 115, 0.4);
}

/* Hero Slider */
.hero-slider {
  position: relative;
  height: 520px;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
  margin-bottom: 3rem;
}

.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  background-size: cover;
  background-position: center;
}

.slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 80, 56, 0.85) 0%, rgba(11, 80, 56, 0.4) 60%, transparent 100%);
}

.slide-content {
  position: absolute;
  top: 50%;
  right: 8%;
  transform: translateY(-50%);
  max-width: 520px;
  z-index: 2;
  text-align: right;
}

.slide-content h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.slide-content p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.btn-accent {
  background: var(--accent);
  color: #0b5038;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1.8rem;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: #0b5038;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(229, 194, 115, 0.45);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  font-size: 1.4rem;
}

.slider-btn:hover {
  background: var(--accent);
  color: #0b5038;
}

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

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

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

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: var(--accent);
  width: 28px;
  border-radius: 6px;
}

/* Sections */
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 0;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

/* Cards */
.festival-card,
.post-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.festival-card:hover,
.post-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: rgba(229, 194, 115, 0.3);
}

.festival-card img,
.post-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.festival-card .card-body,
.post-card .card-body {
  padding: 1.2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.festival-card h5,
.post-card h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.festival-card .date,
.post-card .date {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.card-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.card-link:hover {
  color: var(--accent-hover);
  gap: 10px;
}

/* About section on home */
.about-preview {
  background: rgba(13, 107, 74, 0.35);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  height: 100%;
}

.about-preview p {
  color: var(--text-muted);
  text-align: justify;
  margin-bottom: 1.2rem;
}

/* Footer */
.footer {
  background: var(--footer-bg);
  padding: 3.5rem 0 1.5rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(229, 194, 115, 0.15);
}

.footer h5 {
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1.2rem;
  font-size: 1.15rem;
}

.footer ul {
  list-style: none;
  padding: 0;
}

.footer ul li {
  margin-bottom: 0.6rem;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--accent);
  padding-right: 6px;
}

.footer-contact p {
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-bottom .heart {
  color: #e74c3c;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.social-icons a {
  display: inline-flex;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  transition: var(--transition);
  text-decoration: none;
}

.social-icons a:hover {
  background: var(--accent);
  color: #0b5038;
  transform: translateY(-3px);
}

/* Pagination */
.pagination .page-link {
  background: rgba(13, 107, 74, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  margin: 0 4px;
  border-radius: 8px !important;
}

.pagination .page-link:hover,
.pagination .page-item.active .page-link {
  background: var(--accent);
  color: #0b5038;
  border-color: var(--accent);
}

.pagination .page-item.disabled .page-link {
  background: rgba(13, 107, 74, 0.3);
  color: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Form styles */
.form-section {
  background: rgba(13, 107, 74, 0.4);
  border-radius: var(--radius);
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-label {
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.form-control,
.form-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  border-radius: 10px;
  padding: 0.7rem 1rem;
}

.form-control:focus,
.form-select:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 0 0.2rem rgba(229, 194, 115, 0.25);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

textarea.form-control {
  min-height: 140px;
}

/* Post detail */
.post-detail-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.post-meta {
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.post-content {
  color: var(--text-muted);
  text-align: justify;
  font-size: 1.05rem;
  line-height: 2;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.25rem auto;
  display: block;
}

.post-content figure {
  max-width: 100%;
  margin: 1.25rem 0;
}

.post-content figure img {
  margin: 0 auto;
}

.post-content iframe,
.post-content video {
  max-width: 100%;
  border-radius: var(--radius);
}

/* Festival detail */
.festival-hero {
  height: 320px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  position: relative;
  margin-bottom: 2rem;
}

.festival-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 80, 56, 0.9), transparent);
  border-radius: var(--radius);
}

.festival-hero-content {
  position: absolute;
  bottom: 30px;
  right: 30px;
  left: 30px;
}

/* Breadcrumb */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1.5rem;
}

.breadcrumb-item a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: var(--text-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-muted);
  content: "«";
}

/* Responsive */
@media (max-width: 991px) {
  .slide-content h1 {
    font-size: 2rem;
  }
  .hero-slider {
    height: 420px;
  }
}

@media (max-width: 767px) {
  .slide-content {
    right: 5%;
    left: 5%;
    max-width: 100%;
  }
  .slide-content h1 {
    font-size: 1.6rem;
  }
  .hero-slider {
    height: 380px;
  }
  .slider-btn {
    width: 40px;
    height: 40px;
  }
}

/* Utility */
.text-accent {
  color: var(--accent) !important;
}

.bg-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-outline-accent {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: 10px;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-outline-accent:hover {
  background: var(--accent);
  color: #0b5038;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0b5038;
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}
