/* Import modern fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #8a9a86;       /* Sage Green */
    --primary-dark: #6e7d6b;        /* Darker Sage */
    --primary-light: #f0f3ef;       /* Light Sage Tint */
    --text-charcoal: #2d2d2d;       /* Soft Dark Charcoal */
    --text-muted: #6c757d;
    --accent-gold: #c5a880;         /* Ayurvedic Gold */
    --accent-gold-dark: #a88d66;    /* Darker Gold */
    --bg-warm-white: #fdfdfb;       /* Soft Wellness Cream */
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    --hover-shadow: 0 10px 30px rgba(138, 154, 134, 0.15);
    --font-heading: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-warm-white);
    color: var(--text-charcoal);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography Customizations */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-charcoal);
    font-weight: 600;
}

.font-serif {
    font-family: var(--font-serif);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Navigation Customizations */
.navbar {
    background-color: rgba(253, 253, 251, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(138, 154, 134, 0.15);
    padding: 15px 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: var(--text-charcoal) !important;
}

.navbar-brand span {
    color: var(--primary-color);
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-charcoal) !important;
    padding: 6px 15px !important;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
    background-color: var(--primary-light);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f0f3ef 0%, #e6ebe3 100%);
    border-bottom: 1px solid rgba(138, 154, 134, 0.1);
    margin-bottom: 60px;
}

.hero-subtitle {
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* Reading Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: transparent;
    z-index: 1050;
}

.progress-bar-reading {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-gold) 100%);
    width: 0%;
    transition: width 0.1s ease;
}

/* Custom Buttons */
.btn-wellness {
    background-color: var(--primary-color);
    color: white;
    font-family: var(--font-heading);
    font-weight: 500;
    border: 1px solid var(--primary-color);
    padding: 10px 24px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.btn-wellness:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(138, 154, 134, 0.3);
}

.btn-outline-wellness {
    background-color: transparent;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-weight: 500;
    border: 2px solid var(--primary-color);
    padding: 8px 22px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.btn-outline-wellness:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Blog Feed Cards */
.blog-card {
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--hover-shadow);
    border-color: rgba(138, 154, 134, 0.2);
}

.blog-card-img-wrap {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.blog-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

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

.blog-category-badge {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 12px;
    width: fit-content;
}

.blog-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}

.blog-card-title a {
    color: var(--text-charcoal);
}

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

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.blog-author-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}

/* Category Filter Bar */
.filter-btn {
    border: none;
    background: transparent;
    padding: 8px 20px;
    border-radius: 20px;
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Detailed Post Page Styles */
.post-header {
    padding: 80px 0 40px;
    background-color: #f7f9f6;
    border-bottom: 1px solid rgba(138, 154, 134, 0.1);
}

.post-meta-top {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.post-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 25px;
}

.post-cover-image-container {
    margin-top: -40px;
    margin-bottom: 50px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.post-cover-image {
    width: 100%;
    max-height: 550px;
    object-fit: cover;
}

.post-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #3b3b3b;
    font-family: var(--font-body);
}

.post-content p {
    margin-bottom: 25px;
}

.post-content h3 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--text-charcoal);
}

.post-content ul, .post-content ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

.post-content li {
    margin-bottom: 10px;
}

/* Beautiful Drop Cap for First Letter of Blog Content */
.post-content > p:first-of-type::first-letter {
    font-family: var(--font-serif);
    font-size: 4rem;
    float: left;
    line-height: 0.8;
    margin-right: 8px;
    margin-top: 4px;
    color: var(--primary-color);
    font-weight: bold;
}

/* Author Box Card */
.author-card {
    background-color: white;
    border: 1px solid rgba(138, 154, 134, 0.15);
    border-radius: 12px;
    padding: 30px;
    margin: 50px 0;
    box-shadow: var(--card-shadow);
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-gold);
}

/* Newsletter Widget Card */
.newsletter-card {
    background: linear-gradient(135deg, #8a9a86 0%, #6e7d6b 100%);
    color: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--hover-shadow);
}

.newsletter-card h3 {
    color: white;
    font-family: var(--font-serif);
}

.newsletter-card .form-control {
    border-radius: 20px 0 0 20px;
    border: none;
    padding: 12px 20px;
}

.newsletter-card .btn {
    border-radius: 0 20px 20px 0;
    background-color: var(--accent-gold);
    color: white;
    border: none;
    padding: 0 25px;
    transition: all 0.3s ease;
}

.newsletter-card .btn:hover {
    background-color: var(--accent-gold-dark);
}

/* Login Page Styles */
.login-body {
    background: linear-gradient(135deg, #eef2ed 0%, #dfede2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 420px;
    padding: 40px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2rem;
    color: var(--text-charcoal);
}

.login-logo span {
    color: var(--primary-color);
}

/* Admin Dashboard Table */
.dashboard-table th {
    background-color: var(--primary-light);
    color: var(--text-charcoal);
    font-family: var(--font-heading);
    font-weight: 600;
    border-bottom: 2px solid rgba(138, 154, 134, 0.2);
}

.dashboard-table td {
    vertical-align: middle;
}

/* Toast Messages */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1055;
}

/* Comment Styles */
.comment-item {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 20px 0;
}

.comment-item:last-child {
    border-bottom: none;
}

/* Dynamic Editor Styling */
.editor-preview-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    background-color: white;
    min-height: 400px;
}

/* Hover Utilities */
.hover-success {
    transition: color 0.2s ease;
}
.hover-success:hover {
    color: var(--primary-color) !important;
}

/* Header & Footer Custom Theme Overrides */
.navbar.navbar-dark {
    background-color: rgba(45, 45, 45, 0.95) !important;
    border-bottom: 1px solid rgba(138, 154, 134, 0.25);
}

.navbar.navbar-dark .navbar-brand {
    color: #ffffff !important;
}

.navbar.navbar-dark .nav-link {
    color: #e2e8f0 !important;
}

.navbar.navbar-dark .nav-link:hover, 
.navbar.navbar-dark .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(255, 255, 255, 0.08);
}

footer.footer-dark {
    background-color: #1c201b !important; /* Elegant green-charcoal */
    color: #e2e8f0 !important;
}

footer.footer-dark .text-muted {
    color: #a3b0a1 !important; /* Sage-tinted high contrast light text */
}

footer.footer-dark a.text-muted {
    color: #a3b0a1 !important;
}

footer.footer-dark a.text-muted:hover {
    color: var(--accent-gold) !important;
}

footer.footer-dark hr {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

footer.footer-light {
    background-color: #ffffff !important;
    color: var(--text-charcoal) !important;
    border-top: 1px solid rgba(138, 154, 134, 0.15);
}

footer.footer-light .text-muted {
    color: #555c54 !important;
}

footer.footer-light a.text-muted {
    color: #555c54 !important;
}

footer.footer-light a.text-muted:hover {
    color: var(--primary-color) !important;
}

footer.footer-light hr {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Admin Sidebar Styling */
.admin-sidebar {
    border: 1px solid rgba(138, 154, 134, 0.15) !important;
}

.admin-nav .nav-link {
    color: var(--text-charcoal) !important;
    padding: 10px 15px !important;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.admin-nav .nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-color) !important;
    transform: translateX(4px);
}

.admin-nav .nav-link.active {
    background-color: var(--primary-color);
    color: white !important;
}

.admin-nav .nav-link.active:hover {
    color: white !important;
    transform: none;
}

/* Max-width Utility Classes */
.max-width-600 {
    max-width: 600px;
}
.max-width-700 {
    max-width: 700px;
}

/* Responsive Post Content Styles (Handles tables/images in user-generated blog posts) */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.post-content table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}

.post-content iframe, .post-content video {
    max-width: 100%;
    height: auto;
}

/* Responsive Overrides */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--bg-warm-white);
        border-top: 1px solid rgba(138, 154, 134, 0.1);
        padding: 15px;
        border-radius: 8px;
        margin-top: 10px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }
    .navbar.navbar-dark .navbar-collapse {
        background-color: #2d2d2d;
    }
    .nav-link {
        padding: 10px 15px !important;
        margin: 2px 0;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0 40px;
        margin-bottom: 30px;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .post-title {
        font-size: 1.8rem;
    }
    .post-header {
        padding: 40px 0 20px;
    }
    .blog-card-body {
        padding: 18px;
    }
    .btn-wellness {
        padding: 8px 20px;
    }
    
    /* Make admin sidebar collapsing profile area look neat */
    .admin-sidebar {
        padding: 12px !important;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }
    .post-title {
        font-size: 1.5rem;
    }
    .newsletter-card {
        padding: 24px;
    }
    .newsletter-card .input-group {
        flex-direction: column;
        gap: 10px;
    }
    .newsletter-card .form-control {
        border-radius: 20px !important;
        width: 100%;
    }
    .newsletter-card .btn {
        border-radius: 20px !important;
        width: 100%;
        padding: 10px 0;
    }
}
