﻿@font-face {
    font-family: "IRANSans";
    src: url("/fonts/IRANSans.woff2") format("woff2"), /* Modern Browsers */
    url("/fonts/IRANSans.woff") format("woff"), /* Modern Browsers */
    url("/fonts/IRANSans.ttf") format("truetype"), /* Safari, Android, iOS */
    url("/fonts/IRANSans.otf") format("opentype"), /* Open Type Font */
    url("/fonts/IRANSans.svg") format("svg"), /* Legacy iOS */
    url("/fonts/IRANSans.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
    url("/fonts/IRANSans.eot"); /* IE9 Compat Modes */
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* یا optional */
}

html {
    font-size: 14px;
    font-family: IRANSans !important;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    font-family: IRANSans !important;
}

.form-control {
    border-radius: 1rem !important;
}

.btn {
    border-radius: 3.0rem !important;
}

.dropdown-menu[data-bs-popper] {
    right: 0 !important;
}

/* User Rating Dialog Styles */
.rating-stars {
    display: flex;
    justify-content: center;
    gap: 5px;
    direction: ltr;
}

.rating-input {
    display: none;
}

.star-label {
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: grayscale(100%);
    opacity: 0.3;
}

.star-label:hover,
.rating-input:checked ~ .star-label,
.rating-input:checked + .star-label {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.rating-input:checked ~ .star-label {
    filter: grayscale(0%);
    opacity: 1;
}

#ratingModal .modal-content {
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

#ratingModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rating-animation {
    animation: ratingPulse 2s infinite;
}

@keyframes ratingPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.page-item:first-child .page-link {
    border-top-left-radius: 0rem;
    border-bottom-left-radius: 0rem;
    border-top-right-radius: .5rem;
    border-bottom-right-radius: .5rem;
}

.page-item:last-child .page-link {
    border-top-right-radius: 0rem;
    border-bottom-right-radius: 0rem;
    border-top-left-radius: .5rem;
    border-bottom-left-radius: .5rem;
}

@media (min-width: 992px) {
    .text-lg-start {
        text-align: right !important;
    }
}

.Maat {
    background-color: #272727;
    opacity:0.5;
}

.MaatSefid {
    background-color: #ffffff!important;
    opacity: 0.5!important;
}

.rounded-story {
    border-radius: 2rem !important;
}

.scrollbar {
    overflow-y: scroll;
}

#style-7::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
    background-color: #00000000;
    border-radius: 10px;
}

#style-7::-webkit-scrollbar {
    width: 10px;
    background-color: #00000000;
}

#style-7::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.44, rgb(122,153,217)), color-stop(0.72, rgb(73,125,189)), color-stop(0.86, rgb(28,58,148)));
}

.justify{
    text-align:justify !important;
}

.h1, h1 {
    font-size: 1.3rem !important;
}

.h2, h2 {
    font-size: 1.2rem !important;
}

.h3, h3 {
    font-size: 1.1rem !important;
}

.h4, h4 {
    font-size: 1.0rem !important;
}

.h5, h5 {
    font-size: 0.9rem !important;
}

.h6, h6 {
    font-size: 0.8rem !important;
}

.show{
    display:block !important;
}

.hide{
    display:none !important;
}

.card {
    background-color: #fff !important;
    border-radius: 8px !important;
    box-shadow: 1px 0 6px 0 rgba(0, 0, 0, .2) !important;
    border:none !important;
}

.search-gradient-bg {
    background: rgb(232,240,254) !important;
    background: linear-gradient(90deg, rgba(232,240,254,1) 0%, rgba(232,240,254,1) 15%, rgba(249,249,249,1) 30%, rgba(249,249,249,1) 100%) !important;
}

input{
    outline-color:none !important;
}

input:focus{
    outline-color:none !important;
    border: none !important;
}

/* Modern Kids Story Website Styles - 2025 Design */

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #FF6B9D 0%, #4ECDC4 100%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #4ECDC4 0%, #FF6B9D 100%);
}

/* Custom Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes wiggle {
  0%, 7% { transform: rotateZ(0); }
  15% { transform: rotateZ(-15deg); }
  20% { transform: rotateZ(10deg); }
  25% { transform: rotateZ(-10deg); }
  30% { transform: rotateZ(6deg); }
  35% { transform: rotateZ(-4deg); }
  40%, 100% { transform: rotateZ(0); }
}

/* Utility Classes */
.slide-in-up {
  animation: slideInUp 0.6s ease-out;
}

.fade-in-scale {
  animation: fadeInScale 0.5s ease-out;
}

.wiggle {
  animation: wiggle 1s ease-in-out;
}

/* Interactive Elements */
.interactive:hover {
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* Custom Button Styles */
.btn-kids {
  background: linear-gradient(135deg, #FF6B9D 0%, #4ECDC4 100%);
  border: none;
  border-radius: 25px;
  padding: 12px 30px;
  font-weight: 600;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.btn-kids:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
  color: white;
}

/* Story Card Enhancements */
.story-card-enhanced {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 25px;
  padding: 25px;
  margin: 20px 0;
  transition: all 0.4s ease;
  border: 3px solid transparent;
  position: relative;
  overflow: hidden;
}

.story-card-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.story-card-enhanced:hover::before {
  left: 100%;
}

.story-card-enhanced:hover {
  border-color: #FF6B9D;
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 40px rgba(255, 107, 157, 0.2);
}

/* Category Badge Enhancements */
.category-badge-enhanced {
  background: linear-gradient(135deg, #FFE66D 0%, #FFA07A 100%);
  color: white;
  border-radius: 30px;
  padding: 12px 25px;
  margin: 8px;
  display: inline-block;
  transition: all 0.3s ease;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(255, 230, 109, 0.3);
}

.category-badge-enhanced:hover {
  transform: scale(1.1) rotate(2deg);
  color: white;
  text-decoration: none;
  box-shadow: 0 8px 25px rgba(255, 230, 109, 0.4);
}

/* Search Enhancement */
.search-enhanced {
  background: linear-gradient(135deg, #FFE66D 0%, #FFA07A 100%);
  border-radius: 50px;
  padding: 15px 25px;
  border: none;
  box-shadow: 0 8px 25px rgba(255, 230, 109, 0.3);
  transition: all 0.3s ease;
}

.search-enhanced:focus {
  outline: none;
  box-shadow: 0 8px 25px rgba(255, 230, 109, 0.5);
  transform: scale(1.02);
}

/* Hero Section Enhancements */
.hero-enhanced {
  background: linear-gradient(135deg, #FF6B9D 0%, #4ECDC4 100%);
  border-radius: 30px;
  padding: 80px 50px;
  margin: 50px 0;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-enhanced::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate 25s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-enhanced {
    padding: 40px 20px;
    margin: 20px 0;
  }
  
  .story-card-enhanced {
    margin: 10px 0;
    padding: 20px;
  }
  
  .category-badge-enhanced {
    padding: 10px 20px;
    margin: 5px;
  }
}

/* Loading Animation */
.loading-dots {
  display: inline-block;
}

.loading-dots::after {
  content: '';
  animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* Accessibility Improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .story-card-enhanced {
    border: 2px solid #000;
  }
  
  .btn-kids {
    border: 2px solid #000;
  }
}

/* Category Pills */
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
  text-decoration: none;
  min-width: 120px;
  justify-content: center;
}

.category-pill:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
  color: white;
  text-decoration: none;
}

.category-pill .category-icon {
  font-size: 1.2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.category-pill .category-text {
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Responsive Category Pills */
@media (max-width: 768px) {
  .category-pill {
    padding: 10px 16px;
    font-size: 0.85rem;
    min-width: 100px;
  }
  
  .category-pill .category-icon {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .category-pill {
    padding: 8px 14px;
    font-size: 0.8rem;
    min-width: 90px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .category-pill {
    transition: none;
  }
  
  .category-pill:hover {
    transform: none;
  }
}