/* ========== ОБЩИЕ СТИЛИ ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========== ШАПКА САЙТА ========== */
.header {
    background-color: var(--bg-color);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    gap: 2rem;
}

.logo h1 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 0.125rem;
}

.logo p {
    font-size: 0.875rem;
    color: var(--text-light);
}

.header-search {
    flex: 1;
    max-width: 600px;
    display: flex;
    gap: 0.5rem;
}

.header-search input {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all 0.3s;
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-search {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.3s;
}

.btn-search:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
}

.btn-favorite {
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-favorite:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

/* Навигация */
.main-nav {
    border-top: 1px solid var(--border-color);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    padding: 1rem 0;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* ========== БАННЕР ========== */
.hero-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 5rem 0;
    margin-bottom: 3rem;
}

.hero-content {
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ========== КНОПКИ ========== */
.btn-primary {
    padding: 0.875rem 2rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    padding: 0.875rem 2rem;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

.btn-icon {
    padding: 0.75rem;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-icon:hover {
    background-color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ========== СЕКЦИИ ========== */
section {
    padding: 3rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-weight: 700;
    position: relative;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* ========== ЖАНРЫ ========== */
.genres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.genre-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-xl);
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.genre-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.genre-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.genre-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.genre-card span {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* ========== КНИГИ ========== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.book-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.book-card-image {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--border-color) 100%);
}

.book-card-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.book-card-author {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.book-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.book-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--accent-color);
    font-size: 0.875rem;
}

.book-genre {
    font-size: 0.8125rem;
    color: var(--text-light);
    background: var(--bg-light);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

/* ========== АВТОРЫ ========== */
.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.author-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.author-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.author-photo-small {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.author-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.author-card-meta {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.author-books-count {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
}

/* ========== ПОДБОРКИ ========== */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.collection-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.collection-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.collection-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-light);
}

.collection-info {
    padding: 1.5rem;
}

.collection-info h3 {
    font-size: 1.375rem;
    margin-bottom: 0.5rem;
}

.collection-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.btn-link:hover {
    color: var(--secondary-color);
}

/* ========== ФУТЕР ========== */
.footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-column h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-column p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: white;
}

.subscribe-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.subscribe-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.subscribe-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.btn-subscribe {
    padding: 0.75rem 1.25rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.3s;
}

.btn-subscribe:hover {
    background-color: #1d4ed8;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* ========== ХЛЕБНЫЕ КРОШКИ ========== */
.breadcrumbs {
    padding: 1rem 0;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: var(--secondary-color);
}

.breadcrumbs span {
    color: var(--text-light);
}

/* ========== УТИЛИТЫ ========== */
.text-center {
    text-align: center;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-light);
}
