body {
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    line-height: 1.6;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    background: white;
}

h1,
h2,
h3,
h4 {
    color: #4f46e5;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
}

h1 {
    font-size: 2rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

.lang-content {
    display: none;
}

.lang-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page specific styles */
.highlight-box {
    background: #f8fafc;
    border-left: 4px solid #4f46e5;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
}

.step-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #4f46e5;
}

.step-card h3 {
    margin-top: 0;
    color: #4f46e5;
    font-size: 1.1rem;
}

.step-card p {
    margin-bottom: 0;
    color: #64748b;
    font-size: 0.95rem;
}

/* Image styling */
.img-container {
    margin: 2rem 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color, #e2e8f0);
}

.img-container.img-small {
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.table-img {
    max-width: 250px;
    height: auto;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    display: block;
    margin: 0.5rem 0;
}

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

.img-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.img-container:hover img {
    transform: scale(1.02);
}

.img-caption {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-top: 1px solid var(--border-color, #e2e8f0);
    color: #64748b;
    font-size: 0.875rem;
    text-align: center;
    font-weight: 500;
}

/* Table styling */
.table-container {
    margin: 2rem 0;
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color, #e2e8f0);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    text-align: left;
}

th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    padding: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: top;
}

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

tr:nth-child(even) {
    background-color: #fbfcfe;
}

tr:hover {
    background-color: #f1f5f9;
}

/* Sub-row and Nested hierarchy */
.sub-row td:first-child {
    padding-left: 2rem;
    position: relative;
}

.sub-row td:first-child::before {
    content: "";
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.sub-row {
    background-color: #f8fafc !important;
}

.nested-list {
    margin: 0;
    padding-left: 1.25rem;
    list-style-type: disc;
    color: #64748b;
    font-size: 0.9rem;
}

.nested-list li {
    margin-bottom: 0.25rem;
}

/* Table image styles */
.table-img {
    max-width: 180px;
    /* Reduced to fit two images side-by-side */
    height: auto;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    cursor: zoom-in;
    transition: transform 0.2s;
}

.table-img:hover {
    border-color: #4f46e5;
}

.img-td {
    padding: 0.75rem !important;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    /* Changed from center to left-aligned */
    align-items: flex-start;
}

strong {
    color: #4f46e5;
}

.section-title {
    margin-top: 3rem;
    padding-left: 1rem;
    border-left: 44px solid #4f46e5;
    font-size: 1.25rem;
    font-family: 'Outfit', sans-serif;
    color: #1e293b;
}

/* Lightbox Styling */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    cursor: pointer;
    overflow-y: auto;
    padding: 2rem 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    width: 95%;
    max-width: 1200px;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    margin: auto;
    cursor: default;
}

.lightbox.active img {
    transform: scale(1);
}

.img-container img {
    cursor: zoom-in;
}

/* Comparison Layout */
.img-comparison-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    /* Backend is wider, frontend is narrow auxiliary */
    gap: 1.5rem;
    margin: 1.5rem 0;
    align-items: stretch;
    /* Stretch containers to match height */
}

@media (max-width: 1024px) {
    .img-comparison-grid {
        grid-template-columns: 1fr;
    }
}

.img-comparison-grid .img-container {
    margin: 0 !important;
    /* Override default margins */
    height: 100%;
    display: flex;
    flex-direction: column;
}

.img-comparison-grid .img-container img {
    flex-grow: 1;
    object-fit: cover;
    /* Fill the space while matching heights */
    height: 0;
    /* Important for flex-grow to work properly with img */
    min-height: 200px;
    /* Ensure a decent minimum size */
}