/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #2563eb;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Main Content */
.main {
    flex: 1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    color: #1f2937;
}

/* Posts Section */
.posts {
    padding: 6rem 0;
}

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

.post-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.post-date {
    color: #6b7280;
    font-size: 0.9rem;
}

.post-category {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.post-title-link {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
    display: block;
    cursor: pointer;
}

.post-title-link:hover {
    color: #2563eb;
    text-decoration: none;
    transform: translateY(-1px);
}

.post-title-link:active {
    transform: translateY(0);
}

.post-excerpt {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.read-more {
    display: inline-block;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #1d4ed8;
}

/* About Section */
.about {
    background: white;
    padding: 6rem 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #4b5563;
    line-height: 1.8;
}

/* Support Section */
.support {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    padding: 6rem 0;
    text-align: center;
}

.support .section-title {
    color: white;
    margin-bottom: 2rem;
}

.support-content p {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.coffee-button-container {
    display: flex;
    justify-content: center;
}

.coffee-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: white;
    color: #f59e0b;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.coffee-button:hover {
    background: #fef3c7;
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
    color: #d97706;
}

.coffee-icon {
    font-size: 1.3rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: #f8fafc;
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #4b5563;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.contact-link:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: #1f2937;
    color: #9ca3af;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-links {
        gap: 1rem;
    }
    
    .post-card {
        padding: 1.5rem;
    }
    
    .post-title-link:hover {
        transform: none; /* Disable transform on mobile for better touch experience */
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .posts, .about, .support, .contact {
        padding: 4rem 0;
    }

    .support-content p {
        font-size: 1.1rem;
    }

    .coffee-button {
        font-size: 1rem;
        padding: 0.875rem 1.75rem;
    }
}

/* Tag Search Section */
.tag-search-section {
    margin-bottom: 3rem;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.search-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 250px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.clear-btn {
    padding: 0.75rem 1.5rem;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.clear-btn:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.tags-section {
    margin-top: 1rem;
}

.tags-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #374151;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-filter {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tag-filter:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.tag-filter.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.tag-filter.active:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.tag-count {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.8;
}

.tag-filter.active .tag-count {
    opacity: 0.9;
}

/* Post Tags */
.post-tags {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f0f9ff;
    color: #0369a1;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* No Results Message */
.no-results {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.no-results h3 {
    color: #374151;
    margin-bottom: 0.5rem;
}

.no-results p {
    color: #6b7280;
}

/* Mobile Responsiveness for Tag Search */
@media (max-width: 768px) {
    .tag-search-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .search-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        min-width: auto;
    }
    
    .tags-container {
        gap: 0.5rem;
    }
    
    .tag-filter {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .tag-search-section {
        padding: 1rem;
    }
    
    .tags-title {
        font-size: 1rem;
    }
    
    .tag-filter {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }
}