/* ===== About Section ===== */
.about-section {
    padding: 120px 0 80px;
    background: var(--background-section);
}

/* ===== Section Title ===== */
.section__title {
    font-size: 50px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-color-light);
    opacity: 1;
    transform: translateY(0);
}

/* ===== About Header with Logo ===== */
.about-section__header {
    text-align: center;
    margin-bottom: 60px;
    opacity: 1;
    transform: translateY(0);
}

.logo-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: var(--background-card);
    border: 1px solid var(--border-color-softer);
    border-radius: 15px;
    padding: 40px 30px;
    max-width: 1200px;
    margin: 0 auto;
    /* Add bento-box class for consistency */
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.logo-display:hover {
    background: var(--background-card-soft);
    box-shadow: var(--card-bg-hover-shadow);
}

.logo-display__image {
    width: 300px;
    height: auto;
    margin-bottom: 10px;
}

.logo-display__tagline {
    font-size: 20px;
    color: var(--text-color-light);
    text-align: center;
    line-height: 1.4;
    white-space: normal; /* Allow wrapping on mobile */
    word-break: break-word;
}

/* ===== About Content (Bento Box Layout) ===== */
.about-section__content {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4-column grid for desktop */
    gap: 30px; /* Reduced from 40px for tighter bento layout */
    margin-bottom: 80px;
    align-items: stretch;
}

/* Bento Box Base Styles */
.bento-box {
    background: var(--background-card);
    border: 1px solid var(--border-color-softer);
    border-radius: 15px;
    padding: 30px;
    opacity: 1;
    transform: translateY(0);
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.bento-box:hover {
    background: var(--background-card-soft);
    box-shadow: var(--card-bg-hover-shadow);
    transform: translateY(-5px);
}

/* Bento Box Size Variants */
.bento-box--large {
    grid-column: span 2; /* Spans 2 columns */
    grid-row: span 2; /* Spans 2 rows */
    padding: 40px; /* Slightly more padding for prominence */
}

.bento-box--medium {
    grid-column: span 2; /* Spans 2 columns */
    grid-row: span 1;
}

.bento-box--small {
    grid-column: span 1; /* Spans 1 column */
    grid-row: span 1;
}

.content-block__title {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color-light);
}

.content-block__text {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.7;
    color: var(--text-color-medium);
    margin-bottom: 20px;
    text-align: justify;
}

/* Image Block */
.image-block {
    /* Inherits bento-box styles */
    padding: 0; /* Remove padding for full-bleed images */
}

.image-block__image {
    width: 100%;
    height: 100%; /* Fill the bento box */
    border-radius: 15px;
    object-fit: cover;
}

/* ===== Initiatives Section ===== */
.initiatives {
    margin-bottom: 80px;
    opacity: 1;
    transform: translateY(0);
}

.initiatives__title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-color-light);
}

.initiatives__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.initiative-card {
    background: var(--background-card);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--border-color-softer);
    opacity: 1;
    transform: translateY(0);
}

.initiative-card:hover {
    background: var(--background-card-soft);
}

.initiative-card__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.initiative-card__icon img {
    width: 60px;
    height: 60px;
    filter: brightness(0) saturate(100%) invert(1);
    /* Prevent layout shift */
    aspect-ratio: 1/1;
}

.initiative-card__text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color-light);
    line-height: 1.4;
}

/* ===== Team Section ===== */
.team {
    margin-bottom: 80px;
}

.team__title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color-light);
    opacity: 1;
    transform: translateY(0);
}

.team__description {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.7;
    color: var(--text-color-medium);
    margin-bottom: 20px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.team__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.team-member {
    background: var(--background-card);
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border-color-softer);
    opacity: 1;
    transform: translateY(0);
}

.team-member:hover {
    background: var(--background-card-soft);
    box-shadow: var(--card-bg-hover-shadow);
}

.team-member__avatar {
    flex-shrink: 0;
}

.team-member__image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    /* Prevent layout shift */
    aspect-ratio: 1/1;
}

.team-member__info h4,
.team-member__name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color-light);
    margin-bottom: 5px;
}

.team-member__info p,
.team-member__role {
    font-size: 0.9rem;
    color: var(--text-color-medium);
    line-height: 1.4;
}

/* ===== Partners Section ===== */
.partners {
    margin-bottom: 60px;
    opacity: 1;
    transform: translateY(0);
}

.partners__title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color-light);
}

.partners__description {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.7;
    color: var(--text-color-medium);
    margin-bottom: 20px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.partners__carousel {
    overflow: hidden;
    margin-top: 40px;
    position: relative;
    white-space: nowrap;
}

/* Gradient fade effect on left and right */
.partners__carousel::before,
.partners__carousel::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.partners__carousel::before {
    left: 0;
    background: linear-gradient(to right, var(--background-section) 0%, transparent 100%);
}

.partners__carousel::after {
    right: 0;
    background: linear-gradient(to left, var(--background-section) 0%, transparent 100%);
}

.partners__track {
    display: inline-flex;
    gap: 80px;
    align-items: center;
    animation: scroll-partners 30s linear infinite;
    will-change: transform;
}

.partner-item {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Reserve space to prevent CLS */
    aspect-ratio: 5/3;
}

.partner-item img {
    max-width: 180px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(1);
    transition: opacity 0.3s ease;
    /* Prevent layout shift */
    aspect-ratio: auto;
}

.partner-item #chulan {
    max-width: 220px;
    max-height: 110px;
}

.partner-item #yta {
    max-width: 120px;
    max-height: 100px;
}

.partner-item #yp {
    max-width: 190px;
    max-height: 100px;
}

.partner-item:hover img {
    opacity: 0.7;
}

/* Partners carousel animation - seamless infinite scroll */
@keyframes scroll-partners {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-33.33% - 20px)); /* Move by 1/3 since we have 3 sets */
    }
}

/* Only pause animation when hovering the entire carousel container, not individual items */
.partners__carousel:hover .partners__track {
    animation-play-state: paused;
}

/* ===== Responsive Design ===== */

/* iPad Pro portrait and similar tablets: 2 columns */
@media (max-width: 1024px) {
    .about-section__content {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .bento-box--large {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .bento-box--medium {
        grid-column: span 2;
    }
    
    .bento-box--small {
        grid-column: span 1;
    }
}

/* Standard tablets and smaller: 2 columns */
@media (max-width: 968px) {
    .about-section__content {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

/* Mobile and small tablets: 1 column */
@media (max-width: 768px) {
    .about-section {
        padding: 100px 0 60px;
    }
    
    .about-section__header {
        margin-bottom: 40px;
    }
    
    .about-section__content {
        margin-bottom: 60px;
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .bento-box--large,
    .bento-box--medium,
    .bento-box--small {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .content-block {
        padding: 25px 20px;
    }
    
    .initiatives__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .team__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Smaller gradient on mobile */
    .partners__carousel::before,
    .partners__carousel::after {
        width: 80px;
    }
    
    .team-member {
        padding: 20px;
        gap: 15px;
    }
    
    .partners__track {
        gap: 40px;
        animation: scroll-partners 25s linear infinite;
    }
    
    .partner-item {
        width: 160px;
        height: 100px;
    }
    
    .partner-item img {
        max-width: 140px;
        max-height: 80px;
    }

    /* Reset specific logo sizes for mobile to prevent overflow */
    .partner-item #chulan,
    .partner-item #yta,
    .partner-item #yp {
        max-width: 140px;
        max-height: 80px;
    }

    
}


@media (max-width: 480px) {
    .section__title {
        margin-bottom: 40px;
        font-size: clamp(32px, 10vw, 40px);
        padding: 0 10px;
    }
    
    .logo-display {
        padding: 30px 20px;
        max-width: 95%;
    }
    
    .logo-display__image {
        width: 150px;
    }
    
    .logo-display__tagline {
        font-size: 0.9rem;
        white-space: normal;
    }
    
    .content-block {
        padding: 20px 15px;
    }
    
    .initiative-card {
        padding: 25px 15px;
    }
    
    .initiative-card__icon {
        width: 70px;
        height: 70px;
        margin-bottom: 15px;
    }
    
    .initiative-card__icon img {
        width: 35px;
        height: 35px;
    }
}