/**
 * Flexible Content Blocks Styles
 * עיצוב מלא לכל סוגי הבלוקים הגמישים
 */

/* ===== עיצובים כלליים ===== */
.flexible-content-blocks {
    margin: 40px 0;
}

.content-block {
    margin-bottom: 60px;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.block-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
    border-bottom: 3px solid #0073aa;
    padding-bottom: 15px;
}

/* ===== אקורדיון ===== */
.accordion-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.accordion-item {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 20px;
    background: #f8f9fa;
    border: none;
    text-align: right;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-header[aria-expanded="true"] {
    background: #0073aa;
    color: #fff;
}

.accordion-icon {
    font-size: 24px;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    padding: 25px;
    background: #fff;
}

.accordion-image {
    margin-bottom: 20px;
}

.accordion-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.accordion-text {
    line-height: 1.8;
    color: #555;
}

.accordion-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 25px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.accordion-link:hover {
    background: #005a87;
}

/* עיצוב 2 - מודרני */
.accordion-block.style_2 .accordion-item {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.accordion-block.style_2 .accordion-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.accordion-block.style_2 .accordion-header:hover {
    opacity: 0.9;
}

/* עיצוב 3 - מינימליסטי */
.accordion-block.style_3 .accordion-item {
    border: none;
    border-bottom: 2px solid #e0e0e0;
    border-radius: 0;
}

.accordion-block.style_3 .accordion-header {
    background: transparent;
    padding: 20px 0;
}

.accordion-block.style_3 .accordion-header[aria-expanded="true"] {
    background: transparent;
    color: #0073aa;
}

/* עיצוב 4 - צבעוני */
.accordion-block.style_4 .accordion-item:nth-child(1) .accordion-header {
    background: #ff6b6b;
    color: #fff;
}

.accordion-block.style_4 .accordion-item:nth-child(2) .accordion-header {
    background: #4ecdc4;
    color: #fff;
}

.accordion-block.style_4 .accordion-item:nth-child(3) .accordion-header {
    background: #45b7d1;
    color: #fff;
}

.accordion-block.style_4 .accordion-item:nth-child(4) .accordion-header {
    background: #f9ca24;
    color: #333;
}

/* ===== רשימה מעוצבת ===== */
.styled-list-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.list-item {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.list-image {
    flex-shrink: 0;
}

.list-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.list-content {
    flex: 1;
}

.list-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.list-text {
    line-height: 1.7;
    color: #555;
    margin-bottom: 15px;
}

.list-link {
    display: inline-block;
    padding: 8px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.list-link:hover {
    background: #005a87;
}

/* עיצוב 1 - עם אייקונים */
.list-block.style_1 .list-item::before {
    content: "✓";
    font-size: 30px;
    font-weight: 700;
    color: #0073aa;
    flex-shrink: 0;
}

/* עיצוב 2 - רשימה ממוספרת */
.list-block.style_2 .list-number {
    width: 50px;
    height: 50px;
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

/* עיצוב 3 - תמונות עגולות */
.list-block.style_3 .list-image img {
    border-radius: 50%;
    border: 5px solid #0073aa;
}

/* עיצוב 4 - כרטיסים */
.list-block.style_4 .styled-list-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.list-block.style_4 .list-item {
    flex-direction: column;
    text-align: center;
}

.list-block.style_4 .list-image img {
    width: 100%;
    height: 200px;
}

/* ===== כרטיסיות (טאבים) ===== */
.tabs-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

.tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 3px solid #e0e0e0;
    overflow-x: auto;
}

.tab-button {
    padding: 15px 30px;
    background: #f8f9fa;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: #e9ecef;
    color: #0073aa;
}

.tab-button.active {
    background: #fff;
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.tab-panel {
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.tab-image {
    margin-bottom: 25px;
}

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

.tab-text {
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}

.tab-link {
    display: inline-block;
    padding: 12px 30px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.tab-link:hover {
    background: #005a87;
}

/* עיצוב 2 - טאבים אנכיים */
.tabs-block.style_2 .tabs-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 25px;
}

.tabs-block.style_2 .tabs-nav {
    flex-direction: column;
    border-bottom: none;
    border-left: 3px solid #e0e0e0;
}

.tabs-block.style_2 .tab-button {
    text-align: right;
    border-bottom: none;
    border-left: 3px solid transparent;
}

.tabs-block.style_2 .tab-button.active {
    border-left-color: #0073aa;
}

/* עיצוב 3 - עם אייקונים */
.tabs-block.style_3 .tab-button::before {
    content: "●";
    margin-left: 8px;
    font-size: 20px;
}

.tabs-block.style_3 .tab-button.active::before {
    color: #0073aa;
}

/* עיצוב 4 - מודרני */
.tabs-block.style_4 .tab-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 6px;
    border-bottom: none;
}

.tabs-block.style_4 .tab-button.active {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ===== גלריית תמונות ===== */
.gallery-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.gallery-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    position: relative;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-caption {
    padding: 20px;
}

.gallery-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.gallery-text {
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

.gallery-link {
    display: inline-block;
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.gallery-link:hover {
    color: #005a87;
}

/* עיצוב 2 - מזוני */
.gallery-block.style_2 .gallery-wrapper {
    column-count: 3;
    column-gap: 25px;
}

.gallery-block.style_2 .gallery-item {
    break-inside: avoid;
    margin-bottom: 25px;
}

.gallery-block.style_2 .gallery-image img {
    height: auto;
}

/* עיצוב 3 - קרוסלה */
.gallery-block.style_3 .gallery-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 20px;
}

.gallery-block.style_3 .gallery-item {
    min-width: 350px;
    scroll-snap-align: start;
}

/* עיצוב 4 - גריד עם רווחים */
.gallery-block.style_4 .gallery-wrapper {
    gap: 40px;
}

.gallery-block.style_4 .gallery-item {
    border: 5px solid #f8f9fa;
}

/* ===== וידאו ===== */
.video-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.video-item {
    margin-bottom: 40px;
}

.video-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.video-embed iframe,
.video-embed video {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.video-description {
    margin-top: 20px;
    line-height: 1.7;
    color: #555;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.video-note {
    margin-top: 15px;
    padding: 15px;
    background: #e3f2fd;
    border-right: 4px solid #2196f3;
    border-radius: 4px;
    color: #1565c0;
}

/* עיצוב 2 - עם מסגרת */
.video-block.style_2 .video-embed {
    border: 8px solid #0073aa;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* עיצוב 3 - מלוא הרוחב */
.video-block.style_3 .video-wrapper {
    max-width: 100%;
}

.video-block.style_3 .video-embed {
    border-radius: 0;
}

/* עיצוב 4 - עם רקע */
.video-block.style_4 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.video-block.style_4 .video-title {
    color: #fff;
}

.video-block.style_4 .video-description {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ===== רספונסיבי ===== */
@media (max-width: 768px) {
    .content-block {
        padding: 20px;
    }

    .block-title {
        font-size: 24px;
    }

    .list-item {
        flex-direction: column;
    }

    .list-image img {
        width: 100%;
        height: 200px;
    }

    .tabs-nav {
        flex-wrap: wrap;
    }

    .tab-button {
        padding: 12px 20px;
        font-size: 14px;
    }

    .gallery-wrapper {
        grid-template-columns: 1fr;
    }

    .gallery-block.style_2 .gallery-wrapper {
        column-count: 1;
    }

    .tabs-block.style_2 .tabs-wrapper {
        grid-template-columns: 1fr;
    }

    .tabs-block.style_2 .tabs-nav {
        flex-direction: row;
        border-left: none;
        border-bottom: 3px solid #e0e0e0;
    }

    .tabs-block.style_2 .tab-button {
        border-left: none;
        border-bottom: 3px solid transparent;
    }
}

/* ===== אנימציות ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-block {
    animation: fadeIn 0.5s ease;
}