/* ===== Основные стили ===== */
body {
    padding-top: 70px; /* Фиксируем место для навбара */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* ===== Навбар ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: 600;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    transition: transform 0.3s;
    height: 36px;
}

.navbar-brand:hover img {
    transform: rotate(-5deg);
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    width: calc(100% - 2rem);
    height: 2px;
    background: #0d6efd;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

/* Иконки админ-панели */
.nav-admin-icon {
    font-size: 1rem;
    color: #6c757d;
    transition: color 0.2s;
}

.nav-admin-icon:hover {
    color: #dc3545;
}

/* ===== Заголовок ===== */
header h1 {
    font-size: 2.5rem;
    text-transform: uppercase;
    text-align: center;
    margin-top: 2rem;
    padding: 1rem 0;
    background: url(../img/bboards.png) left / auto 100% no-repeat;
}

/* ===== Основной контент ===== */
main {
    padding: 2rem 0;
    margin-top: 1rem;
}

section {
    margin-left: 0; /* Убираем старый отступ */
    padding: 0 15px;
}

/* ===== Карточки проектов ===== */
.card {
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 1.5rem;
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

/* ===== Кнопки ===== */
.contact-btn {
    display: block;
    margin: 2rem auto;
    padding: 0.75rem 1.5rem;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
    width: auto;
    max-width: 200px;
}

.contact-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Кастомная кнопка с малиновым hover-эффектом */
.btn-custom-magenta {
    color: #6c757d;  /* Стандартный серый цвет текста как у btn-outline-secondary */
    /* border-radius: 0.5rem; */
    border-color: #6c757d;  /* Серый цвет рамки */
    border-style: solid; /* Явное указание стиля рамки */
    border-width: 2px; /* Толщина рамки (увеличим далее) */
    background-color: transparent;  /* Прозрачная заливка */
    padding: 0.375rem 0.75rem; /* Стандартный padding кнопок Bootstrap */
    display: inline-block; /* Для корректного отображения в Chrome */
    text-decoration: none !important; /* Убираем подчёркивание ссылки */
}

.btn-custom-magenta:hover {
    color: #c71585 !important;  /* Белый текст при наведении */
    background-color: transparent !important;  /* Малиновая заливка */
    border-color: #c71585 !important;  /* Малиновая рамка */
    border-width: 2px;
    transition: all 0.3s ease;  /* Плавный эффект */
    box-shadow: 0 0 0 0.2rem rgba(199, 21, 133, 0.25); /* Малиновая тень */
}

.btn-custom-magenta:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(199, 21, 133, 0.5); /* Фокус-эффект для доступности */
}

/* !!! Свой кастомный цвет */
.custom-contact {
    color: #dc3545;             /* красный текст, как у btn-danger */
    background-color: #fff;     /* белый фон */
    border: 3px solid #dc3545;  /* красная широкая рамка */
  }

.custom-contact:hover {
    background-color: #4d0a9e;
    color: white;
}
.custom:focus {
    background-color: #dc3545;  /* красный фон при наведении */
    color: #fff;                /* белый текст при наведении */
  }

/* Новые стили для кнопки админа */
.admin-login-btn {
    color: #6c757d !important;
    border: 1px solid #dee2e6 !important;
    background: transparent !important;
    font-size: 0.85rem !important;
    padding: 0.25rem 0.75rem !important;
    transition: all 0.2s;
}

.admin-login-btn:hover {
    color: #495057 !important;
    border-color: #adb5bd !important;
    background-color: #f8f9fa !important;
}

.admin-login-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.3rem rgba(13, 110, 253, 0.6);  /* Фиолетовая тень */
    background-color: #6c757d;  /* Оставляем серый фон */
}

/* ===== Плавающая закладка ===== */
/* Плавающая закладка (слева) */
.feedback-tab {
    position: fixed;
    left: -78px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    white-space: nowrap;
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    padding: 12px 25px;  /* Оригинальные отступы */
    border-radius: 0 0 8px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1050;
    font-weight: 600;
    font-size: 1rem;
    font-family: 'Roboto Slab', serif;
    border: none;
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2); /* Четкость текста */
    backface-visibility: hidden; /* Устраняет дрожание в Safari */
    will-change: transform; /* Оптимизация анимации */
}

.feedback-tab:hover {
    left: -72px;
    background: linear-gradient(135deg, #c71585 0%, #a0126d 100%);
    transform: translateY(-50%) rotate(-90deg);  /* Сохраняем поворот */
    box-shadow: 3px 0 15px rgba(0,0,0,0.2); /* Усиленная тень при наведении */
}

/* Иконка (если используете) */
.feedback-tab i {
    font-size: 1.3rem;
    transform: none; /* Убираем предыдущий поворот */
    display: block;
    transition: transform 0.3s ease;
}

.feedback-tab:hover i {
    transform: scale(1.1); /* Легкое увеличение при наведении */
}

/* Анимация модального окна (Плавающая закладка) */
.modal.fade .modal-dialog {
    transform: translateY(-50px);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: none;
}

/* ===== Универсальные стили Glassmorphism ===== */
/* ===== ГЛОБАЛЬНЫЕ СТИЛИ ===== */
.modal-content {
    /* Основа стекла */
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(14px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(160%) !important;

    /* Границы и тени */
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 16px !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3), /* Внешняя тень */
        inset 0 1px 1px rgba(255, 255, 255, 0.1) !important; /* Внутреннее свечение */
}

/* ===== ЭЛЕМЕНТЫ УПРАВЛЕНИЯ ===== */
/* 1. Кнопка закрытия (крутая анимация) */
.btn-close {
    filter: invert(1) opacity(0.7) !important;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55) !important;
    width: 1.2em !important;
    height: 1.2em !important;
}

.btn-close:hover {
    transform: rotate(90deg) scale(1.2) !important;
    opacity: 1 !important;
}

/* 2. Заголовок */
/* 2.1 Отбивка */
.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1.25rem 1.5rem !important;
}

/* 2.2 Текст */
.modal-title {
    font-family: 'Roboto Slab', serif;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

/* 3. Поля ввода (тёмные, но читаемые) */
.modal-body .form-control {
    background: rgba(30, 35, 40, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease;
}

.modal-body .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.modal-body .form-control:focus {
    background: rgba(40, 45, 50, 0.8) !important;
    border-color: #fff !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.255) !important;
}

/* Стили для заголовков полей ввода */
.modal-body .form-label {
    color: rgba(255, 255, 255, 0.85) !important; /* Светлый текст с небольшой прозрачностью */
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* Лёгкая тень для лучшей читаемости */
    transition: color 0.3s ease;
}

/* Дополнительные стили для фокуса (опционально) */
.modal-body .form-group:focus-within .form-label {
    color: rgba(255, 255, 255, 1) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Стиль для выпадающих списков в модалках */
.modal-content .form-select {
    background: rgba(30, 35, 40, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease;
}

.modal-content .form-select:focus {
    background: rgba(40, 45, 50, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.1) !important;
}

/* Опции выпадающего списка */
.modal-content .form-select option {
    background: rgba(40, 50, 60, 0.95);
    color: #fff;
}

.btn-custom-form {
    color: #e7e7e7;  /* Стандартный серый цвет текста как у btn-outline-secondary */
    /* border-radius: 0.5rem; */
    border-color: #b9b9b9;  /* Серый цвет рамки */
    border-style: solid; /* Явное указание стиля рамки */
    border-width: 2px; /* Толщина рамки (увеличим далее) */
    background-color: transparent;  /* Прозрачная заливка */
    padding: 0.375rem 0.75rem; /* Стандартный padding кнопок Bootstrap */
    display: inline-block; /* Для корректного отображения в Chrome */
    text-decoration: none !important; /* Убираем подчёркивание ссылки */
}

.btn-custom-form:hover {
    color: #c71585 !important;  /* Белый текст при наведении */
    background-color: transparent !important;  /* Малиновая заливка */
    border-color: #c71585 !important;  /* Малиновая рамка */
    border-width: 2px;
    transition: all 0.3s ease;  /* Плавный эффект */
    box-shadow: 0 0 0 0.2rem rgba(199, 21, 133, 0.25); /* Малиновая тень */
}

.btn-custom-form:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(199, 21, 133, 0.5); /* Фокус-эффект для доступности */
}

/* Кнопка "Отмена" */
.btn-glass-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    transition: all 0.3s ease;
}

.btn-glass-secondary:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* ===== ИНДИВИДУАЛЬНЫЕ АКЦЕНТЫ ===== */
#feedback-modal .modal-content {
    border-color: #19b851; /* Зеленый акцент */
    border-top: 3px solid rgba(25, 184, 81, 0.6) !important;
}

#loginModal .modal-content {
    border-color: #fd0d0d; /* Красный акцент */
    border-top: 3px solid rgba(253, 13, 13, 0.6) !important;
}

#exportModal .modal-content {
    border-color: #0d6efd; /* Синий акцент */
    border-top: 3px solid rgba(13, 110, 253, 0.6) !important;
}
/* ^^^=== Универсальные стили Glassmorphism ===^^^ */

/* ===== Футер ===== */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.social-links a {
    font-size: 1.2rem;
    color: white;
    margin: 0 0.5rem;
    transition: opacity 0.3s;
    display: inline-block;
}

.social-links a:hover {
    opacity: 0.7;
    text-decoration: none;
    transform: scale(1.1);
}

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    header h1 {
        font-size: 2rem;
        background: none;
    }

    .navbar-brand span {
        display: none;
    }

    .contact {
        padding: 1.5rem;
        margin: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (max-width: 576px) {
    .feedback-tab {
        left: -70px;
        padding: 10px 20px;
        font-size: 0.9rem;
        transform: translateY(-50%) rotate(-90deg) scale(0.9);
    }
    .feedback-tab:hover {
        left: -65px;
    }
}

@media (max-width: 768px) {
    .modal-content {
        backdrop-filter: blur(10px) !important;
        border-radius: 12px !important;
    }

    .modal-body .form-control {
        padding: 0.65rem 0.9rem !important;
    }
}

/* Форма добавления проекта */
#addProjectForm .form-control {
    width: 100%;
    margin-bottom: 1rem;
}

#addProjectForm .form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

#addProjectForm textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Стилизация input file */
.custom-file {
    position: relative;
    display: block;
}

.custom-file-input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    margin: 0;
    opacity: 0;
}

.custom-file-label {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

/* Карточки проектов */
.project-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    /* border-left: 3px solid var(--bs-primary); */
}

[data-bs-theme="dark"] .project-card {
    border-left-color: var(--bs-danger);
  }

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.project-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}
