/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header */
header {
    background-color: #1a4960; /* Dark blue from the original design */
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo-img {
    height: 60px;
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

nav ul li a:hover {
    color: #d4a017; /* Gold accent for Orthodox theme */
}

/* Main content */
main {
    margin-top: 80px; /* Space for fixed header */
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 2rem;
}

.hero {
    display: flex;
    background-color: #f5f5f5;
    margin: 0 auto;
    max-width: 1200px;
    min-height: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 3em;
    margin-top: 1em;
}

.hero-image {
    flex: 1;
    background-image: url("/images/berezki.jpg");
    background-size: cover;
    background-position: center;
    min-width: 40%;
}

.hero-content {
    flex: 1;
    text-align: left;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: white;
}

.hero h1 {
    font-size: 2.5rem;
    color: #1a4960;
    margin-bottom: 1.5rem;
    font-weight: bold;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    color: #555;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
    }

    .hero-image {
        min-height: 200px;
        width: 100%;
    }

    .hero-content {
        padding: 2rem;
    }
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

.content-section {
    margin-bottom: 4rem;
}

p#about.content-section {
    white-space: pre-line;
}

.content-section h2 {
    color: #1a4960;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.section-image, .news-image, .map-image {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 5px;
}

.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.activity-item {
    text-align: center;
}

.activity-item img {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

.news-item {
    margin-bottom: 2rem;
}

.news-item h3 {
    color: #1a4960;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background-color: #1a4960;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.partners img {
    max-width: 100px;
    margin: 0.5rem;
    height: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        padding: 1rem;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .activities-grid {
        grid-template-columns: 1fr;
    }
}

/* News List Page Styles */
.news-list-section {
    margin-top: 2rem;
}

.section-title {
    color: #1a4960;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-description {
    color: #555;
    margin-bottom: 2rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.news-card {
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background: white;
}

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

.news-card.draft-article {
    border: 2px dashed #6c757d;
    opacity: 0.85;
}

.news-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

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

.news-card h3 {
    color: #1a4960;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.news-card.small h4 {
    color: #1a4960;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.news-date {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
}

.news-excerpt {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.read-more-link {
    color: #1a4960;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    position: relative;
}

.read-more-link:after {
    content: "→";
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.read-more-link:hover:after {
    transform: translateX(3px);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    text-decoration: none;
    color: #1a4960;
    background-color: #f5f5f5;
    transition: all 0.3s ease;
}

.pagination-link.active {
    background-color: #1a4960;
    color: white;
}

.pagination-link:hover:not(.active) {
    background-color: #e0e0e0;
}

.pagination-link.next:after {
    content: "→";
    margin-left: 5px;
}

/* News Detail Page Styles */
.news-breadcrumb {
    margin-bottom: 2rem;
    color: #777;
}

.news-breadcrumb a {
    color: #1a4960;
    text-decoration: none;
}

.news-breadcrumb a:hover {
    text-decoration: underline;
}

.news-full {
    max-width: 800px;
    margin: 0 auto;
}

.news-title {
    color: #1a4960;
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.news-meta {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
}

.news-category {
    background-color: #1a4960;
    color: white;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.news-detail-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 2rem;
}

.news-content {
    line-height: 1.7;
    color: #333;
}

.news-content p {
    margin-bottom: 1.5rem;
}

.news-content h3 {
    color: #1a4960;
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.news-content blockquote {
    border-left: 4px solid #1a4960;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
}

.news-content blockquote cite {
    display: block;
    margin-top: 1rem;
    font-weight: bold;
    font-style: normal;
}

.news-image-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-image:hover {
    transform: scale(1.05);
}

.news-share {
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.share-button {
    padding: 0.5rem 1rem;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.share-button:hover {
    background-color: #1a4960;
    color: white;
}

.news-navigation {
    display: flex;
    justify-content: space-between;
    margin: 3rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.news-navigation a {
    color: #1a4960;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-navigation a:hover {
    color: #d4a017;
}

.prev-news:before {
    content: "←";
    margin-right: 5px;
}

.next-news:after {
    content: "→";
    margin-left: 5px;
}

.related-news {
    margin-top: 3rem;
}

.related-news h3 {
    color: #1a4960;
    margin-bottom: 1.5rem;
}

.related-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.news-card.small {
    height: 100%;
}

.news-card.small .news-card-image {
    height: 140px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .news-grid,
    .related-news-grid {
        grid-template-columns: 1fr;
    }

    .news-image-gallery {
        grid-template-columns: 1fr;
    }

    .gallery-image {
        height: 200px;
    }

    .news-navigation {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Active nav link */
nav ul li a.active {
    color: #d4a017; /* Gold accent for active link */
    border-bottom: 2px solid #d4a017;
}

/* News Edit Page */
/* News Editor Custom Styles */

/* Override some Bootstrap styles to match the original site theme */
.btn-primary {
    background-color: #1a4960;
    border-color: #1a4960;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
    background-color: #13354a !important;
    border-color: #13354a !important;
}

.form-label {
    font-weight: bold;
    color: #1a4960;
}

/* Image upload preview container */
.image-preview-container {
    border: 2px dashed #ddd;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    position: relative;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
    margin-top: 0.5rem;
}

.image-preview-container:hover {
    background-color: #f8f9fa;
}

.image-preview {
    max-width: 100%;
    max-height: 300px;
    margin-top: 1rem;
    display: none;
    border-radius: 4px;
}

.image-preview.has-image {
    display: block;
}

.placeholder-text {
    color: #6c757d;
}

/* Remove image button */
.remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

.remove-image.visible {
    display: flex;
}

/* Gallery styles */
.gallery-container {
    margin-top: 2rem;
}

.add-gallery-image {
    height: 150px;
    border: 2px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    color: #6c757d;
}

.add-gallery-image:hover {
    background-color: #f8f9fa;
}

.gallery-item {
    position: relative;
    height: 150px;
    border-radius: 4px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-gallery-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Error display */
.error-display .form-control.is-invalid,
.error-display .form-select.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.error-display .invalid-feedback {
    display: block;
}

/* Custom breadcrumb styling to match the site theme */
.news-breadcrumb {
    margin-bottom: 2rem;
    color: #777;
}

.news-breadcrumb a {
    color: #1a4960;
    text-decoration: none;
}

.news-breadcrumb a:hover {
    text-decoration: underline;
}

/* Section title styling */
.section-title {
    color: #1a4960;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-description {
    color: #555;
    margin-bottom: 2rem;
}
