/*====================================================================*/
/* 1️⃣  Theme variables – change one line → whole theme              */
/*====================================================================*/
:root {
  /* colour palette */
  --color-bg:                #ffffff;   /* page background */
  --color-primary:           #73a9e7;   /* main blue – navbar, buttons */
  --color-primary-dark:      #003660;   /* dark blue for hover/active */
  --color-text-dark:         #333333;   /* body text */
  --color-text-light:        #555555;   /* muted / card text */
  --color-accent-yellow:     #fdd302;   /* link / hover accent */
  --color-a-hover:           #aaaaaa;   /* link / hover accent */
  --color-card-bg:           #73a9e7;   /* card background (same as primary) */

  /* typography & spacing */
  --gap-1:   1rem;
  --gap-2:   1.5rem;
  --radius:  .5rem;

  /* image/caption */
  --image-item-height:      200px;
  --caption-item-height:    200px;

  /* card text */
  --title-item-font-size:   18px;
}

/*====================================================================*/
/* 2️⃣  Font definitions – kept unchanged                           */
/*====================================================================*/
@font-face {
  font-family: 'Vazir';
  src: url('../font/Vazir-Bold.eot');
  src: url('../font/Vazir-Bold.eot?#iefix') format('embedded-opentype'),
       url('../font/Vazir-Bold.woff2') format('woff2'),
       url('../font/Vazir-Bold.woff') format('woff'),
       url('../font/Vazir-Bold.ttf')  format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Tanha';
  src: url('../font/Tanha.eot');
  src: url('../font/Tanha.eot?#iefix') format('embedded-opentype'),
       url('../font/Tanha.woff2') format('woff2'),
       url('../font/Tanha.woff') format('woff'),
       url('../font/Tanha.ttf')  format('truetype');
  font-weight: normal;
  font-style: normal;
}

/*====================================================================*/
/* 3️⃣  Global reset & default styles                               */
/*====================================================================*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  text-align: right;
  direction: rtl;
  border-radius: var(--radius);
}

/* body */
body {
  background: var(--color-bg);
  color: var(--color-text-dark);
  line-height: 1.6;
  padding: var(--gap-2);
  font-family: 'Tanha', sans-serif;   /* fallback: Vazir if you prefer */
}

/*====================================================================*/
/* 4️⃣  Links & buttons                                             */
/*====================================================================*/
a {
  color: var(--color-text-dark);
  text-decoration: none;
  transition: color .1s ease;
}

a:hover {
  color: var(--color-a-hover);
  text-decoration: none;
}

/* Search‑button styling (uses theme variables) */
#main-nav .navbar .btn-outline-success {
  color: var(--color-primary-dark);
  background: transparent;
  border-color: var(--color-primary-dark);
  font-weight: bold;
}
#main-nav .navbar .btn-outline-success:hover {
  color: #fff;
  background: var(--color-primary-dark);
}

/* Like‑button component */
.like-container {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: .5rem;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}
.post-icon {
  width: 20px;
  fill: #555;
  display: block;
}
.like-btn {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: .3rem;
  font-size: 1rem;
  color: #555;
  transition: color .2s;
}
.like-btn.liked { color: #e0245e; }
.like-btn.liked .post-icon {
  filter: invert(0) hue-rotate(0deg) saturate(3); /* turns the heart red */
}
.like-count { font-weight: bold; }

/*====================================================================*/
/* 5️⃣  Navbar / navigation bar (light‑sky blue)                    */
/*====================================================================*/
#main-nav {
  background: var(--color-primary) !important;
  color: #fff;
  margin-top: -40px;
}
#main-nav .navbar-nav {
  justify-content: center;          /* flex centering */
}
#main-nav .navbar-nav .nav-link {
  color: rgba(255,255,255,.9);
}
#main-nav .navbar-nav .nav-link:hover {
  color: #fff;
}

/* Dropdown menu – same colour as navbar */
#main-nav .dropdown-menu {
  background: var(--color-primary) !important;
  color: #fff;
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}
#main-nav .dropdown-menu .dropdown-item {
  color: rgba(255,255,255,.9);
}
#main-nav .dropdown-menu .dropdown-item:hover,
#main-nav .dropdown-menu .dropdown-item:focus {
  background: var(--color-primary-dark);
  color: #fff;
}
#main-nav .dropdown-toggle::after {
  filter: invert(1);   /* caret becomes white */
}

/* Shift the expanded menu 200 px to the right (RTL friendly) */
@media (min-width: 992px) {
  #main-nav .navbar-nav { margin-left: 200px; }
}

/*====================================================================*/
/* 6️⃣  Footer – Persian (Farsi) version                           */
/*====================================================================*/
.footer {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 3rem 0;
}
.footer-title { font-weight: 600; margin-bottom: 1rem; }
.footer-text  { margin-bottom: 1rem; line-height: 1.6; }
.footer-link a { color: #bdc3c7; text-decoration: none; }
.footer-link a:hover { color: #ecf0f1; text-decoration: underline; }
.footer-contact { margin-bottom: .5rem; }
.footer-contact .icon-phone,
.footer-contact .icon-mail {
  display: inline-block;
  width: 1.2rem; height: 1.2rem;
  margin-left: .5rem; /* RTL → right */
  vertical-align: middle;
}
.footer-divider { border-color: #fff; opacity: .25; margin: 2rem 0; }
.footer-copyright { color: #ecf0f1; text-decoration: none; }
.footer-copyright:hover { text-decoration: underline; }

@media (max-width: 767.98px) {
  .footer .row > div { margin-bottom: 2rem; }
}

/*====================================================================*/
/* 7️⃣  Layout – page grid and side‑bars                            */
/*====================================================================*/
.container { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
.page-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}
.box-left,
.box-right,
.subbox {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,.05);
}
.box-left { padding: 2rem; min-height: 1000px; }
.box-right { display: flex; flex-direction: column; gap: 1.5rem; }
.subbox { padding: 1.5rem; }

/* Responsive: stack sidebars on mobile */
@media (max-width: 992px) {
  .page-grid { grid-template-columns: 1fr; }
}

/*====================================================================*/
/* 8️⃣  Tag section (Box 2)                                          */
/*====================================================================*/
.tags-section {
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.tags-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 15px;
  color: #555;
  font-size: .95rem;
  font-weight: 600;
}
.tags-header svg { color: #b0b7c3; }
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-item {
  background: #f1f5f9;
  color: #64748b;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: .85rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.tag-item:hover {
  background: #e2e8f0;
  color: #334155;
}

/*====================================================================*/
/* 9️⃣  Miscellaneous helpers                                       */
/*====================================================================*/
/* Disable text selection & pointer events on carousel images */
#courseCarousel img {
  -webkit-user-drag: none;   /* Safari */
  user-select: none;         /* All modern browsers */
  pointer-events: none;      /* Prevent accidental clicks */
}

/* Logo watermark – use one block, not two */
.logo-wm {
  position: absolute;
  top: 20px;
  right: 10px;               /* change to left for LTR */
  width: 200px; height: 100px;
  background: url("../image/faracg_logo.svg") no-repeat center/contain;
  opacity: .3;
  pointer-events: none;
  z-index: 10;
}

/* Register button (Box 1) */
.btn-register-course {
  display: block;
  width: 100%;
  background: #69be45;
  color: #fff;
  text-decoration: none;
  padding: 14px 10px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  transition: background .3s ease;
}
.btn-register-course:hover { background: #58a63a; }

/*====================================================================*/
/* 10️⃣  Top header, Instagram icon, card images                     */
/*====================================================================*/
.top-header { margin-top: var(--gap-1); }

.instagram-icon img {
  float: left; /* RTL → already on right side of flex item */
  margin-right: var(--gap-1);
  margin-top: -20px;
}

/* Card image with hover effect */
.card-image-item { overflow: hidden; border-radius: var(--radius); }
.card-image-item img {
  height: var(--image-item-height);
  object-fit: cover;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-image-item img:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 10px rgba(0,0,0,.15);
}

/* Caption */
.caption-item {
  height: var(--caption-item-height);
  background: #fff;
  border-radius: var(--radius);
  margin-top: -15px;
  position: relative;
}
.cap-item-title   { margin-top: 25px; }
.cap-item-explain { font-size: 14px; font-weight: lighter; }
.cap-item-price   { font-size: 14px; float: right; padding-left: 0; }

/*====================================================================*/
/* 11️⃣  Top‑post‑website styling                                    */
/*====================================================================*/
.top-post-website p {
  font-size: 17px;
  border-bottom: 1px solid #e0e0e0;
}
.btn-dark.morecourse { float: left; }

/*====================================================================*/
/* 12️⃣  Utility – colour the dots like the navbar background      */
/*====================================================================*/
.distcolor, .nav-dots { color: var(--color-primary); }
.nav-dots {
  width: 5rem; display: inline-block; text-align: center;
}

.video-item{
  padding: 1px;
  border-radius: 25px;
}
.separator {
  height: 1rem;          /* 16 px by default, change as you wish */
  width: 100%;           /* full width */
}

.alert-info{
  border-radius: 25px;
  font-size: smaller;
}

/* Container Box */
.download-item-box {
    border: 1px dashed #d7e0e9;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Pushes icons to the left, text to the right */
    flex-wrap: wrap; /* Allows wrapping on small mobile screens */
    gap: 15px;
    background: #fff;
}

/* Info Group (Number + Title + Time + Status) */
.download-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.number-item {
    background: #fff;
    border: 1.5px solid #d7e0e9;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.download-item-box-title {
    font-weight: bold;
    padding-left: 15px;
    border-left: 1px solid #edf1f4;
}

.download-item-box-time {
    color: #8f9ca7;
    padding-left: 15px;
    border-left: 1px solid #edf1f4;
}

.download-item-box-status {
    color: #6fc341;
    font-weight: bold;
}

/* Icons Group */
.download-item-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icons {
  width: 40px;
  cursor: pointer;
  margin-right: 10px;
  margin-top: -10px;
  float: left;
  border: 1px solid #6fc341;
  background: #fafafa;
  color: #6fc341;
  font-size: 18px;
  padding: 9px;
  border-radius: 50%;

  height: 40px;
  transition: all 0.2s ease;
    
}

.icons:hover {
    background: #6fc341;
    filter: brightness(0.5) invert(1); /* Makes icon white on hover */
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .download-item-box {
        justify-content: center; /* Center everything on mobile */
        text-align: center;
    }
    
    .download-item-info {
        justify-content: center;
        width: 100%;
    }

    .download-item-box-title, 
    .download-item-box-time {
        border-left: none; /* Remove borders on mobile for cleaner look */
        padding-left: 0;
    }

    .download-item-actions {
        width: 100%;
        justify-content: center;
        margin-top: 5px;
    }
}
/* shift dropdown box a bit to the right */
.dropdown-menu {
    margin-right: -25px !important; /* adjust value as needed */
}

/* username gray color */
.user-name {
    color: #6c757d !important; /* gray */
    font-weight: 600;
}

.form-control {
    padding-right: 45px;
    height: 50px;
    border-radius: 12px;
}

.card {
    background: white;
}

.btn-primary {
    background: #09c;
    border: none;
    height: 50px;
    border-radius: 12px;
}

.btn-primary:hover {
    background: #007bb8;
}

.course-locked-item {
    opacity: 0.75;
    background: #fff8f8;
    border: 1px solid #ffd6d6;
}

.course-locked-item {
    opacity: 0.75;
    background: #fff8f8;
    border: 1px solid #ffd6d6;
}

.course-locked-item .download-item-box-title::after {
    content: " 🔒";
}

.btn {
    border-radius: 8px;
    font-weight: 500;
}
#main-nav .nav-link {
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
}

.footer img {
    background: white;
    padding: 6px;
    border-radius: 6px;
}