/* ==========================================================================
   Articles Page Styles - V2 Corporate Design
   Primary Color: #2C0454 (Deep Purple)
   Accent Color: #FF1493 (Hot Pink)
   ========================================================================== */

/* ==========================================================================
   Mobile Menu Icon Color Fix for V2 Navigation
   Override the global span color rule from homepage-v2.css
   ========================================================================== */

header button.mobile-menu-toggle span,
header .mobile-menu-toggle span,
button.mobile-menu-toggle span,
.mobile-menu-toggle span {
    color: #ffffff !important;
}

.mobile-menu-toggle:hover span {
    color: #FF1493 !important;
}

/* ==========================================================================
   Articles Hero Section
   ========================================================================== */

.articles-hero-section,
.article-hero-section {
    position: relative;
    padding: 180px 20px 100px;
    background: #2C0454;
    overflow: hidden;
    text-align: center;
}

.articles-hero-background,
.article-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.articles-hero-content,
.article-hero-content {
    position: relative;
    z-index: 2;
}

.articles-hero-content h1,
.article-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 1rem;
    line-height: 1.2;
}

/* Ensure archive title prefix (Tag:, Category:, etc.) is also white */
.articles-hero-content h1 span,
.article-hero-content h1 span {
    color: #ffffff !important;
}

.articles-hero-content .lead,
.article-hero-content .lead {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85) !important;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Article Hero Specific */
.article-hero-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.article-hero-meta .article-date,
.article-hero-meta .article-categories {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7) !important;
}

.article-hero-meta .article-categories a {
    color: #FF1493 !important;
    text-decoration: none;
}

.article-hero-meta .article-categories a:hover {
    text-decoration: underline;
}

.article-author {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7) !important;
}

.article-author span {
    color: rgba(255, 255, 255, 0.7) !important;
}

.reading-time::before {
    content: '•';
    margin-right: 1.5rem;
}

/* ==========================================================================
   Articles Grid (Listing Page)
   ========================================================================== */

main.articles-container,
main.container.articles-container,
.articles-container {
    padding: 80px 20px 100px;
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff !important;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Article Card
   ========================================================================== */

.article-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(44, 4, 84, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(44, 4, 84, 0.15);
}

.article-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-placeholder {
    background: linear-gradient(135deg, #2C0454 0%, #4a0d7a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-card-placeholder .placeholder-icon {
    color: rgba(255, 255, 255, 0.3);
}

.article-card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.article-card-meta .article-date {
    color: #666666 !important;
}

.article-card-meta .article-category a {
    color: #FF1493 !important;
    text-decoration: none;
    font-weight: 500;
}

.article-card-meta .article-category a:hover {
    text-decoration: underline;
}

.article-card-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.article-card-title a {
    color: #2C0454 !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-card-title a:hover {
    color: #FF1493 !important;
}

.article-card-excerpt {
    font-size: 0.95rem;
    color: #555555 !important;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.article-card-excerpt p {
    margin: 0;
    color: #555555 !important;
}

/* Article Card Footer with Author and Button */
.article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #eeeeee;
}

.article-author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-author-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.article-author-info .author-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #555555 !important;
}

.btn-read-article {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #2C0454;
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-read-article:hover {
    background: #FF1493;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Keep old styles for backwards compatibility */
.article-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #2C0454 !important;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-read-more:hover {
    color: #FF1493 !important;
}

.article-read-more .arrow {
    transition: transform 0.3s ease;
}

.article-read-more:hover .arrow {
    transform: translateX(4px);
}

/* ==========================================================================
   Articles Pagination
   ========================================================================== */

.articles-pagination {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.articles-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 1rem;
    border-radius: 8px;
    background: #f5f5f5;
    color: #2C0454 !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.articles-pagination .page-numbers:hover {
    background: #2C0454;
    color: #ffffff !important;
}

.articles-pagination .page-numbers.current {
    background: #FF1493;
    color: #ffffff !important;
}

.articles-pagination .prev,
.articles-pagination .next {
    padding: 0 1.25rem;
}

/* No Articles Found */
.no-articles {
    text-align: center;
    padding: 4rem 2rem;
}

.no-articles h2 {
    font-size: 1.75rem;
    color: #2C0454 !important;
    margin-bottom: 0.75rem;
}

.no-articles p {
    color: #666666 !important;
}

/* ==========================================================================
   Single Article Page
   ========================================================================== */

main.article-container,
main.container.article-container,
.article-container {
    padding: 60px 20px 80px;
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff !important;
    display: block !important;
    visibility: visible !important;
}

.article-content-wrapper {
    background: #ffffff !important;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(44, 4, 84, 0.08);
    overflow: visible !important;
    display: block !important;
    visibility: visible !important;
}

.article-featured-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.article-body {
    padding: 3rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333333 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure Gutenberg blocks display properly */
.article-body .wp-block-paragraph,
.article-body .wp-block-heading,
.article-body .wp-block-list {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.article-body .wp-block-list {
    list-style: disc;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.article-body ol.wp-block-list {
    list-style: decimal;
}

.article-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2C0454 !important;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-body h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2C0454 !important;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-body h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2C0454 !important;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.article-body p {
    margin-bottom: 1.5rem;
    color: #333333 !important;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
    color: #333333 !important;
}

.article-body strong {
    color: #2C0454 !important;
    font-weight: 600;
}

.article-body a {
    color: #FF1493 !important;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.article-body a:hover {
    border-bottom-color: #FF1493;
}

.article-body blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: rgba(44, 4, 84, 0.03);
    border-left: 4px solid #FF1493;
    font-style: italic;
    color: #555555 !important;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-body figure {
    margin: 2rem 0;
}

.article-body figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #888888 !important;
    margin-top: 0.5rem;
}

/* Article Tags */
.article-tags {
    padding: 0 3rem 2rem;
    border-top: 1px solid #eeeeee;
    margin-top: 0;
    padding-top: 2rem;
}

.tags-label {
    font-weight: 600;
    color: #2C0454 !important;
    margin-right: 0.75rem;
}

.article-tags a {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    margin: 0.25rem;
    background: rgba(44, 4, 84, 0.06);
    border-radius: 20px;
    color: #2C0454 !important;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-tags a:hover {
    background: #2C0454;
    color: #ffffff !important;
}

/* Article Share */
.article-share {
    padding: 0 3rem 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-label {
    font-weight: 600;
    color: #2C0454 !important;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(44, 4, 84, 0.06);
    color: #2C0454 !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: #2C0454;
    color: #ffffff !important;
    transform: translateY(-2px);
}

.share-btn svg {
    fill: currentColor;
}

/* Article Navigation */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

@media (max-width: 640px) {
    .article-navigation {
        grid-template-columns: 1fr;
    }
}

.article-navigation a {
    display: block;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(44, 4, 84, 0.08);
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-navigation a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(44, 4, 84, 0.12);
}

.article-navigation .nav-label {
    display: block;
    font-size: 0.85rem;
    color: #888888 !important;
    margin-bottom: 0.5rem;
}

.article-navigation .nav-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2C0454 !important;
    line-height: 1.4;
}

.article-navigation .nav-next {
    text-align: right;
}

/* Back to Articles */
.back-to-articles {
    margin-top: 3rem;
    text-align: center;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
    .articles-hero-content h1,
    .article-hero-content h1 {
        font-size: 2.5rem;
    }

    .articles-hero-content .lead,
    .article-hero-content .lead {
        font-size: 1.1rem;
    }

    .articles-hero-section,
    .article-hero-section {
        padding: 140px 20px 60px;
    }

    .articles-container,
    .article-container {
        padding: 40px 15px 60px;
    }

    .article-body {
        padding: 2rem 1.5rem;
    }

    .article-tags,
    .article-share {
        padding: 0 1.5rem 2rem;
    }

    .article-body h2 {
        font-size: 1.5rem;
    }

    .article-body h3 {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Footer Override for Article Pages
   ========================================================================== */

.footer-corporate-section {
    margin-top: 0;
}
