@import url("../astra/style.css");

/* HEADER & NAVBAR STYLES - FIXED HEADER */
.site-header, header {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    border-bottom: 1px solid #e5e7eb;
}

.navbar {
    padding: 0;
    background: transparent !important;
}

/* Match website header vertical rhythm */
.navbar .container {
    min-height: 64px; /* h-16 */
    display: flex;
    align-items: center;
}

.navbar-brand img {
    width: 168px;
    height: 47px;
}

.navbar-nav .nav-link {
    color: #374151 !important; /* gray-700 */
    font-weight: 500; /* font-medium */
    font-size: 1rem; /* 16px to match website */
    margin: 0 0.5rem;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #2563eb !important; /* blue-600 to match site */
}

.navbar-nav .dropdown-menu {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.language-switcher .dropdown-toggle {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

/* Make language dropdown scrollable */
.language-switcher .dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

/* WebKit scrollbar styling for language dropdown */
.language-switcher .dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.language-switcher .dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.language-switcher .dropdown-menu::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 3px;
}

.language-switcher .dropdown-menu::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

/* BODY AND MAIN LAYOUT */
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    color: #1f2937;
    line-height: 1.6;
    margin: 0 !important;
    padding-top: 0 !important;
}

/* Blog main page - accounting for fixed header */
.blog-main {
    padding-top: 5rem !important; /* 80px for fixed header */
}

/* BLOG HERO SECTION */
.blog-hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, rgba(243, 244, 246, 0.3) 0%, rgba(255, 255, 255, 1) 100%);
    background-image: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    text-align: center;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.badge-icon {
    width: 1rem;
    height: 1rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 0;
    line-height: 1.6;
}

/* FEATURED SECTION */
.featured-section {
    padding: 4rem 0;
}

.section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 0.5rem;
}

.section-line {
    width: 3rem;
    height: 0.25rem;
    background: #6366f1;
    border-radius: 9999px;
}

.featured-card {
    display: block;
    background: #ffffff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.featured-image {
    position: relative;
    height: 16rem;
}

.featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* ====================================
   ARCHIVE PAGE STYLING
==================================== */

/* Author Info Card */
.author-info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2.5rem;
    margin-top: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.author-card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

/* Wide rectangular profile picture for author pages */
.author-card-avatar-wide {
    width: 100%;
    max-width: 720px;
    height: 426px;
    border-radius: 12px;
    object-fit: cover;
    object-position: top center;
    border: 3px solid rgba(255, 255, 255, 0.3);
    order: -1; /* Ensure it appears first */
    margin-bottom: 2rem; /* Add spacing between image and content */
}

.author-card-details {
    flex: none;
    order: 1; /* Ensure it appears after the image */
}

.author-card-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem 0;
}

.author-card-title {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 1rem 0;
    font-weight: 500;
}

.author-card-bio {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
}

/* Article Count */
.article-count {
    font-size: 0.9rem;
    font-weight: 400;
    color: #6b7280;
    margin-left: 0.5rem;
}

/* Pagination Wrapper */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-links a,
.pagination-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: 44px;
}

.pagination-links a:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #1f2937;
}

.pagination-links .current,
.pagination-links .current:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
    cursor: default;
}

.pagination-links .prev,
.pagination-links .next {
    padding: 0.75rem 1.5rem;
}

/* No Posts Section */
.no-posts-section {
    text-align: center;
    padding: 4rem 0;
    max-width: 600px;
    margin: 0 auto;
}

.no-posts-content {
    background: white;
    border-radius: 16px;
    padding: 3rem 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.no-posts-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1rem 0;
}

.no-posts-text {
    font-size: 1.125rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 2rem 0;
}

.no-posts-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.no-posts-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    color: white;
    text-decoration: none;
}

/* Mobile Responsiveness for Archive Pages */
@media (max-width: 768px) {
    .author-info-card {
        padding: 2rem 1.5rem;
        gap: 1.5rem;
        max-width: 90%;
    }
    
    .author-card-avatar {
        width: 60px;
        height: 60px;
    }
    
    .author-card-avatar-wide {
        max-width: 90%;
        height: 280px;
        margin-bottom: 1.5rem; /* Slightly less margin on mobile */
    }
    
    .author-card-name {
        font-size: 1.25rem;
    }
    
    /* Mobile adjustments for language dropdown */
    .language-switcher .dropdown-menu {
        max-height: 250px; /* Shorter on mobile for better UX */
    }
    
    .pagination-links a,
    .pagination-links span {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        min-width: 36px;
    }
    
    .pagination-links .prev,
    .pagination-links .next {
        padding: 0.5rem 1rem;
    }
    
    .no-posts-content {
        padding: 2rem 1.5rem;
    }
    
    .no-posts-title {
        font-size: 1.5rem;
    }
    
    .no-posts-text {
        font-size: 1rem;
    }
}

.featured-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    width: fit-content;
    margin-bottom: 1rem;
}

.featured-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}

.featured-card:hover .featured-title {
    color: #6366f1;
}

.featured-excerpt {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.featured-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.author-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
}

.author-name {
    font-weight: 500;
    color: #111827;
    font-size: 0.875rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.reading-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.time-icon {
    width: 0.75rem;
    height: 0.75rem;
}

.arrow-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #6366f1;
    transition: transform 0.2s ease;
}

.featured-card:hover .arrow-icon {
    transform: translateX(0.25rem);
}

/* LATEST ARTICLES SECTION */
.latest-section {
    padding: 4rem 0;
    background: rgba(243, 244, 246, 0.2);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    display: block;
    background: #ffffff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.card-image {
    position: relative;
    height: 12rem;
}

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

.card-placeholder {
    width: 100%;
    height: 100%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    width: 3rem;
    height: 3rem;
    color: #9ca3af;
}

.image-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(99, 102, 241, 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
    line-height: 1.4;
}

.article-card:hover .card-title {
    color: #6366f1;
}

.card-excerpt {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.small-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
}

.small-author-name {
    font-weight: 500;
    color: #111827;
    font-size: 0.875rem;
}

.small-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.small-reading-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.small-time-icon {
    width: 0.75rem;
    height: 0.75rem;
}

.small-arrow {
    width: 1rem;
    height: 1rem;
    color: #6366f1;
    transition: transform 0.2s ease;
}

.article-card:hover .small-arrow {
    transform: translateX(0.25rem);
}

/* CTA SECTION */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
}

.cta-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.cta-icon {
    width: 6rem;
    height: 6rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.25);
}

.cta-svg {
    width: 4rem;
    height: 4rem;
    color: white;
}

.cta-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1rem;
}

.cta-text {
    color: #374151;
    margin-bottom: 2rem;
    font-size: 1.125rem;
    line-height: 1.6;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.cta-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 14px 0 rgb(0 0 0 / 0.25);
    transition: all 0.2s ease;
}

.cta-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 rgb(0 0 0 / 0.3);
}

.cta-secondary {
    border: 2px solid #8b5cf6;
    color: #8b5cf6;
    background: transparent;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.cta-secondary:hover {
    background: rgba(139, 92, 246, 0.05);
}

/* FOOTER */
.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e5e7eb;
    margin-top: 4rem;
}

.footer p {
    margin-bottom: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.footer a {
    color: #6b7280;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #6366f1;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-image {
        height: 12rem;
    }
    
    .featured-content {
        padding: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .blog-container {
        padding: 0 1rem;
    }
}

@media (min-width: 640px) {
    .cta-buttons {
        flex-direction: row;
    }
}

/* SINGLE POST STYLES */
.single-post-main {
    padding-top: 5rem; /* Account for fixed header */
    padding-bottom: 2rem;
}

.single-post-container {
    max-width: 800px !important;
    margin: 30px auto 0 auto !important;
}

/* Back to Blog Link */
.back-to-blog-link {
    display: inline-flex;
    align-items: center;
    color: #6366f1;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.2s ease;
}

.back-to-blog-link:hover {
    color: #4f46e5;
}

.back-arrow-icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

/* Post Header */
.single-post-header {
    margin-bottom: 3rem;
}

.post-category-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.single-post-title {
    font-size: 2.25rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 2rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .single-post-title {
        font-size: 3rem;
    }
}

/* Post Meta */
.single-post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.author-section {
    display: flex;
    align-items: center;
}

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

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.author-title {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.reading-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.time-icon {
    width: 1rem;
    height: 1rem;
}

.post-date {
    color: #6b7280;
}

/* Featured Image */
.featured-image-container {
    position: relative;
    height: 16rem;
    margin-bottom: 2rem;
    border-radius: 0.75rem;
    overflow: hidden;
}

@media (min-width: 768px) {
    .featured-image-container {
        height: 24rem;
    }
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Post Content */
.single-post-content {
    margin-bottom: 3rem;
}

.single-post-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.single-post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.single-post-content p {
    color: #374151;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.single-post-content ul, 
.single-post-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.single-post-content li {
    margin-bottom: 0.5rem;
    color: #374151;
}

.single-post-content blockquote {
    border-left: 4px solid #6366f1;
    background: rgba(99, 102, 241, 0.05);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
}

/* About Author Section */
.about-author-section {
    background: rgba(243, 244, 246, 0.5);
    padding: 2rem;
    border-radius: 0.75rem;
    margin-top: 3rem;
}

.about-author-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.about-author-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.about-author-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
}

.about-author-details {
    flex: 1;
}

.about-author-name {
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.25rem 0;
}

.about-author-role {
    font-size: 0.875rem;
    color: #6366f1;
    margin: 0 0 0.5rem 0;
}

.about-author-bio {
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* Responsive Design for Single Posts */
@media (max-width: 768px) {
    .single-post-main {
        padding-top: 4rem;
    }
    
    .single-post-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-meta {
        align-self: stretch;
        justify-content: space-between;
    }
    
    .about-author-content {
        flex-direction: column;
        text-align: center;
    }
    
    .single-post-title {
        font-size: 1.875rem;
    }
}

/* Storypie CTA Button - Pink to Purple Gradient Pill */
.storypie-cta-btn {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%) !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 8px 24px !important;
    font-weight: 400 !important;
    color: white !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3) !important;
    margin: 0 1rem 0 1rem !important;
}

.storypie-cta-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4) !important;
    color: white !important;
    text-decoration: none !important;
}

.storypie-cta-btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.3), 0 6px 20px rgba(236, 72, 153, 0.4) !important;
    color: white !important;
}
