/* Homepage News Shortcode Styles */

.homepage-news-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.homepage-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 0;
    align-items: stretch;
}

.homepage-news-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.homepage-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

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

.news-card-category {
    display: none; /* Hide overlay category on desktop */
}

.news-card-category-desktop {
    display: inline;
    background: none;
    color: #1f2937;
    padding: 0;
    border-radius: 0;
    font-size: 14px;
    font-weight: 700;
    margin-left: 0;
}

.news-card-category-desktop::before {
    content: " / ";
    font-weight: 500;
    color: #6b7280;
}

.news-card-category-mobile {
    display: none; /* Hide on desktop, show only on mobile */
}

.news-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card-meta {
    margin-bottom: 12px;
}

.news-card-date {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.news-card-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.6;
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em;
}

.news-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-card-title a:hover {
    color: #3b82f6;
}



.no-news {
    text-align: center;
    color: #6b7280;
    font-size: 16px;
    padding: 40px 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Large Tablet Styles */
@media (max-width: 1200px) {
    .homepage-news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .homepage-news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .homepage-news-container {
        padding: 15px;
    }
    
    .news-card-title {
        font-size: 16px;
    }
}

/* Small Tablet */
@media (max-width: 768px) {
    .homepage-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Mobile Styles */
@media (max-width: 767px) {
    .homepage-news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .homepage-news-container {
        padding: 10px;
    }
    
    .homepage-news-card {
        border-radius: 8px;
    }
    
    .news-card-image {
        display: none; /* Hide images on mobile */
    }
    
    .news-card-content {
        padding: 15px;
    }
    
    .news-card-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .news-card-excerpt {
        display: none; /* Hide excerpts on mobile */
    }
    
    .news-card-meta {
        margin-bottom: 8px;
    }
    
    .news-card-date {
        display: inline;
        color: #6b7280;
        font-size: 14px;
        font-weight: 500;
    }
    
    .news-card-category {
        display: none; /* Hide overlay category on mobile */
    }
    
    .news-card-category-desktop {
        display: none; /* Hide desktop category on mobile */
    }
    
    .news-card-category-mobile {
        display: inline;
        background: none;
        color: #1f2937;
        padding: 0;
        border-radius: 0;
        font-size: 14px;
        font-weight: 700;
        margin-left: 0;
    }
    
    .news-card-category-mobile::before {
        content: " / ";
        font-weight: 500;
        color: #6b7280;
    }
}

/* Extra small mobile */
@media (max-width: 480px) {
    .homepage-news-container {
        padding: 5px;
    }
    
    .news-card-content {
        padding: 12px;
    }
    
    .news-card-title {
        font-size: 15px;
    }
    
    .news-card-date {
        font-size: 12px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .homepage-news-card,
    .news-card-image img,
    .news-card-title a {
        transition: none;
    }
    
    .homepage-news-card:hover {
        transform: none;
    }
    
    .homepage-news-card:hover .news-card-image img {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .homepage-news-card {
        border: 2px solid #000;
    }
    
    .news-card-title a:hover {
        color: #000;
        text-decoration: underline;
    }
}

/* Print styles */
@media print {
    .homepage-news-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .news-card-image {
        display: none;
    }
}