/* Тёмная тема и улучшенные отступы */

/* Кастомные отступы для лучшего дизайна */
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

.card {
    margin-bottom: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn {
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Улучшенные отступы для форм */
.form-control, .form-select {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Улучшенные отступы для навигации */
.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Улучшенные отступы для футера */
footer {
    margin-top: 3rem;
    padding: 3rem 0 2rem;
}

/* Адаптивные отступы */
@media (max-width: 768px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* Стили для тёмной темы */
[data-bs-theme="dark"] {
    color-scheme: dark;
}

/* Улучшенная читаемость текста */
[data-bs-theme="dark"] body {
    color: #e2e8f0;
    background-color: #1a202c;
}

[data-bs-theme="dark"] .text-dark {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #a0aec0 !important;
}

[data-bs-theme="dark"] .text-secondary {
    color: #cbd5e0 !important;
}

[data-bs-theme="dark"] .text-body {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .text-body-secondary {
    color: #a0aec0 !important;
}

[data-bs-theme="dark"] .text-body-tertiary {
    color: #718096 !important;
}

/* Улучшенные отступы для контента */
.content-wrapper {
    padding: 2rem 0;
}

.page-header {
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #dee2e6;
}

[data-bs-theme="dark"] .page-header {
    border-bottom-color: #4a5568;
}

.section-padding {
    padding: 2rem 0;
}

.card-padding {
    padding: 1.5rem;
}

[data-bs-theme="dark"] .card-padding {
    padding: 1.5rem;
}

/* Улучшенные отступы для форм */
.form-section {
    padding: 1.5rem;
    background-color: var(--bs-body-bg);
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .form-section {
    background-color: #2d3748;
    border: 1px solid #4a5568;
}

/* Улучшенные отступы для таблиц */
.table-container {
    padding: 1rem;
    background-color: var(--bs-body-bg);
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .table-container {
    background-color: #2d3748;
    border: 1px solid #4a5568;
}

/* Улучшенные отступы для списков */
.list-group-item {
    padding: 1rem 1.25rem;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .list-group-item:hover {
    background-color: #4a5568;
}

/* Улучшенные отступы для кнопок */
.btn-group .btn {
    margin-right: 0.25rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Улучшенные отступы для модальных окон */
.modal-dialog {
    margin: 1.75rem auto;
}

.modal-content {
    padding: 0;
}

/* Улучшенные отступы для алертов */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 0.75rem;
}

/* Улучшенные отступы для навигации */
.navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Улучшенные отступы для футера */
footer {
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

/* Улучшенные отступы для контейнеров */
.container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Стили для фотогалереи */
.photo-gallery .thumbnail {
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.photo-gallery .thumbnail:hover {
    border-color: #0d6efd;
    transform: scale(1.05);
}

.photo-gallery .thumbnail.active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.photo-card {
    transition: all 0.3s ease;
}

.photo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

[data-bs-theme="dark"] .photo-gallery .thumbnail:hover {
    border-color: #63b3ed;
}

[data-bs-theme="dark"] .photo-gallery .thumbnail.active {
    border-color: #63b3ed;
    box-shadow: 0 0 0 0.2rem rgba(99, 179, 237, 0.25);
}

@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .content-wrapper {
        padding: 1rem 0;
    }
    
    .page-header {
        padding: 1rem 0;
        margin-bottom: 1.5rem;
    }
    
    .section-padding {
        padding: 1rem 0;
    }
    
    .card-padding {
        padding: 1rem;
    }
}

[data-bs-theme="dark"] .card {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #2d3748;
    border-color: #3182ce;
    color: #e2e8f0;
    box-shadow: 0 0 0 0.25rem rgba(49, 130, 206, 0.25);
}

[data-bs-theme="dark"] .btn-outline-primary {
    color: #63b3ed;
    border-color: #63b3ed;
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
    background-color: #63b3ed;
    border-color: #63b3ed;
    color: #1a202c;
}

[data-bs-theme="dark"] .btn-primary {
    background-color: #3182ce;
    border-color: #3182ce;
}

[data-bs-theme="dark"] .btn-primary:hover {
    background-color: #2c5aa0;
    border-color: #2c5aa0;
}

[data-bs-theme="dark"] .navbar-dark {
    background-color: #1a202c !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #2d3748 !important;
    color: #e2e8f0;
}

/* Улучшаем контраст текста в темной теме */
[data-bs-theme="dark"] .text-muted { color: #a8b3c7 !important; }
[data-bs-theme="dark"] .hero-section { color: #f7fafc; }
[data-bs-theme="dark"] .feature-card .text-muted { color: #cbd5e0 !important; }
[data-bs-theme="dark"] .card.bg-primary { color: #fff !important; }
[data-bs-theme="dark"] .navbar a, [data-bs-theme="dark"] .navbar .nav-link { color: #e2e8f0 !important; }
[data-bs-theme="dark"] .navbar .nav-link:hover { color: #fff !important; }

[data-bs-theme="dark"] .text-muted {
    color: #a0aec0 !important;
}

[data-bs-theme="dark"] .border {
    border-color: #4a5568 !important;
}

[data-bs-theme="dark"] .table {
    color: #e2e8f0;
}

/* Админ-таблицы: усиливаем контраст в темной теме */
[data-bs-theme="dark"] .table thead.table-dark th { color: #f7fafc !important; background-color: #111827 !important; }
[data-bs-theme="dark"] .table tbody td { color: #e5e7eb; }
[data-bs-theme="dark"] code.text-body { color: #e5e7eb; }
[data-bs-theme="dark"] .text-truncate { color: inherit; }

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td,
[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #2d3748;
    border-color: #4a5568;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #4a5568;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .alert-info {
    background-color: #2b6cb0;
    border-color: #3182ce;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .alert-success {
    background-color: #2f855a;
    border-color: #38a169;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .alert-warning {
    background-color: #c05621;
    border-color: #dd6b20;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: #c53030;
    border-color: #e53e3e;
    color: #e2e8f0;
}

/* Стили для переключателя темы */
.theme-icon-active {
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .theme-icon-active {
    color: #fbbf24;
}

/* Улучшенные отступы для админки */
.admin-container {
    padding: 2rem 0;
}

.admin-card {
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.admin-table {
    margin-top: 1rem;
}

.admin-form {
    padding: 1.5rem;
    background-color: var(--bs-body-bg);
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Анимации для тёмной темы */
[data-bs-theme="dark"] .animate-fadeInUp {
    animation: fadeInUpDark 0.6s ease;
}

@keyframes fadeInUpDark {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Улучшенные отступы для модальных окон */
.modal-content {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

[data-bs-theme="dark"] .modal-content {
    background-color: #2d3748;
    color: #e2e8f0;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1.5rem;
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: #4a5568;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

[data-bs-theme="dark"] .modal-footer {
    border-top-color: #4a5568;
}
