/* View Blog Page Styles - Vanilla CSS */

/* CSS Reset & 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: #111827;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Brand Colors */
:root {
    --brand-green: #059669;
    --brand-green-dark: #047857;
    --brand-green-light: #10b981;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* Navigation Styles */
.main-nav {
    background-color: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 40;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo-wrapper {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    font-size: 2rem;
    color: var(--brand-green);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--brand-green), var(--brand-green-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: none;
    list-style: none;
    gap: 1.5rem;
}

.nav-link {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--brand-green);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--brand-green);
}

.nav-link:hover::after {
    width: 100%;
}

.cta-button {
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-dark) 100%);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.3);
}

.mobile-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
        align-items: center;
    }
    
    .mobile-nav-wrapper {
        display: none;
    }
}

/* Article Container */
.article-container {
    max-width: 56rem;
    margin: 0 auto;
    padding: 3rem 1rem;
}

/* Breadcrumb */
.breadcrumb-nav {
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
    list-style: none;
}

.breadcrumb-link {
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: var(--brand-green);
}

.breadcrumb-separator {
    font-size: 0.75rem;
}

.breadcrumb-current {
    color: var(--gray-900);
    font-weight: 500;
}

/* Article Header */
.article-header {
    margin-bottom: 2.5rem;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-icon {
    font-size: 1.25rem;
    color: var(--brand-green);
}

/* Tags */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background-color: var(--gray-100);
    color: var(--gray-700);
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: var(--brand-green);
    color: white;
}

/* Like Button */
.like-section {
    margin-top: 1rem;
}

.like-button {
    background-color: var(--gray-100);
    color: var(--gray-700);
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.like-button:hover:not(:disabled) {
    background-color: var(--brand-green);
    color: white;
    transform: translateY(-2px);
}

.like-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.like-button.liked {
    background-color: var(--brand-green);
    color: white;
}

.like-message {
    display: none;
    margin-top: 0.5rem;
    color: var(--brand-green);
    font-size: 0.875rem;
}

.like-message.show {
    display: block;
}

/* Featured Image */
.featured-image-wrapper {
    margin-bottom: 2.5rem;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.featured-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Content */
.blog-content {
    line-height: 1.8;
    color: var(--gray-700);
}

.blog-content h1,
.blog-content h2,
.blog-content h3 {
    scroll-margin-top: 80px;
    color: var(--gray-900);
}

.blog-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.blog-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

.blog-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-content p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.blog-content img {
    border-radius: 0.5rem;
    margin: 2rem 0;
    width: 100%;
    height: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.blog-content a {
    color: var(--brand-green);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s ease;
}

.blog-content a:hover {
    color: var(--brand-green-dark);
}

.blog-content ul,
.blog-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    list-style-position: outside;
}

.blog-content ul {
    list-style-type: disc;
}

.blog-content li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

.blog-content code {
    background-color: var(--gray-100);
    color: var(--gray-800);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.blog-content pre {
    background-color: var(--gray-100);
    color: var(--gray-800);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--gray-300);
}

.blog-content pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}

.blog-content hr {
    margin: 2rem 0;
    border: none;
    border-top: 2px solid var(--gray-300);
}

.blog-content strong {
    font-weight: 600;
    color: var(--gray-900);
}

/* Article Footer */
.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.categories-section {
    margin-bottom: 1.5rem;
}

.categories-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
}

.category-link {
    background-color: var(--brand-green);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-link:hover {
    background-color: var(--brand-green-dark);
}

/* Share Section */
.share-section {
    margin-bottom: 1.5rem;
}

.share-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    color: white;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.share-button.facebook {
    background-color: #1877f2;
}

.share-button.twitter {
    background-color: #1da1f2;
}

.share-button.linkedin {
    background-color: #0077b5;
}

.share-button.whatsapp {
    background-color: #25d366;
}

/* Back to Blog */
.back-to-blog {
    margin-top: 2rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--gray-100);
    color: var(--gray-700);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-button:hover {
    background-color: var(--brand-green);
    color: white;
}

/* Footer */
.main-footer {
    background-color: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 1rem;
    margin-top: 5rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--brand-green);
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: 2rem;
    text-align: center;
}

.footer-copyright {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Responsive Grid */
@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .article-title {
        font-size: 3rem;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .article-container {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-meta {
        font-size: 0.875rem;
    }
}

/* Focus Styles for Accessibility */
a:focus,
button:focus {
    outline: 3px solid var(--brand-green);
    outline-offset: 2px;
}

/* SVG Icons */
svg {
    visibility: visible;
    opacity: 1;
}
