/* Specific styles for products.html */

/* General adjustments for main content */
.products-page-main {
    padding-top: 100px; /* Adjust for fixed header */
    padding-bottom: 80px; /* Space above footer */
    min-height: calc(100vh - 180px); /* Adjust based on header/footer height */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px; /* Space between sections */
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    max-width: 900px;
    color: white;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.05); /* Lighter glassmorphism for hero */
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    margin-top: 40px; /* Push down slightly from header */
}

.hero-section h1 {
    font-size: 3.8rem;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FF6347); /* Gold to orange gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #FFD700; /* Fallback for unsupported browsers */
}

.hero-section p {
    font-size: 1.5rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Common Section Styling */
.section-spacing {
    width: 100%;
    max-width: 1200px;
    padding: 40px 20px;
    text-align: center;
}

.section-spacing h2 {
    font-size: 3.2rem;
    color: white;
    margin-bottom: 25px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.section-spacing h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, transparent, #e0a34b, transparent);
    border-radius: 5px;
}

.section-description {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Product Cards Section --- */
.products-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding-top: 60px;
    padding-bottom: 60px;
}

.product-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    justify-content: center;
    align-items: stretch;
}

.product-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.product-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: rotate(0deg);
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 0;
}

.product-card:hover::before {
    opacity: 1;
    transform: rotate(90deg);
}

.product-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 255, 255, 0.2) inset;
    background: rgba(255, 255, 255, 0.08);
}

.card-image-container {
    width: 100%;
    max-width: 250px;
    height: 180px;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .card-image-container img {
    transform: scale(1.05);
}

.product-card h3 {
    font-size: 1.8rem;
    color: #e0a34b; /* Gold accent */
    margin-bottom: 10px;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.product-card p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    flex-grow: 1; /* Make description take available space */
    z-index: 1;
}

.cta-button {
    background: linear-gradient(45deg, #e0a34b, #f0c27c);
    color: #333;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(224, 163, 75, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
    z-index: -1;
}

.cta-button:hover::after {
    width: 200%;
    height: 200%;
    opacity: 1;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(224, 163, 75, 0.6);
    color: #000;
}

/* --- Subscriptions Section --- */
.subscriptions-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding-top: 60px;
    padding-bottom: 60px;
}

.subscription-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    justify-content: center;
    align-items: flex-start; /* Align tops of cards */
}

.plan-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), box-shadow 0.4s ease, border-color 0.4s ease; /* Springy transition */
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.05), transparent);
    z-index: 0;
    transition: background 0.3s ease;
}

.plan-card:hover::before {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.15), transparent);
}

.plan-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 255, 255, 0.3) inset;
}

.plan-card h3 {
    font-size: 2.2rem;
    color: white;
    margin-bottom: 15px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.plan-card .price {
    font-size: 3.5rem;
    color: #f0c27c;
    font-weight: bold;
    margin-bottom: 25px;
    z-index: 1;
}

.plan-card .price span {
    font-size: 0.7em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: normal;
}

.plan-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    width: 100%;
    text-align: left;
    z-index: 1;
}

.plan-card ul li {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.plan-card ul li i {
    margin-right: 10px;
    font-size: 1.2em;
}

.plan-card ul li .fa-check-circle { color: #28a745; } /* Green for included features */
.plan-card ul li .fa-times-circle { color: #dc3545; opacity: 0.7; } /* Red for excluded features */

.select-plan-button {
    background: #e0a34b;
    color: #333;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(224, 163, 75, 0.5);
    z-index: 1;
}

.select-plan-button:hover {
    background: #f0c27c;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(224, 163, 75, 0.7);
}

/* Specific Plan Colors */
.basic-plan { border-left: 5px solid #007bff; }
.basic-plan .price { color: #007bff; }
.basic-plan:hover { border-color: #007bff; }

.pro-plan { border-left: 5px solid #28a745; }
.pro-plan .price { color: #28a745; }
.pro-plan:hover { border-color: #28a745; }

.ultimate-plan { border-left: 5px solid #dc3545; }
.ultimate-plan .price { color: #dc3545; }
.ultimate-plan:hover { border-color: #dc3545; }


/* --- Offers Section --- */
.offers-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding-top: 60px;
    padding-bottom: 60px;
}

.offer-cards-carousel {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping for responsiveness */
    justify-content: center;
    gap: 30px;
}

.offer-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 25px;
    width: 320px; /* Fixed width for better carousel feel */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.offer-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 255, 255, 0.2) inset;
    background: rgba(255, 255, 255, 0.15);
}

.offer-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, #FF6347, #FFD700);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(255, 99, 71, 0.5);
    transform: rotate(5deg);
    transform-origin: top right;
    animation: pulseBadge 1.5s infinite alternate;
}

@keyframes pulseBadge {
    from { transform: scale(1) rotate(5deg); }
    to { transform: scale(1.05) rotate(5deg); }
}

.offer-card h3 {
    font-size: 2rem;
    color: #e0a34b;
    margin-bottom: 10px;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    margin-top: 30px; /* Space for badge */
}

.offer-card p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    flex-grow: 1;
}

.offer-validity {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
}

.get-offer-button {
    background: linear-gradient(45deg, #FF6347, #FF4500);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 99, 71, 0.4);
}

.get-offer-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 99, 71, 0.6);
    background: linear-gradient(45deg, #FF4500, #FF6347);
}


/* --- Why Us Section (Creative Section) --- */
.why-us-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding-top: 60px;
    padding-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    justify-content: center;
    margin-top: 50px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.02), transparent 50%);
    transition: background 0.3s ease;
    z-index: 0;
}

.feature-item:hover::before {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.08), transparent 50%);
}

.feature-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 25px rgba(255, 255, 255, 0.1) inset;
}

.feature-item i {
    font-size: 3.5rem;
    color: #e0a34b; /* Gold accent */
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(224, 163, 75, 0.6));
    transition: transform 0.3s ease, filter 0.3s ease;
    z-index: 1;
}

.feature-item:hover i {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
}

.feature-item h3 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 15px;
    font-weight: 600;
    z-index: 1;
}

.feature-item p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    z-index: 1;
}


/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
    .hero-section h1 {
        font-size: 3rem;
    }
    .hero-section p {
        font-size: 1.3rem;
    }
    .section-spacing h2 {
        font-size: 2.8rem;
    }
    .section-description {
        font-size: 1.15rem;
    }
    .product-cards-grid,
    .subscription-plans-grid,
    .features-grid {
        gap: 30px;
    }
    .offer-card {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .products-page-main {
        padding-top: 80px; /* Adjust for smaller header on mobile */
        gap: 60px;
    }
    .hero-section {
        padding: 40px 15px;
        margin-top: 20px;
    }
    .hero-section h1 {
        font-size: 2.5rem;
    }
    .hero-section p {
        font-size: 1.1rem;
    }
    .section-spacing h2 {
        font-size: 2.2rem;
    }
    .section-description {
        font-size: 1rem;
        margin-bottom: 40px;
    }
    .product-cards-grid,
    .subscription-plans-grid,
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 25px;
        padding: 0 10px; /* Add some horizontal padding */
    }
    .product-card, .plan-card, .offer-card, .feature-item {
        padding: 20px;
    }
    .product-card h3, .plan-card h3, .offer-card h3, .feature-item h3 {
        font-size: 1.6rem;
    }
    .product-card p, .offer-card p, .feature-item p {
        font-size: 1rem;
    }
    .plan-card .price {
        font-size: 3rem;
    }
    .plan-card ul li {
        font-size: 1rem;
    }
    .cta-button, .select-plan-button, .get-offer-button {
        padding: 10px 20px;
        font-size: 1rem;
    }
    .offer-card {
        width: 100%; /* Make offers full width on smaller screens if they don't fit 300px */
        max-width: 350px; /* Or a max-width */
        margin: 0 auto; /* Center single card */
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    .hero-section p {
        font-size: 0.9rem;
    }
    .section-spacing h2 {
        font-size: 1.8rem;
        padding-bottom: 10px;
    }
    .section-spacing h2::after {
        width: 80px;
        height: 4px;
    }
    .section-description {
        font-size: 0.9rem;
        margin-bottom: 30px;
    }
    .product-cards-grid,
    .subscription-plans-grid,
    .features-grid {
        grid-template-columns: 1fr; /* Stack cards vertically on very small screens */
        gap: 20px;
    }
    .product-card h3, .plan-card h3, .offer-card h3, .feature-item h3 {
        font-size: 1.4rem;
    }
    .product-card p, .offer-card p, .feature-item p {
        font-size: 0.9rem;
    }
    .plan-card .price {
        font-size: 2.5rem;
    }
    .plan-card ul li {
        font-size: 0.9rem;
    }
    .cta-button, .select-plan-button, .get-offer-button {
        padding: 8px 18px;
        font-size: 0.9rem;
    }
}

/* RTL adjustments for Arabic */
body.arabic-active .products-page-main {
    direction: rtl;
}

body.arabic-active .product-card ul,
body.arabic-active .plan-card ul,
body.arabic-active .feature-item ul {
    text-align: right;
}

body.arabic-active .plan-card ul li i {
    margin-right: 0;
    margin-left: 10px;
}

body.arabic-active .offer-badge {
    right: auto;
    left: 15px;
    transform: rotate(-5deg); /* Flip rotation for RTL */
    transform-origin: top left;
}

@keyframes pulseBadge {
    from { transform: scale(1) rotate(-5deg); }
    to { transform: scale(1.05) rotate(-5deg); }
}

body.arabic-active .section-spacing h2::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}
/* Product Image Container & Images */
.card-image-container {
    position: relative;
    width: 100%;
    max-width: 250px; /* Adjust to your card-image-container size */
    height: 180px; /* Adjust to your card-image-container size */
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.slider-image { /* تم تغيير الكلاس من .product-img إلى .slider-image كما في الـ HTML الجديد */
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.5s ease-in-out; /* لتأثير التلاشي عند التبديل */
}

/* Image Navigation Controls */
/* تأكد من أن أزرار التنقل تظهر وتختفي بشكل صحيح على hover */
.slider-btn { /* كلاس جديد لأزرارك */
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%; /* لجعلها دائرية */
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0; /* مخفية افتراضيًا */
    transition: opacity 0.3s ease, background 0.3s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* أظهر الأزرار عند hover على البطاقة بأكملها */
.product-card:hover .slider-btn {
    opacity: 1;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    opacity: 0; /* مخفية افتراضيًا */
    transition: opacity 0.3s ease;
}

/* أظهر النقاط عند hover على البطاقة بأكملها */
.product-card:hover .slider-dots {
    opacity: 1;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dot.active {
    background: #e0a34b; /* لون النقطة النشطة */
    transform: scale(1.2);
}
