/* Custom CSS for Professional Bootstrap Blog Layout */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    
    /* Primary Gradient */
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --gradient-glow: 0 8px 30px rgba(124, 58, 237, 0.2);
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Specific styling overrides for theme */
    --card-shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] {
    --card-shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.3);
}

body {
    font-family: var(--font-sans);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bs-body-bg);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #475569;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Typography Extensions */
.font-serif {
    font-family: var(--font-serif);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Glassmorphism Navigation Bar */
.navbar-glass {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
}

[data-bs-theme="light"] .navbar-glass {
    background-color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .navbar-glass {
    background-color: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 1rem !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 10px;
    background: var(--gradient-primary);
    transition: var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: calc(100% - 20px);
}

/* Reading Progress Bar */
.reading-progress-container {
    position: fixed;
    top: 56px; /* navbar height */
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1030;
    background: transparent;
}

.reading-progress-bar {
    height: 100%;
    width: 0;
    background: var(--gradient-primary);
    transition: width 0.1s ease-out;
}

/* Interactive Card Styles */
.hover-card {
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: var(--bs-card-bg);
}

[data-bs-theme="dark"] .hover-card {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover) !important;
    border-color: rgba(124, 58, 237, 0.2);
}

/* Image Zoom Hover */
.hover-zoom-container {
    overflow: hidden;
    position: relative;
}

.hover-zoom-img {
    transition: var(--transition-smooth);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

/* Badges and Tags */
.badge-custom {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.35em 0.8em;
    border-radius: 6px;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

[data-bs-theme="dark"] .badge-custom {
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
}

.tag-cloud-item {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    margin: 0.25rem;
    display: inline-block;
    border-radius: 30px;
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.tag-cloud-item:hover {
    background: var(--gradient-primary);
    color: white !important;
    border-color: transparent;
    box-shadow: var(--gradient-glow);
}

/* Floating Light/Dark Mode Button & Scroll to Top */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1040;
}

.btn-floating {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
    transition: var(--transition-smooth);
}

.btn-floating:hover {
    transform: scale(1.1);
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.scroll-to-top {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Article Styling */
.article-header {
    margin-bottom: 2rem;
}

.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content blockquote {
    font-family: var(--font-serif);
    font-style: italic;
    border-left: 4px solid #4f46e5;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-size: 1.25rem;
    color: var(--bs-secondary-color);
}

.article-content .dropcap::first-letter {
    font-family: var(--font-serif);
    float: left;
    font-size: 4.5rem;
    line-height: 0.8;
    padding-right: 0.5rem;
    font-weight: bold;
    color: #4f46e5;
}

/* Comments Design */
.comment-card {
    border-left: 2px solid var(--bs-border-color);
    padding-left: 1rem;
    transition: var(--transition-smooth);
}

.comment-card:hover {
    border-left-color: #4f46e5;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Custom Contact Page map placeholder */
.map-placeholder {
    height: 350px;
    background: radial-gradient(circle, var(--bs-border-color) 10%, transparent 11%), 
                radial-gradient(circle, var(--bs-border-color) 10%, transparent 11%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--bs-border-color);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.map-card-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.3;
    animation: pulseGlow 4s infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.2; }
    100% { transform: scale(1.5); opacity: 0.4; }
}

/* Custom stats section style */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
}

/* Newsletter section box */
.newsletter-box {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
    border: 1px solid rgba(124, 58, 237, 0.1);
}
