:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #f59e0b;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --success: #10b981;
    --border-radius: 20px;
    --box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Heebo', sans-serif; color: var(--dark); background-color: #ffffff; line-height: 1.6; overflow-x: hidden; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
section { padding: 80px 0; }

/* Navigation */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed; width: 100%; top: 0; z-index: 1000;
    border-bottom: 1px solid #e2e8f0;
}
nav { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); text-decoration: none; z-index: 1001; }

.nav-links { display: flex; list-style: none; gap: 2rem; align-items: center; }
.nav-links a { text-decoration: none; color: var(--dark); font-weight: 500; transition: 0.3s; }
.nav-links a:hover { color: var(--primary); }

.menu-btn { display: none; font-size: 1.5rem; cursor: pointer; z-index: 1001; }

/* Hero Section */
.hero {
    padding: 160px 0 80px;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
}
.hero-flex { display: flex; align-items: center; gap: 50px; }
.hero-content { flex: 1.2; text-align: right; }
.hero-image { flex: 0.8; text-align: center; }

.hero-image-placeholder {
    width: 100%; height: 400px; max-width: 400px;
    background: linear-gradient(135deg, var(--primary), var(--accent)); 
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; 
    display: flex; align-items: center; justify-content: center; 
    color: white; font-size: 5rem; margin: 0 auto;
    box-shadow: var(--box-shadow);
}

.hero h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 25px; color: var(--dark); font-family: 'Rubik'; }
.hero h1 span { color: var(--primary); }
.hero .tagline { font-size: 1.4rem; color: var(--gray); margin-bottom: 40px; }

.cta-button {
    display: inline-block; background-color: var(--primary); color: white;
    padding: 18px 40px; border-radius: 50px; text-decoration: none;
    font-weight: 700; font-size: 1.1rem; transition: 0.3s;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3); border: none; cursor: pointer;
    text-align: center;
}
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 15px 25px rgba(37, 99, 235, 0.4); }

/* Process Section */
.process { background: var(--light); }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 50px; }
.step { text-align: center; padding: 10px; }
.step-num { 
    width: 50px; height: 50px; background: var(--primary); color: white; 
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    margin: 0 auto 20px; font-weight: 800; font-size: 1.2rem;
}

/* Portfolio */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; margin-top: 50px; }
.portfolio-card {
    background: white; border-radius: var(--border-radius); overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05); transition: 0.4s; border: 1px solid #f1f5f9;
}
.portfolio-card:hover { transform: translateY(-10px); box-shadow: var(--box-shadow); }
.port-img { height: 250px; width: 100%; object-fit: cover; }
.port-content { padding: 30px; }
.port-tags { display: flex; gap: 10px; margin-top: 15px; flex-wrap: wrap; }
.tag { background: #eff6ff; color: var(--primary); padding: 5px 15px; border-radius: 50px; font-size: 0.85rem; font-weight: 600; }

/* FAQ Section */
.faq { max-width: 800px; margin: 40px auto 0; }
.faq-item { border-bottom: 1px solid #e2e8f0; padding: 20px 0; }
.faq-item h3 { font-size: 1.2rem; color: var(--primary); margin-bottom: 10px; }

/* Contact Section */
.contact { background: var(--dark); color: white; }
.contact-box {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
    background: #1e293b; padding: 60px; border-radius: 30px;
}
.contact-form input, .contact-form textarea {
    width: 100%; padding: 18px; margin-bottom: 20px; border-radius: 12px;
    border: 1px solid #334155; background: #0f172a; color: white; font-family: inherit;
}

/* Mobile Adjustments */
@media (max-width: 992px) {
    .hero-flex { flex-direction: column-reverse; text-align: center; gap: 30px; }
    .hero-content { text-align: center; }
    .hero h1 { font-size: 2.8rem; }
    .process-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-box { grid-template-columns: 1fr; padding: 40px 20px; }
}

@media (max-width: 768px) {
    .menu-btn { display: block; }
    .nav-links {
        position: fixed; top: 0; left: -100%; width: 80%; height: 100vh;
        background: white; flex-direction: column; padding: 100px 20px;
        transition: 0.4s; box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }
    .nav-links.active { left: 0; }
    .header-cta { display: none; } /* Hide the big button in nav on mobile */
    
    .hero h1 { font-size: 2.3rem; }
    .hero .tagline { font-size: 1.1rem; }
    .process-grid { grid-template-columns: 1fr; }
    section { padding: 60px 0; }
    .cta-button { width: 100%; }
}

/* Blog Section */
.blog {
    background-color: #f8fafc;
    padding: 80px 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.blog-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
    transition: 0.4s;
    border: 1px solid #f1f5f9;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.blog-image {
    height: 220px;
    overflow: hidden;
}

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

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

.blog-image-placeholder {
    height: 220px;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 3rem;
}

.blog-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--gray);
}

.blog-meta i {
    margin-left: 5px;
}

.blog-date, .blog-category {
    display: flex;
    align-items: center;
}

.blog-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.blog-title a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s;
}

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

.blog-excerpt {
    color: var(--gray);
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s;
}

.blog-read-more:hover {
    gap: 12px;
}

.blog-read-more i {
    font-size: 0.9rem;
}

/* Responsive Blog */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-card {
        margin-bottom: 0;
    }
}

/* Bootstrap-Themed Single Post */

/* Featured Image with Overlay */
.post-featured-image-full {
    position: relative;
    overflow: hidden;
}

.post-featured-image-full .image-container {
    position: relative;
}

.post-featured-image-full .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* Bootstrap Overrides for Post Content */
.post-content-main .content-wrapper {
    font-size: 1.125rem; /* 18px */
    line-height: 1.8;
}

.post-content-main .content-wrapper h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
}

.post-content-main .content-wrapper h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content-main .content-wrapper h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-content-main .content-wrapper blockquote {
    border-right: 4px solid var(--primary);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    font-size: 1.25rem;
}

.post-content-main .content-wrapper pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.post-content-main .content-wrapper code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
    color: #dc2626;
}

.post-content-main .content-wrapper ul,
.post-content-main .content-wrapper ol {
    padding-right: 1.5rem;
    margin: 1.5rem 0;
}

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

.post-content-main .content-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.post-content-main .content-wrapper table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.post-content-main .content-wrapper table th {
    background: #f8fafc;
    padding: 0.75rem;
    text-align: right;
    font-weight: 600;
    border: 1px solid #dee2e6;
}

.post-content-main .content-wrapper table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

/* Share Buttons Gradient */
.post-share.bg-gradient {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border: 1px solid #bae6fd;
}

/* Newsletter Form */
.newsletter-form .form-control {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.newsletter-form .form-control:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

/* Author Box */
.author-box .card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

/* Related Posts Card Hover Effect */
.related-post-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

.related-post-card .card-img-top {
    transition: transform 0.5s ease;
}

.related-post-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Navigation Buttons */
.post-navigation .nav-prev,
.post-navigation .nav-next {
    transition: all 0.3s ease;
}

.post-navigation .nav-prev:hover,
.post-navigation .nav-next:hover {
    background-color: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

/* Tags Badge Hover */
.post-tags .badge:hover {
    background-color: var(--primary) !important;
    color: white !important;
    transform: translateY(-2px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .post-title-main {
        font-size: 2rem;
    }
    
    .post-content-main .content-wrapper {
        font-size: 1rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .share-buttons {
        justify-content: flex-start !important;
    }
    
    .post-navigation .row > div {
        margin-bottom: 1rem;
    }
    
    .post-navigation .row > div:last-child {
        margin-bottom: 0;
    }
}

/* RTL Adjustments for Bootstrap */
[dir="rtl"] .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] .me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

[dir="rtl"] .ms-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

[dir="rtl"] .pe-3 {
    padding-right: 0 !important;
    padding-left: 1rem !important;
}

[dir="rtl"] .border-end {
    border-right: none !important;
    border-left: 4px solid var(--primary) !important;
}

[dir="rtl"] .justify-content-end {
    justify-content: flex-start !important;
}

[dir="rtl"] .justify-content-start {
    justify-content: flex-end !important;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

[dir="rtl"] .text-start {
    text-align: right !important;
}