/* =========================
   FONT
========================= */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Regular.ttf");
}
@font-face {
  font-family: "VazirmatnBold";
  src: url("../fonts/Vazirmatn-Bold.ttf");
}

/* =========================
   GLOBAL & BODY
========================= */
body {
  font-family: "Vazirmatn";
  color: #333;
  direction: rtl;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(
    rgba(255, 255, 255, 0.5),
    rgba(255, 255, 255, 0.5)
  ), url("../images/bg-pattern.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: repeat;
  background-attachment: fixed;
}

/* =========================
   HEADER / TOP HEADER
========================= */
.top-header {
  background: #f7f7f7;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

/* =========================
   NAVBAR
========================= */
.navbar {
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(8px);
}
.navbar-brand {
  font-family: "VazirmatnBold";
  font-size: 28px;
  color: #1aaa55 !important;
}
.navbar-brand img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}
.nav-link {
  font-weight: 600;
}
.nav-link:hover {
  color: #198754 !important;
}

/* =========================
   HERO SECTION
========================= */
.hero-section {
  background: white;
  border-radius: 30px;
  padding: 60px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.06);
}
.hero {
  height: 300px;
  background: url('public/images/hero.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.55);
}
.hero-content {
  position: absolute;
  top: 50%;
  right: 70px;
  transform: translateY(-50%);
  z-index: 5;
}
.hero h1 {
  font-size: 48px;
  font-weight: bold;
}

/* =========================
   SEARCH BOX
========================= */
.search-box {
  width: 600px;
  max-width: 100%;
}
.search-box input {
  border-radius: 30px 0 0 30px;
}
.search-box button {
  border-radius: 0 30px 30px 0;
  padding: 0 22px;
}
.search-input {
  border-radius: 0 50px 50px 0 !important;
}
.search-button {
  border-radius: 50px 0 0 50px !important;
}

/* =========================
   TITLES
========================= */
.section-title {
  font-family: "VazirmatnBold";
  font-size: 38px;
  color: #222;
}

/* =========================
   BUTTONS
========================= */
.btn-main {
  background: #1aaa55;
  color: white;
  border: none;
  border-radius:14px;
  padding: 12px 28px;
  font-size: 16px;
  transition: 0.3s;
}
.btn-main:hover {
  background: #159447;
  color: white;
  transform: translateY(-2px);
}
.auth-btn {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 14px;
  background: #7d9b76;
  color: white;
  font-size: 18px;
  font-weight: bold;
  transition: 0.3s;
}
.auth-btn:hover {
  background: #688462;
}

/* =========================
   CARDS
========================= */
.card {
  border: none;
  border-radius: 24px;
  overflow: hidden;
  background: white;
  transition: 0.35s;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}
.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}
.card img {
  height: 250px;
  object-fit: cover;
}

/* =========================
   PRICE
========================= */
.price {
  color: #1aaa55;
  font-size: 22px;
  font-family: "VazirmatnBold";
}

/* =========================
   CAROUSEL / SLIDER
========================= */
.carousel {
  border-radius: 30px;
  overflow: hidden;
}
.carousel-item img {
  height: 650px;
  object-fit: cover;
}
.carousel-caption {
  bottom: 90px;
}
.slider-box {
  background: #8a4646d1;
  padding: 35px;
  border-radius: 25px;
  backdrop-filter: blur(8px);
}

/* =========================
   TABLE
========================= */
.table {
  background: white;
  border-radius: 20px;
  overflow: hidden;
}

/* =========================
   FORM
========================= */
.form-control,
.form-select {
  border-radius: 14px;
  min-height: 55px;
  border: 1px solid #ddd;
}
.form-control:focus,
.form-select:focus {
  box-shadow: none;
  border-color: #1aaa55;
}

/* =========================
   CATEGORY BOX
========================= */
.category-box {
  background: white;
  border-radius: 22px;
  padding: 25px;
  text-align: center;
  transition: 0.3s;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}
.category-box:hover {
  transform: translateY(-6px);
}

/* =========================
   ADMIN PANEL
========================= */
.admin-box {
  background: white;
  border-radius: 24px;
  padding: 35px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
}

/* =========================
   WATERMARK
========================= */
.watermark {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 22px;
  opacity: 0.3;
  pointer-events: none;
  font-weight: bold;
}

/* =========================
   AUTH / DARK THEME
========================= */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.auth-box {
  width: 100%;
  max-width: 450px;
  background: rgba(35, 35, 35, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 30px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.auth-title {
  color: #291844;
  text-align: center;
  margin-bottom: 30px;
  font-weight: bold;
}
.auth-box .form-control {
  background: #2f2f2f;
  border: 1px solid #444;
  color: #eda9a9;
  height: 50px;
  border-radius: 14px;
}
.auth-box .form-control:focus {
  background: #383838;
  border-color: #8fb18a;
  color: #53d78f;
  box-shadow: none;
}
.auth-box .form-control::placeholder {
  color: #ccc;
}
.auth-box label {
  color: #0e2a8f;
  margin-bottom: 8px;
}
.auth-link {
  color: #d9b65d;
  text-decoration: none;
}
.auth-link:hover {
  color: #b32121;
}
.auth-icon {
  font-size: 65px;
  color: #8fb18a;
  text-align: center;
  margin-bottom: 20px;
}

/* =========================
   CREATE COURSE
========================= */
.create-course-box {
  background: rgba(15, 15, 20, 0.88);
  max-width: 700px;
  margin: auto;
  backdrop-filter: blur(6px);
  border-radius: 12px;
}
.create-course-box .form-control {
  border-radius: 12px;
  min-height: 45px;
}
.create-course-box textarea {
  resize: none;
}

/* =========================
   PRODUCT CARD
========================= */
.product-card {
  transition: 0.3s;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* =========================
   BADGE
========================= */
.badge {
  font-size: 11px;
}

/* =========================
   FOOTER
========================= */
footer {
  background: rgba(255, 255, 255, 0.9);
  margin-top: 80px;
  padding: 50px 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 991.98px) {
  .navbar-collapse {
    padding-top: 15px;
  }
  .search-box {
    margin: 20px 0;
    width: 25%;
  }
  .navbar-nav {
    text-align: center;
  }
  .nav-item {
    margin: 8px 0;
  }
  .search-input {
    width: 25%;
  }
}

@media (max-width: 768px) {
  .carousel-item img {
    height: 300px;
  }
  .carousel-caption {
    bottom: 20px;
  }
  .slider-box {
    padding: 20px;
  }
  .slider-box h1 {
    font-size: 24px;
  }
  .section-title {
    font-size: 28px;
  }
  .hero-section {
    padding: 25px;
  }
  .hero h1 {
    font-size: 32px;
  }
  .hero-content {
    right: 20px;
  }
}

.navbar{
    min-height: 80px;
}

.navbar-brand img{
    object-fit: cover;
}

.navbar-nav .nav-link{
    font-weight: 600;
    padding: 10px 14px !important;
}

.navbar-nav .nav-link:hover{
    color:#198754 !important;
}

.navbar-toggler{
    box-shadow:none !important;
}

@media (max-width: 991.98px){

    .navbar-collapse{
        background:#fff;
        margin-top:15px;
        padding:15px;
        border-radius:16px;
        box-shadow:0 8px 24px rgba(0,0,0,.08);
    }

    .navbar-nav{
        align-items:flex-start !important;
    }

    .navbar-nav .nav-item{
        width:100%;
    }

    .navbar-nav .nav-link{
        padding:12px 0 !important;
        border-bottom:1px solid #f1f1f1;
    }

    .navbar-nav .nav-item:last-child .nav-link{
        border-bottom:none;
    }

    .d-flex.align-items-center.gap-2{
        margin-top:15px;
        width:100%;
        justify-content:flex-start;
    }
}
/* دکمه آیکون جستجو */
.search-toggle-btn {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    color: #198754; /* هماهنگ با text-success بوت‌استرپ */
    padding: 0.375rem 0.5rem;
}

.search-toggle-btn:hover {
    color: #146c43;
}

/* باکس جستجو - پیش‌فرض مخفی */
.search-overlay {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
    z-index: 1030; /* بالاتر از navbar sticky */

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-input {
    flex: 1;
    border: none;
    border-bottom: 2px solid #198754;
    border-radius: 0;
    box-shadow: none;
}

.search-input:focus {
    box-shadow: none;
    outline: none;
    border-bottom-color: #146c43;
}

/* روی موبایل که navbar کوچیک‌تره */
@media (max-width: 991.98px) {
    .search-overlay {
        padding: 0 0.75rem;
    }
}
