/* News specific styles */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-gray-700);
}

.page-header p {
    color: var(--color-gray-500);
    font-size: 1.1rem;
}

/* News grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* News post card */
.news-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.news-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.news-card-image:hover {
    opacity: 0.9;
}

.news-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--color-gray-800);
    cursor: pointer;
    transition: color 0.2s ease;
}

.news-card-title:hover {
    color: var(--color-primary);
}

.news-card-excerpt {
    color: var(--color-gray-600);
    margin-bottom: 1rem;
    line-height: 1.6;
    flex-grow: 1;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-size: 0.875rem;
    color: var(--color-gray-500);
}

.news-card-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-read-more {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: gap 0.3s ease;
}

.news-read-more:hover {
    gap: 0.5rem;
}

.news-read-more i {
    font-size: 0.75rem;
}

.news-category-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    z-index: 2;
}

.news-category-badge.akcijos {
    background-color: #ef4444;
}

.news-category-badge.naujienos {
    background-color: #3b82f6;
}

.news-category-badge.straipsniai {
    background-color: #10b981;
}

/* Modal styles */
.news-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-modal.visible {
    opacity: 1;
}

.news-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 1rem;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    transition: transform 0.3s ease;
}

.news-modal.visible .news-content {
    transform: translate(-50%, -50%) scale(1);
}

.news-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Išlieka flex-start */
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-gray-200);
}

.close-button {
    background: var(--color-gray-200);
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
    margin-left: 1rem;
	margin-top: 0; /* Užtikriname, kad nebūtų viršutinio paraštės */
	padding-top: 0; /* Užtikriname, kad nebūtų viršutinio vidinio užpildymo */
	align-self: flex-start; /* Užtikriname, kad mygtukas būtų pačiame viršuje */
	position: relative; /* Pridedame, kad galėtume naudoti top pozicionavimą */
	top: 0; /* Užtikriname, kad mygtukas būtų pačiame viršuje */
	line-height: 1; /* Sumažiname linijos aukštį, kad nebūtų papildomo tarpo */
}

.close-button:hover {
    background-color: var(--color-gray-300);
}

.close-button i {
    font-size: 1.25rem;
    color: var(--color-gray-600);
}

/* Full news post styles */
.news-post-header {
    margin-bottom: 2rem;
}

.news-post-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
	flex-grow: 1; /* Leidžiame antraštei užimti likusią erdvę */
	padding-right: 1rem; /* Padarome šiek tiek vietos tarp teksto ir mygtuko */
	margin-top: 0; /* Užtikriname, kad antraštė neturėtų viršutinės paraštės */
	line-height: 1.3; /* Kontroliuojame eilutės aukštį */
}

.news-post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--color-gray-500);
    margin-bottom: 1.5rem;
}

.news-post-date, .news-post-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-post-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

/* Nuotraukų modalinis langas */
.photo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    overflow: auto;
    align-items: center;
    justify-content: center;
}

#modalPhoto {
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: block;
}

.close-photo {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}

/* Kursoriaus stilius nuotraukoms */
.news-post-image {
    cursor: pointer;
}

.news-post-content {
    line-height: 1.8;
    color: var(--color-gray-700);
}

.news-post-content p {
    margin-bottom: 1.5rem;
}

.news-post-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.news-post-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.news-post-content li {
    margin-bottom: 0.5rem;
}

.post-tags {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-gray-200);
}

.post-tag {
    display: inline-block;
    background: var(--color-gray-100);
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    color: var(--color-gray-600);
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s, color 0.2s;
}

.post-tag:hover {
    background-color: var(--color-gray-200);
    color: var(--color-gray-800);
}

.call-to-action {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f0f9ff;
    border-radius: 0.75rem;
    text-align: center;
}

.call-to-action h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color: var(--color-primary);
}

.action-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-primary);
    color: white;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    margin-top: 1rem;
    transition: background-color 0.2s;
}

.action-button:hover {
    background-color: var(--color-primary-dark);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-card-image {
        height: 180px;
    }
    
    .news-post-title {
        font-size: 1.5rem;
    }
    
    .news-content {
        padding: 1.5rem;
        width: 95%;
    }
}