/* Основні стилі */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка сайту */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo h1 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.logo h1 a {
    color: white;
    text-decoration: none;
}

.logo .subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin-left: 1.5rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.main-nav a i {
    margin-right: 0.5rem;
}

.main-nav a:hover,
.main-nav a.active {
    color: #3498db;
}

.main-nav .admin-link {
    color: #2ecc71;
}

.main-nav .logout-link {
    color: #e74c3c;
}

/* Герой-секція */
.hero-section {
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.8)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 5rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-family: 'Roboto', sans-serif;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Кнопки */
.btn, .btn-small {
    display: inline-block;
    background-color: #000000;
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
    font-size: 1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn:hover, .btn-small:hover {
    background-color: #2980b9;
}

.btn-edit {
    background-color: #2ecc71;
}

.btn-edit:hover {
    background-color: #27ae60;
}

/* Секція статистики */
.stats-section {
    display: flex;
    justify-content: space-around;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-family: 'Roboto', sans-serif;
}

.stat-label {
    font-size: 1rem;
    color: #7f8c8d;
}

/* Картки пам'яті */
.section-title {
    font-family: 'Roboto', sans-serif;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.memorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.memorial-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.memorial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.memorial-photo {
    height: 200px;
    overflow: hidden;
}

.memorial-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.memorial-card:hover .memorial-photo img {
    transform: scale(1.05);
}

.memorial-info {
    padding: 1.5rem;
}

.memorial-info h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #2c3e50;
}

.dates {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.memorial-excerpt {
    margin-bottom: 1.2rem;
    color: #555;
}

.view-all {
    text-align: center;
    margin-bottom: 3rem;
}

/* Сторінка деталей */
.memorial-detail {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 3rem;
}

.memorial-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.memorial-header h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.memorial-dates {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.date-item {
    display: flex;
    flex-direction: column;
}

.date-label {
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 0.3rem;
}

.date-value {
    font-size: 1.1rem;
    color: #2c3e50;
}

.memorial-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.memorial-photo-large {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.memorial-photo-large img {
    width:100%;
    height: auto;
    display: block;
}

.memorial-biography h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.biography-text {
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.additional-info {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.additional-info h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.memorial-navigation {
    display: flex;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

/* Сторінка пошуку */
.search-page {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 3rem;
}

.search-page h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.search-form {
    margin-bottom: 2rem;
}

.search-input-group {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
    font-size: 1rem;
}

.search-button:hover {
    background-color: #2980b9;
}

.search-results-info {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    text-align: center;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
}

.page-link {
    padding: 0.5rem 1rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.page-link:hover {
    background-color: #2980b9;
}

.page-info {
    font-weight: 600;
    color: #7f8c8d;
}

.no-results, .no-data {
    text-align: center;
    padding: 3rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.no-results a {
    color: #3498db;
    text-decoration: none;
}

.no-results a:hover {
    text-decoration: underline;
}

/* Сторінка "Про проект" */
.about-page {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 3rem;
}

.about-page h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    text-align: center;
}

.about-section {
    margin-bottom: 2.5rem;
}

.about-section h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.about-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.about-section ul {
    list-style-position: inside;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

.about-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Підвал сайту */
footer {
    background-color: #000000;
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-column h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    color: #ecf0f1;
}

.footer-column p {
    margin-bottom: 0.8rem;
    opacity: 0.8;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: #ecf0f1;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-column a:hover {
    opacity: 1;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Адмін-панель */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

.admin-actions {
    margin-bottom: 2rem;
}

.table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.admin-table tr:hover {
    background-color: #f8f9fa;
}

.action-link {
    color: #3498db;
    text-decoration: none;
    margin-right: 1rem;
}

.action-link:hover {
    text-decoration: underline;
}

.delete-link {
    color: #e74c3c;
}

/* Форми */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-help {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 0.3rem;
}

/* Сторінка входу */
.login-container {
    max-width: 400px;
    margin: 5rem auto;
    background-color: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.8rem;
    color: #2c3e50;
}

/* Повідомлення */
.message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Стилі для категорій */
.categories-filter {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    text-align: center;
}

.categories-filter h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-family: 'Roboto', sans-serif;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.btn-filter {
    padding: 0.5rem 1.5rem;
    background-color: #ecf0f1;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 30px;
    border: 2px solid transparent;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-filter:hover {
    background-color: #bdc3c7;
}

.btn-filter.active {
    background-color: #3498db;
    color: white;
    border-color: #2980b9;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.category-1 { /* Військові */
    background-color: #e74c3c;
    color: white;
}

.category-2 { /* Цивільні */
    background-color: #3498db;
    color: white;
}

.category-none {
    background-color: #95a5a6;
    color: white;
}

/* Стилі для карток з категоріями */
.memorial-card .category-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    color: white;
}

.memorial-card {
    position: relative;
}

/* Стилі для сторінки з деталями */
.memorial-category {
    margin-top: 0.5rem;
}

.category-label {
    font-weight: 600;
    color: #7f8c8d;
}

.category-value {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

/* Статистика за категоріями */
.category-stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.stat-category {
    text-align: center;
}

.stat-category .count {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.stat-category .label {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Стилі для пошуку на головній (додані раніше) */
.search-section {
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.8));
    color: white;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.search-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.search-container h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-family: 'Roboto', sans-serif;
}

.search-container .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.search-form-container {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.search-form-container h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.search-form .search-input-group {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-form .search-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
    min-width: 0;
}

.search-form .search-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
    font-size: 1rem;
    white-space: nowrap;
}

.search-form .search-button:hover {
    background-color: #2980b9;
}

.alphabet-index {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
}

.alphabet-index h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: white;
}

.alphabet-letters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.alphabet-letter {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s;
}

.alphabet-letter:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.alphabet-letter.disabled {
    background-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
}

.alphabet-help {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.search-results-section {
    margin-bottom: 3rem;
}

.search-results-section .section-title {
    font-family: 'Roboto', sans-serif;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.search-instructions {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
    text-align: center;
}

.search-instructions h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-family: 'Roboto', sans-serif;
}

.search-instructions ul {
    list-style-type: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.search-instructions li {
    margin-bottom: 0.5rem;
    color: #555;
}

.search-instructions p {
    font-size: 1.1rem;
    color: #2c3e50;
}

/* Адаптивність */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav li {
        margin: 0.5rem;
    }
    
    .stats-section {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .memorial-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-input {
        border-radius: 4px;
        margin-bottom: 0.5rem;
    }
    
    .search-button {
        border-radius: 4px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .search-container h1 {
        font-size: 2rem;
    }
    
    .search-form .search-input-group {
        flex-direction: column;
    }
    
    .search-form .search-input {
        border-radius: 4px;
        margin-bottom: 0.5rem;
    }
    
    .search-form .search-button {
        border-radius: 4px;
        width: 100%;
    }
    
    .alphabet-letter {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    .categories-container {
        grid-template-columns: 1fr;
    }
}

/* Додаткові стилі для адмін-панелі (якщо потрібно) */
.filters-container {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.filter-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

@media (max-width: 768px) {
    .filter-form {
        grid-template-columns: 1fr;
    }
}

.filter-group {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.category-military {
    background-color: #e74c3c;
}

.category-civilian {
    background-color: #3498db;
}

.category-none {
    background-color: #95a5a6;
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.total-count {
    font-weight: 600;
    color: #2c3e50;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-links {
    display: flex;
    gap: 0.5rem;
}

.action-link {
    color: #3498db;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.action-link:hover {
    background-color: #f0f8ff;
    text-decoration: none;
}

.delete-link {
    color: #e74c3c;
}

.view-link {
    color: #2ecc71;
}

.edit-link {
    color: #f39c12;
}

.empty-category {
    color: #95a5a6;
    font-style: italic;
}

.alphabet-index-search {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: center;
}

.alphabet-index-search h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-family: 'Roboto', sans-serif;
}

.alphabet-letter.active {
    background-color: #2c3e50;
    transform: scale(1.1);
}