/* ========================================
   БАЗОВЫЕ НАСТРОЙКИ
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #1a1a1a;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ========================================
   ШАПКА (HEADER)
   ======================================== */
.header {
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #eef0f2;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.logo-icon {
    font-size: 28px;
}

.logo-accent {
    color: #1a5276;
}

.logo-badge {
    font-size: 12px;
    font-weight: 600;
    background: #e8edf2;
    color: #1a5276;
    padding: 2px 12px;
    border-radius: 20px;
    margin-left: 4px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-wrapper {
    position: relative;
}

.search-input {
    padding: 10px 18px 10px 44px;
    border: 2px solid #e0e4e8;
    border-radius: 30px;
    font-size: 15px;
    min-width: 240px;
    outline: none;
    background: #f8f9fa;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.search-input:focus {
    border-color: #1a5276;
    background: white;
    box-shadow: 0 0 0 4px rgba(26, 82, 118, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #8a9aa8;
    pointer-events: none;
}

/* ========================================
   ПРОМО-БАННЕР
   ======================================== */
.promo-banner {
    background: linear-gradient(135deg, #0a2e4a 0%, #1a5a7a 50%, #2d7a9a 100%);
    padding: 0;
    border-radius: 20px;
    margin: 24px 0 0;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(26, 82, 118, 0.25);
}

.promo-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 36px 40px;
    color: white;
}

.promo-text {
    flex: 1;
}

.promo-tag {
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

.promo-text h2 {
    font-size: 34px;
    margin: 10px 0 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.promo-text p {
    font-size: 16px;
    opacity: 0.92;
    max-width: 520px;
    line-height: 1.7;
}

.promo-stats {
    display: flex;
    gap: 28px;
    margin-top: 18px;
    font-size: 14px;
    opacity: 0.9;
}

.promo-stats span {
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 14px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.promo-image {
    flex-shrink: 0;
}

.promo-image img {
    width: 220px;
    height: 150px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

/* ========================================
   КАТЕГОРИИ (ФИЛЬТРЫ-ИКОНКИ)
   ======================================== */
.categories {
    padding: 20px 0 0;
}

.categories-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 22px;
    border: 2px solid #e0e4e8;
    border-radius: 30px;
    background: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #4a5a6a;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-btn:hover {
    border-color: #1a5276;
    background: #f0f7fc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 82, 118, 0.12);
}

.category-btn.active {
    border-color: #1a5276;
    background: #1a5276;
    color: white;
    box-shadow: 0 4px 12px rgba(26, 82, 118, 0.25);
}

/* ========================================
   БЛОК "СЛУЧАЙНЫЙ ФАКТ"
   ======================================== */
.fact-block {
    padding: 18px 0 0;
}

.fact-card {
    background: #fef9e7;
    border-radius: 14px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 5px solid #f1c40f;
    box-shadow: 0 2px 8px rgba(241, 196, 15, 0.15);
}

.fact-emoji {
    font-size: 28px;
    flex-shrink: 0;
}

.fact-text {
    font-size: 16px;
    color: #2c3e50;
    font-style: italic;
    font-weight: 500;
}

/* ========================================
   ОСНОВНОЙ КОНТЕНТ
   ======================================== */
.main-content {
    padding: 8px 0 40px;
}

/* ========================================
   ГЛАВНАЯ КАРТОЧКА (FEATURED)
   ======================================== */
.featured-card-wrapper {
    margin: 24px 0 32px;
}

.featured-card {
    display: flex;
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    cursor: pointer;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.featured-card img {
    width: 38%;
    min-height: 220px;
    object-fit: cover;
    flex-shrink: 0;
}

.featured-card-content {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.featured-card-content .tag {
    margin-bottom: 6px;
}

.featured-card-title {
    font-size: 26px;
    font-weight: 800;
    margin: 4px 0 8px;
    line-height: 1.2;
    color: #0a2e4a;
}

.featured-card-desc {
    color: #4a5a6a;
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 12px;
}

.featured-card-meta {
    font-size: 14px;
    color: #7a8a9a;
}

/* ========================================
   ЗАГОЛОВОК СЕКЦИИ
   ======================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 12px;
    border-bottom: 2px solid #e8ecf0;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: #0a2e4a;
}

.section-count {
    font-size: 14px;
    font-weight: 600;
    color: #7a8a9a;
    background: #f0f2f5;
    padding: 4px 18px;
    border-radius: 20px;
}

/* ========================================
   СЕТКА КАРТОЧЕК (ГЛАВНАЯ)
   ======================================== */
.fish-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ========================================
   КАРТОЧКА РЫБЫ (В СТИЛЕ ДЗЕН)
   ======================================== */
.fish-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    color: inherit;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.fish-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

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

.fish-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #e8ecf0;
}

.fish-card-content {
    padding: 18px 20px 22px;
}

.fish-card-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 2px;
    color: #0a2e4a;
}

.fish-card-latin {
    font-size: 14px;
    color: #7a8a9a;
    font-style: italic;
    margin-bottom: 10px;
}

.fish-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.fish-card-habitats {
    font-size: 14px;
    color: #4a5a6a;
}

.fish-card-habitats strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* ========================================
   ТЕГИ (УНИВЕРСАЛЬНЫЕ)
   ======================================== */
.tag {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 14px;
    border-radius: 20px;
    background: #f0f2f5;
    color: #4a5a6a;
    display: inline-block;
    letter-spacing: 0.3px;
}

.tag-red {
    background: #ffebee;
    color: #c62828;
}

.tag-promyslovaya {
    background: #e3f2fd;
    color: #0d47a1;
}

.tag-green {
    background: #e8f5e9;
    color: #2e7d32;
}

.tag-orange {
    background: #fff3e0;
    color: #e65100;
}

/* ========================================
   СТРАНИЦА РЫБЫ (fish.html)
   ======================================== */
/* Хлебные крошки */
.breadcrumbs {
    padding: 16px 0 8px;
    font-size: 14px;
    color: #7a8a9a;
}

.breadcrumbs a {
    color: #1a5276;
    font-weight: 600;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Обертка страницы рыбы */
.fish-page {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    margin-bottom: 32px;
}

/* Главная секция: фото + информация */
.fish-page-top {
    display: flex;
    gap: 40px;
    margin-bottom: 32px;
}

.fish-page-image {
    flex: 0 0 45%;
}

.fish-page-image img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.fish-page-info {
    flex: 1;
}

.fish-page-name {
    font-size: 36px;
    font-weight: 800;
    color: #0a2e4a;
    margin: 0 0 4px;
    line-height: 1.1;
}

.fish-page-latin {
    font-size: 18px;
    font-style: italic;
    color: #7a8a9a;
    margin-bottom: 12px;
}

.fish-page-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.fish-page-desc {
    font-size: 16px;
    line-height: 1.8;
    color: #2a3a4a;
    margin-bottom: 20px;
}

/* Характеристики таблицей */
.fish-page-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
    background: #f8f9fa;
    padding: 16px 20px;
    border-radius: 12px;
}

.fish-page-specs .spec-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #e8ecf0;
    font-size: 15px;
}

.fish-page-specs .spec-item:last-child,
.fish-page-specs .spec-item:nth-last-child(2) {
    border-bottom: none;
}

.spec-label {
    color: #7a8a9a;
    font-weight: 500;
}

.spec-value {
    font-weight: 600;
    color: #0a2e4a;
}

/* Галерея (коллаж) */
.fish-gallery {
    margin: 28px 0 24px;
}

.fish-gallery h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #0a2e4a;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.gallery-grid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s;
    cursor: pointer;
}

.gallery-grid img:hover {
    transform: scale(1.03);
}

/* Интересные факты */
.fish-facts {
    background: #fef9e7;
    border-radius: 14px;
    padding: 20px 24px;
    border-left: 5px solid #f1c40f;
    margin: 16px 0 8px;
}

.fish-facts h4 {
    font-size: 16px;
    font-weight: 700;
    color: #0a2e4a;
    margin-bottom: 8px;
}

.fish-facts ul {
    list-style: none;
    padding: 0;
}

.fish-facts ul li {
    padding: 4px 0 4px 28px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%23f1c40f" stroke-width="3"><path d="M5 12l5 5L20 7"/></svg>') left center no-repeat;
    background-size: 18px;
    font-size: 15px;
    color: #2a3a4a;
}

/* ========================================
   СТРАНИЦА "О ПРОЕКТЕ" (about.html)
   ======================================== */
.about-page {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    margin: 20px 0 32px;
}

.about-page h1 {
    font-size: 32px;
    font-weight: 800;
    color: #0a2e4a;
    margin-bottom: 16px;
}

.about-page p {
    font-size: 16px;
    line-height: 1.8;
    color: #2a3a4a;
    margin-bottom: 14px;
}

.about-page ul {
    list-style: none;
    padding: 0;
}

.about-page ul li {
    padding: 6px 0 6px 28px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%231a5276" stroke-width="3"><path d="M5 12l5 5L20 7"/></svg>') left center no-repeat;
    background-size: 20px;
    font-size: 15px;
}

/* ========================================
   КНОПКА "ПОКАЗАТЬ ЕЩЕ"
   ======================================== */
.load-more-wrapper {
    text-align: center;
    padding: 28px 0 8px;
}

.load-more-btn {
    padding: 12px 48px;
    border: 2px solid #1a5276;
    border-radius: 30px;
    background: white;
    color: #1a5276;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
}

.load-more-btn:hover {
    background: #1a5276;
    color: white;
    box-shadow: 0 4px 16px rgba(26, 82, 118, 0.25);
    transform: translateY(-2px);
}

/* ========================================
   ПОДВАЛ (FOOTER)
   ======================================== */
.footer {
    background: white;
    padding: 28px 0;
    border-top: 1px solid #e8ecf0;
    margin-top: 8px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-info p {
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 600;
}

.footer-small {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #8a9aa8 !important;
    margin-top: 2px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 14px;
    color: #4a5a6a;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #1a5276;
}

/* ========================================
   СТРАНИЦА 404
   ======================================== */
.error-page {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 20px;
    margin: 40px 0;
}

.error-page h1 {
    font-size: 72px;
    font-weight: 800;
    color: #1a5276;
    margin: 0;
}

.error-page h2 {
    font-size: 28px;
    font-weight: 700;
    color: #0a2e4a;
    margin: 8px 0 12px;
}

.error-page p {
    font-size: 16px;
    color: #7a8a9a;
    max-width: 400px;
    margin: 0 auto 24px;
}

.error-page .btn {
    display: inline-block;
    padding: 12px 36px;
    background: #1a5276;
    color: white;
    border-radius: 30px;
    font-weight: 600;
    transition: background 0.2s;
}

.error-page .btn:hover {
    background: #0a3a5a;
}

/* ========================================
   АДАПТИВНОСТЬ (МОБИЛЬНЫЕ УСТРОЙСТВА)
   ======================================== */
@media (max-width: 1024px) {
    .promo-content {
        padding: 30px 32px;
    }
    .promo-text h2 {
        font-size: 28px;
    }
    .promo-image img {
        width: 180px;
        height: 130px;
    }
}

@media (max-width: 820px) {
    .featured-card {
        flex-direction: column;
    }
    .featured-card img {
        width: 100%;
        height: 200px;
    }
    .featured-card-content {
        padding: 20px 24px;
    }
    .featured-card-title {
        font-size: 22px;
    }
    
    .fish-page-top {
        flex-direction: column;
    }
    .fish-page-image {
        flex: unset;
    }
    .fish-page-image img {
        height: 280px;
    }
    .fish-page-name {
        font-size: 28px;
    }
    .fish-page-specs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .logo {
        font-size: 18px;
    }
    .logo-badge {
        font-size: 10px;
        padding: 1px 10px;
    }
    
    .search-input {
        min-width: unset;
        width: 100%;
        padding: 10px 16px 10px 40px;
        font-size: 14px;
    }
    .search-icon {
        left: 14px;
    }
    
    .promo-content {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        gap: 20px;
    }
    .promo-text h2 {
        font-size: 24px;
    }
    .promo-text p {
        max-width: 100%;
        font-size: 15px;
    }
    .promo-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .promo-stats span {
        font-size: 13px;
    }
    .promo-image img {
        width: 100%;
        height: 160px;
    }
    
    .categories-grid {
        justify-content: center;
    }
    .category-btn {
        font-size: 13px;
        padding: 8px 14px;
    }
    
    .fact-card {
        padding: 12px 16px;
        gap: 12px;
    }
    .fact-emoji {
        font-size: 22px;
    }
    .fact-text {
        font-size: 14px;
    }
    
    .fish-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .section-header h3 {
        font-size: 18px;
    }
    
    .fish-page {
        padding: 20px;
    }
    .fish-page-name {
        font-size: 24px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .gallery-grid img {
        height: 140px;
    }
    
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .about-page {
        padding: 24px 20px;
    }
    .about-page h1 {
        font-size: 24px;
    }
}

@media (max-width: 400px) {
    .promo-text h2 {
        font-size: 20px;
    }
    .promo-stats span {
        font-size: 12px;
        padding: 3px 10px;
    }
    .featured-card-title {
        font-size: 18px;
    }
    .fish-card-title {
        font-size: 17px;
    }
}