/**
 * Counter Responsive Fix
 * Memperbaiki tampilan counter section di mobile
 */

/* Stats section content - remove extra padding */
.tk-stats-section-content {
    padding: 0;
    margin-bottom: 30px;
}

.tk-stats-section-content p {
    margin: 0;
    text-align: left;
}

/* Base counter item improvements */
.tk-countitem {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    border-radius: 12px;
    background: #F7F7F8;
    min-height: 200px;
    justify-content: center;
    box-sizing: border-box;
}

/* Counter image styling */
.tk-countitem img {
    height: 60px;
    max-width: 80px;
    margin-bottom: 20px;
    object-fit: contain;
}

/* Counter number styling */
.tk-countitem h3 {
    margin-bottom: 12px;
    font: 600 32px/38px "Inter", sans-serif;
    color: #1E1E1E;
    white-space: nowrap;
}

/* Counter description styling */
.tk-countitem span {
    display: block;
    font: 400 14px/20px "Inter", sans-serif;
    color: rgba(30, 30, 30, 0.7);
    max-width: 280px;
    line-height: 1.4;
    text-align: center;
}

/* Counter list layout improvements */
.tk-counternum {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 40px 0;
    background: transparent;
    border-radius: 0;
}

.tk-counternum li {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Tablet responsive (768px - 1024px) */
@media (max-width: 1024px) {
    .tk-counternum {
        gap: 15px;
        padding: 30px 15px;
    }
    
    .tk-counternum li {
        min-width: calc(50% - 15px);
        max-width: calc(50% - 15px);
    }
    
    .tk-countitem {
        padding: 25px 15px;
        min-height: 180px;
    }
    
    .tk-countitem h3 {
        font-size: 28px;
        line-height: 34px;
    }
}

/* Mobile responsive (max-width: 767px) */
@media (max-width: 767px) {
    .tk-couter-wrapper .tk-counternum {
        flex-direction: column;
        gap: 20px;
        padding: 30px 15px;
        width: 100%;
    }
    
    .tk-couter-wrapper .tk-counternum li {
        max-width: 100%;
        width: 100%;
        padding: 0;
    }
    
    .tk-couter-wrapper .tk-counternum li + li {
        border-left: none;
        border-top: 1px solid rgba(217, 217, 217, 0.3);
        padding-top: 0;
        margin-top: 0;
    }
    
    .tk-countitem {
        padding: 25px 20px;
        min-height: 160px;
        margin: 0 auto;
        max-width: 100%;
        width: 100%;
    }
    
    .tk-countitem img {
        height: 50px;
        max-width: 70px;
        margin-bottom: 15px;
    }
    
    .tk-countitem h3 {
        font-size: 26px;
        line-height: 32px;
        margin-bottom: 10px;
    }
    
    .tk-countitem span {
        font-size: 13px;
        line-height: 18px;
        max-width: 100%;
        padding: 0 10px;
    }
}

/* Special mobile fix for stats section description text */
@media (max-width: 767px) {
    .tk-couter-wrapper .tk-stats-section-content p {
        font-size: 13px !important;
        line-height: 22px !important;
        text-align: center;
        margin: 0 auto 25px;
        max-width: 320px;
        padding: 0 20px;
        word-spacing: 0.05em;
        letter-spacing: 0.01em;
    }
}

/* Small mobile (max-width: 480px) */
@media (max-width: 480px) {
    .tk-counternum {
        padding: 20px 10px;
        gap: 15px;
    }
    
    .tk-countitem {
        padding: 20px 15px;
        min-height: 140px;
    }
    
    .tk-countitem h3 {
        font-size: 24px;
        line-height: 30px;
    }
    
    .tk-countitem span {
        font-size: 12px;
        line-height: 16px;
        padding: 0 5px;
    }
}

/* Remove default counter wrapper styles conflicts on mobile */
@media (max-width: 767px) {
    .tk-couter-wrapper .tk-stats-section-content {
        width: 100%;
        padding: 0 15px 20px;
        text-align: center;
    }
    
    .tk-couter-wrapper {
        display: flex;
        flex-direction: column;
    }
}

/* Ensure proper text wrapping */
.tk-countitem span {
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* Counter animation improvements */
.tk-countitem h3.animated {
    animation: counterFadeIn 0.8s ease-out forwards;
}

@keyframes counterFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}