/**
 * Cards Layout Fix - v3.0 - SFTP TEST - שיפור תצוגת כרטיסיות
 * This file fixes card layout issues and improves visual appearance
 */

/* =====================================================
   GRID FIX - מניעת שבירה של כרטיסיות
   ===================================================== */

/* Container for cards - using flexbox for better control */
.ourChoice .row,
.green-box .row,
.sec_four .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -7px;
    margin-right: -7px;
}

/* Each card container - consistent sizing */
.mobMasg {
    margin-top: 8px;
    margin-bottom: 8px;
    padding-left: 7px;
    padding-right: 7px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* =====================================================
   CARD STYLING - עיצוב הכרטיס
   ===================================================== */

/* Main card wrapper */
.masg {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    padding: 12px;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    display: flex;
    flex-wrap: wrap;
    height: 100%;
}

.masg:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Card sections */
.masgR {
    width: 32%;
    float: right;
}

.masgL {
    width: 68%;
    float: right;
    padding-right: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* =====================================================
   IMAGE SLIDER - תמונות
   ===================================================== */

.masgSlide {
    min-height: 130px;
    max-height: 130px;
    line-height: 130px;
    background-color: #f8f9fa;
    border-radius: 6px;
    overflow: hidden;
}

.masgSlide .slick-slide img {
    height: auto;
    max-height: 130px;
    object-fit: cover;
    border-radius: 4px;
}

/* =====================================================
   CARD HEADER - כותרת
   ===================================================== */

.cwnTitle {
    width: 68%;
    float: right;
    padding: 8px;
    text-align: right;
}

.cwnTitle h4 {
    font-family: 'Assistant', sans-serif;
    color: #65a830;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.3;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cwnTitle p {
    font-family: 'Assistant', sans-serif;
    color: #666;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Crown/Package badge */
.crownImg {
    padding: 8px;
    text-align: center;
    width: 32%;
    float: right;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px;
}

.crownImg span {
    font-size: 10px !important;
    line-height: 1.3 !important;
    color: #555;
    display: block;
    margin-top: 4px;
}

.cImg img {
    max-width: 100%;
    width: 36px;
    height: auto;
}

/* =====================================================
   ICONS SECTION - אייקונים
   ===================================================== */

.cwnIcon {
    padding: 8px 4px;
    text-align: center;
    width: 50%;
    float: right;
}

.cwnIcon a {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.cwnIcon a:hover {
    opacity: 0.8;
}

.cwnIcon span {
    font-family: 'Assistant', sans-serif;
    color: #666;
    font-weight: 400;
    font-size: 11px !important;
    line-height: 1.3 !important;
    display: block;
}

.cIcon {
    text-align: center;
    margin-bottom: 4px;
}

.cIcon img {
    max-width: 100%;
    height: 22px;
    opacity: 0.85;
}

/* =====================================================
   CHECKBOX SECTION - צ'קבוקסים
   ===================================================== */

.cwnChkbx {
    width: 100%;
    float: right;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 5px 0;
}

.chkbxSlide {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.chkbxSlide li {
    text-align: right;
    display: inline-flex;
    align-items: center;
    width: calc(33.333% - 4px);
    vertical-align: middle;
    padding: 2px 0;
}

.chkbxSlide li span {
    font-size: 10px !important;
    line-height: 1.3 !important;
    padding-right: 4px;
    text-align: right;
    vertical-align: middle;
    display: inline-block;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-width: calc(100% - 18px);
    color: #555;
}

/* =====================================================
   CALL BUTTON - כפתור התקשרות
   ===================================================== */

.cwnCall {
    text-align: center;
    padding: 8px 10px;
    background: linear-gradient(135deg, #f27321 0%, #e56510 100%);
    width: 100%;
    margin-top: auto;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    direction: rtl;
}

/* Main phone link in call bar - BIG and prominent */
.cwnCall > a:first-child {
    background-image: url(../images/13.png);
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 22px;
    font-family: 'Assistant', sans-serif;
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    line-height: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    padding-right: 28px;
    padding-left: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    text-decoration: none;
    transition: opacity 0.2s;
    letter-spacing: 1px;
    flex-grow: 1;
    text-align: right;
    justify-content: flex-start;
}

.cwnCall > a:first-child:hover {
    opacity: 0.9;
    color: #fff;
    text-decoration: none;
}

/* Icons container - aligned left */
.cwnCall .whatsapp-icon,
.cwnCall .telegram-icon {
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.cwnCall .whatsapp-icon {
    margin-left: 4px !important;
}

.cwnCall .telegram-icon {
    margin-left: 0 !important;
}

/* WhatsApp and Telegram icon buttons */
.whatsapp-icon,
.telegram-icon,
a.whatsapp-icon,
a.telegram-icon,
.product .prodCall a.whatsapp-icon,
.product .prodCall a.telegram-icon,
.cwnCall a.whatsapp-icon,
.cwnCall a.telegram-icon,
.cartisiaCall a.whatsapp-icon,
.cartisiaCall a.telegram-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    margin-right: 8px !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background-image: none !important;
    background-position: center !important;
    line-height: 1 !important;
}

.whatsapp-icon {
    background-color: #25D366 !important;
}

.telegram-icon {
    background-color: #0088cc !important;
}

.whatsapp-icon:hover,
.telegram-icon:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
    text-decoration: none !important;
}

.whatsapp-icon svg,
.telegram-icon svg {
    display: block !important;
    margin: 0 !important;
    width: 20px !important;
    height: 20px !important;
    fill: #fff !important;
}

/* Inside cwnCall container */
.cwnCall .whatsapp-icon,
.cwnCall .telegram-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    margin-right: 8px;
}

.cwnCall .whatsapp-icon svg,
.cwnCall .telegram-icon svg {
    width: 18px;
    height: 18px;
}

/* Inside cartisiaCall (item page) */
.cartisiaCall .whatsapp-icon,
.cartisiaCall .telegram-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin-right: 12px;
}

.cartisiaCall .whatsapp-icon svg,
.cartisiaCall .telegram-icon svg {
    width: 24px;
    height: 24px;
}

/* prodCall (desktop view) */
.prodCall {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    direction: rtl !important;
    justify-content: space-between !important;
}

.prodCall > a:first-child {
    font-weight: 800 !important;
    font-size: 18px !important;
    letter-spacing: 1px !important;
    flex-grow: 1 !important;
    text-align: right !important;
    line-height: 36px !important;
}

.prodCall .whatsapp-icon,
.prodCall .telegram-icon {
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.prodCall .whatsapp-icon {
    margin-left: 4px !important;
}

.prodCall .whatsapp-icon,
.prodCall .telegram-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    margin-right: 10px;
}

.prodCall .whatsapp-icon svg,
.prodCall .telegram-icon svg {
    width: 20px;
    height: 20px;
}

/* cartisiaCall (item page) call bar styling */
.cartisiaCall {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    direction: rtl !important;
    background: linear-gradient(135deg, #f27321 0%, #e56510 100%) !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    margin-top: 15px !important;
    justify-content: space-between !important;
}

.cartisiaCall > a:first-child {
    color: #fff !important;
    font-weight: 800 !important;
    font-size: 24px !important;
    letter-spacing: 1px !important;
    text-decoration: none !important;
    flex-grow: 1 !important;
    text-align: right !important;
    line-height: 44px !important;
}

.cartisiaCall .whatsapp-icon,
.cartisiaCall .telegram-icon {
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.cartisiaCall .whatsapp-icon {
    margin-left: 6px !important;
}

/* =====================================================
   ROWS STRUCTURE - מבנה שורות
   ===================================================== */

.cwnRow {
    width: 100%;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.cwnRow:last-child {
    margin-bottom: 0;
}

.masgL .cwnRow {
    min-height: auto;
}

.masgL .cwnRow:first-child {
    min-height: 55px;
}

/* =====================================================
   PACKAGE CLASSES - חבילות
   ===================================================== */

/* Gold package */
.gold .masg {
    border-color: #d4af37;
    background: linear-gradient(135deg, #fffdf5 0%, #fff9e6 100%);
}

.gold .masg:hover {
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25);
}

/* Silver package */  
.silver .masg {
    border-color: #c0c0c0;
    background: linear-gradient(135deg, #fcfcfc 0%, #f5f5f5 100%);
}

/* Bronze package */
.bronze .masg {
    border-color: #cd7f32;
    background: linear-gradient(135deg, #fffcf5 0%, #fff5eb 100%);
}

/* =====================================================
   RESPONSIVE - התאמה למובייל
   ===================================================== */

@media (max-width: 767px) {
    .ourChoice .row,
    .green-box .row,
    .sec_four .row {
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .mobMasg {
        padding-left: 5px;
        padding-right: 5px;
        margin-top: 6px;
        margin-bottom: 6px;
    }
    
    .masg {
        padding: 10px;
        border-radius: 6px;
    }
    
    .masgR {
        width: 35%;
    }
    
    .masgL {
        width: 65%;
        padding-right: 10px;
    }
    
    .masgSlide {
        min-height: 100px;
        max-height: 100px;
        line-height: 100px;
    }
    
    .cwnTitle h4 {
        font-size: 14px;
    }
    
    .cwnTitle p {
        font-size: 11px;
    }
    
    .chkbxSlide li {
        width: calc(50% - 4px);
    }
    
    .chkbxSlide li span {
        font-size: 9px !important;
    }
    
    .cwnCall {
        padding: 8px 10px;
    }
    
    .cwnCall a {
        font-size: 14px;
    }
    
    .crownImg {
        width: 35%;
    }
    
    .cwnTitle {
        width: 65%;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .masgR {
        width: 30%;
    }
    
    .masgL {
        width: 70%;
    }
    
    .masgSlide {
        min-height: 110px;
        max-height: 110px;
        line-height: 110px;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    .masgSlide {
        min-height: 120px;
        max-height: 120px;
        line-height: 120px;
    }
}

@media (min-width: 1280px) {
    .masgSlide {
        min-height: 140px;
        max-height: 140px;
        line-height: 140px;
    }
    
    .cwnTitle h4 {
        font-size: 16px;
    }
    
    .cwnTitle p {
        font-size: 13px;
    }
}

/* =====================================================
   CLEARFIX - ניקוי floats
   ===================================================== */

.masg::after,
.cwnRow::after {
    content: "";
    display: table;
    clear: both;
}

