/* Modern Product Categories Styles */
.products-preview {
    padding: 6rem 0;
    background-color: #f9f9f9;
    position: relative;
    overflow: hidden;
}

.products-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/pattern-bg.png');
    opacity: 0.05;
    z-index: 0;
}

.products-preview .container {
    position: relative;
    z-index: 1;
}

.products-preview h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 1.5rem;
}

.products-preview .subtitle {
    text-align: center;
    color: #666;
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 30px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

.product-card.animate-in {
    animation: fadeInUp 0.6s forwards;
    opacity: 1;
    transform: translateY(0);
}

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

.product-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-info {
    padding: 25px;
}

.product-info h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.6rem;
    font-weight: 600;
    position: relative;
}

.product-info h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-color);
}

.rtl .product-info h3::after {
    left: auto;
    right: 0;
}

.product-info p {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    line-height: 1.6;
    flex-grow: 1;
}

.product-info .icon-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.icon-features.active {
    transform: translateY(-5px);
}

.product-info .icon-feature {
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.rtl .product-info .icon-feature {
    margin-right: 0;
    margin-left: 1.5rem;
}

.product-info .icon-feature i {
    color: var(--accent-color);
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.rtl .product-info .icon-feature i {
    margin-right: 0;
    margin-left: 0.5rem;
}

.btn-secondary {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: var(--accent-color);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background: transparent;
    color: var(--accent-color);
}

/* Projects Section */
.projects-section {
    padding: 6rem 0;
    background-color: white;
}

.projects-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 1.5rem;
}

.projects-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-color);
}

.projects-section .subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: var(--text-dark);
    font-size: 1.1rem;
    line-height: 1.6;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.project-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 250px;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.project-overlay p {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.view-more-btn {
    display: block;
    margin: 3rem auto 0;
    padding: 1rem 2.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    max-width: 200px;
    border: 2px solid var(--primary-color);
}

.view-more-btn:hover {
    background: transparent;
    color: var(--primary-color);
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card img {
        height: 250px;
    }
}

/* Responsive Styles for Product Categories */
@media screen and (max-width: 991px) {
    .products-preview {
        padding: 4rem 0;
    }
    
    .products-preview h2 {
        font-size: 2.2rem;
    }
    
    .products-preview .subtitle {
        font-size: 1rem;
        max-width: 90%;
        margin-bottom: 40px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .product-info h3 {
        font-size: 1.3rem;
    }
    
    .product-info p {
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 767px) {
    .products-preview {
        padding: 3rem 0;
    }
    
    .products-preview h2 {
        font-size: 1.8rem;
        padding-bottom: 1rem;
    }
    
    .products-preview .subtitle {
        font-size: 0.9rem;
        max-width: 95%;
        margin-bottom: 30px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-info h3 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    
    .product-info p {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
    
    .product-info .icon-features {
        margin-bottom: 12px;
    }
    
    .product-info .icon-features i {
        font-size: 0.9rem;
        margin-right: 8px;
    }
    
    .product-info .price {
        font-size: 1.1rem;
    }
    
    .product-info .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .category-tabs {
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 25px;
    }
    
    .category-tab {
        padding: 8px 15px;
        font-size: 0.9rem;
        margin: 0 4px 8px;
    }
}

@media screen and (max-width: 480px) {
    .products-preview {
        padding: 2.5rem 0;
    }
    
    .products-preview h2 {
        font-size: 1.6rem;
    }
    
    .products-preview .subtitle {
        font-size: 0.85rem;
        margin-bottom: 25px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-info h3 {
        font-size: 1.1rem;
    }
    
    .product-info p {
        font-size: 0.8rem;
    }
    
    .product-info .icon-features i {
        font-size: 0.8rem;
        margin-right: 6px;
    }
    
    .product-info .price {
        font-size: 1rem;
    }
    
    .product-info .btn {
        padding: 7px 12px;
        font-size: 0.85rem;
    }
    
    .category-tab {
        padding: 6px 12px;
        font-size: 0.8rem;
        margin: 0 3px 6px;
    }
}
