@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Lora:wght@400;500;700&family=Playfair+Display:ital,wght@1,700&display=swap');
/* ======================================= */
/* BLOG-SPECIFIC STYLES & ANIMATIONS       */
/* ======================================= */

/* Typography: Using the Inter font */
body {
    font-family: 'Inter', sans-serif;
}

/* ======================================= */
/* DARK MODE TOGGLE                        */
/* ======================================= */

#sunIcon {
    opacity: 1;
}

#moonIcon {
    opacity: 0;
}

html.dark #sunIcon {
    opacity: 0;
}

html.dark #moonIcon {
    opacity: 1;
}

#darkModeToggle {
    z-index: 100;
    cursor: pointer;
}

/* ======================================= */
/* NEW LAYOUT & STYLES                     */
/* ======================================= */

.main-blog-container {
    max-width: 1280px;
    margin: 0 auto;
}

/* Sticky sidebar */
.sticky {
    position: sticky;
    top: 2rem;
    align-self: flex-start;
    transition: all 0.3s ease-in-out;
}

/* Profile card styling (Revamped) */
.profile-card {
    transition: all 0.3s ease-in-out;
    padding: 2.5rem;
    margin: 3rem 0;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    background-color: #f9f9f9;
}

.dark .profile-card {
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.05);
    background-color: #1c1c1c;
}

/* Profile card elements */
.profile-img {
    border-radius: 50%;
    border: 5px solid #0D1164;
    transition: all 0.3s ease-in-out;
    width: 120px;
    height: 120px;
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.dark .profile-img {
    border-color: #0D1164;
}

.profile-card h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.dark .profile-card h3 {
    color: #f7f7f7;
}

.profile-card p {
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
}

.dark .profile-card p {
    color: #bbb;
}

/* REMOVES HOVER EFFECT FROM POST PAGE PROFILE CARD */
.post-profile-card:hover {
    box-shadow: none !important;
    transform: none !important;
}

/* Related posts styling (Revamped) */
.related-posts-container {
    max-width: 700px;
    margin: 0 auto;
    padding-top: 4rem;
    border-top: 1px solid #ddd;
    margin-top: 4rem;
}

.related-posts-container .section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    font-style: italic;
    text-align: center;
    margin-bottom: 2rem;
    color: #1a1a1a;
}

.dark .related-posts-container .section-title {
    color: #f7f7f7;
}

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

.related-post-item {
    transition: transform 0.3s ease-in-out;
}

.related-post-item:hover {
    transform: translateY(-5px);
}

.related-post-item img {
    border-radius: 0.5rem;
}

.related-post-item h3 {
    font-size: 1.4rem;
    margin-top: 0.75rem;
    font-family: 'Roboto', sans-serif;
    line-height: 1.3;
}

.related-post-item p {
    font-size: 1rem;
    color: #555;
    font-family: 'Lora', Georgia, serif;
    margin-top: 0.5rem;
}

/* Social icon hover effects (Revamped) */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: transparent;
    transition: all 0.3s ease-in-out;
    border: 1px solid #ddd;
}

.dark .social-icon {
    border-color: #444;
}

.social-icon svg {
    width: 30px;
    height: 30px;
    transition: fill 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.social-icon:hover {
    background-color: rgba(21, 156, 64, 0.1);
    transform: translateY(-2px);
}

.social-icon:hover svg path {
    fill: #0D1164;
}

.dark .social-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dark .social-icon:hover svg path {
    fill: #fff !important;
}

/* Share button styles (Updated for mobile centering) */
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem auto;
}

@media (min-width: 768px) {
    .share-buttons {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 1.5rem;
    }

    .share-button {
        flex-grow: 1;
        justify-content: center;
    }
}

.share-button {
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

.share-button svg {
    width: 24px;
    height: 24px;
    transition: all 0.2s ease-in-out;
}

.share-button:hover {
    background-color: #0D1164;
    color: white;
}

.share-button:hover svg {
    stroke: white;
    fill: white;
}

.dark .share-button:hover {
    background-color: #0D1164;
    color: white;
}

.dark .share-button:hover svg {
    stroke: white;
    fill: white;
}

/* ======================================= */
/* ANIMATIONS                              */
/* ======================================= */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ======================================= */
/* MEDIUM.COM CONTENT STYLES               */
/* ======================================= */

.blog-post-content {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.1875rem;
    line-height: 1.6;
    letter-spacing: -0.003em;
    color: #242424;
}

/* Dark mode adjustments for content */
.dark .blog-post-content {
    color: #e8e8e8;
}

/* Headings */
.blog-post-content h1,
.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4,
.blog-post-content h5,
.blog-post-content h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 2em;
    margin-bottom: 0.5em;
    letter-spacing: -0.015em;
    color: #1a1a1a;
}

.dark .blog-post-content h1,
.dark .blog-post-content h2,
.dark .blog-post-content h3,
.dark .blog-post-content h4,
.dark .blog-post-content h5,
.dark .blog-post-content h6 {
    color: #f7f7f7;
}

/* Paragraphs and Lists */
.blog-post-content p {
    margin-bottom: 1.6rem;
    text-align: justify;
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 1.6rem;
    padding-left: 1.5rem;
}

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

/* Blockquotes */
.blog-post-content blockquote {
    border-left: 4px solid #dddddd;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555555;
    font-family: 'Lora', Georgia, serif;
    font-size: 1.2rem;
    line-height: 1.5;
}

.dark .blog-post-content blockquote {
    color: #a8a8a8;
}

/* Code blocks and inline code */
.blog-post-content pre {
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
}

/* Fix for the toolbar position */
.blog-post-content .code-toolbar > .toolbar {
    top: 0.5em;
    right: 0.5em;
}

.blog-post-content .code-toolbar > .toolbar > .toolbar-item > span,
.blog-post-content .code-toolbar > .toolbar > .toolbar-item > a {
    background: #f5f2f0;
    color: #905;
}

.dark .blog-post-content .code-toolbar > .toolbar > .toolbar-item > span,
.dark .blog-post-content .code-toolbar > .toolbar > .toolbar-item > a {
    background: #2b2b2b;
    color: #f8f8f2;
}

/* Images and Figures */
.blog-post-content figure {
    margin: 3rem 0;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.blog-post-content figcaption {
    text-align: center;
    font-style: italic;
    color: #888888;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Link styling within content */
.blog-post-content a {
    color: #1a8917;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.blog-post-content a:hover {
    color: #0f6a0d;
    text-decoration: underline;
}

.dark .blog-post-content a {
    color: #64ff64;
}

/* Ensure the main content area has the right width */
.post-content {
    max-width: 700px;
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-post-content {
        font-size: 1rem;
    }

    .blog-post-content h1 {
        font-size: 2rem;
    }

    .blog-post-content h2 {
        font-size: 1.5rem;
    }
}

/* ======================================= */
/* BLOG FOOTER STYLES                      */
/* ======================================= */

.blog-footer {
    max-width: 700px;
    margin: 4rem auto 2rem auto;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

.blog-footer p {
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
}

.blog-footer p a {
    color: #0D1164;
    font-weight: 500;
}

.dark .blog-footer p {
    color: #bbb;
}

.dark .blog-footer p a {
    color: #fff;
}

.blog-footer p a:hover {
    color: #08CB00;
    text-decoration: underline;
}

/* Custom Notification Styles */
.custom-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    z-index: 9999;
}

.custom-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Dark mode compatibility */
.dark .custom-notification {
    background-color: #555;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Dynamic Logo Color for Dark Mode */
#blog-logo-horizontal {
    transition: filter 0.3s ease;
}

html.dark #blog-logo-horizontal {
    filter: invert(1);
}

/* Sticky Navigation */
.sticky {
    position: sticky;
    top: 0;
}

/* New: Full-screen Search Overlay */
#full-screen-search {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease-in-out;
}

#full-screen-search #search-input {
    border-color: #4b5563;
    color: #f3f4f6;
    background-color: transparent;
    transition: all 0.3s ease-in-out;
}

#full-screen-search #search-input:focus {
    border-color: #0d9488;
}

#search-results-container {
    padding: 0;
}

#search-results-container .search-result-item {
    margin-bottom: 1px;
}

#search-results-container .search-result-item:first-child {
    border-radius: 8px 8px 0 0;
}

#search-results-container .search-result-item:last-child {
    border-radius: 0 0 8px 8px;
    border-bottom: none;
}

/* Header Separator */
.header-separator-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, rgba(144, 144, 144, 0) 0%, rgba(144, 144, 144, 0.75) 50%, rgba(144, 144, 144, 0) 100%);
    opacity: 0.5;
    transition: all 0.3s ease;
}

html.dark .header-separator-line {
    background: linear-gradient(to right, rgba(144, 144, 144, 0) 0%, rgba(144, 144, 144, 0.75) 50%, rgba(144, 144, 144, 0) 100%);
}

/* All Blogs Button */
.btn-all-blogs {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: #4b5563;
    background-color: transparent;
    border: 2px solid #4b5563;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.btn-all-blogs:hover {
    color: #ffffff;
    background-color: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

html.dark .btn-all-blogs {
    color: #d1d5db;
    border-color: #d1d5db;
}

html.dark .btn-all-blogs:hover {
    color: #1a202c;
    background-color: #d1d5db;
    border-color: #d1d5db;
}

/* Enhanced Search Input Styling */
.search-input-container {
    position: relative;
}

#search-input, #desktopSearchInput {
    transition: all 0.3s ease-in-out;
    border-color: #4b5563; /* Initial subtle border */
    color: #f3f4f6; /* Text color */
    background-color: transparent; /* Transparent background */
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

#search-input:focus, #desktopSearchInput:focus {
    border-color: #0d9488; /* Vibrant border on focus */
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2); /* Soft glow effect */
}

/* Placeholder animation */
#search-input::placeholder, #desktopSearchInput::placeholder {
    color: #9ca3af;
    transition: all 0.3s ease-in-out;
}

#search-input:focus::placeholder, #desktopSearchInput:focus::placeholder {
    transform: translateX(5px);
    color: #d1d5db;
}
