body {
    overflow: auto;
    background-color: rgba(248, 247, 247, 1);
}

/* Family Tree Template 2 Enhanced Styles */
.family-tree-template2 {
    position: relative;
    padding: 3rem 2rem;
    border-radius: 20px;
    min-height: 600px;
    overflow: visible;
}

/* Level Styles */
.grandparents-level,
.parents-siblings-level,
.children-level,
.grandchildren-level,
.great-grandparents-level {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    margin: 4rem 0;
    position: relative;
    flex-wrap: wrap;
    min-height: 120px;
}


/* Family Groups */
.family-group {
    display: inline-flex;
    align-items: center;
    gap: 0 !important;
    position: relative;
    margin: 0 1.5rem;
}

.family-group .tree-member {
    margin: 0 !important;
    position: relative;
}

/* للبطاقة الأولى في المجموعة (الأب عادة) */
.family-group .tree-member:first-child:not(:only-child) {
    border-radius: 0 8px 8px 0 !important;
    border-right-width: 1px !important;
    margin-right: -2px !important;
    z-index: 2;
}

/* للبطاقة الثانية في المجموعة (الأم عادة) */
.family-group .tree-member:nth-child(2) {
    border-radius: 8px 0 0 8px !important;
    border-left-width: 1px !important;
    z-index: 1;
}

/* خط الاتصال الصغير بين الأب والأم */
.family-group .tree-member:first-child:not(:only-child)::after {
    content: '';
    position: absolute;
    top: 35%;
    right: -15px;
    width: 30px;
    height: 2px;
    z-index: 3;
}

/* للبطاقة الوحيدة */
.family-group .tree-member:only-child {
    border-radius: 12px !important;
}

/* تأكد من عدم وجود فجوات */
.parents-siblings-level .family-group {
    display: inline-flex !important;
}

/* Member Cards */
.tree-member {
    background: white;
    border: 2px solid;
    border-radius: 12px;
    padding: 1rem 0.8rem;
    text-align: center;
    max-width: 230px !important;
    max-height: 270px !important;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 10;
}

.tree-member:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 11;
}

.tree-member.male {
    border-top: 10px solid rgba(59, 130, 246, 1);
    border-bottom-color: rgb(201, 200, 200);
    border-right-color: rgb(201, 200, 200);
    border-left-color: rgb(201, 200, 200);
    background: transparent;
}

.tree-member.male:hover {
    box-shadow: 0 4px 12px rgba(107, 166, 229, 0.3);
    border-color: #5B9BD5;
}

.tree-member.female {
    border-top: 10px solid rgba(236, 72, 153, 1);
    border-bottom-color: rgb(201, 200, 200);
    border-right-color: rgb(201, 200, 200);
    border-left-color: rgb(201, 200, 200);
    background: transparent;
}

.tree-member.female:hover {
    box-shadow: 0 4px 12px rgba(244, 163, 196, 0.3);
    border-color: #ED7D95;
}

/* Member Avatar */
.member-avatar-container {
    margin-bottom: 0.5rem;
}

.member-avatar {
    width: 90px !important;
    height: 90px !important;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.tree-member:hover .member-avatar {
    transform: scale(1.05);
}

/* Member Info */
.member-name {
    font-size: 24px;
    font-weight: 700;
    color: rgba(0, 0, 0, 1);
    margin: 0.3rem 0 0.2rem;
}

.member-relation {
    font-size: 0.7rem;
    color: #7f8c8d;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.member-dates {
    font-size: 15px;
    color: rgba(102, 102, 102, 1);
    margin-top: 0.2rem;
}

/* Marriage Connector */
.marriage-connector {
    position: absolute;
    top: 35%;
    left: calc(50% - 25px);
    width: 50px;
    height: 2px;
    background: linear-gradient(to right, #5B9BD5, #ED7D95);
    transform: translateY(-50%);
    z-index: 8;
}

/* Marriage Line Horizontal */
.marriage-line-horizontal {
    position: absolute;
    top: 40%;
    right: -30px;
    width: 30px;
    height: 2px;
    background: linear-gradient(to right, #6BA6E5, #F4A3C4);
    z-index: 8;
    transform: translateY(-50%);
}

/* Parent-Children Connections Container */
.parent-children-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.connection-line {
    position: absolute;
    background: #ddd;
    z-index: 1;
}

.horizontal-line {
    height: 2px;
}

.vertical-line {
    width: 2px;
}

/* Marriage Connection */
.marriage-line {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #e24a90 0%, #ff6b9d 50%, #e24a90 100%);
    border-radius: 2px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(226, 74, 144, 0.3);
}

.marriage-line::after {
    content: '💕';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: #e24a90;
    font-size: 1.2rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Tree Levels with Connection Lines */
.great-grandparents-level {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 4rem;
    position: relative;
}

.grandparents-level {
    display: flex;
    justify-content: center;
    gap: 8rem;
    margin-bottom: 4rem;
    position: relative;
}

.parents-siblings-level {
    display: flex;
    justify-content: center;
    gap: 5rem;
    margin: 4rem 0;
    position: relative;
    flex-wrap: wrap;
}

.family-group {
    display: flex;
    gap: 1.5rem;
    position: relative;
    align-items: center;
}

.parents-level {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 4rem 0;
    position: relative;
}

.children-level {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 4rem 0;
    position: relative;
}

.grandchildren-level {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 4rem;
    position: relative;
}

/* Parent-Child Connection Lines */
.parent-children-connections {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 5;
}

.parent-line {
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.children-horizontal-line {
    box-shadow: 0 1px 3px rgba(74, 144, 226, 0.2);
}

.child-line {
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.child-arrow {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.child-arrow:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 3px 8px rgba(74, 144, 226, 0.4);
}

/* Connection Lines Between Levels */
.level-connector {
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 12rem;
    background: #ccc;
    z-index: 1;
}

.horizontal-connector {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 2px;
    background: #ccc;
    z-index: 1;
}

/* Simplified Connection Lines */
.level-connector {
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 5rem;
    background: #ccc;
    z-index: 1;
}

/* Node Plus Button 2 */
.node-plus2 {
    background: white;
    border: 2px solid rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: rgba(59, 130, 246, 1);
    transition: all 0.3s ease;
}

.node-plus2:hover {
    background: white;
    border-color: rgba(59, 130, 246, 0.1);
    color: rgba(59, 130, 246, 1);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .family-tree-template2 {
        padding: 2rem 1rem;
        min-height: 600px;
    }

    .tree-member {
        min-width: 140px;
        max-width: 160px;
        padding: 1.25rem 0.75rem;
        margin: 0 0.5rem;
    }

    .member-avatar {
        width: 50px;
        height: 50px;
    }

    .member-name {
        font-size: 0.9rem;
    }

    .member-relation {
        font-size: 0.75rem;
    }

    .grandparents-level {
        gap: 4rem;
        margin-bottom: 3rem;
    }

    .parents-siblings-level {
        gap: 3rem;
        margin: 3rem 0;
    }

    .family-group {
        gap: 1rem;
    }

    .children-level {
        gap: 1.5rem;
        margin: 3rem 0;
    }

    .grandchildren-level {
        gap: 1.5rem;
        margin-top: 3rem;
    }

    .marriage-connector {
        width: 50px;
    }
}

@media (max-width: 480px) {
    .tree-member {
        min-width: 120px;
        max-width: 140px;
        padding: 1rem 0.5rem;
    }

    .member-avatar {
        width: 40px;
        height: 40px;
    }

    .grandparents-level {
        gap: 2rem;
    }

    .parents-siblings-level {
        gap: 2rem;
    }

    .children-level {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .grandparents-level {
        gap: 3rem;
        flex-direction: column;
        align-items: center;
    }

    .parents-level {
        gap: 1rem;
    }

    .children-level {
        gap: 0.75rem;
    }

    .tree-member {
        min-width: 100px;
        max-width: 120px;
    }
}

/* Sidebar */
.sidebar {
    width: 300px;
    background-color: #fff;
    box-shadow: 0px 14px 10px rgba(8, 15, 52, 0.06);
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}

.sidebar .logo img {
    max-width: 152px;
    height: auto;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 0.8rem;
}

.sidebar ul li a {
    color: rgba(39, 58, 65, 1);
    text-decoration: none;
    font-size: 16px;
    padding: .7rem;
}

.sidebar ul li.active a {
    color: #b7924f !important;
    font-weight: bold;
}

.sidebar ul li a:hover {
    color: #b7924f;
}

.sidebar .nav-link.active {
    color: #b7924f;
}

.sidebar .icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease-in-out;
}

.sidebar ul li.active .icon,
.sidebar ul li:hover .icon {
    filter: brightness(0) saturate(100%) invert(64%) sepia(29%) saturate(343%) hue-rotate(8deg) brightness(95%) contrast(90%);
    transform: scale(1.05);
}

.sidebar .nav-item:hover {
    background-color: rgba(249, 248, 244, 1);
    border-radius: 8px;
}

.sidebar .nav-item.active {
    background-color: rgba(249, 248, 244, 1);
    border-radius: 8px;
}

/* Close Button */
.sidebar-close {
    display: none;
    position: absolute;
    top: 2%;
    left: 0;
    font-size: 2rem;
    color: black;
}

/* custom container */

.custom-container {
    padding: 0 20rem 0 0;
}

/* navbar */
.search-bar {
    padding-right: 1rem;
    width: 100%;
}

.search-bar input {
    background-color: rgba(39, 58, 65, 0.05);
    border: none;
    padding: .7rem;
}

.search-bar input::placeholder {
    color: rgba(156, 156, 156, 1);
    font-size: 14px;
    padding: .5rem;
}

.search-bar input {
    background-color: #f7f7f7;
    border: none;
    padding-right: 2.5rem;
}

.search-bar input:focus {
    box-shadow: none;
    background-color: #f7f7f7;
}

.search-bar i {
    color: rgba(158, 158, 158, 1);
    font-size: 16px;
}

/* Content */
.content {
    margin-right: 270px;
    padding: 1rem 3rem;
    transition: margin-left 0.3s ease-in-out;
}


@media (max-width: 767.98px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .programmes-table {
        font-size: 14px;
    }

    .pagination-controls select {
        width: 80px;
    }
}

/* Responsive Sidebar */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.show {
        transform: translateX(0%);
    }

    .sidebar-close {
        display: block;
    }

    .content {
        margin-right: 0 !important;
        padding: .5rem;
    }

    .custom-container {
        padding: 0;
    }

    .search-bar {
        width: 100%;
    }
}

.card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 1rem;
    border: none;
    height: 100%;
}

.card-title {
    font-weight: bold;
}

p {
    margin: 0;
}

.card-title {
    font-size: 1.2rem;
    color: rgba(211, 171, 85, 1);
}

.card-footer {
    background-color: rgba(39, 58, 65, 1);
    color: white;
    padding: 0.5rem;
    border-radius: 0px 0px 20px 20px !important;
}

.custom-card {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
    padding: 0rem !important;
    border: 1px dashed rgba(219, 219, 219, 1);
}

/* map */
#map {
    width: 100%;
    height: 600px;
    border-radius: 20px;
    filter: brightness(50%);
}

#tree {
    width: 100%;
    height: 100%;
    border: none !important;
    box-shadow: none !important;
}



/* حاوية الشجرة مع التوسيط والمساحة المقللة */
.background {
    width: 100%;
    height: 900px;
    position: relative;
    margin: 4rem auto;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    display: block;
    /* ضمان التوسيط المثالي */
    left: 50%;
    transform: translateX(-50%);
}

.background .slope {
    position: absolute;
    bottom: 0;
}

.slope {
    background: rgba(148, 105, 74, 1);
    width: 100%;
    height: 150px;
    border-radius: 50% 50% 0px 0px / 100% 100% 0px 0px;
    overflow: hidden;
    z-index: -1;
}

.slope:before {
    content: "";
    background: rgba(148, 105, 74, 1);
    border-radius: 50%;
    width: 160px;
    height: 60px;
    position: absolute;
    left: 50%;
    margin-left: -80px;
    top: -10px;
}

.tree {
    width: 5px;
    border-right: 20px solid transparent;
    border-left: 20px solid transparent;
    border-bottom: 600px solid rgba(148, 105, 74, 1);
    position: absolute;
    left: 50%;
    transform-origin: 50% 600px;
    bottom: 150px;
    margin-left: -20px;
}

.branch {
    position: absolute;
    width: 300px;
    height: 150px;
    border-bottom: 10px solid rgba(148, 105, 74, 1);
}

.branch:before,
.branch:after {
    content: "";
    position: absolute;
    width: inherit;
    height: inherit;
    border: inherit;
    border-radius: inherit;
    z-index: 0;
}

.branch:before {
    transform: rotate(1deg);
}

.branch:after {
    transform: rotate(2deg);
}

.branch.left,
.branch.left:before,
.branch.left:after {
    transform-origin: 100% 100%;
}

.branch.right,
.branch.right:before,
.branch.right:after {
    transform-origin: 0% 100%;
}

.branch.left {
    border-bottom-left-radius: 100% 100%;
}

.branch.right {
    border-bottom-right-radius: 100% 100%;
    margin-left: 1px;
}

.tree>.branch.left {
    transform: rotate(5deg);
}

.tree>.branch.right {
    transform: rotate(-5deg);
}

.leaf {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(46, 125, 50, 1);
    border-radius: 20% 80%;
    z-index: 1;
    transform-origin: 0px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: rgba(255, 255, 255, 1);
    padding: .5rem;
    text-align: center;
    line-height: 1.1;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.leaf .name-text {
    display: block;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
    text-align: center;
    font-size: inherit;
    white-space: normal;
    max-width: 100%;
}

/* تصحيح اتجاه النص ليكون أفقي بالنسبة للصفحة */
.branch.left .leaf1 .name-text {
    transform: rotate(145deg);
}

.branch.left .leaf2 .name-text {
    transform: rotate(70deg);
}

.branch.left .leaf3 .name-text {
    transform: rotate(145deg);
}

.branch.right .leaf1 .name-text {
    transform: rotate(-30deg);
}

.branch.right .leaf2 .name-text {
    transform: rotate(30deg);
}

.branch.right .leaf3 .name-text {
    transform: rotate(-50deg);
}

.branch.left .branch-inner1 .leaf1 .name-text {
    transform: rotate(145deg);
}

.branch.left .branch-inner1 .leaf2 .name-text {
    transform: rotate(70deg);
}

.branch.left .branch-inner1 .leaf3 .name-text {
    transform: rotate(145deg);
}

.branch.left .branch-inner2 .leaf1 .name-text {
    transform: rotate(10deg);
}

.branch.left .branch-inner2 .leaf2 .name-text {
    transform: rotate(160deg);
}

.branch.left .branch-inner2 .leaf3 .name-text {
    transform: rotate(10deg);
}

.branch.left .branch-inner3 .leaf1 .name-text {
    transform: rotate(145deg);
}

.branch.left .branch-inner3 .leaf2 .name-text {
    transform: rotate(40deg);
}

.branch.right .branch-inner1 .leaf1 .name-text {
    transform: rotate(-30deg);
}

.branch.right .branch-inner1 .leaf2 .name-text {
    transform: rotate(-40deg);
}

.branch.right .branch-inner1 .leaf3 .name-text {
    transform: rotate(-30deg);
}

.branch.right .branch-inner2 .leaf1 .name-text {
    transform: rotate(20deg);
}

.branch.right .branch-inner2 .leaf2 .name-text {
    transform: rotate(60deg);
}

.branch.right .branch-inner2 .leaf3 .name-text {
    transform: rotate(40deg);
}

.branch.right .branch-inner3 .leaf1 .name-text {
    transform: rotate(0deg);
}

.branch.right .branch-inner3 .leaf2 .name-text {
    transform: rotate(120deg);
}

.branch.right .branch-inner3 .leaf3 .name-text {
    transform: rotate(50deg);
}

.branch.right .branch-inner4 .leaf1 .name-text {
    transform: rotate(-30deg);
}

.branch3>.leaf1 .name-text {
    transform: rotate(-20deg);
}

.branch3>.leaf2 .name-text {
    transform: rotate(-40deg);
}

.tree>.leaf1 .name-text {
    transform: rotate(145deg);
}

.tree>.leaf2 .name-text {
    transform: rotate(100deg);
}

/* اسم الأب على الفرع */
.parent-name {
    position: absolute;
    background: linear-gradient(to top, rgba(230, 81, 0, 1), rgba(255, 235, 59, 1));
    border: 2px solid none;
    border-radius: 50%;
    min-width: 45px;
    min-height: 45px;
    width: auto;
    height: auto;
    max-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: rgba(255, 255, 255, 1);
    text-align: center;
    line-height: 1.2;
    padding: 8px 10px;
    z-index: 3;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.branch.left>.parent-name {
    right: -10px;
    bottom: -10px;
}

.branch.right>.parent-name {
    left: -10px;
    bottom: -10px;
}

.branch .branch:after {
    content: none;
}

.tree>.leaf1 {
    width: 35px;
    height: 35px;
    transform: rotate(-150deg);
    font-size: 9px;
}

.tree>.leaf2 {
    width: 35px;
    height: 35px;
    transform: rotate(-100deg);
    font-size: 9px;
}

.branch1 {
    top: 360px;
    right: 0;
}

.branch1 .branch-inner1 {
    width: 120px;
    height: 70px;
    transform: rotate(35deg);
    border-bottom-left-radius: 100% 70%;
    left: 100px;
    top: 0px;
    border-width: 8px;
}

.branch1 .branch-inner2 {
    width: 100px;
    height: 45px;
    transform: rotate(-40deg);
    border-bottom-left-radius: 100% 70%;
    left: 52px;
    top: 25px;
    border-width: 7px;
}

.branch1 .branch-inner3 {
    width: 45px;
    height: 22px;
    transform: rotate(40deg);
    border-bottom-left-radius: 100% 70%;
    left: 32px;
    top: 28px;
    border-width: 5px;
}

.branch1 .branch-inner1 .leaf1 {
    transform: rotate(-150deg);
    top: 68px;
    left: 90px;
}

.branch1 .branch-inner1 .leaf2 {
    width: 45px;
    height: 45px;
    transform: rotate(110deg);
    top: 68px;
    left: 48px;
    font-size: 10px;
}

.branch1 .branch-inner1 .leaf3 {
    width: 45px;
    height: 45px;
    transform: rotate(-150deg);
    top: 54px;
    left: 18px;
    font-size: 10px;
}

.branch1 .branch-inner2 .leaf1 {
    transform: rotate(80deg);
    left: 82px;
    top: 46px;
}

.branch1 .branch-inner2 .leaf2 {
    width: 48px;
    height: 48px;
    transform: rotate(-160deg);
    left: 54px;
    top: 38px;
    font-size: 10px;
}

.branch1 .branch-inner2 .leaf3 {
    width: 45px;
    height: 45px;
    transform: rotate(100deg);
    left: 18px;
    top: 34px;
    font-size: 10px;
}

.branch1 .branch-inner3 .leaf1 {
    width: 38px;
    height: 38px;
    transform: rotate(-150deg);
    left: 37px;
    top: 20px;
    font-size: 9px;
}

.branch1 .branch-inner3 .leaf2 {
    width: 38px;
    height: 38px;
    transform: rotate(130deg);
    left: 17px;
    top: 22px;
    font-size: 9px;
}

.branch2 {
    height: 110px;
    top: 240px;
    left: 0;
}

.branch2 .branch-inner1 {
    width: 120px;
    height: 130px;
    transform: rotate(90deg);
    border-bottom-left-radius: 100% 70%;
    left: -52px;
    top: -26px;
    border-width: 8px;
}

.branch2 .branch-inner2 {
    width: 120px;
    height: 145px;
    transform: rotate(60deg);
    border-bottom-right-radius: 100% 70%;
    left: 110px;
    top: -52px;
    border-width: 7px;
}

.branch2 .branch-inner3 {
    width: 80px;
    height: 58px;
    transform: rotate(30deg);
    border-bottom-right-radius: 100% 100%;
    left: 220px;
    top: 19px;
    border-width: 5px;
}

.branch2 .branch-inner4 {
    width: 40px;
    height: 28px;
    transform: rotate(180deg);
    border-bottom-left-radius: 100% 100%;
    left: 0px;
    top: 16px;
    border-width: 4px;
}

.branch2 .branch-inner1 .leaf1 {
    transform: rotate(120deg);
    top: 138px;
    left: 88px;
}

.branch2 .branch-inner1 .leaf2 {
    transform: rotate(220deg);
    top: 118px;
    left: 56px;
    width: 48px;
    height: 48px;
    font-size: 10px;
}

.branch2 .branch-inner1 .leaf3 {
    transform: rotate(150deg);
    top: 112px;
    left: 20px;
    width: 45px;
    height: 45px;
    font-size: 10px;
}

.branch2 .branch-inner2 .leaf1 {
    transform: rotate(-20deg);
    top: 157px;
    left: 24px;
}

.branch2 .branch-inner2 .leaf2 {
    transform: rotate(-120deg);
    top: 137px;
    left: 52px;
    width: 48px;
    height: 48px;
    font-size: 10px;
}

.branch2 .branch-inner2 .leaf3 {
    transform: rotate(-40deg);
    top: 121px;
    left: 90px;
    width: 45px;
    height: 45px;
    font-size: 10px;
}

.branch2 .branch-inner3>.leaf1 {
    transform: rotate(0deg);
    top: 63px;
    left: 24px;
    width: 48px;
    height: 48px;
    font-size: 10px;
}

.branch2 .branch-inner3 .leaf2 {
    transform: rotate(-120deg);
    top: 49px;
    left: 44px;
    width: 48px;
    height: 48px;
    font-size: 10px;
}

.branch2 .branch-inner3 .leaf3 {
    transform: rotate(-50deg);
    top: 26px;
    left: 78px;
    width: 45px;
    height: 45px;
    font-size: 10px;
}

.branch2 .branch-inner4>.leaf1 {
    transform: rotate(150deg);
    top: 27px;
    left: 11px;
    width: 35px;
    height: 35px;
    font-size: 9px;
}

.branch3 {
    top: 135px;
    right: 0;
    width: 300px;
    height: 130px;
}

.branch3 .branch-inner1 {
    width: 120px;
    height: 80px;
    transform: rotate(-80deg);
    border-bottom-right-radius: 100% 100%;
    left: 150px;
    top: 29px;
    border-width: 7px;
}

.branch3 .branch-inner2 {
    width: 120px;
    height: 115px;
    transform: rotate(-40deg);
    border-bottom-left-radius: 100% 70%;
    left: 70px;
    top: 10px;
    border-width: 7px;
}

.branch3 .branch-inner1 .leaf1 {
    transform: rotate(-30deg);
    top: 84px;
    left: 29px;
}

.branch3 .branch-inner1 .leaf2 {
    width: 45px;
    height: 45px;
    transform: rotate(-95deg);
    top: 66px;
    left: 45px;
    font-size: 10px;
}

.branch3 .branch-inner1 .leaf3 {
    width: 45px;
    height: 45px;
    transform: rotate(-50deg);
    top: 61px;
    left: 87px;
    font-size: 10px;
}

.branch3 .branch-inner2 .leaf1 {
    transform: rotate(80deg);
    left: 98px;
    top: 120px;
}

.branch3 .branch-inner2 .leaf2 {
    width: 48px;
    height: 48px;
    transform: rotate(-160deg);
    left: 69px;
    top: 105px;
    font-size: 10px;
}

.branch3 .branch-inner2 .leaf3 {
    width: 45px;
    height: 45px;
    transform: rotate(100deg);
    left: 32px;
    top: 94px;
    font-size: 10px;
}

.branch3>.leaf1 {
    right: 60px;
    transform: rotate(200deg);
    bottom: -33px;
    width: 45px;
    height: 45px;
    font-size: 10px;
}

.branch3>.leaf2 {
    right: 218px;
    transform: rotate(220deg);
    bottom: 19px;
    width: 45px;
    height: 45px;
    font-size: 10px;
}

.branch4 {
    width: 230px;
    height: 70px;
    top: 95px;
    left: 0;
}

.branch4 .branch-inner1 {
    width: 100px;
    height: 115px;
    transform: rotate(90deg);
    border-bottom-left-radius: 100% 70%;
    left: -52px;
    top: -49px;
    border-width: 8px;
}

.branch4 .branch-inner2 {
    width: 100px;
    height: 130px;
    transform: rotate(60deg);
    border-bottom-right-radius: 100% 70%;
    left: 110px;
    top: -69px;
    border-width: 7px;
}

.branch4 .branch-inner1 .leaf1 {
    transform: rotate(120deg);
    top: 121px;
    left: 82px;
}

.branch4 .branch-inner1 .leaf2 {
    transform: rotate(220deg);
    top: 107px;
    left: 59px;
    width: 48px;
    height: 48px;
    font-size: 10px;
}

.branch4 .branch-inner1 .leaf3 {
    transform: rotate(150deg);
    top: 101px;
    left: 26px;
    width: 45px;
    height: 45px;
    font-size: 10px;
}

.branch4 .branch-inner2 .leaf1 {
    transform: rotate(-20deg);
    top: 138px;
    left: 19px;
}

.branch4 .branch-inner2 .leaf2 {
    transform: rotate(-120deg);
    top: 121px;
    left: 39px;
    width: 48px;
    height: 48px;
    font-size: 10px;
}

.branch4 .branch-inner2 .leaf3 {
    transform: rotate(-40deg);
    top: 112px;
    left: 69px;
    width: 45px;
    height: 45px;
    font-size: 10px;
}

.branch5 {
    top: 40px;
    right: 0;
    width: 170px;
    height: 58px;
}

.branch5 .branch-inner1 {
    width: 60px;
    height: 60px;
    border-bottom-right-radius: 100% 100%;
    left: 98px;
    top: -10px;
    border-width: 7px;
    transform: rotate(-60deg);
}

.branch5 .branch-inner2 {
    width: 80px;
    height: 80px;
    transform: rotate(-50deg);
    border-bottom-left-radius: 100% 80%;
    left: 52px;
    top: -20px;
    border-width: 7px;
}

.branch5 .branch-inner1 .leaf1 {
    transform: rotate(-20deg);
    left: 20%;
    bottom: -70%;
    width: 45px;
    height: 45px;
    font-size: 10px;
}

.branch5 .branch-inner1 .leaf2 {
    width: 40px;
    height: 40px;
    transform: rotate(-120deg);
    top: 85%;
    left: 40%;
    font-size: 9px;
}

.branch5 .branch-inner1 .leaf3 {
    width: 35px;
    height: 35px;
    transform: rotate(-50deg);
    top: 65%;
    left: 80%;
    font-size: 9px;
}

.branch5 .branch-inner2 .leaf1 {
    transform: rotate(80deg);
    left: 70%;
    top: 110%;
    width: 45px;
    height: 45px;
    font-size: 10px;
}

.branch5 .branch-inner2 .leaf2 {
    width: 40px;
    height: 40px;
    transform: rotate(-140deg);
    left: 43%;
    top: 85%;
    font-size: 9px;
}

.branch5 .branch-inner2 .leaf3 {
    width: 35px;
    height: 35px;
    transform: rotate(100deg);
    left: 20%;
    top: 75%;
    font-size: 9px;
}

/* تحسينات للتصميم المتجاوب مع الأحجام المقللة */
@media (max-width: 1000px) {
    .background {
        width: 800px;
        height: 800px;
        margin: 15px auto;
    }

    .tree {
        border-bottom-width: 480px;
        bottom: 120px;
        transform-origin: 50% 480px;
    }

    .slope {
        height: 120px;
    }
}

@media (max-width: 900px) {
    .background {
        width: 700px;
        height: 700px;
        margin: 15px auto;
    }

    .tree {
        border-bottom-width: 420px;
        bottom: 110px;
        transform-origin: 50% 420px;
    }

    .slope {
        height: 110px;
    }
}

@media (max-width: 768px) {
    .background {
        width: 100%;
        max-width: 600px;
        height: 600px;
        margin: 10px auto;
    }

    .tree {
        border-bottom-width: 360px;
        bottom: 100px;
        transform-origin: 50% 360px;
    }

    .slope {
        height: 100px;
    }
}

@media (max-width: 600px) {
    .background {
        max-width: 500px;
        height: 500px;
        margin: 10px auto;
    }

    .tree {
        border-bottom-width: 280px;
        bottom: 90px;
    }

    .slope {
        height: 90px;
    }
}

@media (max-width: 480px) {
    .background {
        max-width: 400px;
        height: 400px;
        margin: 10px auto;
    }

    .tree {
        border-bottom-width: 220px;
        bottom: 80px;
    }

    .slope {
        height: 80px;
    }
}

.btn-custom {
    background-color: rgb(216, 162, 47);
    color: rgba(248, 247, 247, 1);
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
}

.btn-outline-custom {
    background-color: rgba(248, 247, 247, 1);
    color: rgba(211, 171, 85, 1);
    border: rgba(211, 171, 85, 1) 1px solid;
    padding: 15px 22px;
    border-radius: 50px;
}

.btn-custom:hover {
    background-color: rgb(207, 145, 10);
    color: rgba(248, 247, 247, 1);
}

.btn-outline-custom:hover {
    background-color: rgba(211, 171, 85, 1);
    color: rgba(248, 247, 247, 1);
}
