/* Custom styles for KinderGoal theme */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Page Content */
.page-content {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.page-header {
    border-bottom: 2px solid var(--light-color);
    padding-bottom: 1rem;
}

.page-meta {
    font-size: 0.9rem;
}

.page-meta i {
    color: var(--primary-color);
}

.page-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.page-body h1, .page-body h2, .page-body h3,
.page-body h4, .page-body h5, .page-body h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.page-body p {
    margin-bottom: 1.5rem;
}

.page-body ul, .page-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.page-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--secondary-color);
}

.page-body code {
    background-color: var(--light-color);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.page-body pre {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
}

.page-footer {
    margin-top: 2rem;
}

.page-tags .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h1, .article-content h2, .article-content h3,
.article-content h4, .article-content h5, .article-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

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

.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--secondary-color);
}

.article-content code {
    background-color: var(--light-color);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.article-content pre {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-buttons .btn {
    transition: all 0.3s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

/* Section Headers */
.section-header h2 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.section-header .lead {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* Featured Posts */
.featured-posts {
    background: linear-gradient(135deg, var(--light-color) 0%, #ffffff 100%);
}

.featured-post-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}

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

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

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

/* Recent Posts */
.recent-post-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recent-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.1) !important;
}

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

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

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

/* Call to Action Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
}

.cta-buttons .btn {
    transition: all 0.3s ease;
}

.cta-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-logo {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--light-color);
}

/* Posts Layout */
.posts-container {
    max-width: 1200px;
    margin: 0 auto;
}

.posts-header {
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--light-color) 0%, #ffffff 100%);
    border-radius: 1rem;
    margin-bottom: 3rem;
}

.section-icon {
    color: var(--primary-color);
    opacity: 0.8;
}

.post-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}

.post-card .card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
}

.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-meta {
    font-size: 0.875rem;
}

.post-tags .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    background-color: var(--light-color) !important;
    color: var(--dark-color) !important;
    border: 1px solid #dee2e6;
}

.post-tags .badge:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color);
}

.empty-state {
    padding: 3rem 1rem;
}

.empty-state i {
    opacity: 0.5;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-title a {
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: var(--primary-color);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-outline-light {
    color: white;
    border-color: white;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.badge.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Typography */
.display-3, .display-4, .display-5 {
    font-weight: 600;
    color: var(--dark-color);
}

.lead {
    color: var(--secondary-color);
    font-weight: 400;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Footer */
footer {
    margin-top: auto;
}

footer h5, footer h6 {
    color: var(--light-color);
    font-weight: 600;
}

footer .social-links a {
    transition: opacity 0.3s ease;
}

footer .social-links a:hover {
    opacity: 0.8;
}

footer ul li a {
    transition: color 0.3s ease;
}

footer ul li a:hover {
    color: var(--primary-color) !important;
}

/* Article content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h1, .article-content h2, .article-content h3,
.article-content h4, .article-content h5, .article-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

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

.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--secondary-color);
}

.article-content code {
    background-color: var(--light-color);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.article-content pre {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .display-3, .display-4, .display-5 {
        font-size: 2.5rem;
    }
    
    .hero-section {
        min-height: 60vh;
        padding: 3rem 0;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .posts-header {
        padding: 1.5rem 0;
        margin-bottom: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .badge {
        display: block;
        margin-bottom: 0.25rem;
        text-align: center;
    }
    
    .post-card {
        margin-bottom: 1rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .display-3 {
        font-size: 2rem;
    }
}

/* Animation for cards */
.card, .post-card, .featured-post-card, .recent-post-card {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Hover effects */
.navbar-nav .nav-link,
.dropdown-item,
.card-title a,
.post-card,
.featured-post-card,
.recent-post-card,
.badge {
    transition: all 0.3s ease;
}

/* Focus states for accessibility */
.btn:focus,
.nav-link:focus,
.dropdown-item:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}
