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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  font-family: "Rubik", sans-serif;
  font-optical-sizing: auto;
  overflow-x: hidden;
}

body {
  background-color: #fff;
}

/* Hide scrollbars for clean appearance */
::-webkit-scrollbar {
  width: 0;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: hsl(230, 71%, 90%);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 200px;
  z-index: 1000;
  box-shadow: 0 2px 16px hsla(230, 75%, 32%, .15);
  transition: all 0.3s ease;
}

.logo {
  cursor: pointer !important;
}

.navbar .nav {
  list-style: none;
  display: flex;
}

.nav-items {
  padding: 10px !important;
}

.nav-items a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  color: #000 !important;
  font-weight: 700 !important;
  padding: 10px !important;
  z-index: 1 !important;
  text-decoration: none !important;
  transition: all 0.3s ease;
}

.nav-items a .link-text {
  margin-left: 8px;
  transition: opacity 0.4s;
}

.nav-items a i {
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.4s;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-items a:hover .link-text {
  opacity: 0;
}

.nav-items a:hover i {
  opacity: 1;
  z-index: 2000 !important;
}

.nav-items a::before {
  content: '';
  width: 100%;
  height: 0;
  background: hsl(230, 12%, 40%);
  position: absolute;
  left: 0;
  bottom: 0;
  border-radius: 8px;
  transition: height 0.4s ease;
}

.nav-items a:hover::before {
  height: 100%;
}

/* ===== Buttons ===== */
.btn {
  color: #fff;
  padding: 10px 30px;
  background-color: hsl(230, 12%, 40%);
  border-radius: 15px;
  font-weight: 700;
  transition: all 0.4s ease;
}

.btn:hover {
  padding: 10px 40px;
}

.btn .ok {
  transition: all 0.4s ease;
}

.btn a:hover::after {
  color: hsl(230, 12%, 40%);
}

/* ===== Responsive Navbar ===== */
@media only screen and (max-width: 768px) {
  .navbar {
    height: auto;
    flex-direction: column;
    padding: 20px;
  }

  .nav {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .nav-items {
    padding: 10px 0;
  }

  .btn {
    display: none !important;
    margin-top: 20px;
  }

  .nav-items a {
    padding: 10px 0;
  }

  .nav-items a::before {
    height: 0; /* disable hover fill on mobile */
  }

  .nav-items a .link-text,
  .nav-items a i {
    opacity: 1;
  }

  .fa-solid {
    display: none !important;
  }

  .menu-toggle {
    margin-left: 10px;
    margin-top: 5px;
  }

  #video-background {
    height: 1000px !important;
  }
}

/* ===== Mobile Nav ===== */
.mobile-nav {
  display: none;
}

@media only screen and (max-width: 768px) {
  .nav.hidden {
    display: none;
  }

  .mobile-nav {
    display: block;
    background-color: rgb(24, 23, 23);
    padding: 20px;
  }

  .menu-toggle {
    display: block;
    cursor: pointer;
  }

  .menu-toggle i {
    font-size: 24px;
    color: #fff;
  }

  .navbar {
    flex-direction: column;
    align-items: center;
  }

  .nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
  }

  .nav-items {
    padding: 10px 0;
  }
}

/* ===== Video / Hero ===== */
#video-background {
  position: relative;
  right: 0;
  bottom: 0;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: 900px;
  z-index: -50;
  margin-top: -50px;
  object-fit: cover;
}

/* Hide mobile video by default */
#video-background-mobile {
  display: none;
}

/* Show mobile video on smaller screens */
@media screen and (max-width: 768px) {
  #video-background {
    display: none;
  }
  #video-background-mobile {
    height: 1000px !important;
    display: block;
    position: relative;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: 800px;
    z-index: -80000000 !important;
    margin-top: -50px;
    object-fit: cover;
  }
}

article {
  position: absolute;
  inset: 0;
  z-index: -5;
  margin: 10px;
}

/* ===== Dynamic Blog Section ===== */
.blog-section {
  padding: 60px 0;
  font-family: "Rubik", sans-serif;
  direction: rtl; /* For Persian content */
}

.blog-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Featured Post Styling */
.blog-section .featured-post {
  margin-bottom: 40px;
  border-bottom: 1px solid #201f1f;
  padding-bottom: 30px;
}

.blog-section .featured-post img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.blog-section .featured-post img:hover {
  transform: scale(1.02);
}

.blog-section .featured-post h2 {
  font-size: 28px;
  font-weight: 700;
  color: #222;
  margin-bottom: 15px;
}

.blog-section .featured-post p {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 20px;
}

.blog-section .post-meta {
  font-size: 14px;
  color: #888;
  display: flex;
  align-items: center;
}

/* Recent Posts List */
.blog-section .recent-posts {
  margin-top: 30px;
}

.blog-section .recent-posts h3 {
  font-size: 22px;
  margin-bottom: 20px;
  color: #222;
  padding-bottom: 10px;
  border-bottom: 1px solid #e1e1e1;
}

.blog-section .post-list {
  list-style: none;
}

.blog-section .post-item {
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  padding: 15px;
  border-radius: 8px;
}

.blog-section .post-item:hover {
  background-color: hsl(230, 71%, 90%);
}

.blog-section .post-item img {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
  margin-left: 15px;
}

.blog-section .post-item .post-content {
  flex: 1;
}

.blog-section .post-item h4 {
  font-size: 18px;
  margin-bottom: 5px;
  color: #222;
}

.blog-section .post-item .post-meta {
  font-size: 13px;
}

/* Responsive Adjustments for Blog */
@media (max-width: 768px) {
  .blog-section .post-item {
    flex-direction: column;
    text-align: center;
  }

  .blog-section .post-item img {
    margin-left: 0;
    margin-bottom: 15px;
    width: 100%;
    height: auto;
    max-height: 200px;
  }

  .blog-section .featured-post h2 {
    font-size: 24px;
  }
}

/* Persian Font Adjustments */
.blog-section {
  font-family: "Rubik", "Tahoma", sans-serif;
}

.blog-section h2,
.blog-section h3,
.blog-section h4 {
  font-weight: 700;
  line-height: 1.4;
}

h1 {
  position: absolute;
  top: 60%;
  width: 100%;
  font-size: 36px;
  letter-spacing: 3px;
  color: #fff;
  font-family: "Rubik", sans-serif;
  text-align: center;
}

h1 span {
  font-weight: 300;
  font-size: 16px;
  line-height: 24px;
}

h1 span a {
  color: #fff;
}

h6 {
  text-decoration: none !important;
}

/* ===== Gallery / Filter ===== */
.container-filter {
  margin: 0 0 30px;
  text-align: center;
}

.container-filter li {
  list-style: none;
  display: inline-block;
}

.container-filter a {
  display: block;
  font-size: 14px;
  margin: 10px 20px;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 400;
  line-height: 30px;
  border-bottom: 1px solid transparent;
  color: #807c7c !important;
  transition: color 0.3s ease;
}

.container-filter a:hover,
.container-filter a.active {
  color: #222 !important;
  border-bottom-color: #222;
}

/* ===== Gallery Item ===== */
.section {
  padding: 60px 0;
}

.portfolioContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.gallery-item {
  flex: 0 1 calc(33.333% - 20px);
  max-width: calc(33.333% - 20px);
  margin-bottom: 20px;
}

.item-box {
  position: relative;
  overflow: hidden;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.item-box a {
  display: block;
  width: 100%;
  height: 100%;
}

.item-box .item-container {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.item-box .item-mask {
  background: rgba(255, 255, 255, 0.9);
  position: absolute;
  top: 10px;
  left: 10px;
  bottom: 10px;
  right: 10px;
  opacity: 0;
  visibility: hidden;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease-in-out;
}

.item-box .item-caption {
  position: relative;
  width: 100%;
  padding: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.item-box .item-caption p,
.item-box .item-caption small,
.item-box .item-caption h6 {
  margin: 5px 0;
  color: #222;
}

.item-box:hover .item-mask {
  opacity: 1;
  visibility: visible;
}

.item-box:hover .item-caption {
  opacity: 1;
}

.item-box:hover .item-container {
  transform: scale(1.05);
}

/* Disable hover effects on touch devices */
@media (hover: none) {
  .item-box .item-mask {
    display: none;
  }

  .item-box .item-caption {
    display: none;
  }

  .item-box:hover .item-container {
    transform: none;
  }
}

/* Responsive Adjustments for Gallery */
@media (max-width: 992px) {
  .gallery-item {
    flex: 0 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
  }
}

@media (max-width: 576px) {
  .gallery-item {
    flex: 0 1 100%;
    max-width: 100%;
  }

  .item-box .item-container {
    height: 250px;
  }

  .item-box .item-mask {
    top: 5px;
    left: 5px;
    bottom: 5px;
    right: 5px;
  }

  .item-box .item-caption {
    padding: 8px;
  }
}

/* ===== About Section ===== */
#about-section {
  position: relative;
}

.blockabout {
  padding: 20px;
  background: #fff;
}

.blockabout-inner {
  padding: 30px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  transition: box-shadow 0.3s ease;
}

.blockabout-inner:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ===== Social Media + Buttons ===== */
.sosmed-horizontal a i {
  border: 1px solid #070707;
  border-radius: 50%;
  color: #070707;
  display: inline-block;
  height: 30px;
  width: 30px;
  line-height: 30px;
  margin: auto 3px;
  font-size: 15px;
  text-align: center;
  transition: all 0.3s ease;
}

.sosmed-horizontal a i:hover {
  background-color: #070707;
  color: #fff;
}

.rey-btn {
  border: 2px solid #070707;
  padding: 10px 40px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.rey-btn:hover {
  background-color: #070707;
  color: #fff;
}