/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a5f7a;
    --secondary-color: #2c8ba8;
    --accent-color: #57a0b8;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #6a6a6a;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.12);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--bg-white);
    padding: 2rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.site-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.site-title a {
    color: var(--bg-white);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.site-title a:hover {
    opacity: 0.9;
}

.site-tagline {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Main Content */
.main-content {
    padding: 3rem 0;
    min-height: calc(100vh - 400px);
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.hero-section h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-medium);
    max-width: 800px;
    margin: 0 auto;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

/* Blog Card */
.blog-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: var(--bg-light);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-date {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    display: block;
}

.blog-card-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-card-excerpt {
    color: var(--text-medium);
    margin-bottom: 1rem;
    flex-grow: 1;
    font-size: 0.9375rem;
}

.read-more {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition-smooth);
}

.blog-card:hover .read-more {
    color: var(--primary-color);
    transform: translateX(4px);
    display: inline-block;
}

/* Article Styles */
.article-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
}

.article-title {
    font-size: 2.75rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.article-meta {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

.article-featured-image {
    width: 100%;
    max-height: 500px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md);
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.article-content h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 2.5rem 0 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.article-content h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.article-content h4 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin: 1.5rem 0 0.75rem;
    font-weight: 600;
}

.article-content p {
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-dark);
}

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

.article-content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: var(--text-dark);
}

.article-content strong {
    font-weight: 600;
    color: var(--text-dark);
}

.article-content a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: var(--transition-smooth);
}

.article-content a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.content-image {
    width: 100%;
    margin: 2.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

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

.info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #f1f8fb 100%);
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.info-box h4 {
    color: var(--secondary-color);
    margin-top: 0;
}

.tip-box {
    background: linear-gradient(135deg, #f1f8e9 0%, #f9fdf4 100%);
    border-left: 4px solid #7cb342;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.tip-box h4 {
    color: #7cb342;
    margin-top: 0;
}

/* Related Posts */
.related-posts {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.related-posts h3 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.related-post-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.related-post-card:hover {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
}

.related-post-card a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.125rem;
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: var(--bg-white);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

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

.footer-info h3,
.footer-posts h4 {
    margin-bottom: 1rem;
    color: var(--bg-white);
}

.footer-info p {
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.footer-info a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-info a:hover {
    color: var(--bg-white);
}

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

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

.footer-posts a {
    color: var(--bg-white);
    text-decoration: none;
    opacity: 0.9;
    transition: var(--transition-smooth);
}

.footer-posts a:hover {
    opacity: 1;
    color: var(--accent-color);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .site-title {
        font-size: 1.5rem;
    }

    .hero-section h1 {
        font-size: 1.875rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .article-title {
        font-size: 2rem;
    }

    .article-content {
        padding: 1.5rem;
    }

    .article-content h2 {
        font-size: 1.625rem;
    }

    .article-content h3 {
        font-size: 1.375rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .article-title {
        font-size: 1.625rem;
    }

    .article-content {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .related-posts,
    .site-footer {
        display: none;
    }

    .article-content {
        box-shadow: none;
        padding: 0;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
a:focus,
button:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right, #f0f0f0 4%, #e0e0e0 25%, #f0f0f0 36%);
    background-size: 1000px 100%;
}
