/* ===============================
   COMPANIES PAGE LAYOUT
   =============================== */

.companies-page {
    /* Add breathing space above and below the content */
    padding-top: 60px;   /* space between header and section */
    padding-bottom: 40px; /* space below content */
    background: #f9f9f9; /* optional: subtle background */
}

/* Main layout: sidebar + content */
.companies-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* SIDEBAR */
.companies-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.companies-sidebar h3 {
    margin-bottom: 15px;
}

.companies-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.companies-sidebar li {
    margin-bottom: 10px;
}

.companies-sidebar a {
    text-decoration: none;
    font-weight: 600;
    color: var(--dark-gray);
}

.companies-sidebar a:hover {
    color: var(--primary-teal);
}
/* =================================================
   SIDEBAR – MODERN BUTTON DESIGN
   ================================================= */

.companies-sidebar {
    background: #fff;
    padding: 26px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

/* TITLE */
.companies-sidebar h3 {
    font-size: 1.05rem;
    margin-bottom: 18px;
    color: #111;
}

/* NAV */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* BUTTON BASE */
.sidebar-btn {
    display: block;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;

    font-size: 0.95rem;
    font-weight: 600;
    color: #333;

    background: #f6f7f8;
    border: 1px solid #e4e4e4;

    transition: all 0.25s ease;
}

/* HOVER */
.sidebar-btn:hover {
    background: #eef1f2;
    border-color: #d8d8d8;
    transform: translateY(-1px);
}

/* ACTIVE */
.sidebar-btn.active {
    background: var(--primary-teal);
    border-color: var(--primary-teal);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

/* ACTIVE HOVER */
.sidebar-btn.active:hover {
    transform: none;
    opacity: 0.95;
}

/* =================================================
   RESPONSIVE
   ================================================= */

@media (max-width: 900px) {
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}


/* MAIN CONTENT PANEL */
.companies-content {
    flex: 1;
    min-width: 0;
}

/* ===============================
   GROUP OVERVIEW STYLES (UNCHANGED)
   =============================== */

.group-structure {
    margin: 30px 0 20px 0;
}

.group-structure h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.group-structure ul {
    list-style: none;
    padding-left: 20px;
}

.group-structure li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.group-structure li::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 0;
    width: 12px;
    height: 2px;
    background: var(--primary-teal);
}

.group-structure li ul li::before {
    background: #aaa;
}

.structure-icon {
    margin-right: 8px;
}

/* Cards spacing inside overview */
.company-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 25px;
}

/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 900px) {
    .companies-layout {
        flex-direction: column;
        gap: 30px; /* reduce gap on mobile */
    }

    .companies-sidebar {
        width: 100%;
    }

    .companies-page {
        padding-top: 40px; /* slightly smaller top space on mobile */
        padding-bottom: 30px;
    }
}
