/* Главная страница сайта - Ведический дизайн */

:root {
    --primary-color: #228B22;
    --secondary-color: #FFD700;
    --accent-color: #DC143C;
    --bg-light: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --green-light: #d4edda;
    --green-dark: #155724;
    --yellow-light: #fff3cd;
    --red-light: #f8d7da;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="leaves" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M25,10 Q35,20 25,30 Q15,20 25,10" fill="rgba(34,139,34,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23leaves)"/></svg>');
    pointer-events: none;
    z-index: -1;
}

/* Header */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.navbar-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.navbar-brand img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 50%;
}

.navbar-menu {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(34, 139, 34, 0.1);
    transform: translateY(-2px);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.user-info:hover {
    background: rgba(34, 139, 34, 0.1);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.2);
    padding: 0.5rem 0;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-info:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(34, 139, 34, 0.1);
}

.dropdown-button {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: background 0.3s ease;
}

.dropdown-button:hover {
    background: rgba(34, 139, 34, 0.1);
}

.auth-links {
    display: flex;
    align-items: center;
}

.login-link {
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-link:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

.mobile-menu-toggle {
    display: none;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu {
    display: none;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(34, 139, 34, 0.1);
    padding: 1rem 0;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.mobile-nav-link:hover {
    background: rgba(34, 139, 34, 0.1);
}

.mobile-user-info {
    border-top: 1px solid rgba(34, 139, 34, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
}

.mobile-user-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.mobile-user-email {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.mobile-user-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-logout-form {
    margin: 0;
}

.mobile-logout-button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.3s ease;
}

.mobile-logout-button:hover {
    background: #b91c1c;
}

.mobile-auth {
    border-top: 1px solid rgba(34, 139, 34, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
}

.mobile-login-link {
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: block;
    text-align: center;
    transition: background 0.3s ease;
}

.mobile-login-link:hover {
    background: #b91c1c;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: rgba(34, 139, 34, 0.1);
    border-radius: 20px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(34,139,34,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,215,0,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(220,20,60,0.1)"/></svg>');
    pointer-events: none;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(34, 139, 34, 0.1);
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.text-muted {
    color: var(--text-light) !important;
}

/* Sections */
.section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(34, 139, 34, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.section p {
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 15px;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(34, 139, 34, 0.2);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--text-dark);
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 139, 34, 0.4), 0 0 15px rgba(255, 215, 0, 0.3);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* Highlights */
.highlight {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    margin: 0.2rem;
}

.highlight-red {
    background: var(--accent-color);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer h5 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-3, .col-md-4 {
    padding: 0 15px;
    margin-bottom: 2rem;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section {
        padding: 1rem;
    }
    
    .section h2 {
        font-size: 1.5rem;
    }
    
    .col-md-3, .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Mobile Navigation */
    .navbar-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .navbar-left {
        gap: 1rem;
    }
    
    .navbar-brand a {
        font-size: 1.2rem;
    }
    
    .navbar-brand img {
        width: 30px;
        height: 30px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section, .card {
    animation: fadeInUp 0.6s ease-out;
}

/* Navigation fixes */
.navbar-toggler {
    border: 2px solid var(--primary-color);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(34, 139, 34, 0.25);
}

/* Login link */
.navbar-nav .nav-link[href*="login"] {
    background: var(--accent-color);
    color: white !important;
    border-radius: 20px;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link[href*="login"]:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu {
        display: none;
    }
    
    .mobile-menu.active {
        display: block;
    }
}

/* Blog Styles */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 2rem;
}

.blog-main {
    min-width: 0;
}

.blog-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(34, 139, 34, 0.1);
}

.blog-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.blog-header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Search */
.search-section {
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid rgba(34, 139, 34, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

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

.search-button {
    padding: 0.8rem 1.2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.post-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(34, 139, 34, 0.2);
}

.post-image {
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
}

.post-category {
    margin-bottom: 1rem;
}

.category-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.post-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

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

.post-title a:hover {
    color: var(--green-dark);
}

.post-excerpt {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.read-more-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.3);
}

/* Sidebar */
.blog-sidebar {
    min-width: 0;
}

.sidebar-widget {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.1);
}

.sidebar-widget h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.categories-list {
    list-style: none;
    padding: 0;
}

.categories-list li {
    margin-bottom: 0.5rem;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.category-link:hover,
.category-link.active {
    color: var(--primary-color);
    background: rgba(34, 139, 34, 0.1);
    padding-left: 0.5rem;
}

.category-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Single Post */
.single-post {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.1);
}

.post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.post-header .post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.post-featured-image {
    margin: 2rem 0;
    border-radius: 15px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    margin: 2rem 0 1rem 0;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-light);
}

.post-navigation {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(34, 139, 34, 0.1);
}

.back-to-blog {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.back-to-blog:hover {
    color: var(--green-dark);
}

/* Related Posts */
.related-posts {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.1);
}

.related-posts h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-post-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.2);
}

.related-post-image {
    height: 150px;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-content {
    padding: 1rem;
}

.related-post-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.related-post-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.related-post-excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Author Info */
.author-info {
    text-align: center;
}

.author-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.author-email {
    color: var(--text-light);
    font-size: 0.9rem;
}

.publication-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Pagination */
.pagination-wrapper {
    text-align: center;
    margin-top: 2rem;
}

.pagination-wrapper .pagination {
    display: inline-flex;
    gap: 0.5rem;
}

.pagination-wrapper .page-link {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination-wrapper .page-link:hover,
.pagination-wrapper .page-item.active .page-link {
    background: var(--primary-color);
    color: white;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.1);
}

.no-posts h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.no-posts p {
    color: var(--text-light);
}

/* Responsive Blog */
@media (max-width: 768px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .single-post .post-header .post-title {
        font-size: 1.8rem;
    }
    
    .search-form {
        flex-direction: column;
    }
}
