/**
 * 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: 20px;
}

.zigzag-image {
    flex: 1;
    min-width: 0;
}

.zigzag-content {
    flex: 1;
    min-width: 0;
}

/* 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;
    min-height: 300px;
    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: var(--zigzag-title-size, 36px) !important;
    font-weight: 800;
    color: #1a202c;
    margin: 0 0 24px 0;
    line-height: 1.2;
}

.zigzag-text {
    font-size: var(--zigzag-text-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;
    background-color: var(--hero-bg-color, #000);
}

.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: var(--hero-title-size, 56px);
    font-weight: 800;
    margin: 0 0 20px 0;
}

.hero-block p {
    font-size: var(--hero-subtitle-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: 6px;
    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: var(--card-title-size, 20px);
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 15px 0;
}

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

/* Image Block */
.image-block {
    margin: 40px 0;
    display: block;
    width: var(--img-width, 100%);
    text-align: var(--img-align, center);
}

.image-block img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    margin-left: var(--img-ml, auto);
    margin-right: var(--img-mr, auto);
    max-width: 100%;
}

.image-block figcaption {
    text-align: center;
    font-size: var(--caption-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: 6px;
    font-size: var(--btn-size, 16px);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

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

.button-block .btn-primary:hover {
    background: #353537;
    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;
    font-size: var(--font-size, 16px);
}

/* Spacer Block */
.spacer-block {
    display: block;
    height: var(--spacer-height, 10px);
}

/* 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: 6px;
    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) {

    /* Global overflow fix for blocks */
    .dynamic-page-content>.zigzag-section,
    .dynamic-page-content>.hero-block,
    .dynamic-page-content>section {
        width: 100% !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow-x: hidden;
    }

    .zigzag-section {
        padding: 40px 0;
        overflow-x: hidden;
    }

    .zigzag-section .container {
        padding: 0 16px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .zigzag-item {
        margin-bottom: 50px;
    }

    .zigzag-grid {
        flex-direction: column !important;
        gap: 30px;
        max-width: 100%;
    }

    .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;
        max-width: 100%;
    }

    .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;
        padding: 0 16px;
    }

    .hero-block {
        overflow-x: hidden;
        padding: 0 16px;
    }

    .hero-block h1 {
        font-size: 36px;
    }

    .hero-block p {
        font-size: 16px;
    }

    .containers {
        padding: 0 16px;
        max-width: 100%;
        overflow-x: hidden;
    }
}

@media (max-width: 480px) {

    .zigzag-section .container,
    .containers {
        padding: 0 12px;
    }

    .hero-block h1 {
        font-size: 28px;
    }

    .zigzag-title {
        font-size: 20px;
    }

    .zigzag-text {
        font-size: 14px;
    }
}

/* ========================================
   ACCORDION / FAQ BLOCK
   ======================================== */

.accordion-section,
.faq-section {
    padding: 60px 0;
    background: #fff;
    --question-size: 16px;
    --answer-size: 15px;
    --title-size: 28px;
}

.accordion-title {
    font-size: var(--title-size);
    font-weight: 700;
}

.accordion-section .accordion-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.accordion-section .accordion-item {
    background: #f8fafc;
    border: none;
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-section .accordion-item:hover {
    background: #f1f5f9;
}

.accordion-section .accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.3s ease;
    box-shadow: none !important;
}

.accordion-section .accordion-question {
    flex: 1;
    padding-right: 16px;
    font-weight: 600;
    font-size: var(--question-size);
}

.accordion-section .accordion-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: #64748b;
    margin-left: 16px;
}

.accordion-section .accordion-item.active .accordion-icon {
    transform: rotate(180deg);
    color: #4f46e5;
}

.accordion-section .accordion-content {
    display: none;
    padding: 0 24px 20px 24px;
}

.accordion-section .accordion-item.active .accordion-content {
    display: block !important;
}

.accordion-section .accordion-answer {
    color: #475569;
    font-size: var(--answer-size);
    line-height: 1.7;
}

/* Mobile Adjustments */
@media (max-width: 768px) {

    .accordion-section,
    .faq-section {
        padding: 40px 15px;
        --title-size: 22px;
    }

    .accordion-section .accordion-header {
        padding: 16px 20px;
    }

    .accordion-section .accordion-content {
        padding: 0 20px 16px 20px;
    }
}

/* ========================================
   EDITOR PREVIEW STYLES
   ======================================== */

.font-size-value {
    min-width: 45px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    display: inline-block;
}

.style-controls {
    display: flex;
    gap: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.style-control-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.style-control-group {
    flex: 1;
    min-width: 200px;
}

.style-control-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.style-range-input {
    flex: 1;
    height: 6px;
    cursor: pointer;
}

.style-align-wrapper {
    min-width: 160px;
}

.align-buttons {
    display: flex;
    gap: 4px;
}

.align-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.align-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: #fff;
}

.align-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.align-btn:last-child {
    border-radius: 0 6px 6px 0;
}

/* ========================================
   DYNAMIC PAGE & BREADCRUMB STYLES
   ======================================== */

.page-breadcrumb {
    background: #f8f9fa;
    padding: 12px 0;
    margin-bottom: 0;
    border-bottom: 1px solid #eee;
}

.page-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.page-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    content: "›";
    color: #adb5bd;
}

.page-breadcrumb .breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-breadcrumb .breadcrumb-item a:hover {
    color: var(--primary-color, #007bff) !important;
}

.page-breadcrumb .breadcrumb-item.active {
    color: #333;
}

.page-inline-title {
    margin-bottom: 24px;
    font-size: 2rem;
    font-weight: 700;
}

.pricing-table-wrapper {
    margin-top: 30px;
    padding-top: 40px;
}

/* Dar içerik genişliği */
.narrow-container {
    max-width: 800px !important;
    margin-left: auto;
    margin-right: auto;
}

.dynamic-page-content {
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.dynamic-page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.dynamic-page-content h2 {
    font-size: 2rem;
}

.dynamic-page-content h3 {
    font-size: 1.75rem;
}

.dynamic-page-content p {
    margin-bottom: 1.25rem;
}

.dynamic-page-content table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
}

.dynamic-page-content table th,
.dynamic-page-content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.dynamic-page-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* ========================================
   DYNAMIC PAGE CONTENT - BLOCKS & ELEMENTS
   ======================================== */

.dynamic-page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.5rem 0;
}

.dynamic-page-content ul,
.dynamic-page-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.dynamic-page-content li {
    margin-bottom: 0.5rem;
}

.dynamic-page-content blockquote {
    border-left: 4px solid var(--primary-color, #007bff);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6c757d;
}

.dynamic-page-content a {
    color: var(--primary-color, #007bff);
    text-decoration: none;
    transition: color 0.3s ease;
}

.dynamic-page-content a:hover {
    color: var(--secondary-color, #0056b3);
}

.dynamic-page-content .hero-block {
    padding: 60px 24px;
    text-align: center;
    border-radius: 12px;
    color: #fff;
    margin: 1.5rem 0;
}

.dynamic-page-content .hero-block h1 {
    margin: 0 0 12px 0;
    font-size: 2.5rem;
    color: #fff;
}

.dynamic-page-content .hero-block p {
    margin: 0;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

.dynamic-page-content .card-item {
    padding: 32px 24px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dynamic-page-content .card-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.dynamic-page-content .btn-primary {
    background: #000000;
    color: #fff;
}

.dynamic-page-content .btn-primary:hover {
    background: #333;
    transform: translateY(-2px);
    color: #fff;
}

/* Old format zigzag */
.dynamic-page-content .zigzag-block {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin: 2rem 0;
}

.dynamic-page-content .zigzag-item img {
    border-radius: 12px;
}

/* ========================================
   WHATSAPP WIDGET STYLES
   ======================================== */

#wa-widget {
    z-index: 999999 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#wa-button {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .25);
    transition: transform 0.3s, box-shadow 0.3s;
    animation: wa-pulse 2s infinite;
}

#wa-button:hover {
    transform: scale(1.1);
}

#wa-button svg {
    fill: #fff;
    display: block;
}

@keyframes wa-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

#wa-box {
    border-radius: 16px;
    overflow: hidden;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
    animation: wa-slideUp 0.3s ease;
    z-index: 1000001;
}

@keyframes wa-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

#wa-header {
    background: var(--wa-header-color, #075E54) !important;
    color: #fff !important;
    padding: 16px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border: none !important;
}

#wa-header .wa-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

#wa-header .wa-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, .2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wa-header .wa-avatar svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

#wa-header .wa-title {
    font-size: 15px;
    font-weight: 600;
}

#wa-header .wa-subtitle {
    font-size: 12px;
    opacity: .85;
    margin-top: 2px;
}

#wa-close {
    cursor: pointer;
    font-size: 24px;
    opacity: .8;
    transition: opacity 0.2s;
    line-height: 1;
    padding: 5px;
}

#wa-close:hover {
    opacity: 1;
}

#wa-body {
    padding: 16px;
    background: #e5ddd5 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAABGlBMVEUAAADd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tPd2tMiIiIUAAAAXnRSTlMAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaW1xd8K6THAAAAR1JREFUSMft1NdSwzAQBdCNS+y0kEJ6773X0HsJJZT//w8sD4xGGo+NZXjhvm3m7K60K0X6H8OyrAwrxc+sCPl8UYQB8sUCe1aGAXKsnD0rQ56VoZ8FBcizCgyQY1UYIM8qMECeVaGfBQUIsCIMkGMFGCDPCjBAjhVhgBwrwAAFVoQBcqwIA+RYEQbIsQIMkGClGCDClB8IsCIMkGMFGCDPCjBAjhVhgBwrwAAFVoQBcqwIA+RYEQbIsQIMkGclGCDHCjBAnhVggDwrwQA5VoQBcqwAA+RZEQbIsyIMkGMFGCDPijBAnpVggBwrwgA5VoAB8qwIA+RZCQbIsSIMkGMFGCDPijBAnpVggBwrwgA5VoAB8qwIA+RZCQbIsSIMkGNF6GdBIfKsDAMUWBkGKLASDFBgRRigwAowQJ4VYP8f+wLGLmZSWm9sswAAAABJRU5ErkJggg==');
    min-height: 120px;
}

.wa-msg {
    background: #fff;
    padding: 12px 14px;
    border-radius: 0 12px 12px 12px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
    position: relative;
    margin-bottom: 0;
}

.wa-msg::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    border-width: 0 8px 8px 0;
    border-style: solid;
    border-color: transparent #fff transparent transparent;
}

.wa-time {
    font-size: 11px;
    color: #667781;
    margin-top: 6px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.wa-time svg {
    width: 16px;
    height: 16px;
    fill: #53bdeb;
}

#wa-footer {
    padding: 12px;
    background: #f0f2f5;
    display: flex;
    gap: 8px;
    align-items: center;
}

#wa-input {
    flex: 1;
    padding: 10px 16px;
    border-radius: 24px;
    border: none;
    background: #fff;
    outline: none;
    font-size: 14px;
    color: #333;
}

#wa-input::placeholder {
    color: #8696a0;
}

#wa-send {
    background: var(--wa-primary-color, #25D366);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

#wa-send:hover {
    background: var(--wa-primary-hover, #128C7E);
    transform: scale(1.05);
}

#wa-send svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    margin-left: 2px;
}

@media (max-width: 768px) {
    .wa-mobile-hidden {
        display: none !important;
    }
}