/* Additional styles for the news homepage */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.news-card-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.news-card-content {
    padding: 1.5rem;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.news-card-category {
    background: #02812c;
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card-date {
    color: #666;
}

.news-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: #1a202c;
}

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

.news-card h3 a:hover {
    color: #02812c;
}

.news-card-excerpt {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eef2f7;
}

.news-card-author {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.read-more {
    color: #02812c;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #764ba2;
    text-decoration: underline;
}

.featured-article {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    margin-bottom: 2rem;
}

.featured-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #1a202c;
}

.featured-content h2 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.featured-content h2 a:hover {
    color: #02812c;
}

.featured-image-large {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
}

.view-all-link {
    color: #02812c;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: #764ba2;
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-article {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Additional styles for rotating featured article */
.featured-article {
    position: relative;
    overflow: hidden;
}

.featured-carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.featured-slide {
    min-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
}

.carousel-controls {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-dot.active {
    background: rgba(255, 255, 255, 1);
}

.carousel-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

.carousel-navigation:hover {
    background: rgba(0, 0, 0, 0.6);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

@media (max-width: 768px) {
    .featured-slide {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Tiny passport-style author badge */
.featured-image {
    position: relative;
}

.author-highlight-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.25rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    z-index: 10;
    width: 45px; /* Very small fixed width */
    height: 65px; /* Fixed height to prevent expansion */
    overflow: hidden; /* Prevent content from expanding container */
}

.author-highlight-badge img {
    width: 35px !important; /* Force small size */
    height: 35px !important; /* Force small size */
    max-width: 35px; /* Additional constraint */
    max-height: 35px; /* Additional constraint */
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #02812c;
    margin-bottom: 0.2rem;
    flex-shrink: 0; /* Prevent shrinking */
}

.author-highlight-badge span {
    font-size: 0.55rem;
    font-weight: 600;
    color: #2d3748;
    text-align: center;
    line-height: 1;
    max-width: 100%;
    word-break: break-word;
    hyphens: auto;
}

/* Mobile - even smaller */
@media (max-width: 768px) {
    .author-highlight-badge {
        top: 10px;
        right: 10px;
        padding: 0.2rem;
        width: 35px;
        height: 50px;
    }
    
    .author-highlight-badge img {
        width: 25px !important;
        height: 25px !important;
        max-width: 25px;
        max-height: 25px;
    }
    
    .author-highlight-badge span {
        font-size: 0.5rem;
    }
}
