/*==========================================*/
/* Nexsone News Content Styling */
/*==========================================*/

/* Updated Post Card Layout */
.post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 1px solid #e6f0ff;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 25px;
}

/* Post Image Container */
.post-image-container {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-image {
    transform: scale(1.08);
}

/* Post Category Badge */
.post-category {
    background: #e6f7ff;
    color: #00bbff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    display: inline-block;
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

/* News Hero Section */
.news-hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
    position: relative;
    border-bottom: 1px solid #e6f0ff;
}

.news-hero .section-header {
    margin-bottom: 0;
    text-align: center;
}

.news-hero .section-header h2 {
    font-size: 2.8rem;
    color: #00bbff;
    margin-bottom: 1.2rem;
}

.news-hero .section-header h2::after {
    left: 50%;
    transform: translateX(-50%);
    bottom: -15px;
}

.news-hero .section-header p {
    font-size: 1.2rem;
    color: #666666;
    margin-top: 1rem;
    font-weight: 500;
    line-height: 1.7;
}

/* News Posts Section */
.news-posts {
    padding: 80px 0;
    background: #ffffff;
}

.news-controls {
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-container.news-search {
    width: 100%;
    max-width: 500px;
    position: relative;
}

.news-search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e6f0ff;
    border-radius: 50px;
    font-size: 1rem;
    background: #f8fbff;
    transition: all 0.3s ease;
    outline: none;
}

.news-search-input:focus {
    border-color: #00bbff;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 187, 255, 0.1);
}

.search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #00bbff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: #0099cc;
    transform: translateY(-50%) scale(1.05);
}

.category-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-filter {
    padding: 10px 20px;
    border: 2px solid #e6f0ff;
    background: white;
    color: #666666;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

.category-filter:hover,
.category-filter.active {
    background: #00bbff;
    color: white;
    border-color: #00bbff;
    transform: translateY(-2px);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

/* Post Card */
.post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 1px solid #e6f0ff;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 25px !important;
    padding: 25px;
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Post Image */
.post-image {
    flex: 0 0 180px;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    align-self: flex-start;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.08);
}

/* Post Content */
.post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Allows flex item to shrink below content size */
}

/* Post Meta */
.post-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #777777;
}

.date {
    font-weight: 600;
    color: #666666;
    font-size: 0.95rem;
}

.category {
    background: #e6f7ff;
    color: #00bbff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    display: inline-block;
}

/* Post Title */
.news-title {
    font-size: 1.3rem;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    line-height: 1.4;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title:hover {
    color: #00bbff;
    transform: translateX(5px);
}

/* News Modal */
.news-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.news-modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 80%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 15px;
    z-index: 10001;
    cursor: pointer;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-news-content {
    padding: 30px;
}

.modal-news-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.modal-date {
    background: #f0f5f9;
    color: #666666;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-category {
    background: #e6f7ff;
    color: #00bbff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-news-content h2 {
    font-size: 1.8rem;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.modal-news-image {
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
}

.modal-news-image img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-news-body {
    margin-top: 20px;
}

.modal-news-body p {
    color: #666666;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f5f9;
    color: #333333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-btn:hover {
    background: #00bbff;
    color: white;
    transform: translateY(-3px);
}

.page-btn.active {
    background: #00bbff;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 187, 255, 0.3);
}

.page-btn.next {
    padding: 0 15px;
    border-radius: 50px;
    width: auto;
    font-size: 0.9rem;
}

.page-btn.next i {
    margin-left: 5px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-card {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .post-image {
        width: 100%;
        height: 220px;
    }
    
    .news-controls {
        align-items: center;
    }
    
    .category-filters {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .news-hero {
        padding: 100px 0 60px;
    }
    
    .news-hero .section-header h2 {
        font-size: 2.2rem;
    }
    
    .post-content {
        padding: 0;
    }
    
    .news-title {
        font-size: 1.2rem;
    }
    
    .news-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-news-content {
        padding: 20px;
    }
    
    .modal-news-content h2 {
        font-size: 1.5rem;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .page-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .news-hero {
        padding: 80px 0 50px;
    }
    
    .news-hero .section-header h2 {
        font-size: 1.8rem;
    }
    
    .posts-grid {
        gap: 25px;
    }
    
    .post-image {
        height: 180px;
    }
    
    .post-content {
        padding: 18px 0;
    }
    
    .news-title {
        font-size: 1.1rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .modal-news-content {
        padding: 15px;
    }
    
    .modal-news-content h2 {
        font-size: 1.3rem;
    }
    
    .modal-news-body p {
        font-size: 1rem;
    }
}

/* News Detail Section Specific Styles */
.news-breadcrumb {
    margin-bottom: 20px;
}

.news-breadcrumb a {
    color: #00bbff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.news-breadcrumb a:hover {
    text-decoration: underline;
}

.news-article {
    /* Removed background, padding, border-radius, and box-shadow */
    margin-bottom: 40px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.news-article h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    line-height: 1.3;
    color: #333;
}

.news-image-container {
    position: relative;
    margin-bottom: 30px;
    max-width: 800px; /* Limit container width on desktop */
    margin-left: auto;
    margin-right: auto;
}

.news-image {
    width: 100%;
    /* Removed border-radius, overflow, and box-shadow */
    margin-bottom: 15px;
}

.news-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px; /* Limit image height on desktop */
    object-fit: cover;
}

.news-source {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #666;
}

.news-source span {
    font-weight: 500;
}

.source-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9ff;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #e6f0ff;
}

.source-logo img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.source-name {
    font-weight: 600;
    color: #333;
}

.news-lead {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #555;
    font-weight: 500;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9ff;
    border-left: 4px solid #00bbff;
    border-radius: 0 8px 8px 0;
    max-width: 800px; /* Match container width */
    margin-left: auto;
    margin-right: auto;
}

.news-content {
    max-width: 800px; /* Limit content width on desktop */
    margin-left: auto;
    margin-right: auto;
}

.news-content p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

.news-share {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 800px; /* Match container width */
    margin-left: auto;
    margin-right: auto;
}

.news-share h3 {
    margin: 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.share-icons {
    display: flex;
    gap: 10px;
}

.share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f5f9;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-icon:hover {
    background: #00bbff;
    color: white;
    transform: translateY(-3px);
}

.share-icon.twitter {
    background: #1da1f2;
    color: white;
}

.share-icon.facebook {
    background: #4267b2;
    color: white;
}

.share-icon.linkedin {
    background: #0077b5;
    color: white;
}

/* Related News Section */
.related-news {
    margin: 60px 0;
}

.related-news h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #333;
}

/* Responsive Design for News Details */
@media (max-width: 768px) {
    .news-article h1 {
        font-size: 1.8rem;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .news-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .source-logo {
        padding: 6px 12px;
    }
    
    .source-logo img {
        width: 20px;
        height: 20px;
    }
    
    /* Remove width constraints on mobile */
    .news-image-container,
    .news-lead,
    .news-content,
    .news-share {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }
    
    .news-image img {
        max-height: 300px; /* Smaller max height on mobile */
    }
}