/* Vertically center content in all predplatne boxes */

/* Make boxes flex containers for centering */
.predplatne-box {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding: 20px 15px !important; /* Consistent padding */
}

/* Compact the header section */
.predplatne-box .box-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Prevent header from shrinking */
    margin-bottom: 0; /* Remove bottom margin */
}

/* Compact the description section */
.predplatne-box .box-description {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 0; /* Don't let description grow */
}

/* Center icon container */
.predplatne-box .box-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 8px 0;
    font-size: 2.5rem;
    line-height: 1;
}

/* Center text content */
.predplatne-box h4,
.predplatne-box .box-title {
    margin: 0;
    padding: 0;
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Compact description text */
.predplatne-box .box-description p {
    margin: 0;
    padding: 0;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Ensure price is centered */
.predplatne-box .box-price,
.predplatne-box .cena {
    margin: 10px 0 0;
    width: 100%;
    text-align: center;
    font-weight: 600;
}

/* Special handling for boxes with different heights */
.druh-boxes .predplatne-box {
    min-height: 230px; /* Ensure consistent height */
}

.chut-boxes .predplatne-box {
    min-height: 230px;
}

.jak-casto-boxes .predplatne-box,
.balicky-boxes .predplatne-box {
    min-height: 180px; /* Smaller boxes */
}

.doba-boxes .predplatne-box {
    min-height: 160px; /* Smallest boxes */
}

/* Remove any default margins and control spacing */
.predplatne-box > * {
    margin: 0;
    padding: 0;
}

/* Set exact spacing between header and description */
.predplatne-box .box-header + .box-description {
    margin-top: 8px; /* Maximum 16px as requested, using 8px for tighter spacing */
}

/* Add small gap between title and description */
.predplatne-box .box-title {
    margin-bottom: 8px !important;
}

/* Ensure icons maintain aspect ratio while being centered */
.predplatne-box img,
.predplatne-box .box-icon img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Remove any extra padding from header */
.predplatne-box .box-header {
    padding: 0 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .druh-boxes .predplatne-box,
    .chut-boxes .predplatne-box {
        min-height: 200px;
    }
    
    .jak-casto-boxes .predplatne-box,
    .balicky-boxes .predplatne-box {
        min-height: 160px;
    }
    
    .doba-boxes .predplatne-box {
        min-height: 140px;
    }
}

/* Ensure active state doesn't affect centering */
.predplatne-box.active {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

/* Debug - uncomment to see box structure */
/*
.predplatne-box {
    border: 2px solid red !important;
}
.predplatne-box .box-header {
    border: 1px solid blue !important;
}
.predplatne-box .box-content {
    border: 1px solid green !important;
}
*/