/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn {
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

    .btn-primary:hover {
        background-color: #0b5ed7;
        border-color: #0a58ca;
    }

.section-title {
    position: relative;
    margin-bottom: 3rem;
}

    .section-title h2 {
        position: relative;
        display: inline-block;
        padding-bottom: 10px;
    }

        .section-title h2::after {
            content: '';
            position: absolute;
            left: 50%;
            bottom: 0;
            width: 80px;
            height: 3px;
            background-color: #0d6efd;
            transform: translateX(-50%);
        }

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../slider.jpg') no-repeat center center/cover;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

/* Property Cards */
.property-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

    .property-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    }

    .property-card .card-img-top {
        height: 220px;
        object-fit: cover;
    }

    .property-card .price {
        color: #0d6efd;
        font-weight: 700;
    }

    .property-card .badge {
        font-size: 0.75rem;
        font-weight: 500;
        padding: 0.35rem 0.75rem;
    }

/* Services */
.service-card {
    transition: all 0.3s ease;
    border-radius: 10px;
}

    .service-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

.icon-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Testimonials */
.testimonial-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.client-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #0d6efd;
}

.testimonial-text {
    font-style: italic;
    color: #555;
}

/* Contact Form */
.contact-item .icon-box {
    width: 50px;
    height: 50px;
}

/* Login & Register Pages */
.login-section, .register-section {
    padding-top: 100px;
    padding-bottom: 100px;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.divider {
    position: relative;
    text-align: center;
}

    .divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: 1px;
        background-color: #dee2e6;
        z-index: -1;
    }

    .divider span {
        background-color: #fff;
        padding: 0 10px;
    }

.toggle-password {
    cursor: pointer;
}

.social-login .btn {
    width: 100%;
}

/* Admin Dashboard */
.admin-dashboard {
    background-color: #f8f9fa;
}

.sidebar {
    width: 250px;
    min-height: 100vh;
    transition: all 0.3s ease;
    position: fixed;
    z-index: 1000;
}

    .sidebar .nav-link {
        color: rgba(255, 255, 255, 0.8);
        padding: 0.75rem 1.5rem;
        border-left: 3px solid transparent;
    }

        .sidebar .nav-link:hover {
            color: #fff;
            background-color: rgba(255, 255, 255, 0.1);
        }

        .sidebar .nav-link.active {
            color: #fff;
            background-color: rgba(255, 255, 255, 0.1);
            border-left: 3px solid #0d6efd;
        }

.main-content {
    margin-left: 250px;
    transition: all 0.3s ease;
}

.stat-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

.activity-item .activity-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar.show {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding-top: 120px;
    }

        .hero-section .btn {
            display: block;
            width: 100%;
            margin-bottom: 15px;
        }

            .hero-section .btn + .btn {
                margin-left: 0;
            }
}
/* Main Container with proper margins */
.hierarchy-container {
    margin: 40px 0 0 40px; /* Top and left margins */
    max-width: 95%;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Tree View Styles */
.tree-view {
    list-style: none;
    padding-left: 20px;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-left: 2px solid #e0e0e0;
}

.tree-node {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #ffffff;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    position: relative;
}

    .tree-node:hover {
        transform: translateX(5px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

/* Dynamic color generation for unlimited levels */
.tree-node {
    border-left: 4px solid;
    background-color: var(--bg-color, rgba(25, 118, 210, 0.05));
}

    /* Generate colors using CSS variables */
    .tree-node[data-level="0"] {
        --border-color: #1976d2;
        --bg-color: rgba(25, 118, 210, 0.05);
    }

    .tree-node[data-level="1"] {
        --border-color: #388e3c;
        --bg-color: rgba(56, 142, 60, 0.05);
    }

    .tree-node[data-level="2"] {
        --border-color: #ffa000;
        --bg-color: rgba(255, 160, 0, 0.05);
    }

    .tree-node[data-level="3"] {
        --border-color: #c2185b;
        --bg-color: rgba(194, 24, 91, 0.05);
    }

    .tree-node[data-level="4"] {
        --border-color: #7b1fa2;
        --bg-color: rgba(123, 31, 162, 0.05);
    }

    .tree-node[data-level="5"] {
        --border-color: #00796b;
        --bg-color: rgba(0, 121, 107, 0.05);
    }

    .tree-node[data-level="6"] {
        --border-color: #d32f2f;
        --bg-color: rgba(211, 47, 47, 0.05);
    }

    .tree-node[data-level="7"] {
        --border-color: #0288d1;
        --bg-color: rgba(2, 136, 209, 0.05);
    }
/* Additional levels will use the last defined color */

/* Toggle Button */
.toggle {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    background-color: var(--border-color, #5c6bc0);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
    user-select: none;
    flex-shrink: 0;
    font-size: 16px;
}

    .toggle:hover {
        transform: scale(1.1);
        opacity: 0.9;
    }

.spacer {
    width: 28px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Children Container */
.children {
    margin-left: 25px;
    padding-left: 15px;
    border-left: 2px dashed #bdbdbd;
    display: none;
}

    .children.open {
        display: block;
        animation: fadeIn 0.4s ease-out;
    }

/* User Info Styles */
.user-info {
    flex-grow: 1;
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    color: #212529;
    font-size: 1rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0;
    font-size: 0.85rem;
}

.user-id, .user-level {
    display: inline-block;
    background-color: rgba(0,0,0,0.08);
    padding: 2px 8px;
    border-radius: 12px;
    color: #5f5f5f;
}

.user-email {
    display: block;
    font-size: 0.85rem;
    color: #5f5f5f;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-path {
    font-size: 0.8rem;
    color: #757575;
    font-style: italic;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dotted #e0e0e0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hierarchy-container {
        margin: 30px 0 0 20px; /* Reduced margins on mobile */
        padding: 0 10px;
    }

    .tree-node {
        padding: 12px;
        flex-direction: column;
    }

    .toggle, .spacer {
        margin-bottom: 8px;
        align-self: flex-start;
    }

    .children {
        margin-left: 15px;
        padding-left: 10px;
    }

    .user-meta {
        flex-direction: column;
        gap: 4px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}