/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Rubik", Arial, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #e0f7fa 0%, #b3e5fc 50%, #e3f2fd 75%, #ffffff 100%);
    color: #0c4a6e;
    min-height: 100vh;
}

/* Layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 250px minmax(auto, 800px) 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Table of Contents */
.toc-container {
    position: sticky;
    top: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(79, 195, 247, 0.2);
    transition: transform 0.3s ease;
}

.toc-container:hover {
    transform: translateY(-5px);
}

.toc-title {
    color: #01579b;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4fc3f7;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin: 0.8rem 0;
    padding-right: 1rem;
    border-right: 2px solid transparent;
    transition: all 0.3s ease;
}

.toc-list li:hover {
    border-right-color: #4fc3f7;
}

.toc-link {
    color: #0288d1;
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    transition: all 0.3s ease;
}

.toc-link:hover {
    color: #01579b;
    transform: translateX(-5px);
}

/* Main Content */
.post-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(79, 195, 247, 0.2);
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: rgba(224, 247, 250, 0.5);
    border-radius: 999px;
    width: fit-content;
}

.breadcrumbs a {
    color: #0288d1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: #01579b;
}

.breadcrumbs span {
    color: #666;
}

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

.post-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #01579b;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-meta {
    color: #666;
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Summary Box */
.post-summary {
    background: linear-gradient(135deg, #e3f2fd 0%, #e1f5fe 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.post-summary::before {
    content: 'תקציר';
    position: absolute;
    top: -0.8rem;
    right: 2rem;
    background: #0288d1;
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(2, 136, 209, 0.2);
}

/* Content Styling */
.post-content {
    margin: 2rem 0;
}

.post-content h2 {
    color: #01579b;
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e3f2fd;
}

.post-content h3 {
    color: #0288d1;
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem;
}

.post-content p {
    margin: 1rem 0;
    line-height: 1.8;
}

/* Key Takeaway */
.key-takeaway {
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    border-right: 5px solid #4fc3f7;
    border-radius: 16px;
    padding: 2rem;
    margin: 3rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.key-takeaway-title {
    color: #01579b;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.key-takeaway ul {
    list-style-type: none;
    padding: 0;
}

.key-takeaway li {
    margin: 0.5rem 0;
    padding-right: 1.5rem;
    position: relative;
}

.key-takeaway li::before {
    content: "•";
    color: #4fc3f7;
    font-weight: bold;
    position: absolute;
    right: 0;
}

/* Related Content */
.related-content {
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 3rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.related-content-title {
    color: #01579b;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4fc3f7;
}

.related-posts-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.related-posts-list li {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.related-posts-list li:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.related-posts-list a {
    color: #0288d1;
    text-decoration: none;
    font-weight: 500;
    display: block;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr minmax(auto, 800px);
        padding: 1rem;
    }
    
    .toc-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .post-container {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .post-title {
        font-size: 2rem;
    }

    .related-posts-list {
        grid-template-columns: 1fr;
    }
}

/* Conversion / data tables inside post content */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.post-content th,
.post-content td {
    padding: 0.75rem 1rem;
    text-align: right;
    border-bottom: 1px solid #e3f2fd;
}

.post-content th {
    background: #e3f2fd;
    color: #01579b;
    font-weight: 700;
}

.post-content tr:last-child td {
    border-bottom: none;
}

/* FAQ */
.faq-section {
    margin: 3rem 0;
}

.faq-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.faq-question {
    color: #01579b;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.faq-answer {
    color: #0c4a6e;
    line-height: 1.7;
}

/* In-content CTA link to the calculator tool */
.cta-inline {
    display: inline-block;
    background: linear-gradient(135deg, #4fc3f7 0%, #0288d1 100%);
    color: white !important;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none !important;
    margin: 0.5rem 0;
    box-shadow: 0 4px 15px rgba(2, 136, 209, 0.25);
    transition: transform 0.2s ease;
}

.cta-inline:hover {
    transform: translateY(-2px);
}

/* Posts index page */
.posts-index-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1.25rem;
}

.posts-index-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.posts-index-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.posts-index-card a {
    color: #01579b;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
}

.posts-index-card p {
    color: #666;
    margin-top: 0.5rem;
}

/* Post Navigation (prev/next) */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.post-navigation .nav-link {
    color: #0288d1;
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    background: rgba(224, 247, 250, 0.5);
    transition: all 0.3s ease;
}

.post-navigation .nav-link:hover {
    background: rgba(79, 195, 247, 0.25);
    color: #01579b;
}

.post-navigation .nav-all {
    order: 2;
}

.post-navigation .nav-prev {
    order: 1;
}

.post-navigation .nav-next {
    order: 3;
}

@media (max-width: 600px) {
    .post-navigation {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .post-navigation .nav-prev {
        order: 1;
    }

    .post-navigation .nav-all {
        order: 2;
    }

    .post-navigation .nav-next {
        order: 3;
    }
}

/* Disclaimer */
.post-disclaimer {
    background: rgba(224, 247, 250, 0.4);
    border: 1px dashed rgba(2, 136, 209, 0.3);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    font-size: 0.9rem;
    color: #555;
}

.post-disclaimer strong {
    color: #01579b;
}