/* ============================================
   ABOUT US SECTION
   ============================================ */
.about-section {
    background: var(--background);
    position: relative;
    padding: 80px 0;
    z-index: 2;
}

/* Flex, not grid: each card carries its own width (half, a third, or the whole
   row), chosen per card in manage-system-settings -> Site Content. A grid would
   have to be told how many columns the row has, which the page cannot know when
   an admin adds a card. */
.about-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.about-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(var(--border-rgb), 0.1);
    transition: all 0.3s ease;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--button-bg), var(--button-hover));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.about-card:hover::before {
    transform: translateX(0);
}

.about-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.about-card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.about-card h3 {
    font-size: 1.25rem;
    color: var(--heading);
    margin-bottom: 0.75rem;
}

.about-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* The gap is subtracted so two halves (or three thirds) still fit one row. */
.about-card {
    flex: 1 1 calc(50% - 1rem);
    min-width: 260px;
}

.about-card-third {
    flex: 1 1 calc(33.333% - 1.334rem);
}

.about-card-wide,
.about-card-full {
    flex: 1 1 100%;
}

@media (max-width: 900px) {
    .about-card,
    .about-card-third {
        flex: 1 1 calc(50% - 1rem);
    }
}

@media (max-width: 768px) {
    .about-card,
    .about-card-third,
    .about-card-wide,
    .about-card-full {
        flex: 1 1 100%;
    }
}
