/* News Container */
.news-container {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.news-table {
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
    margin-top: 2rem;
}

.news-card {
    display: flex;
    min-height: 300px;
    background: #1a1a1a;  /* gris mas claro 1a1a1a mas oscuro 181818*/
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--rojooscuro);
}

.news-image-container {
    flex: 0 0 40%;
    min-width: 300px;
    overflow: hidden;
    display: flex; /* Added for better image handling */
    align-items: center; /* Center the image vertically */
}

.news-image {
    width: 100%;
	height: 280px;
	flex: 1;
    object-fit: cover;
    transition: transform 0.5s ease;
    min-height: 100%;  
}

.news-content {
    flex: 1;
    padding: 1.5rem 1.8rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
}

.news-category {
    display: inline-block;
    background: var(--cyanazul);	
    color: white;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
	font-weight: 600;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    align-self: center;
}

.news-title {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: #fff;
    font-family: "Perpetua", "Open Sans", sans-serif;
    line-height: 1.3;
	text-wrap: balance;
}

.news-subtitle {
    font-size: 1rem;
    color: #B1B1B1;
    margin-bottom: 1rem;
    font-weight: 300;
    line-height: 1.4;
	text-wrap: balance;
}

.news-excerpt {
    color: #ddd;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1; /* Allows this element to grow and push footer down */
    overflow: hidden; /* Prevents text from overflowing */
	
	display: -webkit-box;
  	-webkit-line-clamp: 4;     /* Number of lines to show */
  	-webkit-box-orient: vertical;
	text-overflow: ellipsis;
}

.news-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--redok);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.1s;
    align-self: center;
    margin-top: auto; /* Pushes to bottom of flex container */
}

.news-read-more:hover {
	color: var(--amarillo);
}

/* Pagination and Language Switcher */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    gap: 0.5rem;
}

.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--cyan);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination a:hover {
    background: var(--cyan);
    color: white;
}

.pagination .current {
    background: var(--cyan);
    color: white;
	font-weight: 600;
}

.language-switcher {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.language-switcher button {
    background: none;
    border: 1px solid var(--cyan);
    color: var(--cyan);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.language-switcher button.active {
    background: var(--cyan);
    color: white;
}

.language-switcher button:hover {
    background: var(--cyan);
    color: white;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .news-card {
        flex-direction: column;
        min-height: auto; /* Reset min-height on mobile */
    }
    
    .news-image-container {
        flex: 0 0 200px;
    }
    
    .news-title {
        font-size: 2rem;
    }
	.news-content {
    	padding-inline: 1.5rem;
	}
}

@media (max-width: 480px) {
    .news-image-container {
        flex: 0 0 150px;
    }
	.pagination {
        flex-wrap: wrap;
    }
}
