﻿/*CategoryPosts.razor*/
/*_________________________________________*/

/* General Styles for Category Pages */
.rtl-container {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* Category Header Section */
.category-header {
    padding: 2.5rem 0;
    background: linear-gradient(135deg, #03a87c 0%, #038f6a 100%);
    margin-bottom: 2rem;
    text-align: center;
}

.category-title {
    color: white;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.category-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #03a87c, #38ef7d);
}

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Hero Carousel Styles */
.category-hero-section {
    position: relative;
    margin-bottom: 3rem;
    overflow: hidden;
}

/* Premium Carousel Styles */
.premium-carousel {
    margin-top: -1rem;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}

.carousel-image-container {
    position: relative;
    height: 80vh;
    min-height: 550px;
}

.carousel-image-container img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    filter: brightness(0.95);
    transform: scale(1);
    transition: transform 7s ease;
}

.carousel-item.active .carousel-image-container img {
    transform: scale(1.1);
}

.premium-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(0, 0, 0, 0.3) 40%,
            rgba(0, 0, 0, 0.6) 70%,
            rgba(0, 0, 0, 0.8) 100%);
}

.premium-caption {
    text-align: right;
    right: 0;
    left: 0;
    bottom: 0;
    top: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    max-width: 100%;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-caption-inner {
    max-width: 750px;
    padding: 3rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.7s ease;
}

.carousel-item.active .premium-caption-inner {
    transform: translateY(0);
    opacity: 1;
}

.premium-badges {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.carousel-badge {
    display: inline-flex;
    align-items: center;
    background-color: #03a87c;
    color: white;
    font-size: 0.9rem;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    margin-bottom: 0;
    margin-left: 0;
    box-shadow: 0 5px 15px rgba(3, 168, 124, 0.3);
}

.premium-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.premium-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #03a87c, #38ef7d);
    margin-bottom: 1.5rem;
}

.premium-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

.premium-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-size: 1.1rem;
    background: linear-gradient(45deg, #03a87c, #38ef7d);
    border: none;
    box-shadow: 0 5px 15px rgba(3, 168, 124, 0.4);
    transition: all 0.3s ease;
}

.premium-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(3, 168, 124, 0.5);
    background: linear-gradient(45deg, #038f6a, #32d96f);
}

.premium-btn i {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.premium-btn:hover i {
    transform: translateX(-5px);
}

.post-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    margin-bottom: 0;
    color: white;
}

.carousel-control-circle {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: white;
    backdrop-filter: blur(3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.custom-carousel-control {
    width: 60px;
    height: 60px;
    background-color: transparent;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 10;
}

.custom-carousel-control:hover {
    opacity: 1;
}

.custom-carousel-control:hover .carousel-control-circle {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.carousel-control-prev {
    left: 2rem;
}

.carousel-control-next {
    right: 2rem;
}

.premium-indicators {
    bottom: 30px;
    z-index: 5;
}

.premium-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: white;
    border: none;
    margin: 0 5px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.premium-indicators button.active {
    opacity: 1;
    width: 18px;
    height: 18px;
    background-color: #03a87c;
}

.premium-carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 5;
}

.premium-carousel-progress .progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(to right, #03a87c, #38ef7d);
    animation: progress-animation 5s linear forwards;
}

@keyframes progress-animation {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

.carousel-item.active .premium-carousel-progress .progress-bar {
    animation: progress-animation 5s linear forwards;
}

/* Posts Masonry Section */
.posts-section {
    padding: 2rem 0;
    background-color: white;
}

/* قائمة المشروعات المحسنة */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    margin-bottom: 3rem;
}

.post-list-item {
    display: flex;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    position: relative;
}

.post-list-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.post-list-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(to top, #03a87c, #38ef7d);
    transition: height 0.4s ease;
}

.post-list-item:hover::after {
    height: 100%;
}

.post-list-image {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}

.post-list-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-list-item:hover .post-list-image img {
    transform: scale(1.1);
}

.post-list-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #03a87c;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(3, 168, 124, 0.3);
    z-index: 1;
}

.post-list-content {
    flex: 1;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
}

.post-list-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.post-list-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-list-date i {
    color: #03a87c;
}

.post-list-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
    transition: color 0.3s ease;
}

.post-list-item:hover .post-list-title {
    color: #03a87c;
}

.post-list-excerpt {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1rem;
}

.post-list-footer {
    margin-top: auto;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.post-list-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #03a87c;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 0;
}

.post-list-link i {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.post-list-link:hover {
    color: #038f6a;
}

.post-list-link:hover i {
    transform: translateX(-5px);
}

/* الاستجابة للشاشات المختلفة */
@media (max-width: 992px) {
    .post-list-item {
        flex-direction: column;
    }

    .post-list-image {
        flex: none;
        width: 100%;
    }

    .post-list-image img {
        height: 250px;
    }

    .post-list-title {
        font-size: 1.4rem;
    }
}

/* باقي الأنماط تبقى كما هي */
.posts-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.image-container {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .image-container img {
    transform: scale(1.1);
}

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 168, 124, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.post-card:hover .post-overlay {
    opacity: 1;
}

.post-overlay-link {
    width: 60px;
    height: 60px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #03a87c;
    font-size: 2rem;
    transform: scale(0);
    transition: all 0.3s ease;
}

.post-card:hover .post-overlay-link {
    transform: scale(1);
}

.post-info {
    padding: 1.5rem;
}

.post-title {
    margin: 0.8rem 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.post-excerpt {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

.read-link {
    display: inline-flex;
    align-items: center;
    color: #03a87c;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-link i {
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.read-link:hover {
    color: #038f6a;
}

.read-link:hover i {
    transform: translateX(-5px);
}

.load-more {
    text-align: center;
    padding: 1rem 0;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #03a87c;
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.load-more-btn:hover {
    background: #038f6a;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.load-more-btn i {
    font-size: 1.2rem;
}

/* Popular Posts Section */
.popular-posts-section {
    background-color: #f8f9fa;
    padding: 4rem 0;
}

.popular-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.popular-post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.popular-post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.popular-post-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.popular-post-card:hover .popular-post-image img {
    transform: scale(1.1);
}

.popular-post-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #ff5722;
    color: white;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.popular-post-content {
    padding: 1.5rem;
}

.popular-post-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.popular-post-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.popular-post-date {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.popular-post-link {
    display: inline-block;
    color: #03a87c;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border: 1px solid #03a87c;
    border-radius: 5px;
}

.popular-post-link:hover {
    background-color: #03a87c;
    color: white;
}

/* Subscribe Section */
.subscribe-section {
    background-color: white;
    padding: 2rem 0;
}

/* Animation Classes */
.animated-caption {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .carousel-image-container {
        height: 70vh;
        min-height: 450px;
    }

    .premium-title {
        font-size: 2.2rem;
    }

    .premium-description {
        font-size: 1.1rem;
    }

    .premium-caption-inner {
        max-width: 85%;
        padding: 2rem;
    }

    .custom-carousel-control {
        width: 50px;
        height: 50px;
    }

    .carousel-control-circle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .carousel-image-container {
        height: 60vh;
        min-height: 400px;
    }

    .premium-title {
        font-size: 1.8rem;
    }

    .premium-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .premium-caption-inner {
        max-width: 90%;
        padding: 1.5rem;
    }

    .premium-btn {
        padding: 0.6rem 1.4rem;
        font-size: 0.9rem;
    }

    .custom-carousel-control {
        width: 40px;
        height: 40px;
    }

    .carousel-control-circle {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .carousel-control-prev {
        left: 1rem;
    }

    .carousel-control-next {
        right: 1rem;
    }

    .premium-badges {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/*video*/
/*.video-section {
    margin: 2rem 0;
    padding: 2rem 0;
    background: #f8f9fa;
}

.featured-video {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-video {
    width: 100%;
    max-height: 600px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.video-info {
    padding: 1.5rem;
    text-align: right;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

    .video-card:hover {
        transform: translateY(-5px);
    }

.preview-video {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.video-card-info {
    padding: 1rem;
    text-align: right;
}

.video-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin-top: 0.5rem;
}

    .video-link:hover {
        background: #0056b3;
        color: white;
    }

.video-date {
    color: #6c757d;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: 1fr;
    }
}*/

.carousel-item {
    height: 500px;
}

.carousel-item img {
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 8px;
    bottom: 40px;
}

.carousel-caption .post-date {
    color: #fff;
    font-size: 0.9rem;
}

.carousel-caption h2,
.carousel-caption h3 {
    color: #fff;
    margin: 10px 0;
}

.carousel-caption .btn {
    margin-top: 10px;
}

/*_________________________________________________*/
.custom-category-container {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.custom-category-container label.form-label {
    font-weight: bold;
    color: #495057;
}

.custom-category-container .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.custom-category-container .btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.custom-category-container .btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.me-2 {
    margin-right: 0.5rem;
}