/* Products Enhanced Styling */

.products-area {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 80px 0;
}

.products-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    z-index: 0;
}

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

.product-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(35, 153, 162, 0.1);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, #2399A2 0%, #6CA7AD 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[dir="rtl"] .product-card::before {
    transform-origin: right;
}

.product-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(35, 153, 162, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover::after {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(35, 153, 162, 0.15);
    border-color: rgba(35, 153, 162, 0.3);
}

/* Product Icon */
.product-icon {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #2399A2 0%, #6CA7AD 100%);
    border-radius: 20px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 10px 30px rgba(35, 153, 162, 0.25);
}

.product-icon::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 20px;
    background: linear-gradient(135deg, #2399A2 0%, #6CA7AD 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
    filter: blur(10px);
}

.product-card:hover .product-icon::before {
    opacity: 0.6;
}

.product-icon i {
    font-size: 40px;
    color: #fff;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-icon {
    transform: rotateY(360deg) scale(1.1);
    box-shadow: 0 15px 40px rgba(35, 153, 162, 0.4);
}

.product-card:hover .product-icon i {
    transform: scale(1.1);
}

/* Product Content */
.product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 18px;
    line-height: 1.5;
    text-align: center;
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.product-card:hover .product-name {
    color: #667eea;
}

.product-description {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 0;
    flex: 1;
    text-align: center;
    transition: color 0.3s ease;
}

.product-card:hover .product-description {
    color: #555;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 25px 0 0 0;
    border-top: 2px solid #f0f0f0;
    padding-top: 20px;
}

.product-features li {
    padding: 12px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.3s ease;
}

.product-features li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.product-features li:hover {
    color: #667eea;
    padding-left: 5px;
}

[dir="rtl"] .product-features li:hover {
    padding-left: 0;
    padding-right: 5px;
}

.product-features li i {
    color: #667eea;
    font-size: 16px;
    margin-right: 12px;
    margin-top: 3px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.product-features li:hover i {
    transform: scale(1.2);
}

/* LTR/RTL Text Alignment */
[dir="ltr"] .product-description {
    text-align: center;
}

[dir="rtl"] .product-description {
    text-align: center;
}

[dir="ltr"] .product-features li {
    text-align: left;
}

[dir="rtl"] .product-features li {
    text-align: right;
    flex-direction: row-reverse;
}

[dir="rtl"] .product-features li i {
    margin-right: 0;
    margin-left: 12px;
}

/* Dark Mode Support */
body.dark-mode .products-area {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

body.dark-mode .products-area::before {
    background: linear-gradient(135deg, rgba(35, 153, 162, 0.05) 0%, rgba(108, 167, 173, 0.05) 100%);
}

body.dark-mode .products-area .section-heading h2 {
    color: #ffffff;
}

body.dark-mode .product-card {
    background: #2d2d2d;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: #404040;
}

body.dark-mode .product-card:hover {
    box-shadow: 0 20px 50px rgba(35, 153, 162, 0.25);
    border-color: rgba(35, 153, 162, 0.3);
}

body.dark-mode .product-icon {
    background: linear-gradient(135deg, #2399A2 0%, #6CA7AD 100%);
    box-shadow: 0 10px 30px rgba(35, 153, 162, 0.25);
}

body.dark-mode .product-icon::before {
    background: linear-gradient(135deg, #2399A2 0%, #6CA7AD 100%);
}

body.dark-mode .product-card:hover .product-icon {
    box-shadow: 0 15px 40px rgba(35, 153, 162, 0.4);
}

body.dark-mode .product-name {
    color: #fff;
}

body.dark-mode .product-card:hover .product-name {
    color: #6CA7AD;
}

body.dark-mode .product-description {
    color: #b0b0b0;
}

body.dark-mode .product-card:hover .product-description {
    color: #e0e0e0;
}

body.dark-mode .product-features {
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .product-features li {
    color: #b0b0b0;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .product-features li:hover {
    color: #6CA7AD;
}

body.dark-mode .product-features li i {
    color: #2399A2;
}

/* Responsive Design */
@media (max-width: 991px) {
    .products-area {
        padding: 60px 0 !important;
    }

    .product-icon {
        width: 75px;
        height: 75px;
        border-radius: 18px;
    }

    .product-icon i {
        font-size: 34px;
    }

    .product-name {
        font-size: 19px;
        min-height: auto;
    }

    .product-description {
        font-size: 14px;
    }

    .product-features li {
        font-size: 13px;
        padding: 10px 0;
    }
}

@media (max-width: 767px) {
    .products-area {
        padding: 50px 0 !important;
    }

    .product-card {
        padding: 30px 25px;
        border-radius: 15px;
    }

    .product-icon {
        width: 65px;
        height: 65px;
        margin-bottom: 25px;
        border-radius: 15px;
    }

    .product-icon i {
        font-size: 30px;
    }

    .product-name {
        font-size: 18px;
        min-height: auto;
        margin-bottom: 15px;
    }

    .product-description {
        font-size: 14px;
    }

    .product-features {
        margin-top: 20px;
        padding-top: 15px;
    }

    .product-features li {
        font-size: 13px;
        padding: 8px 0;
    }

    .product-features li i {
        font-size: 14px;
    }
}

/* Products Grid Layout */
.products-area .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
    padding: 15px!important;
}

.products-area .row>[class*="col-"] {
    display: flex;
    padding-left: 15px;
    padding-right: 15px;
}

@media (min-width: 992px) {
    .products-area .row>.col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .products-area .row>.col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 767px) {
    .products-area .row>[class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
