* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

body {
    font-family: 'Playfair Display', 'Helvetica Neue', sans-serif;
    background: #ffffff;
    color: #000000;
}

body.dark {
    background: #000000;
    color: #ffffff;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    border-bottom: 1px solid #eaeaea;
    background: inherit;
}

body.dark header {
    border-bottom-color: #222;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.2rem;
}

.logo {
    font-size: 0.8rem;
    letter-spacing: 4px;
}

.nav-tabs {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tab-btn {
    background: none;
    border: none;
    font-size: 0.65rem;
    letter-spacing: 2px;
    padding: 0.4rem 0;
    cursor: pointer;
    font-family: inherit;
}

.tab-btn.active {
    opacity: 0.5;
}

/* Бегунок */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

main {
    margin-top: 150px;
    padding: 2rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

h2 {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 4px;
    margin-bottom: 3rem;
    font-weight: 300;
}

/* Простая сетка */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.photo-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.photo-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.photo-card p {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    padding: 0.5rem;
    text-align: center;
    font-size: 0.95rem;
    color: white;
}

/* Контакты */
.contacts-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.feedback-section {
    background: transparent;
    padding: 2rem;
}

body.dark .feedback-section {
    background: #0a0a0a;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feedback-form input,
.feedback-form textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    font-family: inherit;
}

.submit-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 0.8rem;
    cursor: pointer;
}

body.dark .submit-btn {
    background: #fff;
    color: #000;
}

.author-photo-full {
    width: 100%;
    cursor: pointer;
}

.contact-item {
    margin: 0.5rem 0;
}

.divider {
    width: 40px;
    height: 1px;
    background: #000;
    margin: 1rem 0;
}

footer {
    text-align: center;
    padding: 2rem;
    opacity: 0.5;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .contacts-wrapper {
        grid-template-columns: 1fr;
    }
    .nav-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
}

/* Тёмная тема — делаем меню видимым */
body.dark .tab-btn {
    color: #ffffff;
}

body.dark .logo,
body.dark .logo-icon {
    color: #ffffff;
}

body.dark .brand {
    color: #ffffff;
}

body.dark h2 {
    color: #ffffff;
}

body.dark .contact-item {
    color: #ffffff;
}

body.dark footer {
    color: #ffffff;
}

/* Активное меню — подчёркивание */
.tab-btn.active {
    position: relative;
    opacity: 1;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 1px;
    background: currentColor;
}

/* Для светлой темы */
body.light .tab-btn.active::after {
    background: #000;
}

/* Для тёмной темы */
body.dark .tab-btn.active::after {
    background: #fff;
}

/* Панель управления галереей */
.gallery-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.view-btn {
    background: none;
    border: 1px solid;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    letter-spacing: 1px;
    transition: all 0.3s;
}

body.light .view-btn {
    border-color: #ccc;
    color: #333;
}

body.dark .view-btn {
    border-color: #555;
    color: #ccc;
}

.view-btn.active {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

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

.grid-mode-btn {
    background: none;
    border: 1px solid;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    border-radius: 20px;
    transition: all 0.3s;
}

body.light .grid-mode-btn {
    border-color: #ccc;
    color: #333;
}

body.dark .grid-mode-btn {
    border-color: #555;
    color: #ccc;
}

.grid-mode-btn.active {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.grid-mode-btn:hover {
    transform: translateY(-2px);
}

/* Скрываем пустые карточки */
.photo-card:empty {
    display: none;
}

.photo-card:last-child {
    margin-bottom: 0;
}

/* Анимация для логотипа */
.brand {
    transition: transform 0.3s ease;
}

.brand:hover {
    transform: scale(1.05);
}

.logo-icon {
    transition: transform 0.2s ease;
    display: inline-block;
}

.brand:hover .logo-icon {
    transform: rotate(5deg);
}

/* Акцентная линия под активным меню */
.tab-btn.active {
    position: relative;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: currentColor;
    opacity: 0.6;
}

/* Эффект для карточек фото */
.photo-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

body.dark .photo-card:hover {
    box-shadow: 0 10px 25px rgba(255,255,255,0.1);
}

/* Плавное появление фото при загрузке */
.photo-card {
    animation: fadeInUp 0.5s ease backwards;
}

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

/* Задержка для каждого фото */
.photo-card:nth-child(1) { animation-delay: 0.05s; }
.photo-card:nth-child(2) { animation-delay: 0.1s; }
.photo-card:nth-child(3) { animation-delay: 0.15s; }
.photo-card:nth-child(4) { animation-delay: 0.2s; }
.photo-card:nth-child(5) { animation-delay: 0.25s; }
.photo-card:nth-child(6) { animation-delay: 0.3s; }

/* Эффект для кнопки бегунка */
.switch {
    transition: transform 0.2s ease;
}

.switch:hover {
    transform: scale(1.05);
}

/* Подчёркивание для контактов */
.contact-item {
    transition: all 0.2s ease;
    display: inline-block;
}

.contact-item:hover {
    transform: translateX(5px);
    opacity: 1;
}

/* Эффект для кнопки отправки формы */
.submit-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    filter: brightness(0.9);
}

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

/* Лёгкая тень для фото автора */
.author-photo-full {
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.author-photo-full:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Стильный разделитель */
.divider {
    transition: width 0.3s ease;
}

.about-section:hover .divider {
    width: 60px;
}

/* Акцент на заголовках */
h2 {
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

h2::before,
h2::after {
    content: '—';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-weight: 300;
}

h2::before {
    left: -30px;
}

h2::after {
    right: -30px;
}

@media (max-width: 768px) {
    h2::before,
    h2::after {
        display: none;
    }
}

/* Слайдер */
.hero-slider {
    position: relative;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 50%;
    transition: 0.3s;
}

.prev:hover, .next:hover {
    background: rgba(0,0,0,0.8);
}

.prev { left: 10px; }
.next { right: 10px; }

.dots {
    text-align: center;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background: #bbb;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

/* Фиксация шапки красивее */
header {
    backdrop-filter: blur(10px);
    background: rgba(0,0,0,0.8);
    transition: all 0.3s ease;
}

body.light header {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
}

/* Анимация при скролле */
.photo-card, .contact-item, .feedback-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.photo-card.visible, .contact-item.visible, .feedback-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Галерея с подписями (уже есть, просто улучшаем) */
.photo-card p {
    font-size: 0.8rem;
    letter-spacing: 2px;
}

body.light .photo-card p {
    color: white;
}


/* Фикс дерганья фото */
.photo-card {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: none !important;
}

.gallery {
    min-height: 200px;
}

.feedback-section {
    background: transparent;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}
body.dark .feedback-section {
    background: transparent;
}
.feedback-form input,
.feedback-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.feedback-form button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
}
#formMessage {
    margin-top: 10px;
    text-align: center;
}

.feedback-section,
.feedback-form,
#feedbackForm {
    opacity: 1 !important;
}

.feedback-section {
    margin-top: 60px;
    background: transparent;
    padding: 25px;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
}

body.dark .feedback-section {
    background: #1e1e1e;
}

.feedback-section h3 {
    text-align: center;
    margin-bottom: 20px;
}

.feedback-form input,
.feedback-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.feedback-form button {
    background: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
}

#formMessage {
    margin-top: 15px;
    text-align: center;
}

/* Отодвигаем форму от шапки */
.feedback-section {
    margin-top: 150px;
    background: transparent;
    padding: 25px;
    border-radius: 12px;
}

body.dark .feedback-section {
    background: #1e1e1e;
}

.feedback-form input,
.feedback-form textarea {
    width: 100%;
    min-width: 200px;
    height: 40px;
    padding: 8px 12px;
    font-size: 14px;
    box-sizing: border-box;
    display: block;
}
.feedback-form textarea {
    height: 100px;
}

/* Принудительные стили для формы */
.feedback-section {
    margin: 80px 0 30px 0;
    background: transparent;
    padding: 25px;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
    display: block !important;
}

.feedback-form input,
.feedback-form textarea {
    width: 100% !important;
    min-width: 200px !important;
    height: auto !important;
    padding: 12px !important;
    margin-bottom: 15px !important;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #000 !important;
    font-size: 14px !important;
    display: block !important;
}

.feedback-form textarea {
    min-height: 100px !important;
}

.feedback-form button {
    background: #4CAF50 !important;
    color: white !important;
    padding: 12px 24px !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 16px !important;
}

body.dark .feedback-section {
    background: #1e1e1e;
}

body.dark .feedback-form input,
body.dark .feedback-form textarea {
    background: #333 !important;
    color: #fff !important;
    border-color: #555 !important;
}

.feedback-block {
    margin-top: 40px;
    background: transparent;
    padding: 20px;
}
body.dark .feedback-block {
    background: transparent;
}
.feedback-block input,
.feedback-block textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.feedback-block button {
    background: #4CAF50;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    width: 100%;
}

.feedback-form-wrapper {
    margin-top: 30px;
    background: transparent;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.feedback-form-wrapper input,
.feedback-form-wrapper textarea {
    width: 100% !important;
    padding: 10px !important;
    margin-bottom: 12px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
}

.feedback-form-wrapper textarea {
    min-height: 100px !important;
}

.feedback-form-wrapper button {
    width: 100% !important;
    padding: 10px !important;
    background: #4CAF50 !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 16px !important;
}

body.dark .feedback-form-wrapper {
    background: transparent;
}
body.dark .feedback-form-wrapper input,
body.dark .feedback-form-wrapper textarea {
    background: #333;
    color: #fff;
    border-color: #555;
}

/* Журнальное меню */
.nav-tabs .tab-btn {
    font-family: 'Playfair Display', 'Didot', 'Times New Roman', serif;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 400;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.nav-tabs .tab-btn:hover {
    opacity: 0.5;
}
.nav-tabs .tab-btn.active {
    opacity: 1;
}


.nav-tabs .tab-btn.active {
    opacity: 1 !important;
}

/* Увеличение шрифта меню - финальное */
.nav-tabs .tab-btn {
    font-size: 1.1rem !important;
}

/* Белый фон без серого */
.photo-card {
    background: transparent !important;
}
body.dark .photo-card {
    background: transparent !important;
}

/* Белый фон в светлой теме */
body.light .photo-card {
    background: #ffffff !important;
}

/* Прозрачная подпись в светлой теме */
body.light .photo-card p {
    background: transparent !important;
    color: #000;
}

/* Тёмная тема — подпись без градиента */
body.dark .photo-card p {
    background: transparent !important;
    color: #ffffff;
}
