/* ==========================================================================
   خانه هنر و انسان — کافه‌کتاب
   Design tokens: سبز جنگلی + کهربایی گرم روی پس‌زمینه کرم
   ========================================================================== */

:root {
  /* Brand */
  --green-900: #0f3d24;
  --green-700: #16643a;
  --green-600: #1e8449;
  --green-100: #e3f1e7;

  --amber-600: #e09a1f;
  --amber-500: #f5b23f;
  --amber-200: #fbe3b0;
  --amber-100: #fdf1d8;

  /* Semantic */
  --bg: #fbf7ef;
  --bg-alt: #f4ecdd;
  --surface: #ffffff;
  --primary: var(--green-600);
  --primary-dark: var(--green-900);
  --accent: var(--amber-500);
  --accent-dark: var(--amber-600);
  --text: #23301f;
  --text-muted: #6b7a68;
  --border: #e6ddcb;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 10px rgba(15, 61, 36, .06);
  --shadow-md: 0 10px 30px rgba(15, 61, 36, .10);
  --shadow-lg: 0 20px 50px rgba(15, 61, 36, .14);
  --transition: .25s ease;

  --font: "Vazirmatn", "Vazir", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(245, 178, 63, .12), transparent 45%),
    radial-gradient(circle at 88% 0%, rgba(30, 132, 73, .10), transparent 40%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 2;
  font-size: .98rem;

  /* Sticky Footer */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 0 auto;
}

::selection {
  background: var(--amber-500);
  color: var(--green-900);
}

a {
  text-decoration: none;
  transition: color var(--transition);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -.2px;
}

img {
  max-width: 100%;
}

/* ---------------------------------------------------------------- Navbar */
.navbar-custom {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: .65rem 0;
  position: sticky;
  top: 0;
  z-index: 1040;
  transition: box-shadow var(--transition), background var(--transition);
}

.navbar-custom.scrolled {
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, .96);
}

.navbar-custom .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--primary-dark);
  font-weight: 800;
}

.navbar-custom .navbar-brand small {
  color: var(--text-muted);
  font-weight: 500;
}

.logo-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.navbar-custom .nav-link {
  color: var(--text);
  font-weight: 600;
  margin-inline: .15rem;
  padding: .45rem .9rem !important;
  border-radius: 999px;
  transition: all var(--transition);
}

.navbar-custom .nav-link:hover {
  color: var(--primary);
  background: var(--green-100);
}

.navbar-custom .nav-link.active {
  color: var(--primary-dark);
  background: var(--amber-100);
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler i {
  color: var(--primary-dark) !important;
}

.btn-contact {
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: .5rem 1.4rem;
  font-weight: 700;
  border: none;
  box-shadow: 0 6px 16px rgba(30, 132, 73, .25);
  transition: all var(--transition);
}

.btn-contact:hover {
  background: var(--green-900);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------------------------------------------------------------- Buttons */
.btn-accent {
  display: inline-block;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: var(--green-900);
  font-weight: 800;
  border: none;
  border-radius: 999px;
  padding: .7rem 1.9rem;
  box-shadow: 0 8px 20px rgba(224, 154, 31, .3);
  transition: all var(--transition);
}

.btn-accent:hover {
  color: var(--green-900);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(224, 154, 31, .38);
}

.btn-outline-accent {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  border-radius: 999px;
  font-weight: 700;
  padding: .35rem 1.1rem;
  transition: all var(--transition);
}

.btn-outline-accent:hover {
  background: var(--primary);
  color: #fff;
}

.text-accent {
  color: var(--accent-dark) !important;
}

.text-primary-green {
  color: var(--primary) !important;
}

/* ---------------------------------------------------------------- Sections */
.section-title {
  position: relative;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-dark);
  padding-bottom: .6rem;
  margin-bottom: 1rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--amber-500), var(--primary));
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.bg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.bg-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* ---------------------------------------------------------------- Breadcrumb */
.breadcrumb {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .5rem 1.2rem;
  display: inline-flex;
  font-size: .85rem;
  margin-bottom: 1.75rem;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 600;
}

.breadcrumb a:hover {
  color: var(--accent-dark);
}

.breadcrumb-item.active {
  color: var(--text-muted);
}

.breadcrumb-item+.breadcrumb-item::before {
  content: "‹";
  color: var(--text-muted);
}

/* ---------------------------------------------------------------- Hero slider */
.hero-slider {
  position: relative;
  height: 78vh;
  min-height: 420px;
  overflow: hidden;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
}

.slider-track {
  display: flex;
  height: 100%;
  transition: transform .7s cubic-bezier(.65, 0, .35, 1);
}

.slide {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
}

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 61, 36, .88) 0%, rgba(15, 61, 36, .55) 55%, rgba(15, 61, 36, .25) 100%);
}

.slide-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  margin-inline-start: 8%;
  padding: 1rem;
  color: #fff;
  animation: fadeUp .8s ease both;
}

.slide-content h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  margin-bottom: .8rem;
  line-height: 1.4;
}

.slide-content h1 span {
  color: var(--amber-500);
}

.slide-content p {
  font-size: clamp(.95rem, 2vw, 1.2rem);
  color: #ecf5ee;
  margin-bottom: 1.6rem;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .9);
  color: var(--primary-dark);
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  z-index: 3;
  transition: all var(--transition);
}

.slider-btn:hover {
  background: var(--amber-500);
}

.slider-btn.prev {
  right: 18px;
}

.slider-btn.next {
  left: 18px;
}

.slider-dots {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: .5rem;
  z-index: 3;
}

.slider-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: all var(--transition);
}

.slider-dots span.active {
  width: 28px;
  background: var(--amber-500);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------- Cards */
.festival-card,
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.festival-card:hover,
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--amber-500);
}

.festival-card img,
.post-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: var(--bg-alt);
  transition: transform .5s ease;
}

.festival-card:hover img,
.post-card:hover img {
  transform: scale(1.05);
}

.festival-card .card-body,
.post-card .card-body {
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  flex: 1;
}

.festival-card h5,
.post-card h5 {
  font-size: 1.02rem;
  margin: 0;
  line-height: 1.8;
}

.festival-card .date,
.post-card .date {
  font-size: .78rem;
  color: var(--accent-dark);
  background: var(--amber-100);
  border-radius: 999px;
  padding: .1rem .7rem;
  align-self: flex-start;
}

.card-link {
  margin-top: auto;
  color: var(--primary);
  font-weight: 700;
  font-size: .88rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.card-link:hover {
  color: var(--accent-dark);
  gap: .6rem;
}

.about-preview {
  background: linear-gradient(160deg, var(--green-900), var(--green-700));
  color: #eaf3ec;
  border-radius: var(--radius);
  padding: 1.6rem;
  height: 100%;
  box-shadow: var(--shadow-md);
}

.about-preview .section-title {
  color: #fff;
}

.about-preview p {
  color: #d6e6da;
  text-align: justify;
  font-size: .9rem;
}

.about-preview .card-link {
  color: var(--amber-500);
}

/* ---------------------------------------------------------------- Feature strip */
.feature-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.1rem;
  text-align: center;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.feature-item .icon-circle {
  width: 58px;
  height: 58px;
  margin: 0 auto .8rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--green-100);
  color: var(--primary);
  font-size: 1.5rem;
}

.feature-item:hover .icon-circle {
  background: var(--amber-100);
  color: var(--accent-dark);
}

.feature-item p {
  color: var(--text-muted);
  font-size: .85rem;
  margin: 0;
}

/* ---------------------------------------------------------------- Festival hero */
.festival-hero {
  position: relative;
  min-height: 340px;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
}

.festival-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 61, 36, .92), rgba(15, 61, 36, .15));
}

.festival-hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  color: #fff;
}

.festival-hero-content h1 {
  color: #fff;
}

.festival-hero-content p {
  color: #dcebdf !important;
}

/* ---------------------------------------------------------------- Forms */
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
}

.form-label {
  font-weight: 600;
  font-size: .88rem;
  color: var(--text);
  margin-bottom: .35rem;
}

.form-control,
.form-select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .6rem .9rem;
  font-size: .9rem;
  transition: all var(--transition);
}

.form-control::placeholder {
  color: #a9b5a6;
}

.form-control:focus,
.form-select:focus {
  background: #fff;
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 0 0 .2rem rgba(30, 132, 73, .15);
}

textarea.form-control {
  min-height: 130px;
}

.form-check-input {
  border-color: #c7d3c4;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-input:focus {
  box-shadow: 0 0 0 .2rem rgba(30, 132, 73, .15);
}

.form-check-label {
  font-size: .88rem;
}

.invalid-feedback {
  font-size: .78rem;
}

/* ---------------------------------------------------------------- Post detail */
.post-meta {
  color: var(--text-muted);
  font-size: .85rem;
}

.post-meta i {
  color: var(--accent-dark);
  margin-inline-end: .2rem;
}

.post-detail-img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.8rem;
  box-shadow: var(--shadow-md);
}

.post-content {
  color: var(--text);
  text-align: justify;
  font-size: .98rem;
}

.post-content h2,
.post-content h3 {
  margin-top: 1.6rem;
}

.post-content img {
  border-radius: var(--radius-sm);
  margin: 1rem 0;
}

.post-content blockquote {
  border-inline-start: 4px solid var(--amber-500);
  background: var(--amber-100);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  color: var(--primary-dark);
}

/* ---------------------------------------------------------------- Pagination */
.pagination {
  gap: .35rem;
}

.page-link {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary-dark);
  border-radius: 12px !important;
  min-width: 42px;
  text-align: center;
  font-weight: 600;
  transition: all var(--transition);
}

.page-link:hover {
  background: var(--green-100);
  color: var(--primary-dark);
  border-color: var(--primary);
}

.page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-item.disabled .page-link {
  background: var(--bg-alt);
  color: #b3bdb1;
}

/* ---------------------------------------------------------------- Footer */
.footer {
  background: linear-gradient(160deg, var(--green-900), #0a2b19);
  color: #d7e6db;
  padding: 3.2rem 0 1.2rem;
  margin-top: 4rem;
  border-top: 5px solid var(--amber-500);
}

.footer h5 {
  color: #fff;
  font-size: 1.02rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: .5rem;
}

.footer h5::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 34px;
  height: 3px;
  background: var(--amber-500);
  border-radius: 3px;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer ul li {
  margin-bottom: .4rem;
}

.footer a {
  color: #c3d8c9;
  font-size: .88rem;
}

.footer a:hover {
  color: var(--amber-500);
}

.footer .navbar-brand {
  color: #fff;
}

.footer .navbar-brand small {
  color: #a9c2b1;
}

.footer-contact p {
  font-size: .88rem;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.footer-contact i {
  color: var(--amber-500);
}

.social-icons {
  display: flex;
  gap: .6rem;
}

.social-icons a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .08);
  color: #e6f0e8;
  transition: all var(--transition);
}

.social-icons a:hover {
  background: var(--amber-500);
  color: var(--green-900);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin-top: 2.2rem;
  padding-top: 1rem;
  text-align: center;
  font-size: .85rem;
  color: #b7cebd;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom .heart {
  color: var(--amber-500);
}

/* ---------------------------------------------------------------- Reveal */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 991.98px) {
  .navbar-custom .navbar-collapse {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: .7rem;
    box-shadow: var(--shadow-md);
  }

  .btn-contact {
    display: inline-block;
    margin-top: .6rem;
  }

  .hero-slider {
    height: 62vh;
  }

  .slide-content {
    margin-inline-start: 5%;
  }
}

@media (max-width: 575.98px) {
  .hero-slider {
    height: 58vh;
    min-height: 380px;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
  }

  .slider-btn {
    display: none;
  }

  .slide-content {
    margin-inline: auto;
    text-align: center;
    padding-inline: 1.4rem;
  }

  .slide::after {
    background: linear-gradient(to top, rgba(15, 61, 36, .92), rgba(15, 61, 36, .55));
  }

  .festival-card img,
  .post-card img {
    height: 165px;
  }

  .form-section {
    padding: 1.2rem;
  }

  .section-title {
    font-size: 1.3rem;
  }
}