/* Fun Facts Widget Styles */

/* Grid Container */
.fun-facts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 30px;
    row-gap: 30px;
    width: 100%;
}

/* Individual Fun Fact Item */
.fun-fact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all 0.3s ease;
}

/* Vertical Layout - Ð¸ÐºÐ¾Ð½ÐºÐ° ÑÐ²ÐµÑ€Ñ…Ñƒ */
.fun-fact-item.layout-vertical {
    flex-direction: column;
    text-align: center;
}

/* Horizontal Layout - Ð¸ÐºÐ¾Ð½ÐºÐ° ÑÐ»ÐµÐ²Ð° */
.fun-fact-item.layout-horizontal {
    flex-direction: row;
    text-align: left;
}

/* Icon Container */
.fun-facts-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

.fun-facts-icon i {
    transition: all 0.3s ease;
}

.fun-facts-icon svg {
    transition: all 0.3s ease;
}

.fun-facts-icon img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Content Container */
.fun-facts-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Vertical Layout Content - Ñ†ÐµÐ½Ñ‚Ñ€Ð¸Ñ€ÑƒÐµÐ¼ Ð²ÑÐµ */
.fun-fact-item.layout-vertical .fun-facts-content {
    align-items: center;
    text-align: center;
}

/* Horizontal Layout Content - Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°ÐµÐ¼ Ð¿Ð¾ Ð»ÐµÐ²Ð¾Ð¼Ñƒ ÐºÑ€Ð°ÑŽ */
.fun-fact-item.layout-horizontal .fun-facts-content {
    align-items: flex-start;
    text-align: left;
}

/* Number */
.fun-facts-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    display: flex;
    align-items: baseline;
    white-space: nowrap;
    max-width: 100%;
    overflow: visible;
}

/* Vertical Layout - Ñ†ÐµÐ½Ñ‚Ñ€Ð¸Ñ€ÑƒÐµÐ¼ Ñ‡Ð¸ÑÐ»Ð¾ */
.fun-fact-item.layout-vertical .fun-facts-number {
    justify-content: center;
}

/* Horizontal Layout - Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°ÐµÐ¼ Ñ‡Ð¸ÑÐ»Ð¾ Ð¿Ð¾ Ð»ÐµÐ²Ð¾Ð¼Ñƒ ÐºÑ€Ð°ÑŽ */
.fun-fact-item.layout-horizontal .fun-facts-number {
    justify-content: flex-start;
}

.fun-facts-number .number-prefix,
.fun-facts-number .number-suffix {
    font-size: 0.7em;
    opacity: 0.8;
}

.fun-facts-number .number-value {
    font-variant-numeric: tabular-nums;
}

/* Title */
.fun-facts-title {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    margin: 5px 0 0 0;
    width: 100%;
}

/* Vertical Layout - Ñ†ÐµÐ½Ñ‚Ñ€Ð¸Ñ€ÑƒÐµÐ¼ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²Ð¾Ðº */
.fun-fact-item.layout-vertical .fun-facts-title {
    text-align: center;
}

/* Horizontal Layout - Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°ÐµÐ¼ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²Ð¾Ðº Ð¿Ð¾ Ð»ÐµÐ²Ð¾Ð¼Ñƒ ÐºÑ€Ð°ÑŽ */
.fun-fact-item.layout-horizontal .fun-facts-title {
    text-align: left;
}

/* Description */
.fun-facts-description {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    margin: 5px 0 0 0;
    opacity: 0.85;
    width: 100%;
}

/* Vertical Layout - Ñ†ÐµÐ½Ñ‚Ñ€Ð¸Ñ€ÑƒÐµÐ¼ Ð¾Ð¿Ð¸ÑÐ°Ð½Ð¸Ðµ */
.fun-fact-item.layout-vertical .fun-facts-description {
    text-align: center;
}

/* Horizontal Layout - Ð²Ñ‹Ñ€Ð°Ð²Ð½Ð¸Ð²Ð°ÐµÐ¼ Ð¾Ð¿Ð¸ÑÐ°Ð½Ð¸Ðµ Ð¿Ð¾ Ð»ÐµÐ²Ð¾Ð¼Ñƒ ÐºÑ€Ð°ÑŽ */
.fun-fact-item.layout-horizontal .fun-facts-description {
    text-align: left;
}

/* Hover Effect */
.fun-fact-item:hover .fun-facts-icon i,
.fun-fact-item:hover .fun-facts-icon svg {
    transform: scale(1.1);
}

/* Alignment Override - Ð¿Ñ€Ð¸Ð¼ÐµÐ½ÑÐµÑ‚ÑÑ Ñ‡ÐµÑ€ÐµÐ· Elementor settings */
.fun-fact-item[style*="text-align: left"] .fun-facts-content,
.fun-fact-item[style*="text-align: left"] .fun-facts-number,
.fun-fact-item[style*="text-align: left"] .fun-facts-title,
.fun-fact-item[style*="text-align: left"] .fun-facts-description {
    text-align: left !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

.fun-fact-item[style*="text-align: center"] .fun-facts-content,
.fun-fact-item[style*="text-align: center"] .fun-facts-number,
.fun-fact-item[style*="text-align: center"] .fun-facts-title,
.fun-fact-item[style*="text-align: center"] .fun-facts-description {
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
}

.fun-fact-item[style*="text-align: right"] .fun-facts-content,
.fun-fact-item[style*="text-align: right"] .fun-facts-number,
.fun-fact-item[style*="text-align: right"] .fun-facts-title,
.fun-fact-item[style*="text-align: right"] .fun-facts-description {
    text-align: right !important;
    justify-content: flex-end !important;
    align-items: flex-end !important;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    /* Grid columns управляется через Elementor responsive controls */
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    /* Grid columns управляется через Elementor responsive controls (mobile_default: 1) */
    
    .fun-fact-item {
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Для horizontal layout на мобильных ограничиваем ширину иконки */
    .fun-fact-item.layout-horizontal .fun-facts-icon {
        max-width: 60px;
    }
    
    .fun-facts-icon i,
    .fun-facts-icon svg,
    .fun-facts-icon img {
        max-width: 100%;
        height: auto;
    }
    
    .fun-facts-number {
        font-size: 36px;
        white-space: normal;
        flex-wrap: wrap;
    }
    
    .fun-facts-content {
        max-width: 100%;
        overflow: hidden;
    }
    
    .fun-facts-title {
        font-size: 14px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .fun-facts-description {
        font-size: 13px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 480px) {
    .fun-fact-item {
        padding: 15px 10px;
    }
    
    /* Для horizontal layout на маленьких экранах переключаемся на vertical */
    .fun-fact-item.layout-horizontal {
        flex-direction: column;
        text-align: center;
    }
    
    .fun-fact-item.layout-horizontal .fun-facts-content {
        align-items: center;
        text-align: center;
    }
    
    .fun-fact-item.layout-horizontal .fun-facts-number {
        justify-content: center;
    }
    
    .fun-fact-item.layout-horizontal .fun-facts-title,
    .fun-fact-item.layout-horizontal .fun-facts-description {
        text-align: center;
    }
    
    .fun-facts-icon {
        max-width: 50px;
    }
    
    .fun-facts-number {
        font-size: 28px;
    }
    
    .fun-facts-title {
        font-size: 13px;
    }
    
    .fun-facts-description {
        font-size: 12px;
    }
}


