/* Slider Content Stable Layout - Fix Judul & Subjudul */

/* Stabilkan hero-content container */
.hero-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
}

/* Badge (Subjudul) - Fixed positioning */
.hero-content .badge,
.hero-content .animate-badge {
    display: inline-block;
    margin-bottom: 20px !important;
    align-self: flex-start;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
    line-height: 1.5;
}

/* Title (Judul) - Fixed positioning */
.hero-content h1,
.hero-content .animate-title {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    line-height: 1.3;
    word-wrap: break-word;
    max-width: 100%;
}

/* Lead text - Fixed positioning */
.hero-content .lead,
.hero-content .animate-text {
    margin-top: 0 !important;
    margin-bottom: 25px !important;
    line-height: 1.6;
    word-wrap: break-word;
    max-width: 100%;
}

/* Buttons - Fixed positioning */
.hero-content .animate-buttons {
    margin-top: 10px !important;
}

/* Disable animation delays that cause layout shift */
.hero-content .animate-badge,
.hero-content .animate-title,
.hero-content .animate-text,
.hero-content .animate-buttons {
    animation-delay: 0s !important;
}

/* Prevent layout shift during animation */
.hero-content > * {
    transform: none !important;
    opacity: 1 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .hero-content {
        text-align: center;
        align-items: center;
    }
    
    .hero-content .badge,
    .hero-content .animate-badge {
        align-self: center;
        margin-bottom: 15px !important;
    }
    
    .hero-content h1,
    .hero-content .animate-title {
        margin-bottom: 15px !important;
    }
    
    .hero-content .lead,
    .hero-content .animate-text {
        margin-bottom: 20px !important;
    }
}

@media (max-width: 576px) {
    .hero-content .badge,
    .hero-content .animate-badge {
        margin-bottom: 12px !important;
    }
    
    .hero-content h1,
    .hero-content .animate-title {
        margin-bottom: 12px !important;
    }
    
    .hero-content .lead,
    .hero-content .animate-text {
        margin-bottom: 18px !important;
    }
}

/* Ensure consistent spacing regardless of content length */
.hero-content .badge + h1,
.hero-content .animate-badge + .animate-title {
    margin-top: 0 !important;
}

.hero-content h1 + p,
.hero-content .animate-title + .animate-text {
    margin-top: 0 !important;
}

.hero-content p + .d-flex,
.hero-content .animate-text + .animate-buttons {
    margin-top: 10px !important;
}

/* Fix for br tags in title */
.hero-content h1 br {
    display: block;
    content: "";
    margin-top: 0.5em;
}

/* Prevent badge from wrapping awkwardly */
.hero-content .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px !important;
}

.hero-content .badge i {
    flex-shrink: 0;
}

/* Desktop specific */
@media (min-width: 769px) {
    .hero-content {
        text-align: left;
        align-items: flex-start;
    }
    
    .hero-content .badge,
    .hero-content .animate-badge {
        align-self: flex-start;
    }
}
