/**
 * Block Editor - Frontend Styles
 * Markaclick CMS Block Stilleri
 */

/* Container */
.containers {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   BLOCK EDITOR - Full Width Sections
   ======================================== */

/* Block sections must break out of parent max-width container */
.dynamic-page-content > .zigzag-section,
.dynamic-page-content > .hero-block,
.dynamic-page-content > section {
    max-width: none !important;
    width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

/* Block containers maintain proper content width */
.zigzag-section .container,
.hero-block .container {
 
    margin: 0 auto;
    padding: 0 0px;
}

/* ========================================
   ZIGZAG BLOCK - Sağ-Sol Alternating Layout
   ======================================== */

.zigzag-section {
    width: 100%;
    padding: 10px 0;
    background: #ffffff;
}

.zigzag-section .container {
 
    margin: 0 auto;
    padding: 0 20px;
}

.zigzag-item {
    display: block;
    margin-bottom: 10px;
}

.zigzag-item:last-child {
    margin-bottom: 0;
}

/* FLEX GRID - Her item içinde 2 sütun */
.zigzag-grid {
    display: flex;
    align-items: center;
    gap: 80px;
}

.zigzag-image,
.zigzag-content {
    flex: 1;
    width: 50%;
}

/* IMAGE LEFT - Görsel solda, içerik sağda */
.zigzag-item.image-left .zigzag-grid {
    flex-direction: row;
}

/* IMAGE RIGHT - İçerik solda, görsel sağda */
.zigzag-item.image-right .zigzag-grid {
    flex-direction: row-reverse;
}

/* Görsel Container */
.zigzag-image {
    position: relative;
    width: 100%;
    max-width: 550px;
    min-height: 350px;
    border-radius: 20px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.zigzag-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* İçerik */
.zigzag-content {
    padding: 20px 0;
}

.zigzag-title {
    font-size: 36px;
    font-weight: 800;
    color: #1a202c;
    margin: 0 0 24px 0;
    line-height: 1.2;
}

.zigzag-text {
    font-size: 16px;
    line-height: 1.8;
    color: #4a5568;
    margin: 0;
}

/* Zigzag Text içindeki HTML elementleri */
.zigzag-text p {
    margin: 0 0 16px 0;
}
.zigzag-text p:last-child {
    margin-bottom: 0;
}
.zigzag-text ul,
.zigzag-text ol {
    margin: 16px 0;
    padding-left: 24px;
}
.zigzag-text li {
    margin-bottom: 8px;
}
.zigzag-text strong,
.zigzag-text b {
    font-weight: 600;
    color: #2d3748;
}
.zigzag-text a {
    color: #667eea;
    text-decoration: underline;
}
.zigzag-text a:hover {
    color: #5a67d8;
}
.zigzag-text blockquote {
    border-left: 4px solid #667eea;
    padding-left: 16px;
    margin: 16px 0;
    font-style: italic;
    color: #718096;
}

/* Hero Block */
.hero-block {
    padding: 120px 20px;
    text-align: center;
    background-size: cover;
    background-position: center;
    color: #fff;
    position: relative;
}

.hero-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-block > * {
    position: relative;
    z-index: 1;
}

.hero-block h1 {
    font-size: 56px;
    font-weight: 800;
    margin: 0 0 20px 0;
}

.hero-block p {
    font-size: 20px;
    margin: 0;
}

/* Card Grids */
.card-grid {
    display: grid;
    gap: 30px;
    margin: 10px 0;
}

.card-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

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

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

.card-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
}

.card-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.card-icon {
    font-size: 48px;
    margin-bottom:3px;
}

.card-item h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 15px 0;
}

.card-item p {
    font-size: 15px;
    line-height: 1.6;
    color: #4a5568;
    margin: 0;
}

/* Image Block */
.image-block {
    margin: 40px 0;
}

.image-block img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.image-block figcaption {
    text-align: center;
    font-size: 14px;
    color: #718096;
    margin-top: 12px;
}

/* Button Block */
.button-block {
    margin: 30px 0;
}

.button-block.text-left {
    text-align: left;
}

.button-block.text-center {
    text-align: center;
}

.button-block.text-right {
    text-align: right;
}

.button-block .btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.button-block .btn-primary {
    background: #667eea;
    color: #fff;
}

.button-block .btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.button-block .btn-secondary {
    background: #718096;
    color: #fff;
}

.button-block .btn-secondary:hover {
    background: #4a5568;
}

.button-block .btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.button-block .btn-outline:hover {
    background: #667eea;
    color: #fff;
}

/* Columns Block */
.columns-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

/* Spacer Block */
.spacer-block {
    display: block;
}

/* Quote Block */
blockquote {
    border-left: 4px solid #667eea;
    padding: 20px 30px;
    margin: 30px 0;
    background: #f7fafc;
    font-style: italic;
    font-size: 18px;
    color: #2d3748;
}

blockquote footer {
    margin-top: 10px;
    font-size: 14px;
    color: #718096;
    font-style: normal;
}

/* Code Block */
pre {
    background: #1a202c;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 30px 0;
}

pre code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
}

/* List Styling */
ul, ol {
    margin: 0px 0;
    padding-left: 30px;
}

ul li, ol li {
    margin: 5px 0;
    line-height: 1.6;
}

/* Placeholder Image */
.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px dashed #cbd5e0;
    font-size: 14px;
    color: #a0aec0;
    font-weight: 600;
    gap: 12px;
}

.placeholder-image::before {
    content: '📷';
    font-size: 48px;
    opacity: 0.5;
}

/* ========================================
   RESPONSIVE - Mobile First
   ======================================== */

@media (max-width: 768px) {
    .zigzag-section {
        padding: 40px 0;
    }
    
    .zigzag-item {
        margin-bottom: 50px;
    }
    
    .zigzag-grid {
        flex-direction: column !important;
        gap: 30px;
    }
    
    .zigzag-image,
    .zigzag-content {
        width: 100%;
        max-width: 100%;
    }
    
    .zigzag-image {
        min-height: 250px;
        aspect-ratio: auto;
    }
    
    .zigzag-image img {
        object-fit: contain;
        max-height: 400px;
    }
    
    .zigzag-title {
        font-size: 24px;
        margin-top: 20px;
    }
    
    .zigzag-text {
        font-size: 15px;
    }
    
    .card-grid-2,
    .card-grid-3,
    .card-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .hero-block h1 {
        font-size: 36px;
    }
    
    .hero-block p {
        font-size: 16px;
    }
    
    .zigzag-section {
        padding: 40px 0;
    }
    
    .zigzag-item {
        margin-bottom: 40px;
    }
}
