* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Override nav grid for legal pages (no profile) */
nav {
    grid-template-columns: auto 1fr;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #fff;
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: #fff;
    padding: 40px 0;
    border: none;
    position: sticky;
    top: 81px;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-item {
    display: block;
    padding: 12px 32px;
    font-size: 15px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.sidebar-item:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.sidebar-item.active {
    background-color: #fff5f5;
    color: #ff6b6b;
    border-left-color: #ff6b6b;
    font-weight: 500;
}

/* Content */
.content {
    flex: 1;
    padding: 60px 80px;
    max-width: 900px;
}

h1 {
    font-size: 42px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 32px;
    line-height: 1.2;
}

.intro-text {
    font-size: 16px;
    color: #4b5563;
    margin-bottom: 48px;
    line-height: 1.7;
}

.section {
    margin-bottom: 48px;
}

.section h2 {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    line-height: 1.3;
}

.section p {
    font-size: 16px;
    color: #4b5563;
    margin-bottom: 16px;
    line-height: 1.7;
}

.section ul {
    margin: 16px 0;
    padding-left: 24px;
}

.section li {
    font-size: 16px;
    color: #4b5563;
    margin-bottom: 12px;
    line-height: 1.7;
}

.section strong {
    color: #111827;
    font-weight: 600;
}

a {
    color: #ff6b6b;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* Mobile Dropdown */
.mobile-dropdown {
    display: none;
    background-color: #fff;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 98;
    /* IMPORTANT: Add relative positioning for dropdown menu */
    position: relative;
}

.dropdown-button-m {
    width: 100%;
    padding: 12px 16px;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    color: #111827;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.dropdown-button-m:hover {
    border-color: #ff6b6b;
}

.dropdown-icon-m {
    transition: transform 0.3s;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-icon-m svg {
    width: 16px;
    height: 16px;
    stroke: #6b7280;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dropdown-icon-m.open {
    transform: rotate(180deg);
}

.dropdown-menu-m {
    position: absolute;
    top: calc(100% - 16px); /* Position below the container, accounting for padding */
    left: 24px;
    right: 24px;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    /* CRITICAL: Change from display:none to max-height for animation */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
}

.dropdown-menu-m.open {
    /* CRITICAL: Set a large max-height when open */
    max-height: 400px;
    opacity: 1;
    display: block;
}

.dropdown-item-m {
    display: block;
    padding: 12px 16px;
    color: #6b7280;
    font-size: 15px;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s;
}

.dropdown-item-m:last-child {
    border-bottom: none;
}

.dropdown-item-m:hover {
    background-color: #f9fafb;
    color: #111827;
}

.dropdown-item-m.active {
    background-color: #fff5f5;
    color: #ff6b6b;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }

    .content {
        padding: 40px 60px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        display: none;
    }

    .mobile-dropdown {
        display: block;
    }

    .content {
        padding: 40px 24px;
    }

    h1 {
        font-size: 32px;
    }
}