:root {
    --primary-teal: #14b8a6;
    --primary-blue: #0ea5e9;
    --primary-green: #10b981;
    --primary-orange: #f97316;
    --primary-purple: #a855f7;
    --bg-light: #f9fafb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --accent-gradient: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-blue) 100%);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
    background-color: var(--bg-light);
    color: var(--text-primary);
    transition: var(--transition);
    padding-top: 80px;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
}

.header-sticky {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-teal);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.card {
    background: white;
    border-radius: 1rem;
    border: 2px solid #e5e7eb;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    overflow: hidden; /* Prevent content overflow */
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-teal);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.social-icon:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: transparent;
    transform: translateY(-2px);
}

/* Specific override for footer social icons */
.footer-social-icon {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    box-shadow: none;
}
.footer-social-icon:hover {
    transform: none;
    box-shadow: none;
}

.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateX(0);
}

.menu-overlay {
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

body.mobile-menu-open {
    overflow: hidden;
}

.blog-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card-img {
    height: 220px;
    object-fit: cover;
    width: 100%;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

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

.blog-card-category {
    color: var(--primary-teal);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

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

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

.post-meta {
    display: flex;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 1rem;
}

.feature-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Blog Details Specific Styles */
.breadcrumb {
    background-color: #f8fafc;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.breadcrumb-item a {
    text-decoration: none;
    color: var(--primary-teal);
    font-weight: 500;
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

.post-header .post-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-meta-details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
}

.post-meta-details .meta-item {
    display: flex;
    align-items: center;
}

.post-meta-details .meta-item i {
    margin-right: 0.5rem;
    color: var(--primary-teal);
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-top: 2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-content h2, .post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-teal);
    padding-left: 1.5rem;
    font-style: italic;
    margin: 2rem 0;
    background-color: #f0fdfa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-content ul {
    list-style-type: disc;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content table {
    width: 100%;
    margin-top: 2rem;
    border-collapse: collapse;
    table-layout: fixed;
}

.post-content th, .post-content td {
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    text-align: left;
    word-wrap: break-word;
}

.post-content thead th {
    background-color: #f8fafc;
    font-weight: 700;
}

.post-content tbody tr:nth-of-type(even) {
    background-color: #f8fafc;
}

.post-share-buttons {
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-share-buttons .share-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.author-box {
    background: #f0fdfa;
    padding: 2rem;
    border-radius: 1rem;
    margin-top: 3rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.author-box img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
}

.author-box h5 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.author-box p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.sidebar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.sidebar-widget .widget-title {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
}

.sidebar-widget ul li a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar-widget ul li a:hover {
    color: var(--primary-teal);
}

.recent-post-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.recent-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-post-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.recent-post-item h6 {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.related-posts {
    background-color: #f8fafc;
    padding: 5rem 0;
}

.related-posts .blog-card {
    background-color: white;
    transition: all 0.3s ease;
}

.related-posts .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.related-posts .card-img-top-container {
    display: block;
    overflow: hidden;
    height: 180px;
}

.related-posts .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-posts .blog-card:hover .card-img-top {
    transform: scale(1.05);
}

.related-posts .blog-card .card-body {
    padding: 1.5rem;
}

.related-posts .related-post-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-teal);
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.related-posts .card-title {
    font-size: 1.1rem;
    line-height: 1.4;
    flex-grow: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.related-posts .related-post-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease; /* Optimized transition time */
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    border: 6px solid rgba(20, 184, 166, 0.2);
    border-left-color: var(--primary-teal);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    animation: spin 1.2s linear infinite;
}

.loader-text {
    margin-top: 1.5rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Content Loader */
.content-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    width: 100%;
}

/* Fix for content overflow */
.blog-post-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.blog-post-content {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
}