/* News Page CSS - Updated with requested changes */
.news-page-article {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: #fff;
    position: relative;
    font-size: 16px;
}

.news-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles - REMOVED ONE BORDER LINE */
.news-page-header {
    margin-bottom: 30px;
    padding-bottom: 0; /* Removed padding bottom */
    border-bottom: none; /* Removed border */
}

.category-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1958a5, #3b82f6);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(25, 88, 165, 0.2);
    transition: all 0.3s ease;
}

.category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(25, 88, 165, 0.3);
    text-decoration: none;
    color: white;
}

.news-page-title {
    font-size: 2em;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 15px 0;
    color: #1a202c;
    letter-spacing: -0.5px;
}

/* Meta Bar Below Title - ONLY ONE BORDER LINE AT BOTTOM */
.news-page-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
    margin: 0 0 30px 0; /* Added margin bottom instead of border */
    border-bottom: none; /* Removed border */
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
    font-size: 0.9em;
    font-weight: 500;
}

.meta-icon {
    color: #1958a5;
    font-size: 0.9em;
    width: 18px;
    text-align: center;
}

.meta-text {
    color: #718096;
    font-size: 0.9em;
}

/* Featured Image with Overlay - USING ALT TEXT */
.news-page-featured-image {
    margin: 0 0 30px 0; /* Adjusted margins */
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.image-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.news-page-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.news-page-featured-image:hover .news-page-image {
    transform: scale(1.03);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.4), transparent);
    padding: 25px 30px; /* Adjusted padding */
    color: white;
    backdrop-filter: blur(2px);
}

.overlay-content {
    max-width: 100%;
}

.overlay-text {
    font-size: 1.1em; /* Smaller font size */
    font-weight: 500; /* Normal weight */
    margin: 0;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
    font-style: italic; /* Optional: make alt text italic */
}

.news-page-image-caption {
    text-align: center;
    font-size: 0.85em;
    color: #718096;
    padding: 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    margin: 0;
    font-style: italic;
}

/* Main Content Layout */
.news-content-layout {
    position: relative;
    margin: 40px 0;
}

/* Intro Text - SMALLER WITH LESS PADDING */
.news-page-intro {
   
    line-height: 1.6;
    color: #1a202c;
    margin: 20px 0; /* Reduced margin */
    padding: 18px 20px; /* Reduced padding */
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 6px; /* Smaller radius */
    border-left: 3px solid #1958a5; /* Thinner border */
    font-weight: 500; /* Reduced from 600 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    clear: both;
}

/* Full Text - Normal body font */
.news-page-content {
    margin: 30px 0;
    font-size: 1.5em;
    line-height: 1.7;
    color: #4a5568;
    font-weight: 400;
}

.news-page-content p {
    margin-bottom: 1.5em;
}

.news-page-content h2 {
    font-size: 1.4em;
    color: #1a202c;
    margin: 2em 0 1em 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 700;
    clear: both;
}

.news-page-content h3 {
    font-size: 1.2em;
    color: #2d3748;
    margin: 1.8em 0 0.8em 0;
    font-weight: 600;
}

.news-page-content ul,
.news-page-content ol {
    margin: 1.2em 0;
    padding-left: 1.5em;
    font-size: 0.95em;
}

.news-page-content li {
    margin-bottom: 0.5em;
}

.news-page-content blockquote {
    margin: 1.5em 0;
    padding: 1.5em;
    background: #f8fafc;
    border-left: 3px solid #1958a5;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #4a5568;
    font-size: 1em;
    line-height: 1.6;
    clear: both;
}

/* Sidebar - Floating right */
.news-sidebar {
    float: right;
    width: 200px;
    margin: 0 0 20px 30px;
    position: relative;
}

/* Share Box - Compact */
.share-box {
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.share-box-header {
    padding: 15px;
    background: linear-gradient(135deg, #1958a5, #3b82f6);
    color: white;
}

.share-box-title {
    margin: 0;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.share-box-content {
    padding: 15px;
}

.share-buttons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 15px;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.share-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.share-btn i {
    font-size: 1em;
    width: 16px;
    text-align: center;
}

.share-btn-text {
    font-size: 0.9em;
}

/* Share Button Colors */
.facebook-btn {
    background: #1877f2;
    color: white;
}

.facebook-btn:hover {
    background: #166fe5;
}

.x-btn {
    background: #000000;
    color: white;
}

.x-btn:hover {
    background: #000000;
    opacity: 0.9;
}

.linkedin-btn {
    background: #0a66c2;
    color: white;
}

.linkedin-btn:hover {
    background: #0959aa;
}

.email-btn {
    background: #6b7280;
    color: white;
}

.email-btn:hover {
    background: #4b5563;
}

/* Copy Link Section */
.copy-link-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.copy-link-input {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.copy-link-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85em;
    background: #f9fafb;
    color: #6b7280;
}

.copy-link-btn {
    padding: 8px 12px;
    background: #374151;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
}

.copy-link-btn:hover {
    background: #1f2937;
}

.copy-success {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #059669;
    font-size: 0.85em;
    font-weight: 500;
}

/* External Links */
.news-page-external-links {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 8px;
    border: 1px solid #bfdbfe;
    clear: both;
}

.external-links-title {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.external-links-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.external-link-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    color: #1e40af;
    padding: 12px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    border: 2px solid #bfdbfe;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.1);
}

.external-link-btn:hover {
    background: #1e40af;
    color: white;
    text-decoration: none;
    transform: translateX(3px);
}

/* Tags Section - SMALLER COMPACT VERSION */
.news-page-tags {
    margin: 40px 0; /* Reduced margin */
    padding: 20px; /* Reduced padding */
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px; /* Smaller radius */
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    clear: both;
    width: 100%; /* Full width */
}

.news-page-tags::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px; /* Thinner top line */
    background: linear-gradient(90deg, #1958a5, #3b82f6, #60a5fa);
    border-radius: 8px 8px 0 0;
}

.tags-title {
    margin: 0 0 18px 0; /* Reduced margin */
    font-size: 1.1em; /* Smaller font */
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px; /* Reduced gap */
    font-weight: 600;
}

.tags-icon {
    font-size: 1em; /* Smaller icon */
    background: #1958a5;
    color: white;
    width: 30px; /* Smaller circle */
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 5px rgba(25, 88, 165, 0.2);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Reduced gap */
}

/* Graphic Tag Buttons - COMPACT VERSION */
.tag-button {
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Reduced gap */
    padding: 10px 16px; /* Reduced padding */
    background: white;
    color: #1958a5;
    text-decoration: none;
    border-radius: 20px; /* Slightly smaller radius */
    font-weight: 600;
    border: 2px solid #dbeafe;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(25, 88, 165, 0.1);
    position: relative;
    overflow: hidden;
    font-size: 0.9em; /* Smaller font */
}

.tag-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(25, 88, 165, 0.05), rgba(59, 130, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
}

.tag-button:hover {
    transform: translateY(-2px); /* Reduced lift */
    box-shadow: 0 6px 12px rgba(25, 88, 165, 0.15);
    border-color: #1958a5;
    background: linear-gradient(135deg, #f0f7ff, #dbeafe);
    color: #0c4a9e;
    text-decoration: none;
}

.tag-button:hover::before {
    opacity: 1;
}

.tag-button:hover .tag-button-arrow {
    transform: translateX(2px); /* Reduced movement */
    opacity: 1;
}

.tag-button-icon {
    font-size: 0.9em; /* Smaller icon */
    z-index: 1;
    background: #f0f7ff;
    width: 26px; /* Smaller circle */
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tag-button:hover .tag-button-icon {
    background: #1958a5;
    color: white;
    transform: scale(1.05); /* Reduced scale */
}

.tag-button-text {
    z-index: 1;
    font-size: 0.85em; /* Smaller text */
    letter-spacing: 0.2px;
}

.tag-button-arrow {
    font-size: 0.9em; /* Smaller arrow */
    z-index: 1;
    opacity: 0.7;
    transition: all 0.3s ease;
    margin-left: 2px; /* Reduced margin */
}

/* Different color variations for tags */
.tag-button:nth-child(3n+1) {
    border-color: #bae6fd;
    background: linear-gradient(135deg, #f0f9ff, white);
}

.tag-button:nth-child(3n+1):hover {
    border-color: #0ea5e9;
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: #0369a1;
}

.tag-button:nth-child(3n+1) .tag-button-icon {
    background: #e0f2fe;
    color: #0ea5e9;
}

.tag-button:nth-child(3n+1):hover .tag-button-icon {
    background: #0ea5e9;
    color: white;
}

.tag-button:nth-child(3n+2) {
    border-color: #c7d2fe;
    background: linear-gradient(135deg, #eef2ff, white);
}

.tag-button:nth-child(3n+2):hover {
    border-color: #6366f1;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #4f46e5;
}

.tag-button:nth-child(3n+2) .tag-button-icon {
    background: #e0e7ff;
    color: #6366f1;
}

.tag-button:nth-child(3n+2):hover .tag-button-icon {
    background: #6366f1;
    color: white;
}

.tag-button:nth-child(3n+3) {
    border-color: #bbf7d0;
    background: linear-gradient(135deg, #f0fdf4, white);
}

.tag-button:nth-child(3n+3):hover {
    border-color: #22c55e;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #15803d;
}

.tag-button:nth-child(3n+3) .tag-button-icon {
    background: #dcfce7;
    color: #22c55e;
}

.tag-button:nth-child(3n+3):hover .tag-button-icon {
    background: #22c55e;
    color: white;
}

/* Mobile Share Bar */
.mobile-share-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.mobile-share-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #4b5563;
    font-size: 0.9em;
}

.mobile-share-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.mobile-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.mobile-share-btn.facebook-btn {
    background: #1877f2;
    color: white;
}

.mobile-share-btn.facebook-btn:hover {
    background: #166fe5;
    transform: translateY(-2px);
}

.mobile-share-btn.x-btn {
    background: #000000;
    color: white;
}

.mobile-share-btn.x-btn:hover {
    background: #000000;
    opacity: 0.9;
    transform: translateY(-2px);
}

.mobile-share-btn.linkedin-btn {
    background: #0a66c2;
    color: white;
}

.mobile-share-btn.linkedin-btn:hover {
    background: #0959aa;
    transform: translateY(-2px);
}

.mobile-share-btn.whatsapp-btn {
    background: #25d366;
    color: white;
}

.mobile-share-btn.whatsapp-btn:hover {
    background: #1da851;
    transform: translateY(-2px);
}

/* Navigation */
.news-page-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.news-nav-btn {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    background: white;
}

.news-nav-btn:hover {
    text-decoration: none;
    border-color: #1958a5;
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 88, 165, 0.1);
}

.prev-btn {
    justify-content: flex-start;
    text-align: left;
}

.next-btn {
    justify-content: flex-end;
    text-align: right;
}

.nav-arrow {
    color: #1958a5;
    margin: 0 15px;
}

.nav-content {
    flex: 1;
}

.nav-label {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-title {
    display: block;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    font-size: 0.95em;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #1958a5;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    box-shadow: 0 4px 12px rgba(25, 88, 165, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #134280;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(25, 88, 165, 0.4);
}

/* Clearfix for floating sidebar */
.news-content-layout::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-page-container {
        padding: 0 15px;
    }
    
    .news-page-title {
        font-size: 1.6em;
    }
    
    .news-page-meta-bar {
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .image-container {
        height: 300px;
    }
    
    .overlay-text {
        font-size: 1em;
    }
    
    .news-sidebar {
        float: none;
        width: 100%;
        margin: 20px 0;
    }
    
    .share-box {
        position: static;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .news-page-intro {
        font-size: 1em;
        padding: 15px;
    }
    
    .news-page-content {
        font-size: 0.9em;
    }
    
    .news-page-navigation {
        grid-template-columns: 1fr;
    }
    
    .mobile-share-bar {
        display: block;
    }
    
    .share-box {
        display: none;
    }
    
    .scroll-to-top {
        bottom: 80px; /* Adjusted for mobile share bar */
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .news-page-title {
        font-size: 1.4em;
    }
    
    .image-container {
        height: 250px;
    }
    
    .overlay-text {
        font-size: 0.9em;
        padding: 20px;
    }
    
    .news-page-meta-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .news-page-intro {
        font-size: 0.95em;
        padding: 12px 15px;
    }
    
    .tags-list {
        justify-content: center;
    }
    
    .tag-button {
        flex: 1 0 auto;
        min-width: 120px;
        justify-content: center;
        padding: 8px 12px;
    }
    
    .tag-button-text {
        text-align: center;
    }
}

/* Combined Article Content */
.news-page-article-content {
    margin: 30px 0;
    font-size: 0.95em;
    line-height: 1.7;
    color: #4a5568;
    font-weight: 400;
}

/* Remove any Joomla readmore split styling */
.news-page-article-content .pagebreak,
.news-page-article-content hr.system-pagebreak,
.news-page-article-content .article-index,
.news-page-article-content .pagenavcounter {
    display: none !important;
}

/* Remove any Joomla readmore link styling */
.news-page-article-content .readmore {
    display: none !important;
}

/* Ensure smooth transition between intro and full text */
.news-page-article-content .news-page-intro {
    margin-bottom: 30px; /* Space between intro and any external links/fulltext */
}

.news-page-article-content .news-page-fulltext {
    margin-top: 30px; /* Space after external links */
}

/* Make sure intro and full text flow naturally */
.news-page-article-content p {
    margin-bottom: 1.5em;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.news-page-article-content h2 {
    font-size: 1.4em;
    color: #1a202c;
    margin: 2em 0 1em 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 700;
    clear: both;
}

.news-page-article-content h3 {
    font-size: 1.2em;
    color: #2d3748;
    margin: 1.8em 0 0.8em 0;
    font-weight: 600;
}

.news-page-article-content ul,
.news-page-article-content ol {
    margin: 1.2em 0;
    padding-left: 1.5em;
    font-size: 0.95em;
}

.news-page-article-content li {
    margin-bottom: 0.5em;
}

.news-page-article-content blockquote {
    margin: 1.5em 0;
    padding: 1.5em;
    background: #f8fafc;
    border-left: 3px solid #1958a5;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #4a5568;
    font-size: 1em;
    line-height: 1.6;
    clear: both;
}

/* Intro text styling within combined content - REDUCED PADDING */
.news-page-article-content .news-page-intro {
    font-size: 1.25em;
    line-height: 1.6;
    color: #1a202c;
    margin: 0 0 15px 0;      /* Reduced from 30px to 15px */
    padding: 12px 15px 1px 15px;  /* Reduced: top=12px, bottom=10px */
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 6px;
    border-left: 3px solid #1958a5;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    clear: both;
}

/* Full text styling within combined content */
.news-page-article-content .news-page-fulltext {
    font-size: 1.1em;
    line-height: 1.7;
    color: #4a5568;
    font-weight: 400;
}

/* Ensure images within content flow properly */
.news-page-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5em 0;
}

.news-page-article-content img[style*="float: left"],
.news-page-article-content img[style*="float:left"] {
    margin-right: 20px;
    margin-bottom: 10px;
}

.news-page-article-content img[style*="float: right"],
.news-page-article-content img[style*="float:right"] {
    margin-left: 20px;
    margin-bottom: 10px;
}