/* General Styles */
html,
body {
    overflow-x: hidden;
}

body {
    margin: 0;
    color: #333;
    overflow-x: hidden;
    touch-action: pan-y;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* === ABOUT SECTION === */
.about-section {
    padding: 40px 0;
    background: white;
    min-height: 100vh;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === TAB NAVIGATION === */
.tab-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    flex: 1;
    justify-content: center;
    min-width: 140px;
}

.tab-btn:hover {
    background: rgba(182, 22, 20, 0.1);
    color: #b61614;
}

.tab-btn.active {
    background: #b61614;
    color: white;
    box-shadow: 0 4px 15px rgba(182, 22, 20, 0.3);
}

.tab-btn i {
    font-size: 1.1rem;
}

/* === TAB CONTENT === */
.tab-content {
    min-height: 600px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #b61614;
    border-radius: 2px;
}

/* === UNIT SECTION === */
.unit-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.unit-image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.unit-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.unit-image-container:hover .unit-image {
    transform: scale(1.05);
}

.unit-description {
    padding: 20px 0;
}

.description-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
    text-align: justify;
}

.unit-stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #b61614;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* === TEAM SECTION STYLES === */
.team-content {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #b61614;
    border-radius: 2px;
}

/* === TEAM SLIDER CONTAINER === */
.team-slider-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.team-slider-wrapper {
    position: relative;
    overflow: hidden;
    background: white;
    padding: 30px 60px;
}

.team-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    /* CRITICAL FIX: Remove gap and use proper spacing */
}

/* === TEAM CARDS === */
.team-card {
    /* CRITICAL FIX: Use precise percentage without margin confusion */
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    /* CRITICAL: Add margin for spacing instead of gap */
    margin-right: 20px;
}

/* Desktop: 3 cards per view */
.team-card {
    flex: 0 0 calc((100% - 40px) / 3);
    /* 3 cards with 2 gaps of 20px each */
}

.team-card:last-child {
    margin-right: 0;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(182, 22, 20, 0.2);
}

.team-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #b61614 0%, #d63031 100%);
}

.team-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.team-card:hover .team-img {
    transform: scale(1.05);
}

/* Default Avatar Styles */
.default-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #b61614 0%, #d63031 100%);
    color: white;
    font-size: 4rem;
}

.team-card-content {
    padding: 25px 20px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.team-card-content.suryatiningsih-fix {
    justify-content: flex-start;
    min-height: 80px;
    padding-top: 40px;
}

.team-card-content.Brahmantya-fix {
    justify-content: flex-start;
    min-height: 80px;
    padding-top: 40px;
}

.team-card-content.Danu-fix {
    justify-content: flex-start;
    min-height: 80px;
    padding-top: 39px;
}

.team-member-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.team-member-role {
    font-size: 1rem;
    color: #b61614;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-member-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    text-align: center;
}

/* === NAVIGATION BUTTONS === */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #b61614;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(182, 22, 20, 0.3);
}

.slider-btn:hover {
    background: #d63031;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(182, 22, 20, 0.4);
}

.prev-btn {
    left: -70px;
}

.next-btn {
    right: -70px;
}

.slider-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.slider-btn:disabled:hover {
    background: #ccc;
    transform: translateY(-50%);
    box-shadow: none;
}

/* === SLIDER INDICATORS === */
.slider-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0; /* Remove default button padding */
    margin: 0; /* Remove default button margin */
    outline: none; /* Remove focus outline */
    box-sizing: border-box; /* Ensure consistent sizing */
    flex-shrink: 0; /* Prevent shrinking in flex container */
    appearance: none; /* Remove browser default button styles */
    -webkit-appearance: none;
}

.indicator.active {
    background: #b61614;
    transform: scale(1.2);
}

.indicator:hover {
    background: #b61614;
}

/* === RESPONSIVE DESIGN === */
/* Tablet: 2 cards per view */
@media (max-width: 992px) {
    .team-card {
        flex: 0 0 calc((100% - 20px) / 2);
        /* 2 cards with 1 gap of 20px */
    }

    .team-slider-wrapper {
        padding: 30px 50px;
    }

    .section-title {
        font-size: 2.2rem;
    }
}

/* Mobile: 1 card per view */
@media (max-width: 768px) {
    .team-card {
        flex: 0 0 100%;
        /* Full width, no gaps needed */
        margin-right: 0;
    }

    .team-slider-wrapper {
        padding: 20px 30px;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .prev-btn {
        left: 5px;
    }

    .next-btn {
        right: 5px;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .team-member-name {
        font-size: 1.2rem;
    }

    .team-member-desc {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .team-slider-wrapper {
        padding: 20px 20px;
    }

    .team-card {
        min-height: 350px;
    }

    .team-card-image {
        height: 200px;
    }

    .default-avatar {
        font-size: 3rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* === SMOOTH ANIMATIONS === */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.team-card {
    animation: slideInUp 0.6s ease-out;
}

.team-card:nth-child(2) {
    animation-delay: 0.1s;
}

.team-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* === RESPONSIBILITIES SECTION === */
.responsibilities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.responsibility-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.responsibility-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.responsibility-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.responsibility-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.responsibility-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(182, 22, 20, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: all 0.3s ease;
}

.responsibility-overlay i {
    font-size: 2.5rem;
    color: white;
}

.responsibility-card:hover .responsibility-overlay {
    opacity: 1;
}

.responsibility-card:hover .responsibility-image img {
    transform: scale(1.1);
}

.responsibility-info {
    padding: 25px;
}

.responsibility-info h3 {
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.responsibility-info p {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    text-align: justify;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 992px) {
    .unit-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .unit-stats {
        justify-content: center;
    }

    .team-card {
        flex: 0 0 calc(50% - 10px);
    }

    .responsibilities-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
        gap: 5px;
    }

    .tab-btn {
        flex: none;
        width: 100%;
    }

    .section-title {
        font-size: 2rem;
    }

    .team-card {
        flex: 0 0 100%;
    }

    .slider-nav {
        display: none;
    }

    .unit-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .unit-image {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .about-container {
        padding: 0 15px;
    }

    .tab-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .unit-description .description-content p {
        font-size: 1rem;
    }

    .responsibility-info {
        padding: 20px;
    }

    .responsibility-info h3 {
        font-size: 1.2rem;
    }

    .responsibility-info p {
        font-size: 0.9rem;
    }
}

/* === IMAGE ERROR HANDLING === */
.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e9e9e9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8rem;
    text-align: center;
    padding: 10px;
}

.image-error {
    opacity: 0.6;
    background: #f8f9fa;
}

/* === SMOOTH SCROLLING === */
html {
    scroll-behavior: smooth;
}

/* === LOADING ANIMATIONS === */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.unit-image-container {
    animation: slideInLeft 0.8s ease-out;
}

.unit-description {
    animation: slideInRight 0.8s ease-out;
}

.responsibility-card {
    animation: slideInUp 0.8s ease-out;
}

.responsibility-card:nth-child(2) {
    animation-delay: 0.1s;
}

.responsibility-card:nth-child(3) {
    animation-delay: 0.2s;
}

.responsibility-card:nth-child(4) {
    animation-delay: 0.3s;
}
