/* 2. Sütun Grid Layout (Grid Columns) fallback */
.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}



/* 4. Resizable & Alignable Image Styles */
.resizable-image-container {
    display: block;
    width: 100%;
    clear: both;
}

/* 5. Premium Before/After Comparison Slider Styles (Clip-path distortion-free) */
.before-after-slider {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 2px solid #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    background: #f1f5f9;
    margin: 1.75rem 0;
    user-select: none;
}

.dark .before-after-slider {
    border-color: #334155;
    background: #1e293b;
}

.before-after-slider img.before-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

.before-after-slider img.after-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    clip-path: inset(0 0 0 50%);
    /* Default showing left half as before-img, right half as after-img */
    pointer-events: none;
}

.before-after-slider .slider-handle {
    position: absolute;
    inset-y: 0;
    height: 100% !important;
    left: 50%;
    width: 4px;
    background: white;
    cursor: ew-resize;
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

.before-after-slider .slider-handle div {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #475569;
    font-size: 14px;
    pointer-events: none;
    transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.before-after-slider:hover .slider-handle div {
    transform: translate(-50%, -50%) scale(1.15);
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}

.before-after-slider::after {
    content: 'SONRASI';
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    z-index: 5;
    background: rgba(15, 23, 42, 0.75);
    color: white;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.before-after-slider::before {
    content: 'ÖNCESİ';
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    z-index: 5;
    background: rgba(15, 23, 42, 0.75);
    color: white;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* 6. Chart Block Styling */
.chart-block {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem auto;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.dark .chart-block {
    border-color: #334155;
    background: #0f172a;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.chart-svg-container svg {
    display: block;
    max-width: 100%;
    height: auto;
}

.chart-svg-container svg text {
    font-family: inherit;
}

.chart-svg-container svg rect,
.chart-svg-container svg circle,
.chart-svg-container svg polyline {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}