/* NOS Media Archive - Elegant Masonry Layout */

.nos-media-archive {
    padding: 4rem 0;
    background-color: var(--bg-color);
}

.nos-media-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.nos-media-header .section-label {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    color: var(--gold-dark);
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

.nos-media-header .section-title {
    font-size: 3.5rem;
    line-height: 1.1;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-family: Georgia, 'Times New Roman', serif;
}

.nos-media-header .section-description {
    font-size: 1.1rem;
    color: var(--muted-text);
    line-height: 1.8;
}

/* Masonry Grid */
.nos-media-masonry {
    column-count: 3;
    column-gap: 2rem;
}

@media (max-width: 900px) {
    .nos-media-masonry {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .nos-media-masonry {
        column-count: 1;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .nos-media-archive {
        padding: 2.5rem 0;
    }

    .nos-media-header {
        margin-bottom: 2.5rem;
    }

    .nos-media-header .section-title {
        font-size: 2rem;
    }

    .nos-media-header .section-description {
        font-size: 1rem;
    }

    .nos-media-content {
        padding: 1.25rem;
    }

    .nos-media-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .nos-media-header .section-title {
        font-size: 1.65rem;
    }

    .nos-media-content {
        padding: 1rem;
    }
}

/* Card Styling */
.nos-media-card-item {
    break-inside: avoid;
    margin-bottom: 2rem;
    background-color: #fff;
    border-radius: 8px; /* Slightly rounded for modern feel, or 0 for classic */
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
    display: flex; /* Fix for some masonry bugs */
    flex-direction: column;
}

.nos-media-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.nos-media-thumb {
    position: relative;
    width: 100%;
}

.nos-media-thumb a {
    display: block;
}

.nos-media-thumb img {
    display: block;
    width: 100%;
    height: auto; /* Allow natural height */
    object-fit: cover;
}

/* Overlay Effect (Optional - keeping it clean for now) */
.nos-media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 70%, rgba(0,0,0,0.5));
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.nos-media-card-item:hover .nos-media-overlay {
    opacity: 1;
}

.nos-media-content {
    padding: 1.75rem;
    background: #fff;
}

.nos-media-meta {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.press-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.press-badge.figura_publica {
    background-color: var(--gold-light);
    color: var(--gold-dark);
}

.press-badge.nos_media {
    background-color: #eee;
    color: #888;
}

.nos-media-title {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    font-family: Georgia, 'Times New Roman', serif;
}

.nos-media-title a {
    color: var(--text-color);
    text-decoration: none;
    background-image: linear-gradient(var(--gold), var(--gold));
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    transition: background-size 0.3s;
}

.nos-media-card-item:hover .nos-media-title a {
    background-size: 100% 1px;
    color: var(--gold-dark);
}

.nos-media-excerpt {
    font-size: 0.95rem;
    color: var(--muted-text);
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nos-media-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nos-media-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold-dark);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nos-media-link span {
    transition: transform 0.3s;
}

.nos-media-link:hover span {
    transform: translateX(4px);
}

/* Pagination */
.pagination {
    margin-top: 4rem;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 50%;
    margin: 0;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background-color: var(--gold-dark);
    color: #fff;
    border-color: var(--gold-dark);
}

.pagination .prev, .pagination .next {
    border-radius: 999px;
    padding: 0 20px;
    width: auto;
}
