/* فونت Vazir - نسخه محلی */
@font-face {
    font-family: Vazir;
    src: url('../fonts/vazirmatn/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2'),
         url('../fonts/Vazirmatn-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Vazir;
    src: url('../fonts/vazirmatn/fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2'),
         url('../fonts/vazirmatn/fonts/ttf/Vazirmatn-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #0d6efd;
    --secondary-color: #20c997;
    --dark-color: #1a3c5e;
    --light-color: #f8f9fa;
    --orange-color: #df9800;
    --water-color: #2980b9;
    --oil-color: #333333;
    --polymer-color: #9C27B0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Vazir, Tahoma, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    direction: rtl;
}

.navbar {
    background-color: var(--dark-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.hero-section {
    
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 300px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.section-title {
    position: relative;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    font-weight: bold;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
    transition: width 0.5s ease;
}

.section-title:hover::after {
    width: 120px;
}

.service-card, .product-card, .certificate-card, .news-card {
    border: none;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    margin-bottom: 40px;
    height: 100%;
    opacity: 0;
    transform: translateY(30px);
}

.service-card.animate, .product-card.animate, .certificate-card.animate, .news-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover, .product-card:hover, .news-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.certificate-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.certificate-img {
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    transition: transform 0.5s ease;
}

.services-img {
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    transition: transform 0.5s ease;
}

.services-img:hover {
    transform: scale(1.03);
}

.service-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.2) rotate(5deg);
}

.news-img {
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    transition: transform 0.5s ease;
}

.news-img:hover {
    transform: scale(1.03);
}

.timeline {
    position: relative;
    padding: 0;
    list-style: none;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 20px;
    width: 4px;
    background: var(--primary-color);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 1s ease;
}

.timeline.animate:before {
    transform: scaleY(1);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-right: 50px;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.5s ease;
}

.timeline-item.animate {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:nth-child(even) {
    transition-delay: 0.2s;
}

.timeline-item:nth-child(odd) {
    transition-delay: 0.4s;
}

.timeline-item:before {
    content: '';
    position: absolute;
    top: 5px;
    right: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--water-color);
    border: 4px solid var(--primary-color);
    transform: scale(0);
    transition: transform 0.5s ease;
}

.timeline-item.animate:before {
    transform: scale(1);
    background-color: var(--water-color);
}

.certificate-card {
    text-align: center;
    padding: 30px 20px;
}

.certificate-card-full {
    border: none;
    border-radius: 25px;
    text-align: center;
    padding: 30px 20px;
}

.certificate-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.certificate-card:hover .certificate-icon {
    transform: scale(1.2);
    color: var(--secondary-color);
}

.product-img  {
    height: 220px;
    object-fit: cover;
    border-top-right-radius: 15px;
    border-top-left-radius: 15px;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img, .news-card:hover  {
    transform: scale(1.05);
}

.news-date {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.news-card:hover .news-date {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

.news-tag {
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.75rem;
    margin-left: 8px;
    transition: all 0.3s ease;
}

.news-card:hover .news-tag {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 80px 0 40px;
}

.footer a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
    padding-right: 5px;
}

.social-icons a {
    display: inline-block;
    width: 45px;
    height: 45px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 45px;
    margin-left: 12px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-8px) scale(1.1);
}

.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.animate {
    opacity: 1;
    transform: translateY(0);
}

.stagger-animate > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.stagger-animate.animate > * {
    opacity: 1;
    transform: translateY(0);
}

.stagger-animate.animate > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-animate.animate > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-animate.animate > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-animate.animate > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-animate.animate > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-animate.animate > *:nth-child(6) { transition-delay: 0.6s; }

@media (max-width: 768px) {
    .hero-section {
        padding: 120px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .timeline:before {
        right: 20px;
    }
    
    .timeline-item {
        padding-right: 40px;
    }
    
    .service-card, .product-card, .certificate-card, .news-card {
        margin-bottom: 30px;
    }
}

/* Pulse animation for CTA buttons */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(13, 110, 253, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Floating animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.float-animation {
    animation: float 5s ease-in-out infinite;
}

.about-paragraph {
    letter-spacing: 0.5px;
    word-spacing: 2px;
    line-height: 2;
    font-size: 17px;
    margin: 0 0 12px 0;
    text-align: justify;
    /* text-indent: 24px; */
  }

  .text-justify {
    text-align: justify;
  }

  .publication-card {
        border: none;
        border-radius: 12px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        transition: all 0.4s ease;
        margin-bottom: 30px;
        height: 100%;
        background-color: white;
        overflow: hidden;
    }

    .publication-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    }

    .publication-img {
        height: 45%;
        object-fit: fill;
        width: 100%;
        transition: transform 0.5s ease;
        scale: 90%;
        position: center;
        border-radius: 12px;
    }

    .publication-card:hover .publication-img {
        transform: scale(1.05);
    }

    .publication-icon {
        font-size: 2.5rem;
        color: var(--primary-color);
        margin-bottom: 1rem;
    }

    .publication-meta {
        font-size: 0.85rem;
        color: #666;
    }

    .publication-meta i {
        color: var(--primary-color);
        margin-left: 5px;
    }

    .download-btn {
        background-color: var(--primary-color);
        color: white;
        border: none;
        padding: 8px 20px;
        border-radius: 6px;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .download-btn:hover {
        background-color: #0b5ed7;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
    }

        .certificates-section {
        padding: 60px 0;
        background-color: #f8f9fa;
        direction: rtl;
    }
    
    .section-title {
        color: #1a3c5e;
        position: relative;
        padding-bottom: 15px;
        margin-bottom: 40px;
        text-align: center;
        font-size: 2rem;
    }
    
    .section-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 50%;
        transform: translateX(50%);
        width: 100px;
        height: 3px;
        background: linear-gradient(to left, #0d6efd, #20c997);
    }
    
    /* نوار افقی اسکرول شونده */
    .scroll-container {
        position: relative;
        padding: 20px 0;
    }
    
    .scroll-wrapper {
        display: flex;
        gap: 20px;
        padding: 15px;
        overflow-x: auto;
        scroll-behavior: smooth;
        overflow: auto
    }
    
    .scroll-wrapper::-webkit-scrollbar {
        height: 6px;
    }
    
    .scroll-wrapper::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.05);
        border-radius: 10px;
    }
    
    .scroll-wrapper::-webkit-scrollbar-thumb {
        background: linear-gradient(45deg, #0d6efd, #20c997);
        border-radius: 10px;
    }
    
    /* کارت گواهینامه */
    .certificate-card {
        flex: 0 0 auto;
        width: 250px;
        background: white;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
        cursor: pointer;
        border: 1px solid rgba(0,0,0,0.08);
    }
    
    .certificate-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }
    
    .certificate-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    .certificate-content {
        padding: 15px;
    }
    
    .certificate-title {
        font-size: 1.1rem;
        font-weight: bold;
        margin-bottom: 8px;
        color: #1a3c5e;
        text-align: center;
    }
    
    .certificate-description {
        color: #666;
        font-size: 0.85rem;
        line-height: 1.4;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .certificate-id {
        display: block;
        text-align: center;
        color: #0d6efd;
        font-size: 0.8rem;
        font-family: monospace;
    }
    
    /* دکمه‌های ناوبری */
    .scroll-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: white;
        border: none;
        box-shadow: 0 3px 10px rgba(0,0,0,0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        color: #0d6efd;
        cursor: pointer;
        z-index: 10;
        transition: all 0.3s ease;
    }
    
    .scroll-btn:hover {
        background: #0d6efd;
        color: white;
    }
    
    .scroll-btn.prev {
        right: -20px;
    }
    
    .scroll-btn.next {
        left: -20px;
    }
    
    /* مودال نمایش عکس */
    .image-modal {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background: rgba(0,0,0,0.9);
        z-index: 1000;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    
    .image-modal.active {
        display: flex;
    }
    
    .modal-image {
        max-width: 90%;
        max-height: 90vh;
        object-fit: contain;
        border-radius: 5px;
    }
    
    .modal-close {
        position: absolute;
        top: 20px;
        left: 20px;
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 5px;
    }
    
    .modal-title {
        position: absolute;
        bottom: 20px;
        right: 20px;
        color: white;
        font-size: 1.1rem;
        background: rgba(0,0,0,0.7);
        padding: 10px 20px;
        border-radius: 5px;
    }
    
    @media (max-width: 768px) {
        .certificate-card {
            width: 220px;
        }
        
        .certificate-image {
            height: 100%;
        }
        
        .scroll-btn {
            display: none;
        }
        
        .modal-image {
            max-width: 95%;
        }
    }
    
    @media (max-width: 576px) {
        .certificate-card {
            width: 200px;
        }
        
        .certificate-image {
            height: 100%;
        }
    }
    
    /* پیام خالی */
    .empty-message {
        text-align: center;
        padding: 40px 20px;
        background: white;
        border-radius: 10px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .empty-message i {
        font-size: 3rem;
        color: #ddd;
        margin-bottom: 15px;
    }
    
    .empty-message h4 {
        color: #666;
        margin-bottom: 10px;
    }

    .text-right {
        text-align: right;
    }

    swiper-container {
      width: 100%;
      height: 100%;
    }

    swiper-slide {
      text-align: center;
      font-size: 18px;
      /* background: #444; */
      display: flex;
      justify-content: center;
      align-items: center;
    }

    swiper-slide img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }