/* Fix untuk struktur layout custom */

/* 1. Body dan container tetap seperti semula */
body {
    margin: 0;
    font-family: sans-serif;
    display: flex;
    background-color: #f0f2f5;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.container {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    max-width: 100vw; /* Prevent overflow */
}

/* 2. Sidebar tetap */
.sidebar {
    background: #008080;
    color: white;
    padding: 20px;
    width: 25%;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 3. Konten scroll - perbaiki struktur flex */
.konten-scroll {
    background: #e9ecf3;
    width: 75%;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    padding: 0;
    max-width: 75vw; /* Prevent overflow */
}

/* 4. Main content scrollable - gunakan flex grow */
.main-content-scrollable {
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scroll */
    flex: 1; /* Take remaining space */
    padding: 30px;
    max-width: 100%; /* Prevent overflow */
}

/* 5. Footer - stick to bottom dalam konten-scroll */
.konten-scroll footer {
    flex-shrink: 0; /* Don't shrink */
    margin-top: auto; /* Push to bottom if content is short */
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* 6. Testimonial section fixes untuk mencegah overflow */
.testimonial-section {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    padding: 40px 0;
    background: #f8fafc;
    margin: 0;
    box-sizing: border-box;
}

.testimonial-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.testimonial-section h2 {
    text-align: center;
    color: #1e293b;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    padding: 0 15px;
}

.testimonial-section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
}

.testimonial-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    margin: 0;
    padding: 0;
}

/* 7. Container testimonial - sesuaikan dengan width konten-scroll */
.testimonial-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 20px 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: calc(75vw - 90px); /* Sesuaikan dengan width konten-scroll minus padding */
    max-width: calc(75vw - 90px);
    margin: 0 auto;
    box-sizing: border-box;
}

.testimonial-container::-webkit-scrollbar {
    display: none;
}

/* 8. Cards - sesuaikan ukuran dengan container yang lebih kecil */
.testimonial-card {
    flex: 0 0 min(250px, calc(25vw - 30px));
    min-width: min(250px, calc(25vw - 30px));
    max-width: min(250px, calc(25vw - 30px));
    width: min(250px, calc(25vw - 30px));
    scroll-snap-align: start;
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    min-height: 180px;
    box-sizing: border-box;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    border-radius: 12px 12px 0 0;
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.testimonial-card:hover .avatar {
    border-color: #3b82f6;
    transform: scale(1.05);
}

.client-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.client-info h4 {
    margin: 0 0 3px;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.company {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.testimonial-content {
    width: 100%;
    overflow: hidden;
}

.testimonial-content p {
    margin: 10px 0 0;
    font-style: italic;
    color: #475569;
    line-height: 1.4;
    font-size: 0.9rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.stars {
    display: flex;
    gap: 2px;
    margin-bottom: 10px;
}

.star {
    font-size: 1rem;
    color: #e2e8f0;
    transition: all 0.2s ease;
}

.star.filled {
    color: #fbbf24;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}

.testimonial-card:hover .star.filled {
    transform: scale(1.1);
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    padding: 0 15px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #3b82f6;
    transform: scale(1.3);
}

.dot:hover {
    background: #64748b;
}

/* 9. Navigation arrows - hide pada layout ini karena space terbatas */
.nav-arrow {
    display: none;
}

/* 10. Responsive untuk layout khusus ini */
@media (max-width: 1200px) {
    .testimonial-container {
        width: calc(75vw - 60px);
        max-width: calc(75vw - 60px);
    }
    
    .testimonial-card {
        flex: 0 0 min(220px, calc(30vw - 30px));
        min-width: min(220px, calc(30vw - 30px));
        max-width: min(220px, calc(30vw - 30px));
        width: min(220px, calc(30vw - 30px));
    }
}

@media (max-width: 768px) {
    /* Mobile - sidebar mungkin collapse atau jadi responsive */
    .container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    .sidebar {
        width: 100%;
        min-width: auto;
        order: 1;
    }
    
    .konten-scroll {
        width: 100%;
        max-width: 100vw;
        order: 2;
        height: auto;
        min-height: calc(100vh - 300px); /* Adjust based on sidebar height */
    }
    
    .testimonial-container {
        width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
    }
    
    .testimonial-card {
        flex: 0 0 min(200px, calc(80vw - 40px));
        min-width: min(200px, calc(80vw - 40px));
        max-width: min(200px, calc(80vw - 40px));
        width: min(200px, calc(80vw - 40px));
    }
    
    .main-content-scrollable {
        padding: 20px 15px;
    }
}

/* 11. Existing styles dari global.css yang perlu dipertahankan */
.profile-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.bio-description {
    background: none;
    padding: 0;
    border-radius: 0;
    text-align: justify;
    font-size: 0.85rem;
    line-height: 1.6;
    color: white;
    margin: 16px 0;
}

.btn-hire {
    background: #ff6f4c;
    padding: 10px 20px;
    color: white;
    border-radius: 20px;
    text-decoration: none;
    margin: 15px 0;
}

.skills {
    background: #9AD0C2;
    color: #008080;
    padding: 20px;
    width: 100%;
    text-align: left;
    font-weight: bold;
}

.skill-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-logos img {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.skill-logos img:hover {
    transform: scale(1.1);
}

.trusted {
    background: #ECF4D6;
    width: 100%;
    padding: 20px;
    color: #222;
}

.masonry-grid {
    column-count: 3;
    column-gap: 16px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s;
}

.masonry-item:hover {
    transform: scale(1.02);
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid #eee;
}

.masonry-item p {
    padding: 10px;
    margin: 0;
    font-weight: bold;
    color: #333;
}
.konten-scroll footer {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 75%;
    z-index: 1000;
}

.main-content-scrollable {
    padding-bottom: 80px; /* Space untuk footer */
}