/* ===== FOOTER STICKY BOTTOM FIX ===== */
html {
    height: 100%;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Main content area - flex grow untuk push footer ke bawah */
main, .main-content, .content-wrapper {
    flex: 1;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Footer - sticky di bawah */
footer {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    margin-top: auto;
    flex-shrink: 0;
}

/* Alternatif struktur wrapper */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100vw;
}

.page-content {
    flex: 1;
    overflow-x: hidden;
    max-width: 100vw;
}

/* ===== TESTIMONIAL SECTION ===== */
.testimonial-section {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    position: relative;
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    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, #cbd5e1, transparent);
}

.testimonial-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

/* ===== HEADER SECTION ===== */
.testimonial-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.testimonial-section h2 {
    color: #1e293b;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin: 0 0 20px;
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, #1e293b, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.testimonial-section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #008080, #9AD0C2, orange);
    border-radius: 2px;
    box-shadow: 0 4px 16px rgba(0, 128, 128, 0.3);
}

.section-subtitle {
    color: #64748b;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 500;
    margin: 0;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== WRAPPER ===== */
.testimonial-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
}

/* ===== GRID LAYOUT ===== */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    opacity: 1;
    width: 100%;
    max-width: 100%;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #008080, #9AD0C2, orange);
    border-radius: 20px 20px 0 0;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.98);
}

/* ===== CARD HEADER ===== */
.testimonial-header-card {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.testimonial-card:hover .avatar {
    border-color: #008080;
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(0, 128, 128, 0.3);
}

.client-info {
    flex: 1;
    min-width: 0;
}

.client-info h4 {
    margin: 0 0 8px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.company {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== CARD CONTENT ===== */
.testimonial-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stars {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    justify-content: flex-start;
}

.star {
    font-size: 1.4rem;
    color: #e2e8f0;
    transition: all 0.3s ease;
    line-height: 1;
}

.star.filled {
    color: #fbbf24;
    text-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.testimonial-card:hover .star.filled {
    transform: scale(1.1);
    color: #f59e0b;
}

.testimonial-content p {
    margin: 0;
    font-style: italic;
    color: #475569;
    line-height: 1.7;
    font-size: 1.1rem;
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* ===== MODERN PAGINATION ===== */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-top: 50px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 15px 25px;
    border-radius: 60px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.pagination::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #008080, #9AD0C2, orange);
    border-radius: 60px 60px 0 0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.pagination-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #008080, #9AD0C2);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination-btn:hover:not(:disabled) {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 128, 128, 0.4);
}

.pagination-btn:hover:not(:disabled)::before {
    opacity: 1;
    transform: scale(1);
}

.pagination-btn:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0, 128, 128, 0.3);
}

.pagination-btn.active {
    color: white;
    background: linear-gradient(135deg, #008080, #9AD0C2);
    box-shadow: 
        0 8px 25px rgba(0, 128, 128, 0.4),
        0 4px 15px rgba(0, 128, 128, 0.2);
    transform: translateY(-2px);
}

.pagination-btn.active::before {
    display: none;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-btn span {
    position: relative;
    z-index: 2;
}

/* Arrow buttons */
.pagination-btn.prev-btn,
.pagination-btn.next-btn {
    width: 46px;
    height: 46px;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(0, 128, 128, 0.2);
    margin: 0 6px;
    font-size: 18px;
    font-weight: 700;
}

.pagination-btn.prev-btn:hover:not(:disabled),
.pagination-btn.next-btn:hover:not(:disabled) {
    background: #008080;
    border-color: #008080;
    box-shadow: 0 10px 30px rgba(0, 128, 128, 0.4);
}

/* Pagination ellipsis */
.pagination-ellipsis {
    padding: 0 10px;
    color: #94a3b8;
    font-weight: 600;
    font-size: 14px;
    user-select: none;
}

/* Pagination Info */
.pagination-info {
    color: white !important;
    font-size: 0.95rem;
    font-weight: 500;
    background: #008080 !important;
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid rgba(0, 128, 128, 0.3);
    box-shadow: 0 4px 15px rgba(0, 128, 128, 0.2);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Large Desktop */
@media (min-width: 1200px) {
    .testimonial-wrapper {
        padding: 0 40px;
    }
    
    .testimonial-grid {
        gap: 24px;
        grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    }
    
    .testimonial-card {
        padding: 36px;
        min-height: 320px;
    }
}

/* Desktop */
@media (min-width: 1024px) and (max-width: 1199px) {
    .testimonial-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 22px;
    }
}

/* Tablet */
@media (max-width: 1023px) {
    .testimonial-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .testimonial-card {
        padding: 28px;
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .testimonial-section {
        padding: 60px 15px;
    }
    
    .testimonial-header {
        margin-bottom: 50px;
    }
    
    .testimonial-wrapper {
        padding: 0 15px;
    }
    
    .testimonial-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 40px;
    }
    
    .testimonial-card {
        padding: 25px;
        min-height: 250px;
    }
    
    .testimonial-header-card {
        gap: 16px;
        margin-bottom: 20px;
    }
    
    .avatar {
        width: 60px;
        height: 60px;
    }
    
    .client-info h4 {
        font-size: 1.2rem;
    }
    
    .testimonial-content p {
        font-size: 1rem;
    }
    
    .star {
        font-size: 1.2rem;
    }
    
    .pagination-container {
        gap: 20px;
        margin-top: 40px;
    }
    
    .pagination {
        padding: 12px 20px;
        gap: 8px;
    }
    
    .pagination-btn {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    
    .pagination-btn.prev-btn,
    .pagination-btn.next-btn {
        width: 42px;
        height: 42px;
        margin: 0 4px;
        font-size: 16px;
    }
}

/* Mobile Medium */
@media (max-width: 480px) {
    .testimonial-section {
        padding: 50px 10px;
    }
    
    .testimonial-wrapper {
        padding: 0 10px;
    }
    
    .testimonial-card {
        padding: 20px;
        min-height: 220px;
    }
    
    .testimonial-header-card {
        gap: 12px;
        margin-bottom: 18px;
    }
    
    .avatar {
        width: 50px;
        height: 50px;
    }
    
    .client-info h4 {
        font-size: 1.1rem;
    }
    
    .company {
        font-size: 0.9rem;
    }
    
    .testimonial-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .stars {
        gap: 3px;
        margin-bottom: 16px;
    }
    
    .star {
        font-size: 1.1rem;
    }
    
    .pagination-container {
        gap: 16px;
        margin-top: 30px;
    }
    
    .pagination {
        padding: 10px 16px;
        gap: 6px;
    }
    
    .pagination-btn {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
    
    .pagination-btn.prev-btn,
    .pagination-btn.next-btn {
        width: 38px;
        height: 38px;
        margin: 0 3px;
        font-size: 15px;
    }
    
    .pagination-info {
        font-size: 0.85rem;
        padding: 8px 16px;
        color: white !important;
        background: #008080 !important;
        border: 1px solid rgba(0, 128, 128, 0.3);
        box-shadow: 0 4px 15px rgba(0, 128, 128, 0.2);
    }
}

/* Mobile Small */
@media (max-width: 360px) {
    .testimonial-card {
        padding: 18px;
        min-height: 200px;
    }
    
    .testimonial-content p {
        font-size: 0.9rem;
    }
    
    .client-info h4 {
        font-size: 1rem;
    }
    
    .pagination {
        padding: 8px 12px;
        gap: 4px;
    }
    
    .pagination-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .pagination-btn.prev-btn,
    .pagination-btn.next-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* ===== LOADING & ANIMATION STATES ===== */
.testimonial-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.testimonial-card.page-transition {
    animation: cardTransition 0.6s ease-out both;
}

@keyframes cardTransition {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== ACCESSIBILITY & PERFORMANCE ===== */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .testimonial-card,
    .avatar,
    .star,
    .pagination-btn,
    .testimonial-grid {
        animation: none !important;
        transition: none !important;
    }
    
    .testimonial-card:hover {
        transform: none;
    }
    
    .pagination-btn:hover {
        transform: none;
    }
}

/* Focus States */
.pagination-btn:focus-visible {
    outline: 3px solid #008080;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(0, 128, 128, 0.2);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .testimonial-card {
        background: white;
        border: 2px solid #1e293b;
        box-shadow: none;
    }
    
    .testimonial-section {
        background: white;
    }
    
    .pagination-btn.active {
        background: #000;
        color: white;
    }
    
    .pagination {
        background: white;
        border: 2px solid #1e293b;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .testimonial-section {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }
    
    .testimonial-card {
        background: rgba(30, 41, 59, 0.9);
        color: #e2e8f0;
        border-color: rgba(71, 85, 105, 0.3);
    }
    
    .client-info h4 {
        color: #f1f5f9;
    }
    
    .testimonial-content p {
        color: #cbd5e1;
    }
    
    .pagination {
        background: rgba(30, 41, 59, 0.9);
        border-color: rgba(71, 85, 105, 0.3);
    }
    
    .pagination-info {
        background: #008080 !important;
        color: white !important;
        border: 1px solid rgba(0, 128, 128, 0.3);
    }
}

/* Print Styles */
@media print {
    .pagination-container {
        display: none;
    }
    
    .testimonial-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        animation: none;
    }
    
    .testimonial-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e2e8f0;
        background: white;
        page-break-inside: avoid;
    }
    
    .testimonial-section {
        background: white;
        padding: 40px 20px;
    }
}