/* ==========================================================================
   1. VARIABLES & THEMING ENGINE (Pranayama Custom Colors)
   ========================================================================== */
:root {
    /* --- Main Background Colors (Light) --- */
    --main-bg-upper-color: #fef6f6;
    --main-bg-bottom-color: #f6dcd9;

    /* Top to Bottom Linear Gradient */
    --main-bg-gradient: linear-gradient(to bottom, var(--main-bg-upper-color), var(--main-bg-bottom-color));

    /* --- Header & Streak Colors (Light) --- */
    --main-header-heading-color: #fbf9f9;
    --streak-bg-color: #fdefe6;
    --streak-text-color: #492528;
    --streak-border-color: #f6d6ca;
    --streak-dot-color: #fecf7f;
    --today-practice-color: #4f2628;
    --min-breathing-color: #663734;

    /* --- Pranayama/Yogasana Headings & Buttons (Light) --- */
    --main-secondary-heading-color: #482226;
    --see-all-btn-txt-color: #b12f3e;
    --see-all-btn-bg-color: #f5dddd;

    /* --- Card Colors (Light) --- */
    --card-border-color: #fefefe;
    --card-5min-text-color: #4c282b;
    --card-primary-heading-color: #502c2e;
    --card-5min-bg-color: #fef6f2;
    --card-secondary-heading-color: #753b41;
    --practice-card-bg-color: #fdf8f5;
    --practice-card-list-bg-color: #fef6f2;

    /* --- Core Website Mapping (Using above variables) --- */
    --text-color: var(--main-secondary-heading-color);
    --icon-color: var(--min-breathing-color);
    --header-bg: rgba(254, 246, 246, 0.85);
    /* Transparent version of upper bg */
    --search-bg: rgba(255, 255, 255, 0.95);
    --border-color: var(--streak-border-color);
    --link-color: var(--see-all-btn-txt-color);
    --link-hover-color: var(--card-secondary-heading-color);

    /* Transitions & UI Effects */
    --transition-silky: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --glass-border: rgba(255, 255, 255, 0.5);

    /* Image se extract kiya hua Light Coral Glass */
    --header-glass-bg: rgba(248, 155, 138, 0.25);
    --header-glass-border: rgba(255, 255, 255, 0.5);
    --header-shadow: 0 4px 30px rgba(248, 155, 138, 0.15);
}

/* ==========================================================================
   DARK MODE VARIABLES
   ========================================================================== */
[data-theme="dark"] {
    /* --- Main Background Colors (Dark) --- */
    --main-bg-upper-color: #15121c;
    --main-bg-bottom-color: #0e0d14;
    /* Gradient automatically uses the updated upper/bottom colors */

    /* --- Header & Streak Colors (Dark) --- */
    --main-header-heading-color: #f9d5b7;
    --streak-bg-color: #251820;
    --streak-text-color: #ead2b6;
    --streak-border-color: #674046;
    --streak-dot-color: #f5b453;
    --today-practice-color: #e9b697;
    --min-breathing-color: #948188;

    /* --- Pranayama/Yogasana Headings & Buttons (Dark) --- */
    --main-secondary-heading-color: #f6c2a4;
    --see-all-btn-txt-color: #e2d2bc;
    --see-all-btn-bg-color: #201d25;

    /* --- Card Colors (Dark) --- */
    --card-border-color: #392d37;
    --card-5min-text-color: #f0dec6;
    --card-5min-bg-color: #281d22;
    --card-primary-heading-color: #fbefd7;
    --card-secondary-heading-color: #86635c;
    --practice-card-bg-color: #261f27;
    --practice-card-list-bg-color: #2e2530;

    /* --- Core Website Mapping (Dark) --- */
    --text-color: var(--main-secondary-heading-color);
    --icon-color: var(--min-breathing-color);
    --header-bg: rgba(21, 18, 28, 0.85);
    /* Transparent version of dark upper bg */
    --search-bg: rgba(38, 31, 39, 0.95);
    --border-color: var(--streak-border-color);
    --link-color: var(--see-all-btn-txt-color);
    --link-hover-color: var(--main-header-heading-color);
    --glass-border: rgba(255, 255, 255, 0.05);

    /* Image se extract kiya hua Dark Warm Charcoal Glass */
    --header-glass-bg: rgba(26, 18, 20, 0.75);
    --header-glass-border: rgba(255, 255, 255, 0.08);
    --header-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   2. GLOBAL BASE STYLES (Using Dynamic Variables)
   ========================================================================== */
body {
    /* Applying the Top-to-Bottom Linear Gradient */
    background: var(--main-bg-gradient);
    background-attachment: fixed;
    /* Ensures gradient doesn't stretch weirdly on scroll */
    color: var(--text-color);
    min-height: 100vh;
    transition: background 0.4s ease, color 0.4s ease;
}

/* Paragraphs dynamically use the 5-min text color for perfect readability */
p {
    color: var(--card-5min-text-color);
    opacity: 1 !important;
    transition: color 0.4s ease;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover-color);
}

/* Global Image Reset - Prevents stretching */
.post-card img,
.single-post-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* --- Global Glass Styles --- */
.glass-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

[data-theme='dark'] .glass-header {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Theme Toggle Icons --- */
.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    display: flex;
    align-items: center;
}

[data-theme='dark'] .sun-icon {
    display: block;
}

[data-theme='dark'] .moon-icon {
    display: none;
}

[data-theme='light'] .sun-icon {
    display: none;
}

[data-theme='light'] .moon-icon {
    display: block;
}

/* --- Search Bar Styling --- */
.premium-search-wrapper .search-field {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    padding: 5px 15px;
    font-size: 0.9rem;
    transition: 0.3s;
    width: 150px;
}

.premium-search-wrapper .search-field:focus {
    width: 220px;
    outline: none;
    border-color: #0d6efd;
}

.search-submit {
    background: none;
    border: none;
    margin-left: -35px;
    color: #666;
}

/* --- Responsive Menu Logic --- */
@media (max-width: 767px) {
    .mobile-menu-icon {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1100;
        position: relative;
    }

    .mobile-menu-icon span {
        width: 25px;
        height: 2px;
        background: currentColor;
        transition: 0.3s;
    }

    /* The Overlay Menu */
    .nav-and-search {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-color, white);
        flex-direction: column !important;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    #mobile-nav-toggle:checked~.nav-and-search {
        transform: translateX(0);
    }

    #mobile-nav-toggle:checked~.mobile-menu-icon span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    #mobile-nav-toggle:checked~.mobile-menu-icon span:nth-child(2) {
        opacity: 0;
    }

    #mobile-nav-toggle:checked~.mobile-menu-icon span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        font-size: 1.25rem;
    }

    .premium-search-wrapper .search-field {
        width: 250px !important;
    }
}

/* Premium Author Box Styles */
.premium-author-box {
    display: flex;
    gap: 24px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
    margin: 40px 0;
}

.author-avatar-wrapper {
    flex-shrink: 0;
}

.author-avatar {
    width: 48px;
    /* Matched to the proportion in the screenshot */
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    flex-grow: 1;
}

.author-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #202124;
    margin: 0 0 12px 0;
}

.author-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4d5156;
    margin: 0 0 16px 0;
}

.author-meta {
    font-size: 0.85rem;
    color: #70757a;
    margin-bottom: 12px;
}

.meta-accuracy {
    font-weight: 500;
}

.author-profile-link {
    display: inline-block;
    font-size: 0.9rem;
    color: #1a73e8;
    /* Standard Google-style blue for high visibility */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.author-profile-link:hover {
    color: #1557b0;
    text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .premium-author-box {
        flex-direction: column;
        gap: 16px;
        padding: 24px;
    }
}