/* =========================
   Tree Cards Section
   ========================= */
.tree-cards-section {
    position: relative;
    margin: 100px auto;
    padding: 40px 20px;
    max-width: 1600px;
}

/* Central vertical line */
.tree-cards-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, #ccc, #eee);
    border-radius: 3px;
    z-index: 0;
}

/* Tree card */
.tree-card {
    width: 50%;
    position: relative;
    opacity: 0;
    transition: all 0.8s ease-out;
    padding: 20px 40px;
}

/* Left & Right positioning */
.tree-card.left {
    margin-right: auto;
    transform: translateX(-120px);
    text-align: right;
}

.tree-card.right {
    margin-left: auto;
    transform: translateX(120px);
    text-align: left;
}

.tree-card.show {
    opacity: 1;
    transform: translateX(0);
}

/* Connector node circle */
.tree-card::before {
    content: "";
    position: absolute;
    top: 30px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f0f0f0;
    z-index: 1;
}

.tree-card.left::before {
    right: -11px;
}

.tree-card.right::before {
    left: -11px;
}

/* Card content with top border */
.tree-card-content {
    background: #ffffff;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-top: 5px solid transparent;
}

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

/* Card Header: Icon + Title */
.tree-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Full Circle Icon */
.tree-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.tree-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Card top border colors */
.tree-accent-green {
    border-top-color: #4CAF50;
}

.tree-accent-blue {
    border-top-color: #2196F3;
}

.tree-accent-orange {
    border-top-color: #FF9800;
}

/* Card text */
.tree-card-content h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.tree-card-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {

    .tree-cards-section {
        padding: 0 5px;
        /* minimal side gap */
        margin: 0 auto;
        max-width: 100%;
    }

    .tree-card,
    .tree-card.left,
    .tree-card.right {
        width: calc(100% - 10px);
        /* leave just space for tree line */
        margin: 10px 0;
        padding: 15px 15px 15px 50px;
        /* more space for line & node */
        text-align: left !important;
        position: relative;
        transform: translateX(0);
    }

    /* Vertical line thinner and on the left */
    .tree-cards-section::before {
        left: 15px;
        transform: translateX(0);
        width: 3px;
        height: 100%;
        background: linear-gradient(to bottom, #ccc, #eee);
    }

    /* Node circle */
    .tree-card::before {
        left: 15px;
        transform: translateX(-50%);
        width: 14px;
        height: 14px;
        top: 25px;
        background: #ddd;
        border: 2px solid #bbb;
        z-index: 1;
    }

    /* Header stacked vertically but spaced */
    .tree-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Icon aligned inside card but above text */
    .tree-icon {
        width: 50px;
        height: 50px;
        position: relative;
        left: 0;
        top: 0;
    }

    .tree-icon img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}